ecore

How to generate plug-in using .ecore metamodel

試著忘記壹切 提交于 2021-01-27 18:17:12
问题 I have 2 files, an ecore implementation metamodel and an e-Repository. The e-Repository is provided in EMF format together with the ecore implementation metamodel. I want to browse the contents of this repository and all I know is that I have to generate an Eclipse plugin from the implementation metamodel and with this plugin, I can open the repository and browse its content. But I have no idea how to generate the plugin and proceed with it. The ecore implementation metamodel was developed

How to export Xcore to Ecore?

对着背影说爱祢 提交于 2020-01-02 05:47:10
问题 Defining metamodels with Xcore is a lot easier than with EMF and Ecore. The problem is that I need the metamodels as Ecore files. Is it possible to export Xcore model to Ecore model? I don't see any export options in Eclipse. 回答1: The official Wiki describes how to export an Xcore model to a GenModel. It looks like the same can be done with the Ecore Model. Especially because the author mentions: [...] Xcore resource does physically contain a GenModel and an Ecore model [...] 来源: https:/

ATL transformation rules not matching nested BPMN2 elements

淺唱寂寞╮ 提交于 2019-12-30 14:43:52
问题 I am writing an ATL translation from BPMN2 to another model. The problem is that the code does not detect any nested element. I have posted the atl code and my input here at: https://github.com/behnaaz/BPMN2ATL.git You can see from the output that the only executed rule is def2mod which has created a Reo module element in the output. If I remove the first level element in the input bpmn file then the rule mapProcess is kicked in. Also in the logs the command BPMN20!Process.allInstances()

Can derived attributes be persisted and derivation disabled in Ecore and OCL?

不问归期 提交于 2019-12-22 08:55:36
问题 I want to port a legacy data format, which consists of concepts similar to Eclipse Modeling Framework (EMF) Ecore: Elements with Parameters which have different datatypes and default values. A custom-made tool lets you edit such model instances by a fancy table-based GUI. Also, a common feature for the Parameters is that a Derivation Rule can be added which specifies that the Parameter value gets computed automatically from other parameters. That also seems similar to Ecore derived Attributes

EProxy URI does not resolve in ecore model

帅比萌擦擦* 提交于 2019-12-22 04:35:16
问题 In my Ecore model all types that come from outside the current model are not resolved by their proxies. All fields of the object returned by getType() are null and only the storage type URI is filled in at runtime. Here is an extract of my model: <?xml version="1.0" encoding="UTF-8"?> <ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="model" nsURI="http:///model

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

OCLinEcore and Regex to create valid IPv4 string

北城余情 提交于 2019-12-11 01:11:31
问题 I have an Ecore model, where I'm trying to add some OCL constraints. My problem comes when I try to make a property (a string) that is in valid IPv4 form. I guess I should use a regular expression, but I have no idea at all about how to use regex on OCLinEcore. 回答1: As of Eclipse Juno, you can use regular expressions in OCL. The function to call on it is matches(regex), just like in Java. context Packet inv ValidIPv4 : ip.matches('\b([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\b')

How to export Xcore to Ecore?

对着背影说爱祢 提交于 2019-12-05 13:27:41
Defining metamodels with Xcore is a lot easier than with EMF and Ecore. The problem is that I need the metamodels as Ecore files. Is it possible to export Xcore model to Ecore model? I don't see any export options in Eclipse. The official Wiki describes how to export an Xcore model to a GenModel. It looks like the same can be done with the Ecore Model. Especially because the author mentions: [...] Xcore resource does physically contain a GenModel and an Ecore model [...] 来源: https://stackoverflow.com/questions/15966601/how-to-export-xcore-to-ecore

EProxy URI does not resolve in ecore model

自古美人都是妖i 提交于 2019-12-05 03:09:35
In my Ecore model all types that come from outside the current model are not resolved by their proxies. All fields of the object returned by getType() are null and only the storage type URI is filled in at runtime. Here is an extract of my model: <?xml version="1.0" encoding="UTF-8"?> <ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="model" nsURI="http:///model.ecore" nsPrefix="model"> <eSubpackages name="general" nsURI="http:///model/general.ecore" nsPrefix="model

ATL transformation rules not matching nested BPMN2 elements

我怕爱的太早我们不能终老 提交于 2019-12-01 14:20:09
I am writing an ATL translation from BPMN2 to another model. The problem is that the code does not detect any nested element. I have posted the atl code and my input here at: https://github.com/behnaaz/BPMN2ATL.git You can see from the output that the only executed rule is def2mod which has created a Reo module element in the output. If I remove the first level element in the input bpmn file then the rule mapProcess is kicked in. Also in the logs the command BPMN20!Process.allInstances() which should give a list of all the Processes only works in the mapProcess rule. I think there is some