Go to Class and Go to Symbol
A custom language plugin can provide its items to be included in the lists shown when the user chooses the or action.
Provide implementations of 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 must return a complete list of names to show in the list for a specified project, which the IDE will then filter 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 item is selected from the list.
Example: