Trying to use XML Editor on our custom xml types [message #177641] |
Mon, 21 August 2006 18:27  |
Eclipse User |
|
|
|
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 15:07  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.28319 seconds