Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[modeling-pmc] Contribution: template engine for GMF

Hello,

 I'm writing to inform the PMC about intent to provide significant code contribution to one of Modeling projects, namely GMF. The contribution is template engine, to be used along with JET engine, which is the only template engine used in GMF now. 

 This new template engine is based on Xpand template engine which is part of openArchitectureWare framework,  GMT project (http://www.eclipse.org/gmt/oaw). It's stripped-down version of the framework, with pieces relevant and essential only for code generation left. All dependencies from 3rd party libraries were removed and the only one left - parser/grammar framework (ANTLR 2.7), has been replaced with LPG library (one EMFT uses for OCL). Rest of the original code is licensed under EPL.

 Xpand approach to code generation is different from JET's and proved to be much more convenient for some tasks we face with GMF templates. Also, one of initial plan items for GMF states support for flexible method of generation (https://bugs.eclipse.org/bugs/show_bug.cgi?id=114207), thus new engine helps both GMF developers and GMF users to express their 'textual' intentions with a language they feel most suitable.

 oAW framework and Xpand in particular are being considered as initial contributions to Model to Text project. Also, M2T project might have support to switch template engines. However, project set up and first deliveries are points in distant future (months), and that just means "no" for GMF 2.0. Using GMF-owned component allows us to start using new engine soon. Syntax of the new engine is almost identical to that of original, and there won't be a problem to switch to M2T deliveries once they are out. Note, however, that proposed contribution in not kind of 'throw away' stuff, pieces of it might find their way into M2T contributions (e.g. LPG grammars, test cases, patches and improvements)

 Size of the contribution is about 10KLOC of handwritten code plus few grammar definitions and LPG generated code. Contribution is thoroughly covered with unit tests (200+). 

 I'll need PMC approval to proceed with contribution questionnaire (http://www.eclipse.org/legal/EclipseLegalProcessPoster.pdf and http://www.eclipse.org/legal/ContributionQuestionnairePart1-v1.0.php). Please let me know your opinion and feel free to ask any question about the contribution. Thank you! 

Best wishes,
Artem Tikhomirov 


Back to the top