Adding New Legal File Types to XML Generate [message #175330] |
Mon, 24 July 2006 23:28 |
Eclipse User |
|
|
|
Originally posted by: hcurtis.xaware.com
In our plugin I would like to add three new files types that would be
treated as legal XML file types for the XML Generate to produce. This is
the generate from an XML schema menu option. I would prefer to do this in
our plugin's plugin.xml. Could someone suggest how to accomplish this or
where I should look to see how it may be done?
Thank you,
Bud Curtis
|
|
|
|
Re: Adding New Legal File Types to XML Generate [message #175390 is a reply to message #175353] |
Tue, 25 July 2006 16:26 |
Eclipse User |
|
|
|
Originally posted by: hcurtis.xaware.com
I was able to find an extension that worked:
<extension point="org.eclipse.core.runtime.contentTypes">
<file-association
content-type="org.eclipse.core.runtime.xml"
file-extensions="xbd"/>
</extension>
but I do not know why my first attempt (the following) had no effect:
<extension point="org.eclipse.core.runtime.contentTypes">
<content-type
base-type="org.eclipse.core.runtime.xml"
default-charset="UTF-8"
describer="org.eclipse.core.internal.content.XMLContentDescriber "
file-extensions="xbd"
id="xaware_xml"
name="XML"
priority="high">
</content-type>
</extension>
I would have thought the second case would have added to the base-type the
file extension.
Is there a document, book, or on-line help that could explain why one over
the other works in this case. While the idea of extensions is pretty clear,
the application of one over the other is still muddy water at best.
Thanks for your help by the way,
Regards,
Bud Curtis
"craig" <csalter@ca.ibm.com> wrote in message
news:d0acfe0a117f7c460bcc3d4bdfc5cd57$1@www.eclipse.org...
> Bud Curtis wrote:
>
>> In our plugin I would like to add three new files types that would be
>> treated as legal XML file types for the XML Generate to produce. This is
>> the generate from an XML schema menu option. I would prefer to do this
>> in our plugin's plugin.xml. Could someone suggest how to accomplish this
>> or where I should look to see how it may be done?
>
>> Thank you,
>> Bud Curtis
>
> Take a look at the xml.ui plugin. Specifically the NewXMLWizard and
> NewXMLGenerator class. Notice that this code is driven off a CMDocument
> model which is abstraction layer over a grammar model such as a DTD or XML
> Schema.
> Good luck!
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.04009 seconds