occiware / OCCI-Studio

OCCI Studio
Eclipse Public License 1.0
11 stars 2 forks source link

Code generation with mixins introduce compilation error when applied several times #19

Closed MaelAudren closed 6 years ago

MaelAudren commented 6 years ago

After creating my model through the visual interface I clicked on the .occie file and select "Generate EMF tooling" Then I updated the model then I regenerated the EMF tooling. As a consequence two line are added to my generated source code each time I use the generation.

Those lines are :
createEOperation(providerEClass, PROVIDER_APPLIES_CONSTRAINTDIAGNOSTICCHAIN_MAP_1); and createEOperation(credentialsEClass, CREDENTIALS_APPLIES_CONSTRAINTDIAGNOSTICCHAIN_MAP_1);

In my model, provider and credentials are mixins and the number goes to 2, 3, etc each time I click on generate.

Removing those lines enable to fix the compilation issue introduced.

fzalila commented 6 years ago

You must delete the .ecore and .genmodel before regenerating EMF tooling.

MaelAudren commented 6 years ago

@fzalila Thank you, this totally solve the issue.

fzalila commented 6 years ago

Welcome @MaelAudren ! I re-open the issue in order to resolve it completely by deleting automatically the .ecore and .genmodel.