【发布时间】:2014-02-24 14:23:56
【问题描述】:
我希望我的 Eclipse 插件为 Eclipse 指定一个 XSD 文件,以便可以将其添加到目录中。
【问题讨论】:
标签: xml eclipse xsd xmlcatalog
我希望我的 Eclipse 插件为 Eclipse 指定一个 XSD 文件,以便可以将其添加到目录中。
【问题讨论】:
标签: xml eclipse xsd xmlcatalog
org.eclipse.wst.xml.core.catalogContributions 扩展点允许您添加到目录(这要求您安装了 Eclipse 的 Web 工具 (WST) 组件)。
例如org.eclipse.wst.xsd.core 插件添加了这个:
<extension
point="org.eclipse.wst.xml.core.catalogContributions">
<catalogContribution id="default">
<uri
name="http://www.w3.org/2001/XMLSchema"
uri="platform:/plugin/org.eclipse.xsd/cache/www.w3.org/2001/XMLSchema.xsd" />
<system
systemId="http://www.w3.org/2001/xml.xsd"
uri="platform:/plugin/org.eclipse.xsd/cache/www.w3.org/2001/xml.xsd"/>
</catalogContribution>
</extension>
【讨论】:
它从扩展点读取它们。 org.eclipse.wst.standard.schemas 和 org.eclipse.jst.standard.schemas(均来自 Web 工具平台并随 Java EE IDE 一起安装)包含许多示例。由于这些插件中没有编译代码,您可以研究安装的副本。
【讨论】: