org.eclipse.acceleo.engine.service.AbstractAcceleoGenerator Java Examples
The following examples show how to use
org.eclipse.acceleo.engine.service.AbstractAcceleoGenerator.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: GenerateAll.java From neoscada with Eclipse Public License 1.0 | 5 votes |
/** * Launches the generation. * * @param monitor * This will be used to display progress information to the user. * @generated NOT */ @SuppressWarnings ( "unchecked" ) public void doGenerate ( final IProgressMonitor monitor ) throws Exception { if ( !this.targetFolder.getLocation ().toFile ().exists () ) { this.targetFolder.getLocation ().toFile ().mkdirs (); } // final URI template0 = getTemplateURI("org.eclipse.scada.protocol.ngp.generator", new Path("/org/eclipse/scada/protocol/ngp/generator/main/generate.emtl")); // org.eclipse.scada.protocol.ngp.generator.main.Generate gen0 = new org.eclipse.scada.protocol.ngp.generator.main.Generate(modelURI, targetFolder.getLocation().toFile(), arguments) { // protected URI createTemplateURI(String entry) { // return template0; // } //}; //gen0.doGenerate(BasicMonitor.toMonitor(monitor)); monitor.subTask ( "Loading..." ); final Class<? extends AbstractAcceleoGenerator> clazz = (Class<? extends AbstractAcceleoGenerator>)Activator.getDefault ().getBundle ().loadClass ( this.main ); final Constructor<? extends AbstractAcceleoGenerator> ctor = clazz.getConstructor ( URI.class, File.class, List.class ); final AbstractAcceleoGenerator gen0 = ctor.newInstance ( this.modelURI, this.targetFolder.getLocation ().toFile (), this.arguments ); // final AbstractAcceleoGenerator gen0 = new org.eclipse.scada.protocol.ngp.generator.main.Generate ( this.modelURI, this.targetFolder.getLocation ().toFile (), this.arguments ); monitor.worked ( 1 ); final String generationID = org.eclipse.acceleo.engine.utils.AcceleoLaunchingUtil.computeUIProjectID ( "org.eclipse.scada.protocol.ngp.generator", this.main, this.modelURI.toString (), this.targetFolder.getFullPath ().toString (), new ArrayList<String> () ); gen0.setGenerationID ( generationID ); gen0.doGenerate ( BasicMonitor.toMonitor ( monitor ) ); }
Example #2
Source File: GenerateAll.java From uml2solidity with Eclipse Public License 1.0 | 5 votes |
public GeneratorAction(String id, String generatorName, IFolder targetFolder, AbstractAcceleoGenerator generator, int work) { super(); this.id = id; this.generatorName = generatorName; this.targetFolder = targetFolder; this.generator = generator; this.work = work; }