Home » Modeling » EMF » Generated editor projects always break after metamodel modifications?
Generated editor projects always break after metamodel modifications? [message #640067] |
Thu, 18 November 2010 22:04 |
Glenview Jeff Messages: 79 Registered: September 2010 |
Member |
|
|
Maybe I'm doing something wrong, but every time I modify my ecore metamodel using the sample hierarchical ecore editor, even doing something as simple as adding a new EClass, I get errors after re-generating (right-clicking on the genmodel file and selecting generate all.)
My generated src directory sometimes reports errors and almost always, the generated projects (.edit, .editor, .test) report errors.
The only way I know to fix this is to delete the generated projects, delete the generated src directory from the top-level project, delete the META-INF folder, and the plugin.xml file, then re-generate all. Sometimes I even have to delete and recreate the genmodel file in addition to the above.
There must be something obvious about the development workflow I'm missing here. I can't imagine EMF/ecore is really this brittle.
Thanks!
Jeff
|
|
|
Re: Generated editor projects always break after metamodel modifications? [message #640072 is a reply to message #640067] |
Thu, 18 November 2010 22:09 |
Ed Merks Messages: 33141 Registered: July 2009 |
Senior Member |
|
|
Jeff,
Comments below.
glenviewjeff wrote:
> Maybe I'm doing something wrong, but every time I modify my ecore
> metamodel using the sample hierarchical ecore editor, even doing
> something as simple as adding a new EClass, I get errors after
> re-generating (right-clicking on the genmodel file and selecting
> generate all.)
>
> My generated src directory sometimes reports errors and almost always,
> the generated projects (.edit, .editor, .test) report errors.
What kind of errors?
>
> The only way I know to fix this is to delete the generated projects,
> delete the generated src directory from the top-level project, delete
> the META-INF folder, and the plugin.xml file, then re-generate all.
> Sometimes I even have to delete and recreate the genmodel file in
> addition to the above.
A clue about the errors will help me understand what you're describing.
>
> There must be something obvious about the development workflow I'm
> missing here. I can't imagine EMF/ecore is really this brittle.
No, it would be unusable. I'll need more details about the nature of
the errors to help you.
>
> Thanks!
> Jeff
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
| | |
Re: Generated editor projects always break after metamodel modifications? [message #641910 is a reply to message #641773] |
Mon, 29 November 2010 08:38 |
Eclipse User |
|
|
|
Originally posted by: koen.yskout.cs.kuleuven.be
To easily see which files can be deleted, a 'class is not present in
model' warning for @generated classes would be nice to have :)
I don't know if it's easily implementable, though, since you'd need
access to the ecore model from which the code was generated...
On 27/11/10 21:01, Ed Merks wrote:
> Jeff,
>
> I wonder what kind of errors? When regenerating, unused imports aren't
> removed and in no case will entire files ever be deleted. So you likely
> need to do "Source->Organize Imports" and to delete files, if you've
> deleted EClasses.
>
>
> glenviewjeff wrote:
>> Thanks Ed. I don't seem to be having the same problems as before, so
>> this thread can probably be disregarded. There is only one minor
>> remaining issue.
>> If I delete a meta-model element using the default EMF/ecore editor
>> and re-generate the model, I do get errors in the generated src
>> directory (src-gen.) If I delete the src-gen directory and
>> re-generate, the errors disappear.
>>
>> Thanks,
>> Jeff
|
|
|
Goto Forum:
Current Time: Thu Apr 25 15:11:21 GMT 2024
Powered by FUDForum. Page generated in 0.03503 seconds
|