Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Adding New Legal File Types to XML Generate
Adding New Legal File Types to XML Generate [message #175330] Mon, 24 July 2006 23:28 Go to next message
Eclipse UserFriend
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 #175353 is a reply to message #175330] Tue, 25 July 2006 11:53 Go to previous messageGo to next message
Craig Salter is currently offline Craig SalterFriend
Messages: 169
Registered: July 2009
Senior Member
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!
Re: Adding New Legal File Types to XML Generate [message #175390 is a reply to message #175353] Tue, 25 July 2006 16:26 Go to previous messageGo to next message
Eclipse UserFriend
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!
>
Re: Adding New Legal File Types to XML Generate [message #175511 is a reply to message #175390] Wed, 26 July 2006 15:45 Go to previous message
Craig Salter is currently offline Craig SalterFriend
Messages: 169
Registered: July 2009
Senior Member
I assume 'xbd' is the file extension of your XML instance document? If so
I'm not sure why you're seeing any problems. If not and this is the
extension of your schema document I can think of a few places in the code
where content type is not respected and 'dtd' and 'xsd' are pretty much
hard coded.
Previous Topic:Dependency war
Next Topic:Error creating JBoss 3.2.6 server runtime eclipse 3.2 (wtp 1.5)
Goto Forum:
  


Current Time: Fri Mar 29 15:56:53 GMT 2024

Powered by FUDForum. Page generated in 0.02510 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top