AbstractFindUsagesDialog (boolean isSingleFile, boolean toShowInNewTab, boolean mustOpenInNewTab) { PsiElement element = getPsiElement(); if (element instanceof PsiPackage) { return new FindPackageUsagesDialog(element, getProject(), myFactory.getFindPackageOptions(), toShowInNewTab, mustOpenInNewTab, isSingleFile, this); } if (element instanceof PsiClass) { return new FindClassUsagesDialog(element, getProject(), myFactory.getFindClassOptions(), toShowInNewTab, mustOpenInNewTab, isSingleFile, this); } if (element instanceof PsiMethod) { return new FindMethodUsagesDialog(element, getProject(), myFactory.getFindMethodOptions(), toShowInNewTab, mustOpenInNewTab, isSingleFile, this); } if (element instanceof PsiVariable) { return new FindVariableUsagesDialog(element, getProject(), myFactory.getFindVariableOptions(), toShowInNewTab, mustOpenInNewTab, isSingleFile, this); } if (ThrowSearchUtil.isSearchable(element)) { return new FindThrowUsagesDialog(element, getProject(), myFactory.getFindThrowOptions(), toShowInNewTab, mustOpenInNewTab, isSingleFile, this); } return super.getFindUsagesDialog(isSingleFile, toShowInNewTab, mustOpenInNewTab); }