Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Trying to use XML Editor on our custom xml types
Trying to use XML Editor on our custom xml types [message #177641] Mon, 21 August 2006 22:27 Go to next message
Eclipse UserFriend
Originally posted by: hcurtis.xaware.com

We have several custom types of XML files. Each with their own suffix. For
example, one of our XML files is called a BizDocument and its suffix is xbd.
When I attempt to use the XML Editor I get the following message even though
it shows as a valid editor selection in the "Open with" menu item.

"Unsupported content type in editor. To associate file extension with a
supported content type, please see Content Types Preference Page"

Our plugin.xml has the following assignments to set the content-type:

<extension point="org.eclipse.core.runtime.contentTypes">
<file-association content-type="org.eclipse.core.runtime.xml"
file-extensions="xbd"/>
<file-association content-type="org.eclipse.core.runtime.xml"
file-extensions="xbc"/>
....
</extension>

There is also the following that provides a definition for our custom
editor:

<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,xbc,xdr"
id="biz_content"
name="Biz Content"
priority="high">
</content-type>
</extension>

When I look under the text/XML content types the our custom file suffixs are
shown as locked. They are also listed under

"text/XML/Biz Content"

and shown as locked. Is this confusing the XML Editor? If so, how can I
get around it and still let our editor access to our custom XML files only.


--
Bud Curtis
XAware, Inc.
719-884-5443
Re: Trying to use XML Editor on our custom xml types [message #181584 is a reply to message #177641] Thu, 12 October 2006 19:07 Go to previous message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4435
Registered: July 2009
Senior Member

Bud Curtis wrote:
> We have several custom types of XML files. Each with their own suffix. For
> example, one of our XML files is called a BizDocument and its suffix is xbd.
> When I attempt to use the XML Editor I get the following message even though
> it shows as a valid editor selection in the "Open with" menu item.
>
> "Unsupported content type in editor. To associate file extension with a
> supported content type, please see Content Types Preference Page"
>
> Our plugin.xml has the following assignments to set the content-type:
>
> <extension point="org.eclipse.core.runtime.contentTypes">
> <file-association content-type="org.eclipse.core.runtime.xml"
> file-extensions="xbd"/>
> <file-association content-type="org.eclipse.core.runtime.xml"
> file-extensions="xbc"/>
> ....
> </extension>
>
> There is also the following that provides a definition for our custom
> editor:
>
> <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,xbc,xdr"
> id="biz_content"
> name="Biz Content"
> priority="high">
> </content-type>
> </extension>
>
> When I look under the text/XML content types the our custom file suffixs are
> shown as locked. They are also listed under
>
> "text/XML/Biz Content"
>
> and shown as locked. Is this confusing the XML Editor? If so, how can I
> get around it and still let our editor access to our custom XML files only.

Odds are you should try it with just the file associations added.
The part where you declare your own editor is actually declaring
another content type, and reusing the basic XML describer may not be
having the effect you intended.

--
- Nitin


_
Nitin Dahyabhai
Eclipse Web Tools Platform
Previous Topic:Turning off validator in JUnit tests
Next Topic:Snippets View Contributions Extension
Goto Forum:
  


Current Time: Fri Apr 26 10:42:10 GMT 2024

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

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

Back to the top