I'm trying to add a content type for my XML files with a custom file extension(CST) and I get the following error - Could not create content describer for com.example.cstfile. Content type has been disabled.
Here's my plugin.xml file -
<extension point="org.eclipse.core.contenttype.contentTypes">
<content-type
base-type="org.eclipse.core.runtime.xml"
file-extensions="cst,xml"
id="cstfile"
name="CST File"
priority="normal">
<describer class="org.eclipse.core.runtime.content.XMLRootElementContentDescriber2"
plugin="org.eclipse.core.runtime">
<parameter name="elementNames" value="CSTFile"/>
</describer>
</content-type>
<file-association
content-type="org.eclipse.core.runtime.xml"
file-extensions="cst">
</file-association>
</extension>
I'm trying to figure out the reason by debugging org.eclipse.core.internal.content.ContentTypeCatalog but have not found any reasons so far, any help is appreciated.
It looks like it comes from calls to
ContentTypes.invalidateDescriber- the content describer has thrown an exception.Looking at
XMLRootElementContentDescriber2it will throw an exception if it gets ajavax.xml.parsers.ParserConfigurationExceptionexception when try to parse the XML.There should be more information in the .log file in the .metadata directory of the workspace.