@Override @Nullable public PsiElement getDeclaration(final Project project) { DomElement domDeclaration = getDomDeclaration(); if (domDeclaration != null) { final DomTarget target = DomTarget.getTarget(domDeclaration); if (target != null) { return PomService.convertToPsi(target); } return domDeclaration.getXmlElement(); } final DomAnchor anchor = getUserData(DomExtensionImpl.KEY_DOM_DECLARATION); if (anchor != null) { return anchor.getContainingFile(); } final SmartPsiElementPointer<?> pointer = getUserData(DomExtensionImpl.DECLARING_ELEMENT_KEY); if (pointer != null) { final PsiElement element = pointer.getElement(); if (element != null) { return element; } } return PomService.convertToPsi(project, this); }
@Nullable public PsiElement getDeclaration(final Project project) { DomElement domDeclaration = getDomDeclaration(); if (domDeclaration != null) { final DomTarget target = DomTarget.getTarget(domDeclaration); if (target != null) { return PomService.convertToPsi(target); } return domDeclaration.getXmlElement(); } final DomAnchor anchor = getUserData(DomExtensionImpl.KEY_DOM_DECLARATION); if (anchor != null) { return anchor.getContainingFile(); } final SmartPsiElementPointer<?> pointer = getUserData(DomExtensionImpl.DECLARING_ELEMENT_KEY); if (pointer != null) { final PsiElement element = pointer.getElement(); if (element != null) { return element; } } return PomService.convertToPsi(project, this); }
@Override public DomElement getDomDeclaration() { final DomAnchor anchor = getUserData(DomExtensionImpl.KEY_DOM_DECLARATION); if (anchor != null) { return anchor.retrieveDomElement(); } return null; }
public CustomDomChildrenDescriptionImpl(DomExtensionImpl custom) { this(null, custom.getType(), custom.getTagNameDescriptor(), custom.getAttributesDescriptor()); }