PsiElement () { PsiElement res = super.getNavigationElement(); if (res != this || myNavigationClass == null) return res; PsiClass aClass = JavaPsiFacade.getInstance(getProject()).findClass(myNavigationClass, getResolveScope()); if (aClass == null) return res; PsiMethod[] methods = aClass.findMethodsByName("newInstance", false); if (methods.length != 1) return aClass; return methods[0]; }