@Override
    public boolean processElementUsages(PsiElement elementToSearch,
                                        Processor<? super UsageInfo> processor,
                                        FindUsagesOptions options) {
        if (options.isUsages) {
            if (elementToSearch instanceof SdFunctionDefinition) {
                new FunctionUsageFinder((SdFunctionDefinition) elementToSearch, options.searchScope, processor).findUsages();
            }
            else if (elementToSearch instanceof SdRankProfileDefinition) {
                new RankProfileUsageFinder((SdRankProfileDefinition) elementToSearch, options.searchScope, processor).findUsages();
            }
            else { // try find definitions
                boolean suitable = new RankProfileDefinitionFinder(elementToSearch, options.searchScope, processor).findDefinition();
                if ( ! suitable)
                    new FunctionDefinitionFinder(elementToSearch, options.searchScope, processor).findDefinition();
            }
        }

        if (options.isSearchForTextOccurrences && options.searchScope instanceof GlobalSearchScope) {
            if (options.fastTrack != null)
                options.fastTrack.searchCustom(consumer -> processUsagesInText(elementToSearch,
                                                                               processor,
                                                                               (GlobalSearchScope)options.searchScope));
            else
                return processUsagesInText(elementToSearch, processor, (GlobalSearchScope)options.searchScope);
        }

        return true;
    }
This class handles creating the "Find Usages" window.

@author Shahar Ariel
@author bratseth
integration/intellij/src/main/java/ai/vespa/intellij/schema/findUsages/SdFindUsagesHandler.java