public CommonFindUsagesDialog(@NotNull PsiElement element, @NotNull Project project, @NotNull FindUsagesOptions findUsagesOptions, boolean toShowInNewTab, boolean mustOpenInNewTab, boolean isSingleFile, @NotNull FindUsagesHandler handler) { super(project, findUsagesOptions, toShowInNewTab, mustOpenInNewTab, isSingleFile, isTextSearch(element, isSingleFile, handler), !isSingleFile && !element.getManager().isInProject(element)); myPsiElement = element; myHelpId = ObjectUtils.chooseNotNull(handler.getHelpId(), HelpID.FIND_OTHER_USAGES); init(); }
@Override public String getHelpId(PsiElement psiElement) { if (psiElement instanceof FunctionStatement) { return "reference.dialogs.findUsages.method"; } if (psiElement instanceof TargetExpression || psiElement instanceof Parameter || psiElement instanceof ReferenceExpression) { return "reference.dialogs.findUsages.variable"; } // typically build rules and imported Skylark functions, but also all other function calls return HelpID.FIND_OTHER_USAGES; }
@Nullable @Override public String getHelpId(@NotNull PsiElement psiElement) { return HelpID.FIND_OTHER_USAGES; }
@Nullable @Override public String getHelpId( @NotNull PsiElement psiElement ) { return HelpID.FIND_OTHER_USAGES; }
@Nullable @Override public String getHelpId(@NotNull final PsiElement psiElement) { return HelpID.FIND_OTHER_USAGES; }
@Nullable @Override public String getHelpId(PsiElement psiElement) { return HelpID.FIND_OTHER_USAGES; }