Questions about building on top of the XML Editor [message #213952] |
Fri, 16 May 2008 20:05  |
Eclipse User |
|
|
|
Originally posted by: kosta.bea.com
I am in the process of writing a form-based editor for an XML file and I
want to use WTP's XML editor as the source view. I found a way to get at
the XML DOM of the editor and I am able to push changes from the
form-based editor to the source view.
Couple of questions...
1. How does one listen for changes to the DOM (in order to update the
form-based UI)?
2. Is there a trick/utility for handling formatting when creating
content? I know how to do it manually by adding various whitespace
sections to the DOM tree, but I'd rather not re-invent the wheel if the
wheel already exists. :)
Thanks,
- Konstantin
|
|
|
|
|
|
Re: Questions about building on top of the XML Editor [message #213983 is a reply to message #213969] |
Mon, 19 May 2008 09:28   |
Eclipse User |
|
|
|
Originally posted by: dcarver.starstandard.org
Konstantin Komissarchik wrote:
> Yeah, I've been sifting through all that code, but without having a real
> good grasp about what all the pieces are, what they are called and how
> they are put together, it's a bit like looking for a needle in the
> haystack.
>
> I did find IStructuredDocument.addDocumentChangedListener() api, but
> that isn't the right level of abstraction for me since it deals with
> document regions. I am looking for something that deals with DOM nodes.
>
As for some of the DOM nodes, you might want to look at the
EMFDOMAdaptor, which I think will get you in the direction you want to
go, as it keeps an EMF Model and DOM model in synch, so that changes to
one get propopogated into the other. Might be able to do something
similar in your situation, or at least it might give you some ideas.
> Regarding the formatting question, I am not looking for a way to format
> an existing document, but rather for something that will create
> well-formatted structure (in localized manner) as new content is added
> to the document.
I believe that is taken care of for you automatically, but I could be
mistaken.
|
|
|
|
|
|
|
Re: Questions about building on top of the XML Editor [message #217183 is a reply to message #214020] |
Wed, 09 July 2008 07:53  |
Eclipse User |
|
|
|
Originally posted by: renhart.gittens.ouls.ox.ac.uk
Hi Konstantin,
I'm also in the process of writing a form-based editor for an XML files
controlled by XSD schemas. Would you be willing to share what you've
learned with me. I would really appreciate sight of your model etc as you
appear to have already explored the areas I'm finding difficulty with.
I've looked at the PDE Schema editor but I really need the model to run
from the DOM as you appear to.
Many thanks
Renhart
|
|
|
Powered by
FUDForum. Page generated in 0.04537 seconds