[Announce] M2T templates for Java metamodel [message #507111] |
Tue, 12 January 2010 03:45  |
Eclipse User |
|
|
|
Hello,
A new plugin, for working with Java models, is available :
the goal of this 'Java Generation' plugin is to allow Java code
generation from a Java model.
Such a generation will participate to Legacy Refactoring & Migration chains.
For more informations :
http://wiki.eclipse.org/MoDisco/JavaGeneration
--
----------------------------------------------------
Fabien GIQUEL
R&D Engineer
Mia-Software
4, rue du Château de l'Eraudiere
44324 NANTES CEDEX 03
----------------------------------------------------
|
|
|
|
|
|
|
Re: [Announce] M2T templates for Java metamodel [message #509943 is a reply to message #509870] |
Mon, 25 January 2010 15:31  |
Eclipse User |
|
|
|
Hi Jean-Sebastien, hi Sylvain,
"Java discoverer +M2T" process allows quite a round-trip scenario :
- you will not loose any Java information (including ordering)
- you will loose your original indentation (spaces, tabs, line feed) -> in fact, at the end of the M2T, a call to JDT formater is done (i.e. ctrl+shift+f)
- some '/***...*' will become '/*'
- some '{' may appear enclosing blocks which did not have it before (e.g. within if statements).
Moreover, at the moment, there is an issue on discoverer which may move some Java comments, i will fix it asap.
In order to improve the round-trip, i suppose we may follow two ways :
- build traceability links with original files parts, to restore original source regions where not modified.
- as Sylvain suggests it, keep links to JDT AST nodes to use JDT rewriting apis.
|
|
|
|
Re: [Announce] M2T templates for Java metamodel [message #574175 is a reply to message #507134] |
Tue, 12 January 2010 06:11  |
Eclipse User |
|
|
|
Le 12/01/2010 10:47, Sylvain EVEILLARD a écrit :
> Just a quick question, are those templates generated or hand-coded ?
templates are 95% hand-coded (templates declarations were generated)
--
----------------------------------------------------
Fabien GIQUEL
R&D Engineer
Mia-Software
4, rue du Château de l'Eraudiere
44324 NANTES CEDEX 03
----------------------------------------------------
|
|
|
Re: [Announce] M2T templates for Java metamodel [message #574416 is a reply to message #507111] |
Mon, 25 January 2010 11:13  |
Eclipse User |
|
|
|
I have a question about it :
Can I suppose it to work for a basic "round-trip" scenario.
I mean can I use the injector from Java code to Model and then use the M2T templates from Model to Java code without loosing information? (e.g., retrieving the original Java source code).
Interesting work indeed.
|
|
|
|
Re: [Announce] M2T templates for Java metamodel [message #574467 is a reply to message #574416] |
Mon, 25 January 2010 15:31  |
Eclipse User |
|
|
|
Hi Jean-Sebastien, hi Sylvain,
"Java discoverer +M2T" process allows quite a round-trip scenario :
- you will not loose any Java information (including ordering)
- you will loose your original indentation (spaces, tabs, line feed) -> in fact, at the end of the M2T, a call to JDT formater is done (i.e. ctrl+shift+f)
- some '/***...*' will become '/*'
- some '{' may appear enclosing blocks which did not have it before (e.g. within if statements).
Moreover, at the moment, there is an issue on discoverer which may move some Java comments, i will fix it asap.
In order to improve the round-trip, i suppose we may follow two ways :
- build traceability links with original files parts, to restore original source regions where not modified.
- as Sylvain suggests it, keep links to JDT AST nodes to use JDT rewriting apis.
--
----------------------------------------------------
Fabien GIQUEL
R&D Engineer
Mia-Software
4, rue du Château de l'Eraudiere
44324 NANTES CEDEX 03
----------------------------------------------------
|
|
|
Powered by
FUDForum. Page generated in 0.05179 seconds