Skip to main content



      Home
Home » Modeling » TMF (Xtext) » Synchronize Xtext and GMF editors
Synchronize Xtext and GMF editors [message #683927] Tue, 14 June 2011 13:07 Go to next message
Eclipse UserFriend
Hi,

With the help of Jan topic http://koehnlein.blogspot.com/2009/06/synchronized-editors-with-tmfxtext-and.html, i have succeeded in synchronizing both editors.
The problem that i have is that actually im working on a multipage editor, so, the property Same File for Diagram And Model is set to true and the domain and diagram files extensions have the same values, doing so , i found problems in remaking work the synchro stuff.

Any ideas how i could deal with the synchronization without actual parameters?

thanks
Re: Synchronize Xtext and GMF editors [message #686137 is a reply to message #683927] Mon, 20 June 2011 03:01 Go to previous messageGo to next message
Eclipse UserFriend
I cannot see how same file for diagram and model would ever work with
Xtext, as you'd have a mixed content (XMI, Xtext based text) resource.
I'd rather keep the two separated and register the editor to both
extensions.

Am 14.06.11 19:07, schrieb elhamlaoui:
> Hi,
>
> With the help of Jan topic
> http://koehnlein.blogspot.com/2009/06/synchronized-editors-with-tmfxtext-and.html,
> i have succeeded in synchronizing both editors.
> The problem that i have is that actually im working on a multipage
> editor, so, the property Same File for Diagram And Model is set to true
> and the domain and diagram files extensions have the same values, doing
> so , i found problems in remaking work the synchro stuff.
>
> Any ideas how i could deal with the synchronization without actual
> parameters?
>
> thanks


--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com
Re: Synchronize Xtext and GMF editors [message #686569 is a reply to message #686137] Wed, 22 June 2011 10:05 Go to previous messageGo to next message
Eclipse UserFriend
Hi Jan ,

Thanks for the reply, its exactly what i conclued with reaserch, actually i creat an xtext file and i run the perform action diagram, which is a multipage editor and i inject the content of xtext file in one of myeditor pages.

Re: Synchronize Xtext and GMF editors [message #692424 is a reply to message #686569] Mon, 04 July 2011 08:17 Go to previous message
Eclipse UserFriend
Actually, you can get the same file for diagram and model to work, but it's not for the faint of heart. You have to specialize several Xtext classes like the XtextLazyLinkingResource, among others, not to mention several GMF classes and code generation templates. All in all about a dozen classes, some of which have to be injected into your Xtext editor. I don't recommend doing it unless you really really really have a pressing need, as well as time and an understanding of how these editors work. The solution is not guaranteed to work with future versions and it may even void your warranty. In other words, there is no nice, general solution Sad
Previous Topic:Using Xbase in own grammar
Next Topic:'Cannot find type' error
Goto Forum:
  


Current Time: Wed Jul 23 21:12:35 EDT 2025

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

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

Back to the top