Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 354145 - Provide a Tycho plugin for code generation
Summary: Provide a Tycho plugin for code generation
Status: NEW
Alias: None
Product: GMF-Tooling
Classification: Modeling
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 473742 487295
  Show dependency tree
 
Reported: 2011-08-08 10:46 EDT by Mickael Istria CLA
Modified: 2016-02-08 07:50 EST (History)
8 users (show)

See Also:


Attachments
log from the Papyrus build for https://git.eclipse.org/r/#/c/62191/ : ClassD generated (12.00 MB, text/plain)
2016-01-21 08:48 EST, Michael Golubev CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mickael Istria CLA 2011-08-08 10:46:32 EDT
GMF Tooling should provide a Tycho plugin to generate code during a Tycho build. Then same way as an Ant task is supported.
Comment 1 Francois Le Fevre CLA 2015-07-28 07:11:26 EDT
Dear gmf tooling community,
such plugin would be great.

Here some comments (that could be migrated to the bug 473742 if more appropriate)

We have been trying to develop also an initial maven plugin to generate code at build time for genmodel.

It is located here: https://git.eclipse.org/c/papyrus/org.eclipse.papyrus.tools.git/tree/emfgen

You could also have a look to this gerrit for an integration example in the project papyrus: https://git.eclipse.org/r/#/c/41167/
The following pom shows the integration of the plugin: https://git.eclipse.org/r/#/c/41167/12/plugins/infra/constraints/org.eclipse.papyrus.infra.constraints.edit/pom.xml

I do not know if it could help.

Francois
Comment 3 Francois Le Fevre CLA 2015-11-15 14:42:36 EST
Hello
I have look to your patch.
Would it be possible to add also a specifc documentation directly inside the plugin (with maven doc for instance?)
Would it possible also to add a unit test with an example ?

Thanks
Comment 4 Eclipse Genie CLA 2015-11-24 06:27:08 EST
New Gerrit change created: https://git.eclipse.org/r/61118
Comment 6 Eclipse Genie CLA 2015-11-24 07:15:24 EST
New Gerrit change created: https://git.eclipse.org/r/61121
Comment 7 Eclipse Genie CLA 2015-11-25 11:37:31 EST
New Gerrit change created: https://git.eclipse.org/r/61271
Comment 8 Eclipse Genie CLA 2015-12-10 11:13:02 EST
New Gerrit change created: https://git.eclipse.org/r/62388
Comment 10 Eclipse Genie CLA 2015-12-15 09:41:47 EST
New Gerrit change created: https://git.eclipse.org/r/62721
Comment 11 Eclipse Genie CLA 2015-12-15 14:26:02 EST
New Gerrit change created: https://git.eclipse.org/r/62757
Comment 12 Francois Le Fevre CLA 2016-01-21 04:26:43 EST
Mickael,
I would like to know if you succeed in this hard task but very benefit for the Eclipse community.
Is there a way to test the feature?
Francois
Comment 13 Mickael Istria CLA 2016-01-21 08:15:54 EST
Hi,
I didn't do anything and don't plan to do anything on this topic. However, did you have the opportunity to try Syatoslav's patches that are attached to this bug as Gerrit reviews?
Comment 14 Michael Golubev CLA 2016-01-21 08:46:48 EST
@Francois, 

Actually this is almost completed. The last version of the gerrit https://git.eclipse.org/r/#/c/61271 has 2 samples generated as part of the build. 
The build results including generated code are available http://download.eclipse.org/modeling/gmp/gmf-tooling/updates/dev-snapshots/gerrit-61271/ and looks good. 

There is also a related gerrit specifically for Papyrus that regenerates the ClassD using the results of the first gerrit: https://git.eclipse.org/r/#/c/62191/

The Papyrus gerrit build had been already deleted, but you probably can retrigger it, and in any case I have attached the build log from that old build which also looks good. 

The remaining problems: 
- manifest ΠΈ build.properties can't be regenerated as part of the build
Comment 15 Michael Golubev CLA 2016-01-21 08:48:50 EST
Created attachment 259298 [details]
log from the Papyrus build for https://git.eclipse.org/r/#/c/62191/ : ClassD generated
Comment 16 Francois Le Fevre CLA 2016-01-26 03:10:55 EST
Thanks for this element.
I will test the compilation/generation in gmf-tooling.
Then I will test the generation in papyrus.
I keep you in touch.
Francois
Comment 17 Francois Le Fevre CLA 2016-01-27 04:56:43 EST
So my tests have consist on downloading gmf-tooling, checkout the patch https://git.eclipse.org/r/#/c/61271
For pins-example, I was able to regenerate the xtend folder completly with all java classes;
Just a question should it generate also code in the some code directly inside /pins-example/org.eclipse.gmf.tooling.examples.pins and /pins-example/org.eclipse.gmf.tooling.examples.pins.edit ?

perhaps adding a comment inside the test could help me to verify exactly the status of test.
nevertheless this patch add really a good feature !
Good job.