Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » How should I deal with XML files in my plugin(I wanna use the method integrated with Eclipse platfor
How should I deal with XML files in my plugin(I wanna use the method integrated with Eclipse platfor [message #306747] Fri, 04 August 2006 02:52 Go to next message
Eclipse UserFriend
Originally posted by: zzk101.hotmail.com

Hi:
We know there are many kinds of xml files in the platform, (plugin.xml for
example). I wanna know how Eclipse deals with them. Yes, there are many
methods and API in the universe, but I don't wanna use others. I wanna use
the same API as Eclipse does. Can you give me this information? You can
illustrate with how to read, analyze, write plugin.xml.
Re: How should I deal with XML files in my plugin(I wanna use the method integrated with Eclipse pla [message #306881 is a reply to message #306747] Tue, 08 August 2006 12:07 Go to previous messageGo to next message
Eclipse UserFriend
Vic wrote:
> Hi:
> We know there are many kinds of xml files in the platform, (plugin.xml for
> example). I wanna know how Eclipse deals with them. Yes, there are many
> methods and API in the universe, but I don't wanna use others. I wanna use
> the same API as Eclipse does. Can you give me this information? You can
> illustrate with how to read, analyze, write plugin.xml.

There are classes like DialogSettings and the implementors of the
IMemento interface that eclipse uses to read and write xml files. There
are also classes like the ExtensionParser in the extension registry that
specifically deals with plugin.xml

You can also check out how the ManifestEditor and ExtensionBlock deal
with the plugin.xml

Later,
PW
Re: How should I deal with XML files in my plugin(I wanna use the method integrated with Eclipse pla [message #306905 is a reply to message #306881] Wed, 09 August 2006 04:11 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ahmedlazreg.free.fr

Hi Vic,
I hope you have found the answer in Paul's post. But (personnally) I think
that it's a stupid idea to try to do every thing with Eclipse API or the
Eclipse way. I think that Eclipse is a very high quality platform, but the
integration to this platform does not imply or force you to be limited to
its api. When we deal for example with files in the workspace, it's a good
idea (or may be the BEST one) to use Eclipse API in order to keep every
thing synchronized. When we deal with the presentation layer of an
application, the best is to use Eclipse API. But when we deal with
productive part of an application (the business layer, ... the processing
part of an application) may be the best is to use directly JAVA api, to
avoid to introduce any level of indirection. XML processing is very well
done with JAVA api, and even if Eclipse API will change in the future, I do
not think that this will have any effect on the code that will manage XML or
process it. So you can use SAX or DOM without having to deal with Eclipse
api at all.
This is only an opinion, since I do not know your needs I cant say more.

Best regards.
A.Lazreg
octal@pocketmt.com
http://www.pocketmt.com the mcuStudio Home Page ;) you can see a dirty demo
at http://www.pocketmt.com/demo/idm2.htm


"Paul Webster" <pwebster@ca.ibm.com> a
Re: How should I deal with XML files in my plugin(I wanna use the method integrated with Eclipse pla [message #306921 is a reply to message #306905] Wed, 09 August 2006 09:19 Go to previous message
Eclipse UserFriend
Ahmed LAZREG wrote:
> So you can use SAX or DOM without having to deal with Eclipse
> api at all.
> This is only an opinion, since I do not know your needs I cant say more.

I agree ...

If you are reading/writing plugin settings, IMemento or DialogSettings
are handy (and consistent with the way a lot of platform plugins
save/restore settings). But they are just convenience objects and not
mandatory, and property files are good for plugin settings as well.

For reading XML I would reach for the standard SAX API (or DOM,
depending on which serves your application needs better).

Later,
PW
Previous Topic:How do I change the icon of a toolbar button from OUTSIDE of the button itself?
Next Topic:adding paren matching in editor
Goto Forum:
  


Current Time: Sat May 10 16:05:23 EDT 2025

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

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

Back to the top