Search in sources :

Example 1 with CMAnyElementImpl

use of org.eclipse.wst.xml.core.internal.contentmodel.basic.CMAnyElementImpl in project webtools.sourceediting by eclipse.

the class InferredGrammarFactory method lookupOrCreateCMAnyElement.

protected CMAnyElement lookupOrCreateCMAnyElement(CMDocumentImpl parentCMDocument, String uri) {
    CMNamedNodeMapImpl anyElementMap = parentCMDocument.getAnyElements();
    CMAnyElementImpl anyElement = (CMAnyElementImpl) anyElementMap.getNamedItem(CMAnyElementImpl.computeNodeName(uri));
    if (anyElement == null) {
        // System.out.println("create anyElement " + uri);
        anyElement = new CMAnyElementImpl(uri);
        anyElement.setInferred(true);
        anyElementMap.put(anyElement);
    }
    return anyElement;
}
Also used : CMNamedNodeMapImpl(org.eclipse.wst.xml.core.internal.contentmodel.basic.CMNamedNodeMapImpl) CMAnyElementImpl(org.eclipse.wst.xml.core.internal.contentmodel.basic.CMAnyElementImpl)

Aggregations

CMAnyElementImpl (org.eclipse.wst.xml.core.internal.contentmodel.basic.CMAnyElementImpl)1 CMNamedNodeMapImpl (org.eclipse.wst.xml.core.internal.contentmodel.basic.CMNamedNodeMapImpl)1