private static @NotNull UsageVariantHandler createVariantHandler(@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);
      }
    };
  }
private static @NotNull UsageVariantHandler createVariantHandler(@NotNull Project project,
                                                                   @Nullable Editor editor,
                                                                   @NotNull RelativePoint popupPosition,
                                                                   @NotNull SearchScope searchScope)