Skip to main content



      Home
Home » Language IDEs » ServerTools (WTP) » Re: Structured Text Editor and EMF Model
Re: Structured Text Editor and EMF Model [message #195935] Tue, 10 July 2007 07:26
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Ralph,

Unfortunately I don't have any experience with StructuredTextEditor.
I've always wanted to use it to provide a source view in the generated
editor, but since WTP depends on EMF we couldn't add a reverse
dependency. But I think WTP's features were restructured in the last
release to separate out the XML editor support, so I think it should now
be possible. I've added the WTP newsgroup to the reply since someone
reading that group may have more experience with this type of problem.
Feel free to open a bugzilla enhancement request for EMF to look into
generating a source view. I suppose we could do something very crude
like is done for the sample XSD editor, i.e., when the source changes,
reparse the whole model and when the model changes, regenerate the whole
source. But doing something incremental at the level of individual
changes to nodes in the DOM and change to EObjects in containment tree
would be very interesting. Certainly all the notification mechanisms
are in place to support that level of granularity. (I'm not promising
we'll do this, but it's something I've always wanted to do.)


Ralph wrote:
> Hello,
>
> I have a complex xml schema from which I generated a genmodel and then the code (Generate All). Now I have a fully functional tree editor, outline - and properties view and all is in sync. But the problem is I need an source (text) editor which emf doesn't generate.
>
> So I spent a long time to find an easy way to use a simple <i>StructuredTextEditor </i>(instead of the created <i>MultiPageEditor</i> with one one more trees) to edit the xml directly. I have studied the xsd and wsdl Plug-In and I find it very hard to implement my editor this way (a lot of model conversion and listener..).
>
> If I use only the <i>StructuredTextEditor </i>(content type in plugin.xml declared) then consequently editor and outline are in sync but I have the default outline. And I dont'want to adjust labels and text through code like <i>if ("field".equals(element.getNodeName()))</i> in my <i>XMLContentOutlineConfiguration</i>. I need to have the model objects.
> On the other site If I use the generated classes and set the StructuredTextEditor I have the problem how I sync between editor and outline and editor and properties view (outline and properties view sync is no problem, thanks to emf). My objects doesn't implement <i>IndexedRegion</i>.
> So I need 'only' a way to join this tweo ways but I found no solution.
>
> After reading http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse. wst.doc.isv/html/plugin_descriptions_WST/cheatsheet_tutorial .html
> I thought that the extension adapterFactoryDescription could help me. But then I need obviously a <i>JFaceNodeAdapterFactory </i>and a class which implements <i>IJFaceNodeAdapter</i>. I'm not sure if this could help me?
>
> The generated adapter factory uses <i>org.eclipse.emf.common.notify.impl.AdapterFactoryImpl</i >. Can I combine this with <i>JFaceNodeAdapterFactory </i>to get the data in asingle step (one read)?
>
> I could also imagine to extend my model classes with <i> org.eclipse.wst.xml.core.internal.provisional.document.IDOMN ode </i> for every model object if this would solve my problem. Then the editor or else (?) have to read the model and set additionally the <i>IDOMNode</i>. Where is the place to do this?
>
> Shortly:
> I search a simple solution to use the generated emf model (which is quite complex) and the generated providers for outline and propeties view in combination with a structured text editor which cares about synchronization between editor and views.
>
> Many thanks for your attention. Your help would be very appreciated.
>
> Regards,
> Ralph
>
Previous Topic:Removing error markers for invalid DTD
Next Topic:Migrating from JBuilder to Europa using Resin
Goto Forum:
  


Current Time: Sat May 10 07:43:40 EDT 2025

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

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

Back to the top