Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » XML multipage editor cutomization (GEF, design and source)
XML multipage editor cutomization (GEF, design and source) [message #156850] Mon, 16 January 2006 23:15 Go to next message
Brian Jakubik is currently offline Brian JakubikFriend
Messages: 140
Registered: July 2009
Senior Member
Im trying to create a multipage editor like the xml editor, but instead of
the design page, it would have a GEFeditor representing the XML...

I have the multi pages and a simple gef editor in place. now I have to hook
them together.

From my understanding the XML editor has the Source editor handle the DOM,
and the design page makes changes to the Source editor, not to the DOM
directly ... Is my unserstanding correct?

If it is, where is the design page changing the document (source)? Ive
tried to look through the source, but I get Lost with everything that is
going on. Could someone point me in the right direction, I would greatly
appreciate it.

Thanks
Brian
Re: XML multipage editor cutomization (GEF, design and source) [message #156858 is a reply to message #156850] Mon, 16 January 2006 23:37 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4434
Registered: July 2009
Senior Member

Brian Jakubik wrote:
> From my understanding the XML editor has the Source editor handle the DOM,
> and the design page makes changes to the Source editor, not to the DOM
> directly ... Is my unserstanding correct?

No, it makes changes using the DOM interfaces (with help from
IDOMModel) as much as possible. Certain precise changes are often
done using the raw text, but this tends to be used mostly by
formatting and cleanup where whitespace is significant. Selection
and responsibilities such as saving are routed through the
StructuredTextEditor, though.

> If it is, where is the design page changing the document (source)? Ive
> tried to look through the source, but I get Lost with everything that is
> going on. Could someone point me in the right direction, I would greatly
> appreciate it.

The design page is actually using the text document to obtain the
DOM model, Otherwise, it tends not to be used there.

--
- Nitin


_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: XML multipage editor cutomization (GEF, design and source) [message #157085 is a reply to message #156850] Wed, 18 January 2006 04:12 Go to previous messageGo to next message
David Williams is currently offline David WilliamsFriend
Messages: 722
Registered: July 2009
Senior Member
While Nitin answered your main question, thought I'd be sure to point ou=
t that the
schema editor does something similar to what you mention .... uses GEF o=
n the design page,
and our source editor as the source page (as does the WSDL editor). So .=
... you might look to
those for inspriation if you haven't already.
Re: XML multipage editor cutomization (GEF, design and source) [message #157762 is a reply to message #156858] Tue, 24 January 2006 00:20 Go to previous messageGo to next message
Brian Jakubik is currently offline Brian JakubikFriend
Messages: 140
Registered: July 2009
Senior Member
Can anyone point me to these said DOM interfaces as im am so lost in how
the editor is making these changes. Closest I can find it is being done
through XMLModelUpdater, but it is in internal and I have no visibility to
use it.

Or am I missing the whole boat?

Basically what I am trying to do is make a multipage editor very similar to
the XSD editor, with source on one page and Gef on the next, when a change
is made in gef page, source knows about it, and same other way around. But
not knowing how to update the DOM, changes to the gef dont keep in sync with
the source.....

Sorry to keep asking the same thing but thak you for your time

Brian


"Nitin Dahyabhai" <nitind@us.ibm.com> wrote in message
news:dqhanh$qj8$1@utils.eclipse.org...
> Brian Jakubik wrote:
>> From my understanding the XML editor has the Source editor handle the
>> DOM, and the design page makes changes to the Source editor, not to the
>> DOM directly ... Is my unserstanding correct?
>
> No, it makes changes using the DOM interfaces (with help from IDOMModel)
> as much as possible. Certain precise changes are often done using the raw
> text, but this tends to be used mostly by formatting and cleanup where
> whitespace is significant. Selection and responsibilities such as saving
> are routed through the StructuredTextEditor, though.
>
>> If it is, where is the design page changing the document (source)? Ive
>> tried to look through the source, but I get Lost with everything that is
>> going on. Could someone point me in the right direction, I would greatly
>> appreciate it.
>
> The design page is actually using the text document to obtain the DOM
> model, Otherwise, it tends not to be used there.
>
> --
> - Nitin
Re: XML multipage editor cutomization (GEF, design and source) [message #157826 is a reply to message #157762] Tue, 24 January 2006 07:25 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4434
Registered: July 2009
Senior Member

Brian Jakubik wrote:
> Can anyone point me to these said DOM interfaces as im am so lost in how
> the editor is making these changes. Closest I can find it is being done
> through XMLModelUpdater, but it is in internal and I have no visibility to
> use it.

No, in fact I got asked the same question just last week. The DOM
interfaces mentioned are the interfaces in the org.w3c.dom packages.
The XML model implements them to a reasonable extent. Changes
made to the model using the DOM interfaces are automatically
reflected in the text, and vice-versa, assuming the syntax is
well-formed. Most of your concern will be in keeping your GEF model
in sync with DOM changes.

--
- Nitin


_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: XML multipage editor cutomization (GEF, design and source) [message #879910 is a reply to message #157826] Fri, 01 June 2012 05:25 Go to previous message
chavi   is currently offline chavi Friend
Messages: 67
Registered: April 2011
Member
Hi ,
Sorry to open this thread again..

Are you guys able to solve the problem to do Sync in between Source and GEF Design page?
I am not able to understand "Changes
made to the model using the DOM interfaces are automatically
reflected in the text
". Can you please guide me that how to start with it.
Actually i am completely lost as i have gone through xml bundle source code,I am not able to connect that how are these editor using the DOM Interface to generate xml code so that it would be sync with GEF Design page.

Please help
Thanks...
Previous Topic:Plain Java Project Web Service Client
Next Topic:Rhino debugging in Helios - What am I missing?
Goto Forum:
  


Current Time: Sat Apr 20 02:03:10 GMT 2024

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

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

Back to the top