@Override public void contributeMetaData(MetaDataRegistrar registrar) { registrar.registerMetaData(new ElementFilter() { @Override public boolean isAcceptable(Object element, PsiElement context) { if (element instanceof XmlTag) { final XmlTag tag = (XmlTag)element; final DomElement domElement = DomManager.getDomManager(tag.getProject()).getDomElement(tag); if (domElement != null) { return domElement.getGenericInfo().getNameDomElement(domElement) != null; } } return false; } @Override public boolean isClassAcceptable(Class hintClass) { return XmlTag.class.isAssignableFrom(hintClass); } }, DomMetaData.class); }
@Override public void contributeMetaData(MetaDataRegistrar registrar) { registrar.registerMetaData(new ElementFilter() { public boolean isAcceptable(Object element, PsiElement context) { if (element instanceof XmlTag) { final XmlTag tag = (XmlTag)element; final DomElement domElement = DomManager.getDomManager(tag.getProject()).getDomElement(tag); if (domElement != null) { return domElement.getGenericInfo().getNameDomElement(domElement) != null; } } return false; } public boolean isClassAcceptable(Class hintClass) { return XmlTag.class.isAssignableFrom(hintClass); } }, DomMetaData.class); }
@Override public void contributeMetaData(MetaDataRegistrar registrar) { registrar.registerMetaData(new ElementFilter() { @Override public boolean isAcceptable(Object element, PsiElement context) { if(element instanceof XmlTag) { final XmlTag tag = (XmlTag) element; final DomElement domElement = DomManager.getDomManager(tag.getProject()).getDomElement(tag); if(domElement != null) { return domElement.getGenericInfo().getNameDomElement(domElement) != null; } } return false; } @Override public boolean isClassAcceptable(Class hintClass) { return XmlTag.class.isAssignableFrom(hintClass); } }, DomMetaData.class); }