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