当前位置: 首页>>代码示例>>Java>>正文


Java AbstractAcceleoGenerator类代码示例

本文整理汇总了Java中org.eclipse.acceleo.engine.service.AbstractAcceleoGenerator的典型用法代码示例。如果您正苦于以下问题:Java AbstractAcceleoGenerator类的具体用法?Java AbstractAcceleoGenerator怎么用?Java AbstractAcceleoGenerator使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


AbstractAcceleoGenerator类属于org.eclipse.acceleo.engine.service包,在下文中一共展示了AbstractAcceleoGenerator类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: run

import org.eclipse.acceleo.engine.service.AbstractAcceleoGenerator; //导入依赖的package包/类
@Override
public Map<String, Model> run(
		Map<String, Model> inputsByName, Map<String, GenericElement> genericsByName,
		Map<String, MID> outputMIDsByName) throws Exception {

	//TODO MMINT[REASONING] generalize for non-mavo too
	//TODO MMINT[REASONING] improve create formula vars 1) use other strings if name not present 2) check uniqueness 3) use names of src/tgt for edges

	// input
	Model mavoModel = inputsByName.get(IN_MODEL);
	init(mavoModel);

	List<Object> m2tArgs = createAcceleoArguments(mavoModel);
	File folder = createAcceleoFolder(mavoModel);
	AbstractAcceleoGenerator m2t = createAcceleoGenerator((MAVORoot) mavoModel.getEMFInstanceRoot(), folder, m2tArgs);
	m2t.doGenerate(new BasicMonitor());

	return new HashMap<>();
}
 
开发者ID:adisandro,项目名称:MMINT,代码行数:20,代码来源:EcoreMAVOToSMTLIB.java

示例2: doGenerate

import org.eclipse.acceleo.engine.service.AbstractAcceleoGenerator; //导入依赖的package包/类
/**
 * 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 ) );
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:36,代码来源:GenerateAll.java

示例3: GeneratorAction

import org.eclipse.acceleo.engine.service.AbstractAcceleoGenerator; //导入依赖的package包/类
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;
}
 
开发者ID:UrsZeidler,项目名称:uml2solidity,代码行数:10,代码来源:GenerateAll.java

示例4: createAcceleoGenerator

import org.eclipse.acceleo.engine.service.AbstractAcceleoGenerator; //导入依赖的package包/类
@Override
protected AbstractAcceleoGenerator createAcceleoGenerator(MAVORoot rootMavoModelObj, File folder, List<Object> m2tArgs) throws IOException {

	return new IStarMAVOToSMTLIBWithListeners_M2T(rootMavoModelObj, folder, m2tArgs);
}
 
开发者ID:adisandro,项目名称:MMINT,代码行数:6,代码来源:IStarMAVOToSMTLIB.java

示例5: createAcceleoGenerator

import org.eclipse.acceleo.engine.service.AbstractAcceleoGenerator; //导入依赖的package包/类
@Override
protected AbstractAcceleoGenerator createAcceleoGenerator(MAVORoot rootMavoModelObj, File folder, List<Object> m2tArgs) throws IOException {

	return new StateMachineMAVOToSMTLIBWithListeners_M2T(rootMavoModelObj, folder, m2tArgs);
}
 
开发者ID:adisandro,项目名称:MMINT,代码行数:6,代码来源:StateMachineMAVOToSMTLIB.java

示例6: createAcceleoGenerator

import org.eclipse.acceleo.engine.service.AbstractAcceleoGenerator; //导入依赖的package包/类
protected AbstractAcceleoGenerator createAcceleoGenerator(MAVORoot rootMavoModelObj, File folder, List<Object> m2tArgs) throws IOException {

		return new EcoreMAVOToSMTLIBWithListeners_M2T(rootMavoModelObj, folder, m2tArgs);
	}
 
开发者ID:adisandro,项目名称:MMINT,代码行数:5,代码来源:EcoreMAVOToSMTLIB.java


注:本文中的org.eclipse.acceleo.engine.service.AbstractAcceleoGenerator类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。