本文整理匯總了Java中com.intellij.util.xml.DomMetaData類的典型用法代碼示例。如果您正苦於以下問題:Java DomMetaData類的具體用法?Java DomMetaData怎麽用?Java DomMetaData使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
DomMetaData類屬於com.intellij.util.xml包,在下文中一共展示了DomMetaData類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: contributeMetaData
import com.intellij.util.xml.DomMetaData; //導入依賴的package包/類
@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);
}
示例2: contributeMetaData
import com.intellij.util.xml.DomMetaData; //導入依賴的package包/類
@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);
}
示例3: contributeMetaData
import com.intellij.util.xml.DomMetaData; //導入依賴的package包/類
@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);
}