Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » A plugin backed by XML
A plugin backed by XML [message #286127] Thu, 02 June 2005 20:03 Go to next message
Eclipse UserFriend
Originally posted by: craig.haenterprises.com.au

I currently have code (an application) that reads an XML file and
generates java classes. However, the XML file can get quite large and
cumbersome, so I would like to write an eclipse GUI plugin that lets you
manage the file through GUI controls - much like the GUI that lets you
manage a plugin's feature.xml file (ie. with one or more GUI tabs and an
XML source tab).

However, I must admit that I am confused about how I should model it
internally. Do most people keep a DOM tree (or some other internal
representation of the XML) and update that when the user changes something
on the GUI? If so, does that imply that the contents of the Source panel
gets regenerated from the internal representation every time the user
switches back to it? What about if the user changes the XML directly; at
what point do I refresh the internal representation and/or the GUI
controls?

Sorry for the barrage of questions... I have searched around on the web
looking for a simple example, but couldn't find anything. Any advice or
pointers to existing articles would be very much appreciated. Many thanks.

Cheers,
Craig
Re: A plugin backed by XML [message #286142 is a reply to message #286127] Fri, 03 June 2005 01:15 Go to previous messageGo to next message
Eclipse UserFriend
Craig Edwards wrote:

> I currently have code (an application) that reads an XML file and
> generates java classes. However, the XML file can get quite large and
> cumbersome, so I would like to write an eclipse GUI plugin that lets you
> manage the file through GUI controls - much like the GUI that lets you
> manage a plugin's feature.xml file (ie. with one or more GUI tabs and an
> XML source tab).
>
> However, I must admit that I am confused about how I should model it
> internally. Do most people keep a DOM tree (or some other internal
> representation of the XML) and update that when the user changes
> something on the GUI? If so, does that imply that the contents of the
> Source panel gets regenerated from the internal representation every
> time the user switches back to it? What about if the user changes the
> XML directly; at what point do I refresh the internal representation
> and/or the GUI controls?
> Sorry for the barrage of questions... I have searched around on the web
> looking for a simple example, but couldn't find anything. Any advice or
> pointers to existing articles would be very much appreciated. Many thanks.
>
> Cheers,
> Craig
>
>
>

Have you looked at the EMF project? EMF is real useful for modeling
models internally in Eclipse. Much heavy lifting around refresh and
undo has already been done there and I think it is behind the
implementation of the manifest editors, like that for feature.xml, in
Eclipse itself.

-
Steve
Re: A plugin backed by XML [message #286143 is a reply to message #286142] Fri, 03 June 2005 01:20 Go to previous message
Eclipse UserFriend
Steve Blass wrote:

> Craig Edwards wrote:
>
>> I currently have code (an application) that reads an XML file and
>> generates java classes. However, the XML file can get quite large and
>> cumbersome, so I would like to write an eclipse GUI plugin that lets
>> you manage the file through GUI controls - much like the GUI that lets
>> you manage a plugin's feature.xml file (ie. with one or more GUI tabs
>> and an XML source tab).
>>
>> However, I must admit that I am confused about how I should model it
>> internally. Do most people keep a DOM tree (or some other internal
>> representation of the XML) and update that when the user changes
>> something on the GUI? If so, does that imply that the contents of the
>> Source panel gets regenerated from the internal representation every
>> time the user switches back to it? What about if the user changes the
>> XML directly; at what point do I refresh the internal representation
>> and/or the GUI controls?
>> Sorry for the barrage of questions... I have searched around on the
>> web looking for a simple example, but couldn't find anything. Any
>> advice or pointers to existing articles would be very much
>> appreciated. Many thanks.
>>
>> Cheers,
>> Craig
>>
>>
>>
>
> Have you looked at the EMF project? EMF is real useful for modeling
> models internally in Eclipse. Much heavy lifting around refresh and
> undo has already been done there and I think it is behind the
> implementation of the manifest editors, like that for feature.xml, in
> Eclipse itself.
>
> -
> Steve

.... but I could be wrong. This was in another thread here today:

unknown wrote:
>.so JDT ,PDE needn't EMF ?
>

no, neither JDT nor PDE require EMF
/adam

-
Steve
Previous Topic:Eclipse is suddenly freezed
Next Topic:RTL
Goto Forum:
  


Current Time: Sat May 03 10:48:53 EDT 2025

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

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

Back to the top