Java 类com.intellij.psi.filters.position.TargetNamespaceFilter 实例源码

项目:consulo-xml    文件:XmlApplicationComponent.java   
@Override
public void contributeMetaData(final MetaDataRegistrar registrar)
{
    {
        registrar.registerMetaData(new AndFilter(new NamespaceFilter(XmlUtil.SCHEMA_URIS), new ClassFilter(XmlDocument.class)), SchemaNSDescriptor.class);

        registrar.registerMetaData(new AndFilter(XmlTagFilter.INSTANCE, new NamespaceFilter(XmlUtil.SCHEMA_URIS), new XmlTextFilter("schema")), SchemaNSDescriptor.class);
    }
    {
        registrar.registerMetaData(new OrFilter(new AndFilter(new ContentFilter(new OrFilter(new ClassFilter(XmlElementDecl.class), new ClassFilter(XmlEntityDecl.class), new ClassFilter
                (XmlConditionalSection.class), new ClassFilter(XmlEntityRef.class))), new ClassFilter(XmlDocument.class)), new ClassFilter(XmlMarkupDecl.class)), XmlNSDescriptorImpl.class);
    }

    {
        registrar.registerMetaData(new AndFilter(XmlTagFilter.INSTANCE, new NamespaceFilter(XmlUtil.SCHEMA_URIS), new XmlTextFilter("element")), XmlElementDescriptorImpl.class);
    }

    {
        registrar.registerMetaData(new AndFilter(XmlTagFilter.INSTANCE, new NamespaceFilter(XmlUtil.SCHEMA_URIS), new XmlTextFilter("attribute")), XmlAttributeDescriptorImpl.class);
    }

    {
        registrar.registerMetaData(new ClassFilter(XmlElementDecl.class), com.intellij.xml.impl.dtd.XmlElementDescriptorImpl.class);
    }

    {
        registrar.registerMetaData(new ClassFilter(XmlAttributeDecl.class), com.intellij.xml.impl.dtd.XmlAttributeDescriptorImpl.class);
    }

    {
        registrar.registerMetaData(new AndFilter(new ClassFilter(XmlDocument.class), new TargetNamespaceFilter(XmlUtil.XHTML_URI), new NamespaceFilter(XmlUtil.SCHEMA_URIS)),
                RelaxedHtmlFromSchemaNSDescriptor.class);
    }

    {
        registrar.registerMetaData(new AndFilter(XmlTagFilter.INSTANCE, new NamespaceFilter(XmlUtil.SCHEMA_URIS), new XmlTextFilter("complexType", "simpleType", "group", "attributeGroup")),
                NamedObjectDescriptor.class);
    }
}
项目:intellij-ce-playground    文件:XmlApplicationComponent.java   
@Override
public void contributeMetaData(final MetaDataRegistrar registrar) {
  {
    registrar.registerMetaData(
        new AndFilter(
            new NamespaceFilter(XmlUtil.SCHEMA_URIS),
            new ClassFilter(XmlDocument.class)
        ),
        SchemaNSDescriptor.class
    );

    registrar.registerMetaData(
        new AndFilter(XmlTagFilter.INSTANCE, new NamespaceFilter(XmlUtil.SCHEMA_URIS), new XmlTextFilter("schema")),
        SchemaNSDescriptor.class
    );
  }
  {
    registrar.registerMetaData(
        new OrFilter(
            new AndFilter(
                new ContentFilter(
                  new OrFilter(
                    new ClassFilter(XmlElementDecl.class),
                    new ClassFilter(XmlEntityDecl.class),
                    new ClassFilter(XmlConditionalSection.class),
                    new ClassFilter(XmlEntityRef.class)
                  )
                ),
                new ClassFilter(XmlDocument.class)
            ),
            new ClassFilter(XmlMarkupDecl.class)
        ),
        XmlNSDescriptorImpl.class
    );
  }

  {
    registrar.registerMetaData(new AndFilter(XmlTagFilter.INSTANCE, new NamespaceFilter(XmlUtil.SCHEMA_URIS), new XmlTextFilter("element")),
                       XmlElementDescriptorImpl.class);
  }

  {
    registrar.registerMetaData(
        new AndFilter(XmlTagFilter.INSTANCE, new NamespaceFilter(XmlUtil.SCHEMA_URIS), new XmlTextFilter("attribute")),
        XmlAttributeDescriptorImpl.class
    );
  }

  {
    registrar.registerMetaData(
        new ClassFilter(XmlElementDecl.class),
        com.intellij.xml.impl.dtd.XmlElementDescriptorImpl.class
    );
  }

  {
    registrar.registerMetaData(
        new ClassFilter(XmlAttributeDecl.class),
        com.intellij.xml.impl.dtd.XmlAttributeDescriptorImpl.class
    );
  }

  {
    registrar.registerMetaData(
        new AndFilter(
            new ClassFilter(XmlDocument.class),
            new TargetNamespaceFilter(XmlUtil.XHTML_URI),
            new NamespaceFilter(XmlUtil.SCHEMA_URIS)),
        RelaxedHtmlFromSchemaNSDescriptor.class
    );
  }

  {
    registrar.registerMetaData(new AndFilter(XmlTagFilter.INSTANCE, new NamespaceFilter(XmlUtil.SCHEMA_URIS), new XmlTextFilter("complexType",
                                                                                                                                "simpleType", "group",
                                                                                                                                "attributeGroup")),
                       NamedObjectDescriptor.class);
  }
}
项目:tools-idea    文件:XmlApplicationComponent.java   
public void contributeMetaData(final MetaDataRegistrar registrar) {
  {
    registrar.registerMetaData(
        new AndFilter(
            new NamespaceFilter(XmlUtil.SCHEMA_URIS),
            new ClassFilter(XmlDocument.class)
        ),
        SchemaNSDescriptor.class
    );

    registrar.registerMetaData(
        new AndFilter(XmlTagFilter.INSTANCE, new NamespaceFilter(XmlUtil.SCHEMA_URIS), new XmlTextFilter("schema")),
        SchemaNSDescriptor.class
    );
  }
  {
    registrar.registerMetaData(
        new OrFilter(
            new AndFilter(
                new ContentFilter(
                  new OrFilter(
                    new ClassFilter(XmlElementDecl.class),
                    new ClassFilter(XmlEntityDecl.class),
                    new ClassFilter(XmlConditionalSection.class),
                    new ClassFilter(XmlEntityRef.class)
                  )
                ),
                new ClassFilter(XmlDocument.class)
            ),
            new ClassFilter(XmlMarkupDecl.class)
        ),
        XmlNSDescriptorImpl.class
    );
  }

  {
    registrar.registerMetaData(new AndFilter(XmlTagFilter.INSTANCE, new NamespaceFilter(XmlUtil.SCHEMA_URIS), new XmlTextFilter("element")),
                       XmlElementDescriptorImpl.class);
  }

  {
    registrar.registerMetaData(
        new AndFilter(XmlTagFilter.INSTANCE, new NamespaceFilter(XmlUtil.SCHEMA_URIS), new XmlTextFilter("attribute")),
        XmlAttributeDescriptorImpl.class
    );
  }

  {
    registrar.registerMetaData(
        new ClassFilter(XmlElementDecl.class),
        com.intellij.xml.impl.dtd.XmlElementDescriptorImpl.class
    );
  }

  {
    registrar.registerMetaData(
        new ClassFilter(XmlAttributeDecl.class),
        com.intellij.xml.impl.dtd.XmlAttributeDescriptorImpl.class
    );
  }

  {
    registrar.registerMetaData(
        new AndFilter(
            new ClassFilter(XmlDocument.class),
            new TargetNamespaceFilter(XmlUtil.XHTML_URI),
            new NamespaceFilter(XmlUtil.SCHEMA_URIS)),
        RelaxedHtmlFromSchemaNSDescriptor.class
    );
  }

  {
    registrar.registerMetaData(new AndFilter(XmlTagFilter.INSTANCE, new NamespaceFilter(XmlUtil.SCHEMA_URIS), new XmlTextFilter("complexType",
                                                                                                                                "simpleType", "group",
                                                                                                                                "attributeGroup")),
                       NamedObjectDescriptor.class);
  }
}