coldistric
coldistric

Reputation: 303

How to add an XSD to Eclipse catalog directly

I am developing a plugin for Eclipse, one of the features is to be able to edit XML. In order to do that I have to add the XSD in Eclipse catalog. Is there an easy way to add an XSD to Eclipse catalog directly (I mean directly through code)

Upvotes: 0

Views: 913

Answers (1)

greg-449
greg-449

Reputation: 111197

You can use the org.eclipse.wst.xml.core.catalogContributions extension point (this requires that you have the Web Tools (WST) component of Eclipse installed.

The following is the contribution made by the org.eclipse.wst.xsd.core plugin:

<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>

Upvotes: 2

Related Questions