Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Synchronize Xtext and GMF editors
Synchronize Xtext and GMF editors [message #683927] Tue, 14 June 2011 17:07 Go to next message
Elhamlaoui Mahmoud is currently offline Elhamlaoui MahmoudFriend
Messages: 268
Registered: March 2010
Senior Member
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 07:01 Go to previous messageGo to next message
Jan Koehnlein is currently offline Jan KoehnleinFriend
Messages: 760
Registered: July 2009
Location: Hamburg
Senior Member
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


---
Get professional support from the Xtext committers at www.typefox.io
Re: Synchronize Xtext and GMF editors [message #686569 is a reply to message #686137] Wed, 22 June 2011 14:05 Go to previous messageGo to next message
Elhamlaoui Mahmoud is currently offline Elhamlaoui MahmoudFriend
Messages: 268
Registered: March 2010
Senior Member
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 12:17 Go to previous message
E. Waldin is currently offline E. WaldinFriend
Messages: 5
Registered: April 2010
Junior Member
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: Tue Apr 16 18:06:14 GMT 2024

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

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

Back to the top