首先,我是新的Acceleo和eclipse的建模功能。我想要做的只是创建一个简单的测试文件。所以对于初学者来说,我创建了一个主模块:Acceleo:代无法生成任何文件
comment encoding = UTF-8 /]
[module generate('file:/C:/Users/maria/Documents/workspace/org.eclipse.acceleo.module.m2tTransformation/model/PSMMetamodel.ecore')]
[template public generateElement(aServicePSM : ServicePSM)]
[comment @main/]
[file ('test.java', false, 'UTF-8')]
Test
[/file]
[/template]
当我运行此我得到:
The generation failed to generate any file because there are no model elements that matches at least the type of the first parameter of one of your main templates.
The problem may be caused by a problem with the registration of your metamodel, please see the method named "registerPackages" in the Java launcher of your generator. It could also come from a missing [comment @main/] in the template used as the entry point of the generation.
另外的URI我用的是nsURI属性值我设置为元模型的根。我确定我的输入模型确实包含ServicePSM元素。 我在做什么错?
在此先感谢。