Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » GMF and Xtext working on same resource - How?(GMF and Xtext working on same resource - How?)
GMF and Xtext working on same resource - How? [message #723044] Wed, 07 September 2011 13:58 Go to next message
Johnnyboy  is currently offline Johnnyboy Friend
Messages: 39
Registered: September 2011
Member
Hello supporters,

How are you?

My question is the following: I want to develop a concrete model Xtext and a GMF-Editor in parallel. Because the problem is descriped in the Xtext-tutorial I posted the question in this forum. In the tutorium http://www.eclipse.org/Xtext/documentation/2_0_0/210-emf-integration.php is descriped that both projects need to refer to the same "resource" and both have mechanisms which update their models ( XtextResource.update(int, int, String)/CanonicalEditPolicy). But it is not descriped how the resource is shared. That is why I wanted to ask what resource has to be shared (both the same XtextResource?) and how to do that?

THX in advance for any answer
Konnyboy

[Updated on: Wed, 07 September 2011 14:02]

Report message to a moderator

(no subject) [message #723236 is a reply to message #723044] Thu, 08 September 2011 06:44 Go to previous message
Jan Koehnlein is currently offline Jan KoehnleinFriend
Messages: 760
Registered: July 2009
Location: Hamburg
Senior Member
In the example, we don't share the resource instance but its
implementation. This is achived by plain EMF means, i.e. registering the
XtextReosurce to the EMF resource factory.

The synchronization is performed on the IResource (workspace file)
level, i.e. on save. Both editors register listeners to the IFile and
update themselves on change.

Sharing the resource instance - the loaded model - is cumbersome because
of the different synchronization mechanisms of Xtext and GMF.
See e.g.
http://www.slideshare.net/schwurbel/combining-text-and-graphics-in-eclipsebased-modeling-tools

You might also want to have a look at the Yakindu implementation
http://www.yakindu.de/

Am 07.09.11 15:58, schrieb Johnnyboy:
> Hello supporters,
>
> How are you?
> My question is the following: I want to develop a concrete model Xtext
> and a GMF-Editor in parallel. Because the problem is descriped in the
> Xtext-tutorial I posted the question in this forum. In the tutorium
> http://www.eclipse.org/Xtext/documentation/2_0_0/210-emf-integration.php
> is descriped that both projects need to refer to the same "resource" and
> both have mechanisms which update their models (
> XtextResource.update(int, int, String)/CanonicalEditPolicy). But it is
> not descriped how the resource is shared. That is why I wanted to ask
> what resource has to be shared (both the same XtextResource) and how to
> do that?
>
> THX in advance for any answer
> Konnyboy


--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com


---
Get professional support from the Xtext committers at www.typefox.io
(no subject) [message #723237 is a reply to message #723044] Thu, 08 September 2011 06:44 Go to previous message
Jan Koehnlein is currently offline Jan KoehnleinFriend
Messages: 760
Registered: July 2009
Location: Hamburg
Senior Member
In the example, we don't share the resource instance but its
implementation. This is achived by plain EMF means, i.e. registering the
XtextReosurce to the EMF resource factory.

The synchronization is performed on the IResource (workspace file)
level, i.e. on save. Both editors register listeners to the IFile and
update themselves on change.

Sharing the resource instance - the loaded model - is cumbersome because
of the different synchronization mechanisms of Xtext and GMF.
See e.g.
http://www.slideshare.net/schwurbel/combining-text-and-graphics-in-eclipsebased-modeling-tools

You might also want to have a look at the Yakindu implementation
http://www.yakindu.de/

Am 07.09.11 15:58, schrieb Johnnyboy:
> Hello supporters,
>
> How are you?
> My question is the following: I want to develop a concrete model Xtext
> and a GMF-Editor in parallel. Because the problem is descriped in the
> Xtext-tutorial I posted the question in this forum. In the tutorium
> http://www.eclipse.org/Xtext/documentation/2_0_0/210-emf-integration.php
> is descriped that both projects need to refer to the same "resource" and
> both have mechanisms which update their models (
> XtextResource.update(int, int, String)/CanonicalEditPolicy). But it is
> not descriped how the resource is shared. That is why I wanted to ask
> what resource has to be shared (both the same XtextResource) and how to
> do that?
>
> THX in advance for any answer
> Konnyboy


--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com


---
Get professional support from the Xtext committers at www.typefox.io
Previous Topic:Parsing a portion of the model
Next Topic:Trying to implement simple expressions in XTEXT
Goto Forum:
  


Current Time: Fri Apr 26 05:25:28 GMT 2024

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

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

Back to the top