boolean (@NotNull Project project, Editor editor, @NotNull PsiElement element) { if (element instanceof XmlToken && ((XmlToken)element).getTokenType() == XmlTokenType.XML_NAME && element.getParent() instanceof XmlTag tag) { for (XmlTag xmlTag : tag.getSubTags()) { if (xmlTag.getAttribute(FxmlConstants.FX_VALUE) == null) return false; } final XmlTag parentTag = tag.getParentTag(); if (parentTag != null && tag.getDescriptor() instanceof JavaFxPropertyTagDescriptor && parentTag.getDescriptor() instanceof JavaFxClassTagDescriptorBase) { setText(JavaFXBundle.message("javafx.collapse.subtag.to.attribute.intention",tag.getName())); return true; } } return false; }