Search in sources :

Example 11 with ModelHandlerRegistry

use of org.eclipse.wst.sse.core.internal.modelhandler.ModelHandlerRegistry in project webtools.sourceediting by eclipse.

the class TestModelHandlers method testCreation.

public void testCreation() {
    ModelHandlerRegistry registry = getModelHandlerRegistry();
    assertTrue("model handler registry must exist", registry != null);
}
Also used : ModelHandlerRegistry(org.eclipse.wst.sse.core.internal.modelhandler.ModelHandlerRegistry)

Example 12 with ModelHandlerRegistry

use of org.eclipse.wst.sse.core.internal.modelhandler.ModelHandlerRegistry in project webtools.sourceediting by eclipse.

the class TestModelHandlers method testJSPExistsFromFilename.

public void testJSPExistsFromFilename() throws IOException {
    String filename = "test.jsp";
    ModelHandlerRegistry registry = getModelHandlerRegistry();
    IModelHandler handler = registry.getHandlerFor(filename, null);
    assertTrue("model handler registry does not have JSP type ", handler != null && handler.getAssociatedContentTypeId().equals(ContentTypeIdForJSP.ContentTypeID_JSP));
}
Also used : ModelHandlerRegistry(org.eclipse.wst.sse.core.internal.modelhandler.ModelHandlerRegistry) IModelHandler(org.eclipse.wst.sse.core.internal.ltk.modelhandler.IModelHandler)

Example 13 with ModelHandlerRegistry

use of org.eclipse.wst.sse.core.internal.modelhandler.ModelHandlerRegistry in project webtools.sourceediting by eclipse.

the class TestModelHandlers method testDTDExists.

public void testDTDExists() {
    String id = "org.eclipse.wst.dtd.core.dtdsource";
    ModelHandlerRegistry registry = getModelHandlerRegistry();
    IModelHandler handler = registry.getHandlerForContentTypeId(id);
    assertTrue("model handler registry does not have DTD type ", handler != null && handler.getAssociatedContentTypeId().equals(id));
}
Also used : ModelHandlerRegistry(org.eclipse.wst.sse.core.internal.modelhandler.ModelHandlerRegistry) IModelHandler(org.eclipse.wst.sse.core.internal.ltk.modelhandler.IModelHandler)

Example 14 with ModelHandlerRegistry

use of org.eclipse.wst.sse.core.internal.modelhandler.ModelHandlerRegistry in project webtools.sourceediting by eclipse.

the class TestModelHandlers method testJSPExists.

public void testJSPExists() {
    String id = ContentTypeIdForJSP.ContentTypeID_JSP;
    ModelHandlerRegistry registry = getModelHandlerRegistry();
    IModelHandler handler = registry.getHandlerForContentTypeId(id);
    assertTrue("model handler registry does not have JSP type ", handler != null && handler.getAssociatedContentTypeId().equals(id));
}
Also used : ModelHandlerRegistry(org.eclipse.wst.sse.core.internal.modelhandler.ModelHandlerRegistry) IModelHandler(org.eclipse.wst.sse.core.internal.ltk.modelhandler.IModelHandler)

Example 15 with ModelHandlerRegistry

use of org.eclipse.wst.sse.core.internal.modelhandler.ModelHandlerRegistry in project webtools.sourceediting by eclipse.

the class TestModelHandlers method testCSSExists.

public void testCSSExists() {
    String id = ContentTypeIdForCSS.ContentTypeID_CSS;
    ModelHandlerRegistry registry = getModelHandlerRegistry();
    IModelHandler handler = registry.getHandlerForContentTypeId(id);
    assertTrue("model handler registry does not have CSS type ", handler != null && handler.getAssociatedContentTypeId().equals(id));
}
Also used : ModelHandlerRegistry(org.eclipse.wst.sse.core.internal.modelhandler.ModelHandlerRegistry) IModelHandler(org.eclipse.wst.sse.core.internal.ltk.modelhandler.IModelHandler)

Aggregations

ModelHandlerRegistry (org.eclipse.wst.sse.core.internal.modelhandler.ModelHandlerRegistry)15 IModelHandler (org.eclipse.wst.sse.core.internal.ltk.modelhandler.IModelHandler)14 IDocumentLoader (org.eclipse.wst.sse.core.internal.document.IDocumentLoader)1 IStructuredModel (org.eclipse.wst.sse.core.internal.provisional.IStructuredModel)1 ResourceInUse (org.eclipse.wst.sse.core.internal.provisional.exceptions.ResourceInUse)1 IStructuredDocument (org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument)1