Search in sources :

Example 1 with XMLSearchPattern

use of org.eclipse.wst.xml.core.internal.search.XMLSearchPattern in project webtools.sourceediting by eclipse.

the class XSDSearchContributor method initializeReferences.

protected void initializeReferences() {
    references = new HashMap();
    String ns = IXSDSearchConstants.XMLSCHEMA_NAMESPACE;
    List patterns = new ArrayList();
    patterns.add(new XMLSearchPattern(ns, XSDConstants.ELEMENT_ELEMENT_TAG, XSDConstants.REF_ATTRIBUTE));
    patterns.add(new XMLSearchPattern(ns, XSDConstants.ELEMENT_ELEMENT_TAG, XSDConstants.SUBSTITUTIONGROUP_ATTRIBUTE));
    references.put(IXSDSearchConstants.ELEMENT_META_NAME, patterns);
    patterns = new ArrayList();
    patterns.add(new XMLSearchPattern(ns, XSDConstants.RESTRICTION_ELEMENT_TAG, XSDConstants.BASE_ATTRIBUTE));
    patterns.add(new XMLSearchPattern(ns, XSDConstants.EXTENSION_ELEMENT_TAG, XSDConstants.BASE_ATTRIBUTE));
    patterns.add(new XMLSearchPattern(ns, XSDConstants.ELEMENT_ELEMENT_TAG, XSDConstants.TYPE_ATTRIBUTE));
    references.put(IXSDSearchConstants.COMPLEX_TYPE_META_NAME, patterns);
    patterns = new ArrayList();
    patterns.add(new XMLSearchPattern(ns, XSDConstants.RESTRICTION_ELEMENT_TAG, XSDConstants.BASE_ATTRIBUTE));
    patterns.add(new XMLSearchPattern(ns, XSDConstants.ELEMENT_ELEMENT_TAG, XSDConstants.TYPE_ATTRIBUTE));
    patterns.add(new XMLSearchPattern(ns, XSDConstants.ATTRIBUTE_ELEMENT_TAG, XSDConstants.TYPE_ATTRIBUTE));
    patterns.add(new XMLSearchPattern(ns, XSDConstants.UNION_ELEMENT_TAG, XSDConstants.MEMBERTYPES_ATTRIBUTE));
    patterns.add(new XMLSearchPattern(ns, XSDConstants.LIST_ELEMENT_TAG, XSDConstants.ITEMTYPE_ATTRIBUTE));
    references.put(IXSDSearchConstants.SIMPLE_TYPE_META_NAME, patterns);
    patterns = new ArrayList();
    patterns.add(new XMLSearchPattern(ns, XSDConstants.GROUP_ELEMENT_TAG, XSDConstants.REF_ATTRIBUTE));
    references.put(IXSDSearchConstants.GROUP_META_NAME, patterns);
    patterns = new ArrayList();
    patterns.add(new XMLSearchPattern(ns, XSDConstants.ATTRIBUTEGROUP_ELEMENT_TAG, XSDConstants.REF_ATTRIBUTE));
    references.put(IXSDSearchConstants.ATTRIBUTE_GROUP_META_NAME, patterns);
    patterns = new ArrayList();
    patterns.add(new XMLSearchPattern(ns, XSDConstants.ATTRIBUTE_ELEMENT_TAG, XSDConstants.REF_ATTRIBUTE));
    references.put(IXSDSearchConstants.ATTRIBUTE_META_NAME, patterns);
}
Also used : HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) List(java.util.List) ArrayList(java.util.ArrayList) XMLSearchPattern(org.eclipse.wst.xml.core.internal.search.XMLSearchPattern)

Example 2 with XMLSearchPattern

use of org.eclipse.wst.xml.core.internal.search.XMLSearchPattern in project webtools.sourceediting by eclipse.

the class XSDSearchContributor method initializeDeclarations.

protected void initializeDeclarations() {
    declarations = new HashMap();
    String ns = IXSDSearchConstants.XMLSCHEMA_NAMESPACE;
    SearchPattern pattern = new XMLSearchPattern(ns, XSDConstants.SCHEMA_ELEMENT_TAG, XSDConstants.ELEMENT_ELEMENT_TAG, XSDConstants.NAME_ATTRIBUTE);
    declarations.put(IXSDSearchConstants.ELEMENT_META_NAME, pattern);
    pattern = new XMLSearchPattern(ns, XSDConstants.COMPLEXTYPE_ELEMENT_TAG, XSDConstants.NAME_ATTRIBUTE);
    declarations.put(IXSDSearchConstants.COMPLEX_TYPE_META_NAME, pattern);
    pattern = new XMLSearchPattern(ns, XSDConstants.SIMPLETYPE_ELEMENT_TAG, XSDConstants.NAME_ATTRIBUTE);
    declarations.put(IXSDSearchConstants.SIMPLE_TYPE_META_NAME, pattern);
    pattern = new XMLSearchPattern(ns, XSDConstants.ATTRIBUTE_ELEMENT_TAG, XSDConstants.NAME_ATTRIBUTE);
    declarations.put(IXSDSearchConstants.ATTRIBUTE_META_NAME, pattern);
    pattern = new XMLSearchPattern(ns, XSDConstants.ATTRIBUTEGROUP_ELEMENT_TAG, XSDConstants.NAME_ATTRIBUTE);
    declarations.put(IXSDSearchConstants.ATTRIBUTE_GROUP_META_NAME, pattern);
    pattern = new XMLSearchPattern(ns, XSDConstants.GROUP_ELEMENT_TAG, XSDConstants.NAME_ATTRIBUTE);
    declarations.put(IXSDSearchConstants.GROUP_META_NAME, pattern);
}
Also used : HashMap(java.util.HashMap) XMLSearchPattern(org.eclipse.wst.xml.core.internal.search.XMLSearchPattern) SearchPattern(org.eclipse.wst.common.core.search.pattern.SearchPattern) XMLSearchPattern(org.eclipse.wst.xml.core.internal.search.XMLSearchPattern)

Aggregations

HashMap (java.util.HashMap)2 XMLSearchPattern (org.eclipse.wst.xml.core.internal.search.XMLSearchPattern)2 ArrayList (java.util.ArrayList)1 List (java.util.List)1 SearchPattern (org.eclipse.wst.common.core.search.pattern.SearchPattern)1