本文整理汇总了Java中org.intellij.lang.xpath.xslt.psi.impl.ImplicitModeElement类的典型用法代码示例。如果您正苦于以下问题:Java ImplicitModeElement类的具体用法?Java ImplicitModeElement怎么用?Java ImplicitModeElement使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ImplicitModeElement类属于org.intellij.lang.xpath.xslt.psi.impl包,在下文中一共展示了ImplicitModeElement类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: ModeReference
import org.intellij.lang.xpath.xslt.psi.impl.ImplicitModeElement; //导入依赖的package包/类
public ModeReference(XmlAttribute attribute, boolean isDeclaration) {
super(attribute);
if (isDeclaration) {
myIsDeclaration = true;
}
else {
final PsiFile file = attribute.getContainingFile();
if (file != null && XsltSupport.getXsltLanguageLevel(file) == XsltChecker.LanguageLevel.V2) {
final String value = attribute.getValue();
myIsDeclaration = "#current".equals(value) || "#default".equals(value);
}
else {
myIsDeclaration = false;
}
}
myImplicitModeElement = new ImplicitModeElement(attribute);
}
示例2: getPrefixCompletions
import org.intellij.lang.xpath.xslt.psi.impl.ImplicitModeElement; //导入依赖的package包/类
static Object[] getPrefixCompletions(XmlAttribute attribute) {
final ModeReference.MyModeMatcher matcher = new ModeReference.MyModeMatcher(attribute, QNameUtil.ANY);
final PsiElement[] modes = ResolveUtil.collect(matcher);
final Collection<String> prefixes = XsltNamespaceContext.getPrefixes(attribute);
final Set<NamespaceLookup> lookups = new HashSet<NamespaceLookup>(prefixes.size());
for (PsiElement mode : modes) {
final QName qName = ((ImplicitModeElement)mode).getQName();
if (qName == null) continue;
final String prefix = qName.getPrefix();
if (!prefixes.contains(prefix)) continue;
lookups.add(new NamespaceLookup(prefix));
}
return ArrayUtil.toObjectArray(lookups);
}
示例3: ModeReference
import org.intellij.lang.xpath.xslt.psi.impl.ImplicitModeElement; //导入依赖的package包/类
public ModeReference(XmlAttribute attribute, boolean isDeclaration) {
super(attribute);
if (isDeclaration) {
myIsDeclaration = true;
} else {
final PsiFile file = attribute.getContainingFile();
if (file != null && XsltSupport.getXsltLanguageLevel(file) == XsltChecker.LanguageLevel.V2) {
final String value = attribute.getValue();
myIsDeclaration = "#current".equals(value) || "#default".equals(value);
} else {
myIsDeclaration = false;
}
}
myImplicitModeElement = new ImplicitModeElement(attribute);
}
示例4: transform
import org.intellij.lang.xpath.xslt.psi.impl.ImplicitModeElement; //导入依赖的package包/类
protected PsiElement transform(XmlTag element) {
return new ImplicitModeElement(element.getAttribute("mode", null));
}
示例5: transform
import org.intellij.lang.xpath.xslt.psi.impl.ImplicitModeElement; //导入依赖的package包/类
protected PsiElement transform(XmlTag element) {
return new ImplicitModeElement(element.getAttribute("mode", null));
}