Home » Language IDEs » ServerTools (WTP) » XML multipage editor cutomization (GEF, design and source)
|
Re: XML multipage editor cutomization (GEF, design and source) [message #156858 is a reply to message #156850] |
Mon, 16 January 2006 23:37 |
|
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 #157762 is a reply to message #156858] |
Tue, 24 January 2006 00:20 |
Brian Jakubik 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 |
|
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
|
|
| |
Goto Forum:
Current Time: Sat Nov 09 05:05:33 GMT 2024
Powered by FUDForum. Page generated in 0.03652 seconds
|