For generated code:
/templates/ZeroBlankLinePapyrusFormatter.xml
For manual code:
/templates/papyrus_formatter.xml
And the clean-up profile must also run after the formatter (The formatter adds some trailing whitespaces which are removed by the cleanup profile)
Camille
De : mdt-papyrus.dev-bounces@xxxxxxxxxxx [mailto:mdt-papyrus.dev-bounces@xxxxxxxxxxx]
De la part de LE FEVRE FRANCOIS
Envoyé : lundi 22 février 2016 14:52
À : Papyrus Project list <mdt-papyrus.dev@xxxxxxxxxxx>
Objet : [PROVENANCE INTERNET] [mdt-papyrus.dev] Code Generation with gmfgen tycho plugin
Dear all,
I am looking at this integration of the gmf-gen Tycho plugin done by Svyatoslav Kovalsky and Michael Golubev, in Papyrus.
The goal of this gmf-gen maven Tycho is to be able to regenerate the diagram code at buildtime, and not to have to do it manually.
Ensuring:
·
A full continuous integration
·
A good practice to generate at the fly the code from gmfgen model
·
Discouraging people to modify the generated code in src-gen
·
Encouraging people to modify templates
At this moment it is not officially release but it is functionnal
Do not hesitate to vote for it here:
https://git.eclipse.org/r/#/c/61271/
Note: This Tycho plugins seems not to be release inside a nexus repository:
https://git.eclipse.org/r/#/c/62757/ . Perhaps it could be good to deploy it directly here
https://repo.eclipse.org/#welcome in a gmfgen repository.
At this moment, there is no official maven connector for it in Eclipse. However, you can run it manually, with “mvn install” command.
We have an example of integration for papyrus clazz diagram here:
https://git.eclipse.org/r/#/c/62191/
I would like to know:
·
which is the last official code template for papyrus code generation?
o
It seems that the last manual generation of code for clazz diagram did not use the right one template? Or at least a different template.
o
I have found the following templates
§
/templates/papyrus_formatter.xml
§
/templates/ZeroBlankLinePapyrusFormatter.xml
o
May I delete the unnecessary templates?
·
May I push over the patch of Svyatoslav with the following modifications:
o
Push the code regenerated with the right template?
o
Push the code regenerated in src-gen and not src ?
Thanks for the clarification/help.
Francois


|
Francois LE FEVRE
Research Engineer
Commission for Atomic Energy and Alternative Energies (CEA)
Model-driven Engineering for Embedded Systems Laboratory (LISE)
Projet: Papyrus:
https://www.eclipse.org/papyrus/

Commissariat à l’énergie atomique et aux énergies alternatives (CEA)
Paris-Saclay Campus - Nano-INNOV | Bât. 862-PC1087 | F-91191 Gif-sur-Yvette Cedex
T. +33 (0)1 69 08 49 86
|
F. +33 (0)1 69 08 83 95
|
francois.le-fevre@xxxxxx
| Blog:
http://biocamp.blogspot.fr/
|