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 ChooseByNameContributorEx
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 ChooseByNameContributorEx
implementation must provide the following methods:
processNames(@NotNull Processor<? super String> processor, @NotNull GlobalSearchScope scope, @Nullable IdFilter filter)
Feeds the processor with a complete list of names available in a specified scope, which the IDE will then filter according to the text typed by the user in the dialog. Using Indexing and PSI Stubs to obtain matching candidates is highly recommended to improve performance.
processElementsWithName(String name, Processor<? super NavigationItem> processor, FindSymbolParameters parameters)
Feeds the processor with a list of
NavigationItem
instances (typicallyPsiElement
) matching the given name and parameters. ProcessedNavigationItem
s specify the destinations to jump to when a specific item is selected from the list.
Example: