【问题标题】:How does Eclipse generate the Plugin Specified Entries in the XML catalog?Eclipse 如何在 XML 目录中生成 Plugin Specified Entries?
【发布时间】:2014-02-24 14:23:56
【问题描述】:

我希望我的 Eclipse 插件为 Eclipse 指定一个 XSD 文件,以便可以将其添加到目录中。

【问题讨论】:

    标签: xml eclipse xsd xmlcatalog


    【解决方案1】:

    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>
    

    【讨论】:

      【解决方案2】:

      它从扩展点读取它们。 org.eclipse.wst.standard.schemas 和 org.eclipse.jst.standard.schemas(均来自 Web 工具平台并随 Java EE IDE 一起安装)包含许多示例。由于这些插件中没有编译代码,您可以研究安装的副本。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2012-07-11
        • 1970-01-01
        • 1970-01-01
        • 2012-08-07
        • 2013-03-16
        • 2011-11-23
        相关资源
        最近更新 更多