PsiClass () { final PsiElement xmlAttribute = myXmlAttributeValue.getParent(); final XmlTag xmlTag = ((XmlAttribute)xmlAttribute).getParent(); if (xmlTag == null) return null; final PsiElement parentTag = xmlTag.getParent(); if (parentTag == null) return null; String className = null; if (parentTag instanceof XmlDocument) { className = JavaFxCommonNames.JAVAFX_SCENE_LAYOUT_PANE; } else if (parentTag.getParent() instanceof XmlDocument) { final String name = xmlTag.getName(); if (!FxmlConstants.FX_BUILT_IN_TAGS.contains(name)) { className = JavaFxCommonNames.JAVAFX_SCENE_NODE; } } if (className == null) return null; return JavaPsiFacade.getInstance(myAClass.getProject()).findClass(className, GlobalSearchScope.allScope(myAClass.getProject())); }