Search in sources :

Example 1 with HTMLFormattingUtil

use of org.eclipse.wst.html.core.internal.format.HTMLFormattingUtil in project webtools.sourceediting by eclipse.

the class TestFormatUtility method testInlineNode.

public void testInlineNode() {
    IDOMModel model = (IDOMModel) StructuredModelManager.getModelManager().createUnManagedStructuredModelFor(ContentTypeIdForXML.ContentTypeID_XML);
    IDOMDocument document = model.getDocument();
    HTMLFormattingUtil util = new HTMLFormattingUtil();
    assertTrue("Anchor tag must be inline", util.isInline(document.createElement("a")));
    assertFalse("Div tag must not be inline", util.isInline(document.createElement("div")));
}
Also used : IDOMModel(org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel) IDOMDocument(org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument) HTMLFormattingUtil(org.eclipse.wst.html.core.internal.format.HTMLFormattingUtil)

Aggregations

HTMLFormattingUtil (org.eclipse.wst.html.core.internal.format.HTMLFormattingUtil)1 IDOMDocument (org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument)1 IDOMModel (org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel)1