Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Import of Ecore model without regenerating ecore model code
Import of Ecore model without regenerating ecore model code [message #1351915] Tue, 13 May 2014 08:08 Go to next message
Jens P. is currently offline Jens P.Friend
Messages: 2
Registered: May 2014
Junior Member
Hi there,

I'm struggling with a problem when importing Ecore models into different projects.
I have a set of plug-ins, which each has its own Ecore model but are included in the same Eclipse app. Some of these models are dependent of others and include them via a simple line of code in the .emf file.

Example: deploy.emf
import "platform:/resource/com.example.resource/model/resource.ecore";


Everytime I generate the the deploy.emf code the code from the resource project will be recreated again in the deployment project. So as I start the Eclipse application both projects (Resource and Deploy) try to register the the resource package which results in a ClassCastException. I intend to transform the models via Eclipse ETL, so I assume, that there is no distinct single class that could be used by the application.

Is there something nicer than this import command? Perhaps something that is closer to a "reference"? I tried to avoid exporting the code for an imported package by altering the MANIFEST.MF file but it just gets overwritten by the EuGenia processes.


Thanks a lot for quick answers or advices, I really need them.

Jens
Re: Import of Ecore model without regenerating ecore model code [message #1352539 is a reply to message #1351915] Tue, 13 May 2014 14:08 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Jens,

Comments below.

On 13/05/2014 2:57 PM, Jens P. wrote:
> Hi there,
>
> I'm struggling with a problem when importing Ecore models into
> different projects.
> I have a set of plug-ins, which each has its own Ecore model but are
> included in the same Eclipse app. Some of these models are dependent
> of others and include them via a simple line of code in the .emf file.
Note that mutually dependent models need a single GenModel and must be
generated into a single project...
>
> Example: deploy.emf
>
> import "platform:/resource/com.example.resource/model/resource.ecore";
>
>
> Everytime I generate the the deploy.emf code the code from the
> resource project will be recreated again in the deployment project.
I can't really comment on how EuGenia works, so it's best to ask about
that on the eclipse.epsilon forum. With a "standard" EMF GenModel,
you'd specified a dependency on another model via a usedGenPackage so
that you reuse the already generated code and don't generate a copy of
it locally...
> So as I start the Eclipse application both projects (Resource and
> Deploy) try to register the the resource package which results in a
> ClassCastException. I intend to transform the models via Eclipse ETL,
> so I assume, that there is no distinct single class that could be used
> by the application.
>
> Is there something nicer than this import command? Perhaps something
> that is closer to a "reference"? I tried to avoid exporting the code
> for an imported package by altering the MANIFEST.MF file but it just
> gets overwritten by the EuGenia processes.
>
>
> Thanks a lot for quick answers or advices, I really need them.
>
> Jens


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Import of Ecore model without regenerating ecore model code [message #1354109 is a reply to message #1352539] Wed, 14 May 2014 05:45 Go to previous message
Jens P. is currently offline Jens P.Friend
Messages: 2
Registered: May 2014
Junior Member
Thanks for the quick reply!
I edited the genmodel and added them by hand as external references/dependencies.
Works fine for me now.
Previous Topic:Cast Excel-File to java.lang.Object problems
Next Topic:Notify changes on any models
Goto Forum:
  


Current Time: Thu Apr 25 05:35:13 GMT 2024

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

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

Back to the top