UsageVariantHandler (@NotNull Project project, @Nullable Editor editor, @NotNull RelativePoint popupPosition, @NotNull SearchScope searchScope) { return new UsageVariantHandler() { @Override public void handleTarget(@NotNull SearchTarget target) { ShowTargetUsagesActionHandler.showUsages( project, searchScope, target, ShowUsagesParameters.initial(project, editor, popupPosition) ); } @Override public void handlePsi(@NotNull PsiElement element) { startFindUsages(element, popupPosition, editor); } }; }