Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Import from Annotated Java into a different project
Import from Annotated Java into a different project [message #415727] Fri, 04 January 2008 05:02 Go to next message
Ian Bull is currently offline Ian BullFriend
Messages: 145
Registered: July 2009
Senior Member
Is it possible to import from Annotated Java into a different project
than the source is in?

I have some source (which was actually generated from EMF) filled with
all the @model tags. If I "import from annotated java" and select the
same project to put my .genmodel in, it works fine. However, if I
create a new "empty emf project" and create an EMF Model from annotated
java (setting this project as the place I want my genmodel to be saved),
I get an error:

"No Java source was found".

Is this workflow possible?

Cheers,
Ian
Re: Import from Annotated Java into a different project [message #415729 is a reply to message #415727] Fri, 04 January 2008 11:18 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
Ian,

This sounds similar to
https://bugs.eclipse.org/bugs/show_bug.cgi?id=210405 but I don't think
that bug will cover it this type of flow. I suppose you could move the
..genmodel and .ecore afterwards and then rely on reload working or you
could open a feature request and hope for the best. :-P


Ian Bull wrote:
> Is it possible to import from Annotated Java into a different project
> than the source is in?
>
> I have some source (which was actually generated from EMF) filled with
> all the @model tags. If I "import from annotated java" and select the
> same project to put my .genmodel in, it works fine. However, if I
> create a new "empty emf project" and create an EMF Model from
> annotated java (setting this project as the place I want my genmodel
> to be saved), I get an error:
>
> "No Java source was found".
>
> Is this workflow possible?
>
> Cheers,
> Ian


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Import from Annotated Java into a different project [message #415737 is a reply to message #415729] Fri, 04 January 2008 16:07 Go to previous messageGo to next message
Philipp Kutter is currently offline Philipp KutterFriend
Messages: 306
Registered: July 2009
Senior Member
Hi, Ian, hi, Ed.

I added Ian's comment to bug 210405, and I tried to change the topic of
the bug into

reload/load from Java not possible if code with model tags is in a
separate plugin

I think Ian's worflow is very realistic, especially if consultants come
into a new environment. One of my favorite scenarios with EMF would
still be to annotate legacy with EMF tags, extract the model in a
separate project, generate there the standard EMF code just to allow the
construction of test cases and MOCK objects.

For the clients I work, this would be a great progress, since it gives
them two things:
- up to date models of their (nightmare) code
- a testing scenario, which works as well if the 3 IBM hosts and 4 DB
servers are not up (which they are normally never....)

Best, Philipp

PS: Ian, you might vote for the bug...

Ed Merks wrote:
> Ian,
>
> This sounds similar to
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=210405 but I don't think
> that bug will cover it this type of flow. I suppose you could move the
> .genmodel and .ecore afterwards and then rely on reload working or you
> could open a feature request and hope for the best. :-P
>
>
> Ian Bull wrote:
>> Is it possible to import from Annotated Java into a different project
>> than the source is in?
>>
>> I have some source (which was actually generated from EMF) filled with
>> all the @model tags. If I "import from annotated java" and select the
>> same project to put my .genmodel in, it works fine. However, if I
>> create a new "empty emf project" and create an EMF Model from
>> annotated java (setting this project as the place I want my genmodel
>> to be saved), I get an error:
>>
>> "No Java source was found".
>>
>> Is this workflow possible?
>>
>> Cheers,
>> Ian
Re: Import from Annotated Java into a different project [message #415748 is a reply to message #415737] Fri, 04 January 2008 19:17 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
Philipp,

This is trickier now since now the wizard itself has to specify two
separate things, so that will hold up completing it...


Philipp W. Kutter wrote:
> Hi, Ian, hi, Ed.
>
> I added Ian's comment to bug 210405, and I tried to change the topic
> of the bug into
>
> reload/load from Java not possible if code with model tags is in a
> separate plugin
>
> I think Ian's worflow is very realistic, especially if consultants
> come into a new environment. One of my favorite scenarios with EMF
> would still be to annotate legacy with EMF tags, extract the model in
> a separate project, generate there the standard EMF code just to allow
> the
> construction of test cases and MOCK objects.
>
> For the clients I work, this would be a great progress, since it gives
> them two things:
> - up to date models of their (nightmare) code
> - a testing scenario, which works as well if the 3 IBM hosts and 4 DB
> servers are not up (which they are normally never....)
>
> Best, Philipp
>
> PS: Ian, you might vote for the bug...
>
> Ed Merks wrote:
>> Ian,
>>
>> This sounds similar to
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=210405 but I don't
>> think that bug will cover it this type of flow. I suppose you could
>> move the .genmodel and .ecore afterwards and then rely on reload
>> working or you could open a feature request and hope for the best. :-P
>>
>>
>> Ian Bull wrote:
>>> Is it possible to import from Annotated Java into a different
>>> project than the source is in?
>>>
>>> I have some source (which was actually generated from EMF) filled
>>> with all the @model tags. If I "import from annotated java" and
>>> select the same project to put my .genmodel in, it works fine.
>>> However, if I create a new "empty emf project" and create an EMF
>>> Model from annotated java (setting this project as the place I want
>>> my genmodel to be saved), I get an error:
>>>
>>> "No Java source was found".
>>>
>>> Is this workflow possible?
>>>
>>> Cheers,
>>> Ian


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Import from Annotated Java into a different project [message #415758 is a reply to message #415748] Fri, 04 January 2008 21:03 Go to previous message
Philipp Kutter is currently offline Philipp KutterFriend
Messages: 306
Registered: July 2009
Senior Member
We don't die if it takes longer. Our aim for the moment is to generate
everything from the model.

The reload and load is only needed in large development projects, and
I try to avoid them for the moment.

As a work around, one can put the Ecore in the project of the generated
source, and reload it there. Then one can merge it in the local Ecore.

It's good enough for me to know that this is comming some time, and for
the moment I will not propose people to load from code that is in
different projects.

Best and thanks for caring about the timing,
Philipp

Ed Merks wrote:
> Philipp,
>
> This is trickier now since now the wizard itself has to specify two
> separate things, so that will hold up completing it...
>
>
> Philipp W. Kutter wrote:
>> Hi, Ian, hi, Ed.
>>
>> I added Ian's comment to bug 210405, and I tried to change the topic
>> of the bug into
>>
>> reload/load from Java not possible if code with model tags is in a
>> separate plugin
>>
>> I think Ian's worflow is very realistic, especially if consultants
>> come into a new environment. One of my favorite scenarios with EMF
>> would still be to annotate legacy with EMF tags, extract the model in
>> a separate project, generate there the standard EMF code just to allow
>> the
>> construction of test cases and MOCK objects.
>>
>> For the clients I work, this would be a great progress, since it gives
>> them two things:
>> - up to date models of their (nightmare) code
>> - a testing scenario, which works as well if the 3 IBM hosts and 4 DB
>> servers are not up (which they are normally never....)
>>
>> Best, Philipp
>>
>> PS: Ian, you might vote for the bug...
>>
>> Ed Merks wrote:
>>> Ian,
>>>
>>> This sounds similar to
>>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=210405 but I don't
>>> think that bug will cover it this type of flow. I suppose you could
>>> move the .genmodel and .ecore afterwards and then rely on reload
>>> working or you could open a feature request and hope for the best. :-P
>>>
>>>
>>> Ian Bull wrote:
>>>> Is it possible to import from Annotated Java into a different
>>>> project than the source is in?
>>>>
>>>> I have some source (which was actually generated from EMF) filled
>>>> with all the @model tags. If I "import from annotated java" and
>>>> select the same project to put my .genmodel in, it works fine.
>>>> However, if I create a new "empty emf project" and create an EMF
>>>> Model from annotated java (setting this project as the place I want
>>>> my genmodel to be saved), I get an error:
>>>>
>>>> "No Java source was found".
>>>>
>>>> Is this workflow possible?
>>>>
>>>> Cheers,
>>>> Ian
Previous Topic:generated editor
Next Topic:inherit two properties with the same name
Goto Forum:
  


Current Time: Fri Apr 26 06:54:13 GMT 2024

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

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

Back to the top