void (@NotNull FindUsagesOptions findUsagesOptions, @NotNull FindUsagesHandler handler, PsiFile scopeFile, FileEditor fileEditor) { ThreadingAssertions.assertEventDispatchThread(); boolean singleFile = scopeFile != null; clearFindingNextUsageInFile(); LOG.assertTrue(handler.getPsiElement().isValid()); PsiElement[] primaryElements = handler.getPrimaryElements(); checkNotNull(primaryElements, handler, "getPrimaryElements()"); PsiElement[] secondaryElements = handler.getSecondaryElements(); checkNotNull(secondaryElements, handler, "getSecondaryElements()"); if (singleFile && fileEditor instanceof TextEditor) { Editor editor = ((TextEditor)fileEditor).getEditor(); editor.putUserData(KEY_START_USAGE_AGAIN, null); findUsagesInEditor(primaryElements, secondaryElements, handler, scopeFile, FileSearchScope.FROM_START, findUsagesOptions.clone(), editor); } else { boolean skipResultsWithOneUsage = FindSettings.getInstance().isSkipResultsWithOneUsage(); findUsages(primaryElements, secondaryElements, handler, findUsagesOptions, skipResultsWithOneUsage); } }