acceleo

How do I generate Java code from my graphical diagram using Acceleo?

空扰寡人 提交于 2020-06-29 03:38:09
问题 I am new to Accelo. First, I have created my DSL metamodel ( pfe.ecore) and then I generated the Java classes of this metamodel using Accelo based on the .Ecore[I got .java file for each class of my metamodel] _the name of the Accelo project is MyTransformationM2T.1st attachment shows the workplace image Second, I have created Sirius graphical model (MyPfe.pfe)based on my DSL on Eclipse Run time that contains the diagram (VLC) that I want to generate its java codesee 2nd attachment, for that,

实验三 UML 建模工具的安装与使用

妖精的绣舞 提交于 2020-04-27 11:17:32
一、 实验目的 1) 学习使用 EA(Enterprise Architect) 开发环境创建模型的一般方法; 2) 理解 EA 界面布局和元素操作的一般技巧; 3) 熟悉 UML 中的各种图的建立和表示方法; 4) 掌握如何通过 EA 工具完成相关模型的建立 二、 实验内容及步骤 1.熟悉EA 环境 (1) 开始——>运行——>Enterprise Architect, 打开 Enterprise Architect 软件。 进入软件之后, 可以选择新建一个项目。 在新建项目时, 系统会提示选择所需要的模型设计。 (2) 选择了所需要的模型之后, 可以看到, 在界面的右侧出现了相应的导航栏。 如下图所示, 在导航栏里面列出了刚才所选择的系统模型。 (3) 假设选择用例建模, 那么可以从左侧的工具面板中拖拽出一个参与者, 并为它命名。这样在系统里面就多了一个叫做“用户” 的参与者。 (4) 以同样的方式从左侧工具面板中拖曳一个用例, 命名为“用例一” 。 (5) 同样通过拖拽的方式, 建立用例与参与者之间的关系。 对这个关联关系, 我们还可以设置更加细化的约束。 2.采用EA工具完成以下ATM示例系统的UML模型的建立。 通过 EA 工具完成相关 UML 图的绘制。在建立过程中尝试理解模型元素,模型元素之间的关系。 (1)创建.eap文件 (2)勾选所需要的模块 (3)卡处理 (4

Exp3 UML 建模工具的安装与使用

▼魔方 西西 提交于 2020-04-27 11:13:35
一、实验目的 1) 学习使用 EA(Enterprise Architect) 开发环境创建模型的一般方法; 2) 理解 EA 界面布局和元素操作的一般技巧; 3) 熟悉 UML 中的各种图的建立和表示方法; 4) 掌握如何通过 EA 工具完成相关模型的建立 二、实验要求 1.熟悉EA 环境 2.采用EA工具完成以下ATM示例系统的UML模型的建立。 通过 EA 工具完成相关 UML 图的绘制。在建立过程中尝试理解模型元素,模型元素之间的关系。 三、实验内容 1.需求模型 分为功能性需求和非功能性需求,功能性需求包括卡处理、取款、查询余额、用户界面、用户登录 卡处理 取款 查询余额 用户界面 用户登录 2.用例模型 3.行为模型 活动图 状态图 顺序图 四、思考题 通过网络查找相关资料,了解有哪些工具可以支持UML模型与C++或JAVA或PYTHON 代码的相互转换,并给出网络链接及说明。 1.PyUML可以将UML模型转为python代码。 http://www.pythontip.com/blog/post/1217/ 2.MyEclipse里面有许多插件,可以实现UML模型与JAVA代码间的转换 https://blog.csdn.net/dan15188387481/article/details/50053807 3.Acceleo是MDA的一个代码自动生成工具

Generate UML from a conceptual data model

随声附和 提交于 2020-01-06 08:41:46
问题 I have an conceptual data model (Relational model) created using powerAMC for my database but i wanted to generate DAO from it using acceleo and for that i need it in UML , is there a way to generate UML from a conceptual data model model ? 回答1: Acceleo can generate code from any models defined with any EMF based metamodel . The UML project of the Eclipse Foundation defines an UML metamodel based on EMF so that users can create UML models based on EMF and Acceleo can thus generate code from

Meshing Acceleo with Xtext

南笙酒味 提交于 2019-12-24 01:08:38
问题 I am in the middle of an Acceleo Transformation aimed at producing code (i.e. Java) from an input UML model. Some elements of this UML model (i.e. Activities Opaque actions) contain some text which is conform to an Xtext grammar and I'd like to get the equivalent AST Ecore representation in the Acceleo transformation. To this end I have developed a Java class with a method which takes as input a string, containing the DSL excerpt, and produces an Ecore model conform to it (see http://www

Standalone Acceleo Generator

扶醉桌前 提交于 2019-12-22 05:30:07
问题 I need to develope a standalone Acceleo generator but I don't know hot to start. I've done my generator inside my Acceleo Project. The Acceleo Project contains the generate.mtl file, the Generate.java file, and the Activator.java file. What I have to do? 回答1: Acceleo has been designed with standalone generation in mind right from the start. The Generate.java file is there for that reason. If you need to launch the generation in standalone, simply use its main or instantiate with the two

Acceleo M2T - Write timestamp into a generated file

余生颓废 提交于 2019-12-12 04:47:23
问题 I am generating some files by using different Acceleo templates defined into a *.mtl file. At the top op these files I need to write something like: #----------------------------------------------------------------------------- # Project automatically generated by XXX at (add timestamp here) #----------------------------------------------------------------------------- How could I generate this timestamp dynamically each time I generate the files? Thanks! Edit: I solved this as described

How to specify the classpath to the acceleoCompiler ant task to compile mtl files

二次信任 提交于 2019-12-12 03:55:10
问题 I'm trying to compile Acceleo mtl files using an Ant task: <target name="compileEmtsFiles"> <echo>...... Running Acceleo mtl=emtl file compilation</echo> <acceleoCompiler sourceFolder="src/main/java" outputFolder="build/classes/main" binaryResource="false" dependencies="" packagesToRegister="com.company.MyAcceleoPackage"> </acceleoCompiler> <echo>...... Finished Acceleo mtl=emtl file compilation</echo> </target> But the acceleoCompiler seems to have a problem to find the "com.company

How to check SysML stereotypes with Acceleo?

偶尔善良 提交于 2019-12-11 04:59:41
问题 I'm using Eclipse 4.6.3 (Neon.3) with Acceleo 3.6.6, Paprus 2.0.3 and Papyrus SysML 1.4 0.10.1. How can I check from an Acceleo MTL script, whether a class of my model has the SysML Block stereotype applied? The method getAppliedStereotypes() only works for my own defined stereotypes but not for SysML 1.4 ones. In my UML model (Papyrus project) I have created "Class1" to which I have applied my own stereotype "MyProfile::MyStereotype" created in the "Model Explorer" via "Profile"/"Update

Ant Builder Build Failed eINSTANCE

自闭症网瘾萝莉.ら 提交于 2019-12-08 04:03:37
问题 Trying to use AcceleoCompiler with an Ant Builder. When i build with ant i get the following error: compile: [acceleoCompiler] eINSTANCE BUILD FAILED C:\Users\random\workspace\foo\bar\Framework\buildstandalone.xml:52: eINSTANCE Here is how i have my target defined and some other information that could be important. I am very new to ant and acceleo. Let me know if there is any other information you need. I am not sure that any of the below is correct, let me know if there is anything i need to