Search in sources :

Example 1 with NullContentAssistRequest

use of org.eclipse.wst.xsl.ui.provisional.contentassist.NullContentAssistRequest in project webtools.sourceediting by eclipse.

the class XSLContentAssistRequestFactory method getContentAssistRequest.

/**
 * Get the appropriate content assist request class for the XSL request.
 * @return
 */
public IContentAssistProposalRequest getContentAssistRequest() {
    NamedNodeMap nodeMap = xmlNode.getAttributes();
    IDOMElement element = (IDOMElement) xmlNode;
    IContentAssistProposalRequest proposal = commonAttributeProposals(nodeMap);
    if (proposal instanceof NullContentAssistRequest) {
        if (isElementProposal(element)) {
            proposal = getElementProposals(nodeMap, element);
        }
    }
    return proposal;
}
Also used : NamedNodeMap(org.w3c.dom.NamedNodeMap) IContentAssistProposalRequest(org.eclipse.wst.xsl.ui.provisional.contentassist.IContentAssistProposalRequest) NullContentAssistRequest(org.eclipse.wst.xsl.ui.provisional.contentassist.NullContentAssistRequest) IDOMElement(org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement)

Example 2 with NullContentAssistRequest

use of org.eclipse.wst.xsl.ui.provisional.contentassist.NullContentAssistRequest in project webtools.sourceediting by eclipse.

the class EXSLTContentAssistRequestFactory method getContentAssistRequest.

/**
 * Get the appropriate content assist request class for the XSL request.
 * @return
 */
public IContentAssistProposalRequest getContentAssistRequest() {
    NamedNodeMap nodeMap = xmlNode.getAttributes();
    IDOMElement element = (IDOMElement) xmlNode;
    IContentAssistProposalRequest proposal = commonAttributeProposals(nodeMap);
    if (proposal instanceof NullContentAssistRequest) {
        if (isElementProposal(element)) {
            proposal = getNullProposal();
        }
    }
    return proposal;
}
Also used : NamedNodeMap(org.w3c.dom.NamedNodeMap) IContentAssistProposalRequest(org.eclipse.wst.xsl.ui.provisional.contentassist.IContentAssistProposalRequest) NullContentAssistRequest(org.eclipse.wst.xsl.ui.provisional.contentassist.NullContentAssistRequest) IDOMElement(org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement)

Aggregations

IDOMElement (org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement)2 IContentAssistProposalRequest (org.eclipse.wst.xsl.ui.provisional.contentassist.IContentAssistProposalRequest)2 NullContentAssistRequest (org.eclipse.wst.xsl.ui.provisional.contentassist.NullContentAssistRequest)2 NamedNodeMap (org.w3c.dom.NamedNodeMap)2