Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » juno upgrade - uml2.types(unable to run mwe forkflow)
juno upgrade - uml2.types [message #1000280] Mon, 14 January 2013 12:35 Go to next message
Marian Edu is currently offline Marian EduFriend
Messages: 7
Registered: March 2012
Junior Member
I have a dsl backed-up by an UML model that was working just fine for Indigo but when upgrading to Juno I can't just get it to work anymore.

The issue seems to be due to the change from UML 2.2.0 to 4.0.0 and now when I refresh the genmodel it shows me the 'Types' package that wasn't there before... if I try to reference it the mwe workflow stops with this transformation diagnostic error:
The existing attribute 'reference' has an incompatible type 'null'. The expected type is 'EString' [java.lang.String]. (ErrorCode: CannotCreateTypeInSealedMetamodel)

The primitive types in the generated ecore model were changed from EString to String, I added the uml2 import in xtext file but doesn't change anything (import "http://www.eclipse.org/uml2/4.0.0/Types" as types)... is there something that need to be added to the mwe workflow? I only have one registerGeneratedEPackage there that point to the generated model code from the source UML.

Sorry for the basic question, I don't seems to be able to find a way through... any hints?

Thanks,
Marian
Re: juno upgrade - uml2.types [message #1000284 is a reply to message #1000280] Mon, 14 January 2013 12:44 Go to previous messageGo to next message
Marian Edu is currently offline Marian EduFriend
Messages: 7
Registered: March 2012
Junior Member
just tried to remove the reference and generated the model for Types as well, not the workflow happily runs but this doesn't look like a real solution does it? Sad
Re: juno upgrade - uml2.types [message #1000289 is a reply to message #1000280] Mon, 14 January 2013 12:51 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 4188
Registered: July 2009
Senior Member
Hi

The additional support for UML 2.4.1's separate Types package caused a
few hiccoughs (https://bugs.eclipse.org/bugs/show_bug.cgi?id=382637).
Make sure you use SR1.

I think the above should fix your problem. If you're unlucky you might
get hit by https://bugs.eclipse.org/bugs/show_bug.cgi?id=389542 which
requires a more recent maintenance build or SR2 (coming shortly).

Regards

Ed Willink

On 14/01/2013 12:35, Marian Edu wrote:
> I have a dsl backed-up by an UML model that was working just fine for
> Indigo but when upgrading to Juno I can't just get it to work anymore.
>
> The issue seems to be due to the change from UML 2.2.0 to 4.0.0 and
> now when I refresh the genmodel it shows me the 'Types' package that
> wasn't there before... if I try to reference it the mwe workflow stops
> with this transformation diagnostic error:
> The existing attribute 'reference' has an incompatible type 'null'.
> The expected type is 'EString' [java.lang.String]. (ErrorCode:
> CannotCreateTypeInSealedMetamodel)
>
> The primitive types in the generated ecore model were changed from
> EString to String, I added the uml2 import in xtext file but doesn't
> change anything (import "http://www.eclipse.org/uml2/4.0.0/Types" as
> types)... is there something that need to be added to the mwe
> workflow? I only have one registerGeneratedEPackage there that point
> to the generated model code from the source UML.
>
> Sorry for the basic question, I don't seems to be able to find a way
> through... any hints?
>
> Thanks, Marian
Re: juno upgrade - uml2.types [message #1000307 is a reply to message #1000280] Mon, 14 January 2013 13:34 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 6550
Registered: July 2009
Senior Member
Did you do what was suggested in the comments section of
http://christiandietrich.wordpress.com/2011/07/17/xtext-2-0-and-uml/

--
Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext at itemis dot de
Re: juno upgrade - uml2.types [message #1001276 is a reply to message #1000307] Wed, 16 January 2013 11:29 Go to previous messageGo to next message
Marian Edu is currently offline Marian EduFriend
Messages: 7
Registered: March 2012
Junior Member
first sorry for being so stupid no to turn on email notifications on the post Sad

Ed, I'm using Juno 4.2.1 Build id: M20120914-1800 and I do see the option to 'reference' the Types package which is what I do.

The data type reference in ecore is like this: eType="ecore:EDataType http://www.eclipse.org/uml2/4.0.0/Types#//Boolean"


Christian, not sure if I need to register all ecore files and genmodels as I'm not directly using a UML file but the Ecore/EPackage generated out of it... however I did tried to register the uml2.types first like this:

uriMap = {
  from = "platform:/plugin/org.eclipse.uml2.types/model/Types.genmodel"
  to = "platform:/resource/org.eclipse.uml2.types/model/Types.genmodel"
}

uriMap = {
  from = "platform:/plugin/org.eclipse.uml2.types/model/Types.ecore"
  to = "platform:/resource/org.eclipse.uml2.types/model/Types.ecore"
}

registerGeneratedEPackage = "org.eclipse.uml2.types.TypesPackage"

registerGenModelFile = "platform:/resource/org.eclipse.uml2.types/model/Types.genmodel"

registerEcoreFile = "platform:/resource/org.eclipse.uml2.types/model/Types.ecore"



but then I get a PackageNotFoundException: Package with uri 'http://www.eclipse.org/uml2/2.2.0/GenModel' not found. (platform:/resource/org.eclipse.uml2.types/model/Types.genmodel, 7, 78)

I then tried to register everything as on your blog article, same error only now from platform:/resource/org.eclipse.uml2.uml/model/UML.genmodel.

In xtext file I can import "http://www.eclipse.org/uml2/4.0.0/UML" and "http://www.eclipse.org/uml2/4.0.0/Types"... but "http://www.eclipse.org/uml2/2.2.0/GenModel" is proposed as well, maybe there is something else that I need to register, or the plugin dependencies needs something to be added?

This was working just fine before, all I had to do was to register the generated EPackage... also tried to register the ecore file and the genmodel of my own model but didn't changed a thing Sad

Thanks,
Marian

Re: juno upgrade - uml2.types [message #1001282 is a reply to message #1001276] Wed, 16 January 2013 11:43 Go to previous message
Marian Edu is currently offline Marian EduFriend
Messages: 7
Registered: March 2012
Junior Member
oh, checking the list of required plug-ins saw org.eclipse.uml2.codegen.ecore was missing... added that and now the error is gone when running the workflow, and it does seems to work.

thanks all for helping me out, did I said xtext rules? Smile

started to look at xbase but it's not very clear to me how this can be used on a Java alike language but not really Java... is it easy to override the operators, primitive data types or to map those somehow to the Java equivalent? (guess this deserves a post on it's own but first I have to check the docs a bit)
Previous Topic:IJvmModelInferrer invoked for invalid model
Next Topic:Running MWE2 Generator from external code
Goto Forum:
  


Current Time: Sun Dec 21 18:52:19 GMT 2014

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

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