【问题标题】:How to add an XSD to Eclipse catalog directly如何直接将 XSD 添加到 Eclipse 目录
【发布时间】:2014-02-24 17:14:27
【问题描述】:

我正在为 Eclipse 开发一个插件,其中一个功能是能够编辑 XML。为此,我必须在 Eclipse 目录中添加 XSD。 有没有一种简单的方法可以直接将 XSD 添加到 Eclipse 目录(我的意思是直接通过代码)

【问题讨论】:

    标签: xml eclipse plugins xsd


    【解决方案1】:

    您可以使用org.eclipse.wst.xml.core.catalogContributions 扩展点(这要求您安装了Eclipse 的Web Tools (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>
    

    【讨论】:

      猜你喜欢
      • 2014-09-29
      • 2012-07-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-06-06
      • 2020-12-03
      • 2015-05-17
      • 1970-01-01
      相关资源
      最近更新 更多