Search in sources :

Example 1 with EmbeddedXML

use of org.eclipse.wst.xml.core.internal.modelhandler.EmbeddedXML in project webtools.sourceediting by eclipse.

the class TestPageDirective method testSetEmbeddedType.

public void testSetEmbeddedType() {
    IStructuredModel model = createUnmanagedHTMLModel();
    PageDirectiveAdapter pageDirectiveAdapter = (PageDirectiveAdapter) ((IDOMModel) model).getDocument().getAdapterFor(PageDirectiveAdapter.class);
    EmbeddedTypeHandler embeddedXMLHandler = new EmbeddedXML();
    pageDirectiveAdapter.setEmbeddedType(embeddedXMLHandler);
    EmbeddedTypeHandler handler = pageDirectiveAdapter.getEmbeddedType();
    assertTrue("incorrect embedded handler", handler == embeddedXMLHandler);
}
Also used : EmbeddedTypeHandler(org.eclipse.wst.sse.core.internal.ltk.modelhandler.EmbeddedTypeHandler) IDOMModel(org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel) EmbeddedXML(org.eclipse.wst.xml.core.internal.modelhandler.EmbeddedXML) PageDirectiveAdapter(org.eclipse.jst.jsp.core.internal.document.PageDirectiveAdapter) IStructuredModel(org.eclipse.wst.sse.core.internal.provisional.IStructuredModel)

Aggregations

PageDirectiveAdapter (org.eclipse.jst.jsp.core.internal.document.PageDirectiveAdapter)1 EmbeddedTypeHandler (org.eclipse.wst.sse.core.internal.ltk.modelhandler.EmbeddedTypeHandler)1 IStructuredModel (org.eclipse.wst.sse.core.internal.provisional.IStructuredModel)1 EmbeddedXML (org.eclipse.wst.xml.core.internal.modelhandler.EmbeddedXML)1 IDOMModel (org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel)1