Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [acceleo-dev] Dynamic polyphormism + overriding for templates and queries

Hello,


Thank you, I will try and look at this change asap.


Regards,


Laurent Goubet

Obeo


On 18/11/2019 14:50, Pere Joseph Rodríguez wrote:
Hi Laurent,
I've reviewed the code and some standalone enabler code was missing in the last commit, so I've pushed a new commit with all content.
Things I've encountered are:

-Compiled with maven 3.1.0 (couldn't with 3.3.9)
-Had to upgrade tycho version to 0.18.1
-Couldn't apply checkstyle at all because of compatibility problems with my eclipse environment.
-Also had to modify org.eclipse.acceleo::org.eclipse.acceleo.maven dependencies to compile, and add org.eclipse.acceleo::org.eclipse.acceleo.maven-launcher, copied from R3_5_manteinance branch to test the standalone projects. the dependencies needed (not anymore available at github due to unknown problems), are added in maven/repository/releases/indigo , as a tycho style dependencies repository. (p2/eclipse-plugin), from eclipse Mars update-site.


The steps to build are:
set maven path to 3.1.0
go to repository dir
mvn clean install 
cd maven/org.eclipse.acceleo.maven
mvn clean install
cd ../org.eclipse.acceleo.maven.launcher
mvn clean install


I've published a standalone test project in github to demonstrate the functionality: https://github.com/perelengo/acceleo-dynamic-overX-test
We have three components annotated with different stereotypes, and want to generate a file (org.eclipse.acceleo.module.sample\acceleo_generated\RootElement) that shows that the queries used to print the name of the component, and the templates used, vary depending of the stereotype applied to the component. 
As you will see, the generateMain module has no imports to the generateEntityModule, and the dynamic overriding and overloading is due to the runtime dependency  from org.eclipse.acceleo.module.sample to org.eclipse.acceleo.module.dynamic_override_entity.

Hope this clarifies how this change works.


$ git push review
Counting objects: 42, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (29/29), done.
Writing objects: 100% (42/42), 16.31 KiB | 0 bytes/s, done.
Total 42 (delta 17), reused 1 (delta 0)
remote: Resolving deltas: 100% (17/17)
remote: Processing changes: new: 1, refs: 1, done
remote: (W) 450eea9: commit subject >50 characters; use shorter first paragraph
remote: ----------
remote: Reviewing commit: 450eea96
remote: Authored by: Pere Joseph Rodríguez <perelengo@xxxxxxxxxxx>
remote:
remote: The author is not a committer on the project.
remote: The author has a current Eclipse Contributor Agreement (ECA) on file.
remote: The author has "signed-off" on the contribution.
remote:
remote: This commit passes Eclipse validation.
remote:
remote: New Changes:
remote:   https://git.eclipse.org/r/152865 I am writing because, some time ago I funded a MDA company, that vastly ...
remote:
To ssh://git.eclipse.org:29418/acceleo/org.eclipse.acceleo
 * [new branch]          R3_3_maintenance -> refs/for/R3_3_maintenance





--

Laurent Goubet
Consultant
+33 2 51 13 51 42

7 Boulevard Ampère - Carquefou - France
obeo.fr | twitter | linkedin

begin:vcard
fn:Laurent Goubet
n:Goubet;Laurent
org:<a href="http://www.obeo.fr";>Obeo</a>
email;internet:laurent.goubet@xxxxxxx
url:http://www.obeo.fr
version:2.1
end:vcard


Back to the top