[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.newcomer] Re: Import ecore resource

Anna,

Comments below.

Anna S wrote:
Ok, sorry, I'm new to this, so I thought that newcomer would be the best choice :)
It's not a problem and that's a perfectly valid assumption. I make sure to monitor questions in the newcomers newsgroup, but I do always suggest they start using the EMF newsgroup instead...
More questions below.

Ed Merks wrote:

Anna,

Please use the EMF newsgroup, which I've added to the "to" list of the reply, for asking questions about EMF. More comments below.


Anna S wrote:
I'm currently working on a project that extends an earlier project done at my company. I've been told to re-use code from the old project when it's possible and now I have a folder with a bunch of code that I need to use. When I got it, they told me that I should "import it as an ecore resource" in order to use it. However, I can't find any information on how to do this, and I'm not even sure what it means. I can import the project into my workspace, but I'm guessing that's not what I'm supposed to do? And what's the difference between importing a resource and just importing a project?
Does the project have a "model" folder with *.ecore/*.genmodel files in it?


Yes, both the old and the new project does (the new project which I'm developing is made in GMF). The side menu in eclipse looks like this: http://farm4.static.flickr.com/3097/3286642609_7dc57cc6d0_o.jpg


This tutorial is likely to help:

http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclipse.emf.doc/tutorials/clibmod/clibmod.html


Just so I haven't misunderstood anything...is importing an ecore model the same thing as importing an ecore resource?
Generally if the *.genmodel exists, you'd invoke "Reload..." to make it import from whatever model source it was created from in the first place. It's possible to create (import) a model from an existing Ecore in the file system say, from annotated Java (Java interfaces with @model information in the Javadoc), an XML Schema, or a Rose model. I'm not sure actually what question you're asking. :-P
I want to be able to use the code in the src-folder of the DDHMI-project in my Renegade-project...as far as I know I can do this already, since the DDHMI-project is in my workspace?
Yes, you only need to create a dependency on it and then you'll be able to reuse all the classes.
What will be the difference if I manage to import the ecore-resource into my own project?
That would seem bad. The project with the *.genmodel/*.ecore is what's generated from the model and it sound like you just want to reuse that generated stuff. So it's just a matter of creating your project and adding a dependency (typically done by working with the MANIFEST.MF).
Thanks,
Anna