Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [wtp-incubator-dev] EMF2DOMSSE

Konstantin Komissarchik wrote:
Yes, the EMF2DOM infrastructure is definitely built on assumption that you are mapping to specific java types based on element names. Good fit if your model represents a particular schema, but probably not for cases where you are trying to model arbitrary XML.

So why not just use DOM with SSE extensions directly if your editor manipulates generic XML? That gives you structure plus offset information. What would be gained by introducing another model and then having to deal with bi-directional synchronization problems?
The problem is that the offset information is completely different between the VEX Visual Editor and the DOM Structured Text Editor. They are representing two different types of models though modeling similar concepts.

However, I'm doing something similar to what you had suggested after talking with Ed Merks, basically doing a wrapper, and handling the notifications within the EMF classes themselves. It's similar to the wrapping concept that you mentioned earlier. I originally thought about just extending the existing SSEDOM to handle the other information I needed (i.e. different offsets, etc) but that was going to mean reimplementing much of the WTP DOM implementation which was more than I wanted to deal with.

He does something similiar with the org.eclispe.xsd code, and so I'm basing some of it off of that implementation. So I'm seeing how the wtp xsd editor and the emf based xsd editor from wtp keep in synch.

Dave




Back to the top