|
Re: Problems with using the UML.ecore metamodel directly [message #1059754 is a reply to message #1059519] |
Tue, 21 May 2013 14:07 |
Ed Merks Messages: 33218 Registered: July 2009 |
Senior Member |
|
|
Arn,
UML.ecore needs to use UML2's extended version of GenModel to generate
properly; I don't think it makes sense to try to regenerate UML2 again.
You should just use what's already generated.
On 21/05/2013 2:49 PM, Arn Lapierrre wrote:
> For a prototype of an UML-tool, I'd like to use the UML.ecore file which is part of Eclipse UML2 directly. Therefore, I searched for the org.eclipse.uml2.uml_<version>.jar file and extracted the UML.ecore and its genmodel file. Then I created a new "Empty EMF Project" in Eclipse and imported both files. At this point, everything looks fine, I can browse through the uml-core hierarchy etc. without getting any errors.
>
> But when I try to generate the model code via the imported genmodel, the generation suddenly stops with a bunch of exceptions (see attachment #1).
> I also tried to delete the genmodel and create it on my own, based on UML.ecore. This time, the model generation finishes without any problems, but the generated code contains errors (see attachment #2).
>
> How could I fix this? thanks.
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Re: Problems with using the UML.ecore metamodel directly [message #1059777 is a reply to message #1059754] |
Tue, 21 May 2013 14:40 |
Ed Willink Messages: 7670 Registered: July 2009 |
Senior Member |
|
|
Hi
As Ed notes, this is a fairly dubious undertaking. But it should work.
Provided:
You use the same Eclipse tool versions as the UML code.
You use all the UML files (from GIT rather than Import Project)
You don't 'improve' the code by adding extra files such as Ecore.ecore.
I suggest that you practice regebnerating the unmodified source before
modifying, and thinking hard about why you want to modify at all.
Regards
Ed Willink
On 21/05/2013 15:07, Ed Merks wrote:
> Arn,
>
> UML.ecore needs to use UML2's extended version of GenModel to generate
> properly; I don't think it makes sense to try to regenerate UML2
> again. You should just use what's already generated.
>
>
> On 21/05/2013 2:49 PM, Arn Lapierrre wrote:
>> For a prototype of an UML-tool, I'd like to use the UML.ecore file
>> which is part of Eclipse UML2 directly. Therefore, I searched for the
>> org.eclipse.uml2.uml_<version>.jar file and extracted the UML.ecore
>> and its genmodel file. Then I created a new "Empty EMF Project" in
>> Eclipse and imported both files. At this point, everything looks
>> fine, I can browse through the uml-core hierarchy etc. without
>> getting any errors.
>>
>> But when I try to generate the model code via the imported genmodel,
>> the generation suddenly stops with a bunch of exceptions (see
>> attachment #1).
>> I also tried to delete the genmodel and create it on my own, based on
>> UML.ecore. This time, the model generation finishes without any
>> problems, but the generated code contains errors (see attachment #2).
>>
>> How could I fix this? thanks.
>
|
|
|
Powered by
FUDForum. Page generated in 0.02696 seconds