Search in sources :

Example 76 with CMElementDeclaration

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

the class AbstractContentAssistProcessor method addAttributeNameProposals.

protected void addAttributeNameProposals(ContentAssistRequest contentAssistRequest) {
    IDOMNode node = (IDOMNode) contentAssistRequest.getNode();
    IStructuredDocumentRegion sdRegion = contentAssistRequest.getDocumentRegion();
    // retrieve the list of attributes
    CMElementDeclaration elementDecl = getCMElementDeclaration(node);
    if (elementDecl != null) {
        CMNamedNodeMap attributes = elementDecl.getAttributes();
        CMNamedNodeMapImpl allAttributes = new CMNamedNodeMapImpl(attributes);
        if (node.getNodeType() == Node.ELEMENT_NODE) {
            List nodes = ModelQueryUtil.getModelQuery(node.getOwnerDocument()).getAvailableContent((Element) node, elementDecl, ModelQuery.INCLUDE_ATTRIBUTES);
            for (int k = 0; k < nodes.size(); k++) {
                CMNode cmnode = (CMNode) nodes.get(k);
                if (cmnode.getNodeType() == CMNode.ATTRIBUTE_DECLARATION) {
                    allAttributes.put(cmnode);
                }
            }
        }
        attributes = allAttributes;
        String matchString = contentAssistRequest.getMatchString();
        // check whether an attribute really exists for the replacement
        // offsets AND if it possesses a value
        boolean attrAtLocationHasValue = false;
        NamedNodeMap attrs = node.getAttributes();
        for (int i = 0; i < attrs.getLength(); i++) {
            AttrImpl existingAttr = (AttrImpl) attrs.item(i);
            ITextRegion name = existingAttr.getNameRegion();
            if ((sdRegion.getStartOffset(name) <= contentAssistRequest.getReplacementBeginPosition()) && (sdRegion.getStartOffset(name) + name.getLength() >= contentAssistRequest.getReplacementBeginPosition() + contentAssistRequest.getReplacementLength()) && (existingAttr.getValueRegion() != null)) {
                attrAtLocationHasValue = true;
                break;
            }
        }
        // the matchstring
        if (attributes != null) {
            for (int i = 0; i < attributes.getLength(); i++) {
                CMAttributeDeclaration attrDecl = (CMAttributeDeclaration) attributes.item(i);
                int isRequired = 0;
                if (attrDecl.getUsage() == CMAttributeDeclaration.REQUIRED) {
                    isRequired = XMLRelevanceConstants.R_REQUIRED;
                }
                boolean showAttribute = true;
                showAttribute = showAttribute && beginsWith(getRequiredName(node, attrDecl), matchString.trim());
                AttrImpl attr = (AttrImpl) node.getAttributes().getNamedItem(getRequiredName(node, attrDecl));
                ITextRegion nameRegion = attr != null ? attr.getNameRegion() : null;
                // nameRegion.getEndOffset() + 1 is required to allow for
                // matches against the full name of an existing Attr
                showAttribute = showAttribute && (attr == null || nameRegion == null || (nameRegion != null && (sdRegion.getStartOffset(nameRegion) <= contentAssistRequest.getReplacementBeginPosition()) && (sdRegion.getStartOffset(nameRegion) + nameRegion.getLength() >= contentAssistRequest.getReplacementBeginPosition() + contentAssistRequest.getReplacementLength())));
                if (showAttribute) {
                    Image attrImage = CMImageUtil.getImage(attrDecl);
                    if (attrImage == null) {
                        if (isRequired > 0) {
                            attrImage = XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_ATT_REQ_OBJ);
                        } else {
                            attrImage = XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_ATTRIBUTE);
                        }
                    }
                    String proposedText = null;
                    String proposedInfo = getAdditionalInfo(elementDecl, attrDecl);
                    CustomCompletionProposal proposal = null;
                    // attribute is at this location and already exists
                    if (attrAtLocationHasValue) {
                        // only propose the name
                        proposedText = getRequiredName(node, attrDecl);
                        proposal = new CustomCompletionProposal(proposedText, contentAssistRequest.getReplacementBeginPosition(), contentAssistRequest.getReplacementLength(), proposedText.length(), attrImage, proposedText, null, proposedInfo, XMLRelevanceConstants.R_XML_ATTRIBUTE_NAME + isRequired, true);
                    } else // no attribute exists or is elsewhere, generate
                    // minimally
                    {
                        Attr existingAttrNode = (Attr) node.getAttributes().getNamedItem(getRequiredName(node, attrDecl));
                        String value = null;
                        if (existingAttrNode != null && existingAttrNode.getSpecified()) {
                            value = existingAttrNode.getNodeValue();
                        }
                        if ((value != null) && (value.length() > 0)) {
                            proposedText = getRequiredName(node, attrDecl);
                        } else {
                            proposedText = getRequiredText(node, attrDecl);
                        }
                        proposal = new CustomCompletionProposal(proposedText, contentAssistRequest.getReplacementBeginPosition(), contentAssistRequest.getReplacementLength(), attrDecl.getNodeName().length() + 2, attrImage, // and there is no single quote that may be encasing a double quote
                        (showValues && (proposedText.lastIndexOf('\"') - proposedText.indexOf('\"') == 1 && proposedText.indexOf('\'') == -1)) ? getRequiredName(node, attrDecl) : proposedText, null, proposedInfo, XMLRelevanceConstants.R_XML_ATTRIBUTE_NAME + isRequired);
                    }
                    contentAssistRequest.addProposal(proposal);
                }
            }
        }
    } else {
        setErrorMessage(NLS.bind(XMLUIMessages.Element__is_unknown, (new Object[] { node.getNodeName() })));
    }
}
Also used : CMNamedNodeMapImpl(org.eclipse.wst.xml.core.internal.contentmodel.basic.CMNamedNodeMapImpl) IStructuredDocumentRegion(org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion) CMNamedNodeMap(org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap) NamedNodeMap(org.w3c.dom.NamedNodeMap) CustomCompletionProposal(org.eclipse.wst.sse.ui.internal.contentassist.CustomCompletionProposal) AttrImpl(org.eclipse.wst.xml.core.internal.document.AttrImpl) Image(org.eclipse.swt.graphics.Image) Attr(org.w3c.dom.Attr) CMElementDeclaration(org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration) IDOMNode(org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode) ITextRegion(org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion) CMNodeList(org.eclipse.wst.xml.core.internal.contentmodel.CMNodeList) List(java.util.List) ITextRegionList(org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionList) ArrayList(java.util.ArrayList) NodeList(org.w3c.dom.NodeList) CMNode(org.eclipse.wst.xml.core.internal.contentmodel.CMNode) CMAttributeDeclaration(org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration) CMNamedNodeMap(org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap)

Example 77 with CMElementDeclaration

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

the class AbstractContentAssistProcessor method addEndTagNameProposals.

/**
 * Add the proposals for the name in an end tag
 */
protected void addEndTagNameProposals(ContentAssistRequest contentAssistRequest) {
    if (contentAssistRequest.getStartOffset() + contentAssistRequest.getRegion().getTextLength() < contentAssistRequest.getReplacementBeginPosition()) {
        CustomCompletionProposal proposal = new // $NON-NLS-1$
        CustomCompletionProposal(// $NON-NLS-1$
        ">", // $NON-NLS-1$
        contentAssistRequest.getReplacementBeginPosition(), // $NON-NLS-1$
        contentAssistRequest.getReplacementLength(), // $NON-NLS-1$
        1, // $NON-NLS-1$
        XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_TAG_GENERIC), // $NON-NLS-1$
        NLS.bind(XMLUIMessages.Close_with__, (new Object[] { " '>'" })), null, null, XMLRelevanceConstants.R_END_TAG_NAME);
        contentAssistRequest.addProposal(proposal);
    } else {
        IDOMNode node = (IDOMNode) contentAssistRequest.getNode();
        ModelQuery modelQuery = ModelQueryUtil.getModelQuery(node.getOwnerDocument());
        Node aNode = contentAssistRequest.getNode();
        String matchString = contentAssistRequest.getMatchString();
        if (matchString.startsWith("</")) {
            matchString = matchString.substring(2);
        }
        while (aNode != null) {
            if (aNode.getNodeType() == Node.ELEMENT_NODE) {
                if (aNode.getNodeName().startsWith(matchString)) {
                    IDOMNode aXMLNode = (IDOMNode) aNode;
                    CMElementDeclaration ed = modelQuery.getCMElementDeclaration((Element) aNode);
                    if ((aXMLNode.getEndStructuredDocumentRegion() == null) && ((ed == null) || (ed.getContentType() != CMElementDeclaration.EMPTY))) {
                        String replacementText = aNode.getNodeName();
                        String displayText = replacementText;
                        String proposedInfo = (ed != null) ? getAdditionalInfo(null, ed) : null;
                        if (!contentAssistRequest.getDocumentRegion().isEnded()) {
                            // $NON-NLS-1$
                            replacementText += ">";
                        }
                        CustomCompletionProposal proposal = null;
                        // double check to see if the region acted upon is
                        // a tag name; replace it if so
                        Image image = CMImageUtil.getImage(ed);
                        if (image == null) {
                            image = XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_TAG_GENERIC);
                        }
                        if (contentAssistRequest.getRegion().getType() == DOMRegionContext.XML_TAG_NAME) {
                            proposal = new CustomCompletionProposal(replacementText, contentAssistRequest.getStartOffset(), contentAssistRequest.getRegion().getTextLength(), replacementText.length(), image, displayText, null, proposedInfo, XMLRelevanceConstants.R_END_TAG_NAME);
                        } else {
                            proposal = new // $NON-NLS-1$ //$NON-NLS-2$
                            CustomCompletionProposal(// $NON-NLS-1$ //$NON-NLS-2$
                            replacementText, // $NON-NLS-1$ //$NON-NLS-2$
                            contentAssistRequest.getReplacementBeginPosition(), // $NON-NLS-1$ //$NON-NLS-2$
                            contentAssistRequest.getReplacementLength(), // $NON-NLS-1$ //$NON-NLS-2$
                            replacementText.length(), // $NON-NLS-1$ //$NON-NLS-2$
                            image, // $NON-NLS-1$ //$NON-NLS-2$
                            NLS.bind(XMLUIMessages.Close_with__, (new Object[] { "'" + displayText + "'" })), null, proposedInfo, XMLRelevanceConstants.R_END_TAG_NAME);
                        }
                        contentAssistRequest.addProposal(proposal);
                    }
                }
            }
            aNode = aNode.getParentNode();
        }
    }
}
Also used : CMElementDeclaration(org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration) IDOMNode(org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode) IDOMNode(org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode) CMNode(org.eclipse.wst.xml.core.internal.contentmodel.CMNode) Node(org.w3c.dom.Node) CustomCompletionProposal(org.eclipse.wst.sse.ui.internal.contentassist.CustomCompletionProposal) ModelQuery(org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQuery) Image(org.eclipse.swt.graphics.Image)

Example 78 with CMElementDeclaration

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

the class AbstractContentAssistProcessor method addTagCloseProposals.

/**
 * Close an unclosed start tag
 */
protected void addTagCloseProposals(ContentAssistRequest contentAssistRequest) {
    IDOMNode node = (IDOMNode) contentAssistRequest.getParent();
    if (node.getNodeType() == Node.ELEMENT_NODE) {
        CMElementDeclaration elementDecl = getCMElementDeclaration(node);
        String proposedInfo = (elementDecl != null) ? getAdditionalInfo(null, elementDecl) : null;
        int contentType = (elementDecl != null) ? elementDecl.getContentType() : CMElementDeclaration.ANY;
        // if it's XML and content doesn't HAVE to be element, add "/>"
        // proposal.
        boolean endWithSlashBracket = (getXML(node) && (contentType != CMElementDeclaration.ELEMENT));
        Image image = CMImageUtil.getImage(elementDecl);
        if (image == null) {
            image = XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_TAG_GENERIC);
        }
        // is the start tag ended properly?
        if ((contentAssistRequest.getDocumentRegion() == node.getFirstStructuredDocumentRegion()) && !(node.getFirstStructuredDocumentRegion()).isEnded()) {
            setErrorMessage(null);
            // tell, we assume it's not.
            if ((elementDecl != null) && (elementDecl.getContentType() == CMElementDeclaration.EMPTY)) {
                // prompt with a self-closing end character if needed
                CustomCompletionProposal proposal = new CustomCompletionProposal(getContentGenerator().getStartTagClose(node, elementDecl), contentAssistRequest.getReplacementBeginPosition(), // contentAssistRequest.getReplacementLength(),
                0, getContentGenerator().getStartTagClose(node, elementDecl).length(), image, NLS.bind(XMLUIMessages.Close_with___, (new Object[] { getContentGenerator().getStartTagClose(node, elementDecl) })), null, proposedInfo, XMLRelevanceConstants.R_CLOSE_TAG);
                contentAssistRequest.addProposal(proposal);
            } else {
                // prompt with a close for the start tag
                CustomCompletionProposal proposal = new // $NON-NLS-1$
                CustomCompletionProposal(// $NON-NLS-1$
                ">", contentAssistRequest.getReplacementBeginPosition(), // $NON-NLS-1$
                0, // $NON-NLS-1$
                1, // $NON-NLS-1$
                image, // $NON-NLS-1$
                NLS.bind(XMLUIMessages.Close_with__, (new Object[] { " '>'" })), null, proposedInfo, XMLRelevanceConstants.R_CLOSE_TAG);
                contentAssistRequest.addProposal(proposal);
                // if one is not present
                if (node.getEndStructuredDocumentRegion() == null) {
                    // make sure tag name is actually what it thinks it
                    // is...(eg. <%@ vs. <jsp:directive)
                    IStructuredDocumentRegion sdr = contentAssistRequest.getDocumentRegion();
                    // $NON-NLS-1$
                    String openingTagText = (sdr != null) ? sdr.getFullText() : "";
                    if ((openingTagText != null) && (openingTagText.indexOf(node.getNodeName()) != -1)) {
                        proposal = new // $NON-NLS-2$//$NON-NLS-1$
                        CustomCompletionProposal(// $NON-NLS-2$//$NON-NLS-1$
                        "></" + node.getNodeName() + ">", contentAssistRequest.getReplacementBeginPosition(), // contentAssistRequest.getReplacementLength(),
                        0, 1, image, NLS.bind(XMLUIMessages.Close_with____, (new Object[] { node.getNodeName() })), null, proposedInfo, XMLRelevanceConstants.R_CLOSE_TAG);
                        contentAssistRequest.addProposal(proposal);
                    }
                }
                // ending tag
                if (endWithSlashBracket) {
                    proposal = new // $NON-NLS-1$
                    CustomCompletionProposal(// $NON-NLS-1$
                    "/>", contentAssistRequest.getReplacementBeginPosition(), // $NON-NLS-1$
                    0, // $NON-NLS-1$
                    2, // $NON-NLS-1$
                    image, // $NON-NLS-1$
                    NLS.bind(XMLUIMessages.Close_with__, (new Object[] { " \"/>\"" })), null, proposedInfo, // +1
                    XMLRelevanceConstants.R_CLOSE_TAG + 1);
                    // to
                    // bring
                    // to
                    // top
                    // of
                    // list
                    contentAssistRequest.addProposal(proposal);
                }
            }
        } else if ((contentAssistRequest.getDocumentRegion() == node.getLastStructuredDocumentRegion()) && !node.getLastStructuredDocumentRegion().isEnded()) {
            setErrorMessage(null);
            // prompt with a closing end character for the end tag
            CustomCompletionProposal proposal = new // $NON-NLS-1$
            CustomCompletionProposal(// $NON-NLS-1$
            ">", contentAssistRequest.getReplacementBeginPosition(), // $NON-NLS-1$
            0, // $NON-NLS-1$
            1, // $NON-NLS-1$
            image, // $NON-NLS-1$
            NLS.bind(XMLUIMessages.Close_with__, (new Object[] { " '>'" })), null, proposedInfo, XMLRelevanceConstants.R_CLOSE_TAG);
            contentAssistRequest.addProposal(proposal);
        }
    } else if (node.getNodeType() == Node.DOCUMENT_NODE) {
        setErrorMessage(UNKNOWN_CONTEXT);
    }
}
Also used : IStructuredDocumentRegion(org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion) CMElementDeclaration(org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration) IDOMNode(org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode) CustomCompletionProposal(org.eclipse.wst.sse.ui.internal.contentassist.CustomCompletionProposal) Image(org.eclipse.swt.graphics.Image)

Example 79 with CMElementDeclaration

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

the class BaseNodeActionManager method contributeAddChildActions.

protected void contributeAddChildActions(IMenuManager menu, Node node, int ic, int vc) {
    int nodeType = node.getNodeType();
    if (nodeType == Node.ELEMENT_NODE && canContributeChildActions(node)) {
        // 'Add Child...' and 'Add Attribute...' actions
        // 
        Element element = (Element) node;
        IMenuManager addAttributeMenu = new MyMenuManager(XMLUIMessages._UI_MENU_ADD_ATTRIBUTE);
        IMenuManager addChildMenu = new MyMenuManager(XMLUIMessages._UI_MENU_ADD_CHILD);
        menu.add(addAttributeMenu);
        menu.add(addChildMenu);
        CMElementDeclaration ed = modelQuery.getCMElementDeclaration(element);
        if (ed != null) {
            // add insert attribute actions
            // 
            List modelQueryActionList = new ArrayList();
            modelQuery.getInsertActions(element, ed, -1, ModelQuery.INCLUDE_ATTRIBUTES, vc, modelQueryActionList);
            addActionHelper(addAttributeMenu, modelQueryActionList);
            // add insert child node actions
            // 
            modelQueryActionList = new ArrayList();
            modelQuery.getInsertActions(element, ed, -1, ic, vc, modelQueryActionList);
            addActionHelper(addChildMenu, modelQueryActionList);
        }
        // add PI and COMMENT
        contributePIAndCommentActions(addChildMenu, element, ed, -1);
        // add PCDATA, CDATA_SECTION
        contributeTextNodeActions(addChildMenu, element, ed, -1);
        // add NEW ELEMENT
        contributeUnconstrainedAddElementAction(addChildMenu, element, ed, -1);
        // add ATTRIBUTE
        contributeUnconstrainedAttributeActions(addAttributeMenu, element, ed);
    }
}
Also used : CMElementDeclaration(org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration) Element(org.w3c.dom.Element) ArrayList(java.util.ArrayList) ArrayList(java.util.ArrayList) NodeList(org.w3c.dom.NodeList) List(java.util.List) IMenuManager(org.eclipse.jface.action.IMenuManager)

Example 80 with CMElementDeclaration

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

the class BaseNodeActionManager method contributeAddSiblingActions.

protected void contributeAddSiblingActions(IMenuManager menu, Node node, int ic, int vc) {
    IMenuManager addBeforeMenu = new MyMenuManager(XMLUIMessages._UI_MENU_ADD_BEFORE);
    IMenuManager addAfterMenu = new MyMenuManager(XMLUIMessages._UI_MENU_ADD_AFTER);
    menu.add(addBeforeMenu);
    menu.add(addAfterMenu);
    Node parentNode = node.getParentNode();
    if (parentNode != null) {
        int index = getIndex(parentNode, node);
        if (parentNode.getNodeType() == Node.ELEMENT_NODE) {
            Element parentElement = (Element) parentNode;
            CMElementDeclaration parentED = modelQuery.getCMElementDeclaration(parentElement);
            if (parentED != null) {
                // 'Add Before...' and 'Add After...' actions
                // 
                List modelQueryActionList = new ArrayList();
                modelQuery.getInsertActions(parentElement, parentED, index, ic, vc, modelQueryActionList);
                addActionHelper(addBeforeMenu, modelQueryActionList);
                modelQueryActionList = new ArrayList();
                modelQuery.getInsertActions(parentElement, parentED, index + 1, ic, vc, modelQueryActionList);
                addActionHelper(addAfterMenu, modelQueryActionList);
            }
            // add COMMENT and PI before and after
            contributePIAndCommentActions(addBeforeMenu, parentElement, parentED, index);
            contributePIAndCommentActions(addAfterMenu, parentElement, parentED, index + 1);
            // add PCDATA, CDATA_SECTION before and after
            contributeTextNodeActions(addBeforeMenu, parentElement, parentED, index);
            contributeTextNodeActions(addAfterMenu, parentElement, parentED, index + 1);
            // add NEW ELEMENT before and after
            contributeUnconstrainedAddElementAction(addBeforeMenu, parentElement, parentED, index);
            contributeUnconstrainedAddElementAction(addAfterMenu, parentElement, parentED, index + 1);
        } else if (parentNode.getNodeType() == Node.DOCUMENT_NODE) {
            Document document = (Document) parentNode;
            CMDocument cmDocument = modelQuery.getCorrespondingCMDocument(parentNode);
            if (cmDocument != null) {
                // add possible root element insertions
                // 
                List modelQueryActionList = new ArrayList();
                modelQuery.getInsertActions(document, cmDocument, index, ic, vc, modelQueryActionList);
                addActionHelper(addAfterMenu, modelQueryActionList);
                modelQueryActionList = new ArrayList();
                modelQuery.getInsertActions(document, cmDocument, index + 1, ic, vc, modelQueryActionList);
                addActionHelper(addAfterMenu, modelQueryActionList);
            }
            // add COMMENT and PI before and after
            contributePIAndCommentActions(addBeforeMenu, document, index);
            contributePIAndCommentActions(addAfterMenu, document, index + 1);
            // add ELEMENT before and after
            contributeUnconstrainedAddElementAction(addBeforeMenu, document, index);
            contributeUnconstrainedAddElementAction(addAfterMenu, document, index + 1);
        }
    }
}
Also used : CMDocument(org.eclipse.wst.xml.core.internal.contentmodel.CMDocument) CMElementDeclaration(org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration) Node(org.w3c.dom.Node) CMNode(org.eclipse.wst.xml.core.internal.contentmodel.CMNode) Element(org.w3c.dom.Element) ArrayList(java.util.ArrayList) ArrayList(java.util.ArrayList) NodeList(org.w3c.dom.NodeList) List(java.util.List) IMenuManager(org.eclipse.jface.action.IMenuManager) Document(org.w3c.dom.Document) CMDocument(org.eclipse.wst.xml.core.internal.contentmodel.CMDocument)

Aggregations

CMElementDeclaration (org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration)147 CMNode (org.eclipse.wst.xml.core.internal.contentmodel.CMNode)53 List (java.util.List)46 CMNamedNodeMap (org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap)43 Element (org.w3c.dom.Element)41 ModelQuery (org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQuery)38 CMDocument (org.eclipse.wst.xml.core.internal.contentmodel.CMDocument)37 ArrayList (java.util.ArrayList)35 IDOMNode (org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode)33 Node (org.w3c.dom.Node)32 CMAttributeDeclaration (org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration)30 NodeList (org.w3c.dom.NodeList)28 ITextRegionList (org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionList)24 Iterator (java.util.Iterator)19 CMNodeList (org.eclipse.wst.xml.core.internal.contentmodel.CMNodeList)19 CustomCompletionProposal (org.eclipse.wst.sse.ui.internal.contentassist.CustomCompletionProposal)17 IDOMModel (org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel)17 NamedNodeMap (org.w3c.dom.NamedNodeMap)17 Image (org.eclipse.swt.graphics.Image)15 IStructuredDocumentRegion (org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion)15