GMF and Xtext working on same resource - How? [message #723044] |
Wed, 07 September 2011 13:58 |
Johnnyboy 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 |
Jan Koehnlein 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 |
Jan Koehnlein 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
|
|
|
Powered by
FUDForum. Page generated in 0.03542 seconds