當前位置: 首頁>>代碼示例>>Java>>正文


Java ImplicitModeElement類代碼示例

本文整理匯總了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);
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:18,代碼來源:ModeReference.java

示例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);
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:18,代碼來源:ModeReference.java

示例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);
}
 
開發者ID:consulo,項目名稱:consulo-xslt,代碼行數:16,代碼來源:ModeReference.java

示例4: transform

import org.intellij.lang.xpath.xslt.psi.impl.ImplicitModeElement; //導入依賴的package包/類
protected PsiElement transform(XmlTag element) {
  return new ImplicitModeElement(element.getAttribute("mode", null));
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:4,代碼來源:ModeReference.java

示例5: transform

import org.intellij.lang.xpath.xslt.psi.impl.ImplicitModeElement; //導入依賴的package包/類
protected PsiElement transform(XmlTag element) {
    return new ImplicitModeElement(element.getAttribute("mode", null));
}
 
開發者ID:consulo,項目名稱:consulo-xslt,代碼行數:4,代碼來源:ModeReference.java


注:本文中的org.intellij.lang.xpath.xslt.psi.impl.ImplicitModeElement類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。