SearchScope (final PsiSearchHelper helper, final PsiElement element) { SearchScope scope = helper.getUseScope(element); if (scope instanceof GlobalSearchScope) { scope = GlobalSearchScope.getScopeRestrictedByFileTypes((GlobalSearchScope)scope, JavaFileType.INSTANCE, StdFileTypes.JSP, StdFileTypes.JSPX); } return scope; }