Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » subclassing org.eclipse.wst.xmleditor?
subclassing org.eclipse.wst.xmleditor? [message #197317] Thu, 01 March 2007 20:34 Go to next message
Ric Wright is currently offline Ric WrightFriend
Messages: 70
Registered: July 2009
Member
I have a number of XML-based files I would like to edit that don't have
a normal "xml" extension (e.g. "opf"). Is it possible to extend the
org.eclipse.wst.xmleditor to support:
- different extensions
- adding my own problems and markers (via IMarker)
- using my own DTDs and schemas.

I assume the answer is yes, but part of what I am trying to figure out
is difficult it might be. I implemented a simple editor using the
standard Eclipse XML editor in the template wizard, but it lacks most of
the features of the WTP implementation. Of course, the ideal answer is
yes, it's possible and a pointer to an example of how to do it. :-)

Also, is this question and related ones more appropriately asked on the
WTP newsgroup? Or is that intended for people actually building the WTP
pieces?

Thanks in advance, Ric Wright
Re: subclassing org.eclipse.wst.xmleditor? [message #197375 is a reply to message #197317] Thu, 01 March 2007 23:58 Go to previous messageGo to next message
Ric Wright is currently offline Ric WrightFriend
Messages: 70
Registered: July 2009
Member
Well, to answer my own question, it looks like the blessed approach is
my setting the "editor configuration" extension point of the SSE
Structured Text Editor. However, the documentation on how to do this,
exactly, is vague at best. Like with a lot of Eclipse it consists of
"here's an API, now go read the code in the plugin". If anyone knows of
a clear example of how to use this extension point, I would appreciate
it. Thanks.

Ric Wright wrote:
> I have a number of XML-based files I would like to edit that don't have
> a normal "xml" extension (e.g. "opf"). Is it possible to extend the
> org.eclipse.wst.xmleditor to support:
> - different extensions
> - adding my own problems and markers (via IMarker)
> - using my own DTDs and schemas.
>
> I assume the answer is yes, but part of what I am trying to figure out
> is difficult it might be. I implemented a simple editor using the
> standard Eclipse XML editor in the template wizard, but it lacks most of
> the features of the WTP implementation. Of course, the ideal answer is
> yes, it's possible and a pointer to an example of how to do it. :-)
>
> Also, is this question and related ones more appropriately asked on the
> WTP newsgroup? Or is that intended for people actually building the WTP
> pieces?
>
> Thanks in advance, Ric Wright
Re: subclassing org.eclipse.wst.xmleditor? [message #197414 is a reply to message #197317] Fri, 02 March 2007 05:01 Go to previous message
Steve Blass is currently offline Steve BlassFriend
Messages: 276
Registered: July 2009
Senior Member
Ric Wright wrote:
> I have a number of XML-based files I would like to edit that don't have
> a normal "xml" extension (e.g. "opf"). Is it possible to extend the
> org.eclipse.wst.xmleditor to support:
> - different extensions
> - adding my own problems and markers (via IMarker)
> - using my own DTDs and schemas.
>
> I assume the answer is yes, but part of what I am trying to figure out
> is difficult it might be. I implemented a simple editor using the
> standard Eclipse XML editor in the template wizard, but it lacks most of
> the features of the WTP implementation. Of course, the ideal answer is
> yes, it's possible and a pointer to an example of how to do it. :-)
>
> Also, is this question and related ones more appropriately asked on the
> WTP newsgroup? Or is that intended for people actually building the WTP
> pieces?
>
> Thanks in advance, Ric Wright

You can add extensions to the list supported by the xml editor in your
workbench through the Window menu under Preferences in the
General->Editors->File Associations dialog. Add opf to the list of file
types and then add the XML editor to the list of editors associated with
the opf file type. The WTP newsgroup is a good place to ask about
problems and markers coding.
Previous Topic:IBM + Eclipse +Speech Recognition?
Next Topic:Connecting to MySql 5.0
Goto Forum:
  


Current Time: Sat Apr 20 01:05:24 GMT 2024

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

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

Back to the top