我试图为具有自定义文件扩展名(CST)的XML文件添加一个内容类型,并得到以下错误--无法为com.example.cstfile创建内容描述器。内容类型已被禁用。
这是我的plugin.xml文件-
<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>我正试图通过调试org.eclipse.core.internal.content.ContentTypeCatalog来找出原因,但到目前为止还没有找到任何原因,非常感谢您的帮助。
发布于 2022-10-17 13:27:59
它看起来像是来自对ContentTypes.invalidateDescriber的调用--内容描述程序抛出了一个异常。
查看XMLRootElementContentDescriber2,当尝试解析javax.xml.parsers.ParserConfigurationException时,如果它得到一个javax.xml.parsers.ParserConfigurationException异常,它就会抛出一个异常。
工作空间的.log目录中的.metadata文件中应该有更多的信息。
https://stackoverflow.com/questions/74094050
复制相似问题