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


Java XsltReferenceProvider類代碼示例

本文整理匯總了Java中org.intellij.lang.xpath.xslt.impl.references.XsltReferenceProvider的典型用法代碼示例。如果您正苦於以下問題:Java XsltReferenceProvider類的具體用法?Java XsltReferenceProvider怎麽用?Java XsltReferenceProvider使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


XsltReferenceProvider類屬於org.intellij.lang.xpath.xslt.impl.references包,在下文中一共展示了XsltReferenceProvider類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: registerReferenceProviders

import org.intellij.lang.xpath.xslt.impl.references.XsltReferenceProvider; //導入依賴的package包/類
public void registerReferenceProviders(@NotNull PsiReferenceRegistrar registrar) {
  final XmlTagPattern xsltTag = xmlTag().withNamespace(XsltSupport.XSLT_NS);
  registrar.registerReferenceProvider(
    xmlAttributeValue("name", "href", "mode", "elements", "exclude-result-prefixes", "extension-element-prefixes", "stylesheet-prefix")
      .withSuperParent(2, xsltTag),
    new XsltReferenceProvider());

  registrar.registerReferenceProvider(
    xmlAttributeValue("as")
      .withValue(string().matches("[^()]+"))
      .withSuperParent(2, xsltTag), SchemaTypeProvider.INSTANCE);

  registrar.registerReferenceProvider(
    xmlAttributeValue("as")
      .withSuperParent(2, xsltTag)
      .withValue(string().contains(":")), new PsiReferenceProvider() {
    @NotNull
    @Override
    public PsiReference[] getReferencesByElement(@NotNull PsiElement element, @NotNull ProcessingContext context) {
      return new PsiReference[]{ new NamespacePrefixReference(element) };
    }
  });
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:24,代碼來源:XsltReferenceContributor.java

示例2: registerReferenceProviders

import org.intellij.lang.xpath.xslt.impl.references.XsltReferenceProvider; //導入依賴的package包/類
public void registerReferenceProviders(PsiReferenceRegistrar registrar) {
  registrar.registerReferenceProvider(
    psiElement(XmlAttributeValue.class).withParent(
      xmlAttribute().withLocalName("name", "href", "mode", "elements", "exclude-result-prefixes", "extension-element-prefixes", "stylesheet-prefix").withParent(
        xmlTag().withNamespace(XsltSupport.XSLT_NS))),
    new XsltReferenceProvider());

  registrar.registerReferenceProvider(
    xmlAttributeValue()
      .withValue(string().matches("[^()]+"))
      .withParent(xmlAttribute("as").withParent(xmlTag().withNamespace(XsltSupport.XSLT_NS))), SchemaTypeProvider.INSTANCE);

  registrar.registerReferenceProvider(
    xmlAttributeValue()
      .withParent(xmlAttribute("as").withParent(xmlTag().withNamespace(XsltSupport.XSLT_NS)))
      .withValue(string().contains(":")), new PsiReferenceProvider() {
    @NotNull
    @Override
    public PsiReference[] getReferencesByElement(@NotNull PsiElement element, @NotNull ProcessingContext context) {
      return new PsiReference[]{ new NamespacePrefixReference(element) };
    }
  });
}
 
開發者ID:lshain-android-source,項目名稱:tools-idea,代碼行數:24,代碼來源:XsltReferenceContributor.java

示例3: registerReferenceProviders

import org.intellij.lang.xpath.xslt.impl.references.XsltReferenceProvider; //導入依賴的package包/類
public void registerReferenceProviders(PsiReferenceRegistrar registrar)
{
	registrar.registerReferenceProvider(psiElement(XmlAttributeValue.class).withParent(xmlAttribute().withLocalName("name", "href", "mode", "elements", "exclude-result-prefixes",
			"extension-element-prefixes", "stylesheet-prefix").withParent(xmlTag().withNamespace(XsltSupport.XSLT_NS))), new XsltReferenceProvider());

	registrar.registerReferenceProvider(xmlAttributeValue().withValue(string().matches("[^()]+")).withParent(xmlAttribute("as").withParent(xmlTag().withNamespace(XsltSupport.XSLT_NS))),
			SchemaTypeProvider.INSTANCE);

	registrar.registerReferenceProvider(xmlAttributeValue().withParent(xmlAttribute("as").withParent(xmlTag().withNamespace(XsltSupport.XSLT_NS))).withValue(string().contains(":")),
			new PsiReferenceProvider()
	{
		@NotNull
		@Override
		public PsiReference[] getReferencesByElement(@NotNull PsiElement element, @NotNull ProcessingContext context)
		{
			return new PsiReference[]{new NamespacePrefixReference(element)};
		}
	});
}
 
開發者ID:consulo,項目名稱:consulo-xslt,代碼行數:20,代碼來源:XsltReferenceContributor.java


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