Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » XText integration with GMF
XText integration with GMF [message #856319] Wed, 25 April 2012 15:02 Go to next message
Zlatka Manas is currently offline Zlatka ManasFriend
Messages: 26
Registered: March 2012
Junior Member
Hi,
I am trying to implement the XText Integration with GMF Editors(as explained in the documentation for Xtext) with my own model.
When I try to make a diagram for my model, I get the following error:

org.xtext.example.mydsl.ui.internal.MyDslActivator - com.google.inject.internal.ComputationException: java.lang.NoClassDefFoundError: xxx/xxx/xxx/Instance .

Anyone has any idea how to solve this??? Why it does not recognize the classes from the model?

Thanks.

Zlatka
Re: XText integration with GMF [message #869813 is a reply to message #856319] Fri, 04 May 2012 11:44 Go to previous messageGo to next message
Zlatka Manas is currently offline Zlatka ManasFriend
Messages: 26
Registered: March 2012
Junior Member
So, a new workspace and doing it step by step seemed to work for the previous error. Now, I am getting the following when I create a diagram:

These errors need to be fixed before the model can be serialized.
System: Feature System.instance holds 0 non-transient value(s), but at least 1 are required.

Can anybody explain this error and maybe the reason it is there?
Is it something with the model?

Zlatka
Re: XText integration with GMF [message #870044 is a reply to message #869813] Sat, 05 May 2012 22:51 Go to previous messageGo to next message
Jan Koehnlein is currently offline Jan KoehnleinFriend
Messages: 760
Registered: July 2009
Location: Hamburg
Senior Member
Your grammar says that you have to specify at least one System.instance,
but your model does not have one. So it cannot be serialized such that
the result it conforms to your grammar.

So either your grammar is too strict or your model is wrong.

Am 04.05.12 13:44, schrieb Zlatka Manas:
> So, a new workspace and doing it step by step seemed to work for the
> previous error. Now, I am getting the following when I create a diagram:
>
> These errors need to be fixed before the model can be serialized.
> System: Feature System.instance holds 0 non-transient value(s), but at
> least 1 are required.
> Can anybody explain this error and maybe the reason it is there?
> Is it something with the model?
>
> Zlatka


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


---
Get professional support from the Xtext committers at www.typefox.io
Re: XText integration with GMF [message #870178 is a reply to message #870044] Mon, 07 May 2012 07:27 Go to previous messageGo to next message
Zlatka Manas is currently offline Zlatka ManasFriend
Messages: 26
Registered: March 2012
Junior Member
Thanks Jan, I changed the model and now it is ok.

Another question about the integration of gmf and xtext: do you assume the root(element) of your diagram to be the root of the model?
I have one root element which contains two other for which I want to have a diagram.
In the DiagramUpdater, in the method for getting the children of the root element for my diagram I get an error :

!MESSAGE IRJS0007E Semantic refresh failed.
!STACK 0
java.lang.ClassCastException: xxx.impl.xxxImpl cannot be cast to xxx.yyy where xxx is the root element and yyy is the element for my diagram.

For some reason, instead of returning yyy element, it returns the parent element of yyy (xxx) and I cannot create a simple diagram and try the implementation.

Let me know if you have any ideas for this issue.

Thanks.

Re: XText integration with GMF [message #870192 is a reply to message #870178] Mon, 07 May 2012 08:22 Go to previous messageGo to next message
Jan Koehnlein is currently offline Jan KoehnleinFriend
Messages: 760
Registered: July 2009
Location: Hamburg
Senior Member
I do not make any assumptions on that, but GMF does:
No matter if the semantic model is plain EMF or Xtext-based, GMF will
have problems with multiple editors on the same semantic model. Better
ask in the GMF newsgorup...

Am 07.05.12 09:27, schrieb Zlatka Manas:
> Thanks Jan, I changed the model and now it is ok.
> Another question about the integration of gmf and xtext: do you assume
> the root(element) of your diagram to be the root of the model? I have
> one root element which contains two other for which I want to have a
> diagram.
> In the DiagramUpdater, in the method for getting the children of the
> root element for my diagram I get an error :
>
> !MESSAGE IRJS0007E Semantic refresh failed.
> !STACK 0
> java.lang.ClassCastException: xxx.impl.xxxImpl cannot be cast to xxx.yyy
> where xxx is the root element and yyy is the element for my diagram.
> For some reason, instead of returning yyy element, it returns the parent
> element of yyy (xxx) and I cannot create a simple diagram and try the
> implementation.
>
> Let me know if you have any ideas for this issue.
>
> 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: XText integration with GMF [message #870210 is a reply to message #870192] Mon, 07 May 2012 09:43 Go to previous messageGo to next message
Zlatka Manas is currently offline Zlatka ManasFriend
Messages: 26
Registered: March 2012
Junior Member
For the moment, I want to have only one diagram working so I can actually have your example working with my model.
The model is like this:
Poosl
- System
- Cluster
- Process
- Data

System
- Instance (a Cluster or Process)
- Channel

etc.

So, I want to have a System diagram displaying Cluster and Process nodes.
My confusion is why the diagram I generate, as a View element returns the Poosl and not the System. In a previous implementation this was working correctly.
For some reason, with your example, it just uses a different element thus the casting error.

Is there any part in the code where you assign or change the element?
Re: XText integration with GMF [message #870375 is a reply to message #870210] Mon, 07 May 2012 20:46 Go to previous messageGo to next message
Jan Koehnlein is currently offline Jan KoehnleinFriend
Messages: 760
Registered: July 2009
Location: Hamburg
Senior Member
Would be helpful to know what kind of example code you're using.

Am 07.05.12 11:43, schrieb Zlatka Manas:
> For the moment, I want to have only one diagram working so I can
> actually have your example working with my model.
> The model is like this:
> Poosl
> - System
> - Cluster
> - Process
> - Data
>
> System
> - Instance (a Cluster or Process)
> - Channel
>
> etc.
>
> So, I want to have a System diagram displaying Cluster and Process
> nodes. My confusion is why the diagram I generate, as a View element
> returns the Poosl and not the System. In a previous implementation this
> was working correctly. For some reason, with your example, it just uses
> a different element thus the casting error.
> Is there any part in the code where you assign or change the element?


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


---
Get professional support from the Xtext committers at www.typefox.io
Re: XText integration with GMF [message #870435 is a reply to message #870375] Tue, 08 May 2012 07:51 Go to previous messageGo to next message
Zlatka Manas is currently offline Zlatka ManasFriend
Messages: 26
Registered: March 2012
Junior Member
I am using this example
samoa.informatik.uni-kiel.de/~rvm/xtext-2.0.0/doc/210-emf-integration-3.html
Re: XText integration with GMF [message #870436 is a reply to message #870375] Tue, 08 May 2012 08:29 Go to previous messageGo to next message
Zlatka Manas is currently offline Zlatka ManasFriend
Messages: 26
Registered: March 2012
Junior Member
I am using this example
samoa.informatik.uni-kiel.de/~rvm/xtext-2.0.0/doc/210-emf-integration-3.html
Re: XText integration with GMF [message #870471 is a reply to message #870436] Tue, 08 May 2012 11:27 Go to previous message
Jan Koehnlein is currently offline Jan KoehnleinFriend
Messages: 760
Registered: July 2009
Location: Hamburg
Senior Member
The example in the docs is for the root element of an Xtext resource
only. YOu have to dig deeper into GMF to learn how to put a diagram on a
non-root element.

Am 08.05.12 10:29, schrieb Zlatka Manas:
> I am using this example
> samoa.informatik.uni-kiel.de/~rvm/xtext-2.0.0/doc/210-emf-integration-3.html
>


--
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:generating wizards
Next Topic:Referencing generated code from other DSL files.
Goto Forum:
  


Current Time: Fri Apr 19 18:36:09 GMT 2024

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

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

Back to the top