Search in sources :

Example 11 with IContentTypeManager

use of org.eclipse.core.runtime.content.IContentTypeManager in project webtools.sourceediting by eclipse.

the class TestContentTypeHandlers method testCSSExistsByFileExtension.

public void testCSSExistsByFileExtension() throws IOException {
    String filename = "test.css";
    IContentTypeManager registry = getContentTypeRegistry();
    IContentType identifier = registry.getDescriptionFor(new NullStream(), filename, IContentDescription.ALL).getContentType();
    assertTrue("content type identifier for " + filename + " does not have CSS type ", identifier != null);
}
Also used : IContentTypeManager(org.eclipse.core.runtime.content.IContentTypeManager) IContentType(org.eclipse.core.runtime.content.IContentType)

Example 12 with IContentTypeManager

use of org.eclipse.core.runtime.content.IContentTypeManager in project webtools.sourceediting by eclipse.

the class TestContentTypeHandlers method testJSPExists.

public void testJSPExists() {
    String id = ContentTypeIdForJSP.ContentTypeID_JSP;
    IContentTypeManager registry = getContentTypeRegistry();
    IContentType identifier = registry.getContentType(id);
    assertTrue("content type identifier " + id + " does not have JSP type ", identifier != null);
}
Also used : IContentTypeManager(org.eclipse.core.runtime.content.IContentTypeManager) IContentType(org.eclipse.core.runtime.content.IContentType)

Example 13 with IContentTypeManager

use of org.eclipse.core.runtime.content.IContentTypeManager in project webtools.sourceediting by eclipse.

the class TestContentTypeHandlers method testDTDExistsByFileExtension.

public void testDTDExistsByFileExtension() throws IOException {
    String filename = "test.dtd";
    IContentTypeManager registry = getContentTypeRegistry();
    IContentType identifier = registry.getDescriptionFor(new NullStream(), filename, IContentDescription.ALL).getContentType();
    assertTrue("content type identifier for " + filename + " does not have DTD type ", identifier != null);
}
Also used : IContentTypeManager(org.eclipse.core.runtime.content.IContentTypeManager) IContentType(org.eclipse.core.runtime.content.IContentType)

Example 14 with IContentTypeManager

use of org.eclipse.core.runtime.content.IContentTypeManager in project webtools.sourceediting by eclipse.

the class TestContentTypeHandlers method testXMLExists.

public void testXMLExists() {
    String id = ContentTypeIdForXML.ContentTypeID_SSEXML;
    IContentTypeManager registry = getContentTypeRegistry();
    IContentType identifier = registry.getContentType(id);
    assertTrue("content type identifier " + id + " does not have custom XML type ", identifier != null);
}
Also used : IContentTypeManager(org.eclipse.core.runtime.content.IContentTypeManager) IContentType(org.eclipse.core.runtime.content.IContentType)

Example 15 with IContentTypeManager

use of org.eclipse.core.runtime.content.IContentTypeManager in project webtools.sourceediting by eclipse.

the class TestContentTypeHandlers method testHTMLExists.

public void testHTMLExists() {
    String id = ContentTypeIdForHTML.ContentTypeID_HTML;
    IContentTypeManager registry = getContentTypeRegistry();
    IContentType identifier = registry.getContentType(id);
    assertTrue("content type identifier " + id + " does not have HTML type ", identifier != null);
}
Also used : IContentTypeManager(org.eclipse.core.runtime.content.IContentTypeManager) IContentType(org.eclipse.core.runtime.content.IContentType)

Aggregations

IContentTypeManager (org.eclipse.core.runtime.content.IContentTypeManager)33 IContentType (org.eclipse.core.runtime.content.IContentType)27 IContentDescription (org.eclipse.core.runtime.content.IContentDescription)8 CoreException (org.eclipse.core.runtime.CoreException)5 InputStream (java.io.InputStream)4 IOException (java.io.IOException)3 HashSet (java.util.HashSet)3 IConfigurationElement (org.eclipse.core.runtime.IConfigurationElement)3 ArrayList (java.util.ArrayList)2 Set (java.util.Set)2 BufferedInputStream (java.io.BufferedInputStream)1 Iterator (java.util.Iterator)1 LinkedHashSet (java.util.LinkedHashSet)1 List (java.util.List)1 ExecutionException (org.eclipse.core.commands.ExecutionException)1 IFileInfo (org.eclipse.core.filesystem.IFileInfo)1 IFile (org.eclipse.core.resources.IFile)1 IProject (org.eclipse.core.resources.IProject)1 ProjectScope (org.eclipse.core.resources.ProjectScope)1 IExtensionPoint (org.eclipse.core.runtime.IExtensionPoint)1