Search in sources :

Example 1 with CMDocumentation

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

the class MarkupTagInfoProvider method printDocumentation.

/**
 * Adds the tag documentation property of the CMNode to the string buffer,
 * sb
 */
protected void printDocumentation(StringBuffer sb, CMNode node) {
    // $NON-NLS-1$
    CMNodeList nodeList = (CMNodeList) node.getProperty("documentation");
    if ((nodeList != null) && (nodeList.getLength() > 0)) {
        for (int i = 0; i < nodeList.getLength(); i++) {
            CMDocumentation documentation = (CMDocumentation) nodeList.item(i);
            String doc = documentation.getValue();
            if (doc != null) {
                sb.append(PARAGRAPH_START + doc.trim() + PARAGRAPH_END);
            }
        }
        sb.append(NEW_LINE);
    }
}
Also used : CMNodeList(org.eclipse.wst.xml.core.internal.contentmodel.CMNodeList) CMDocumentation(org.eclipse.wst.xml.core.internal.contentmodel.CMDocumentation)

Aggregations

CMDocumentation (org.eclipse.wst.xml.core.internal.contentmodel.CMDocumentation)1 CMNodeList (org.eclipse.wst.xml.core.internal.contentmodel.CMNodeList)1