IntelliJ Platform Plugin SDK Help

Go to Class and Go to Symbol

A custom language plugin can provide its own items to be included in the lists shown when the user chooses the Navigate | Class or Navigate | Symbol action. In order to do so, the plugin must provide implementations for the ChooseByNameContributor interface (separate implementations need to be provided for Class and Symbol respectively), and register them in the com.intellij.gotoClassContributor and com.intellij.gotoSymbolContributor extension points.

Each contributor needs to be able to return a complete list of names to show in the list for a specified project, which will then be filtered by the IDE according to the text typed by the user in the dialog. Using File-based or Stub indices to obtain matching candidates is highly recommended to improve performance.

For each name in that list, the contributor needs to provide a list of NavigationItem instances (typically PsiElement), which specify the destinations to jump to when a specific name is selected from the list.


Last modified: 14 January 2021