Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » Dynamic Acceleo Project Plugin(I want to run an Acceleo Project from an Installed Plugin dynamically, where users can modify the templates without needing to deploy anything.)
icon1.gif  Dynamic Acceleo Project Plugin [message #1702118] Mon, 20 July 2015 06:04
Samuel Windall is currently offline Samuel WindallFriend
Messages: 6
Registered: July 2015
Junior Member
I want to run an Acceleo Project from an Installed Plugin, i.e. I have written a plugin that uses Acceleo and I want it to run an Acceleo template from a project that is in the workspace.

Currently, I have an Acceleo project which I run from my Eclipse Plugin programmatically:
try {
final File outputDir = new File("C:/outputDir/");
List<String> arguments = new ArrayList<String>();
/*fc is an instance of a EMF Compare Comparison object
 * the nsURI for it is
Generate generator = new Generate(fc, outputDir, arguments);                                 
            generator.doGenerate(new BasicMonitor());
} catch (IOException e) {

The template is simple at the moment:

[comment encoding = UTF-8 /]
[module generate('')]
[template public generateElement(comparison : Comparison)]
[comment @main/]
[file ('update.sql', false, 'UTF-8')]
[comparison.getDifferences().toString() /]

This generates perfectly.

The issue is that I need to deploy the plugin but I still need end users to be able to modify the templates. The end goal is to have the Acceleo project in the end users' workspace and let my plugin call it at runtime, but no matter how I set it up, I have to include the Acceleo project in my Plugin Feature.

Things I have attempted:
- Overriding the Acceleo Module from a project in the end users workspace
- Various attempts with java class loaders (I feel this is the way to go but I can't seem to get a working example)

I am running:
Eclipse Luna SR2 (4.4.2)
Windows 7 Pro - 64bit - SP1
JRE 1.8.0_45

Thanks in advance for any help Smile
Previous Topic:Android Code Generation
Next Topic:[Acceleo] Running stand alone
Goto Forum:

Current Time: Fri Dec 01 09:18:13 GMT 2023

Powered by FUDForum. Page generated in 0.02073 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top