本文整理匯總了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));
}