Home » Modeling » ATL » How to add new model elements in refining mode
How to add new model elements in refining mode [message #1424771] |
Tue, 16 September 2014 11:47 |
Rafael Durelli Messages: 72 Registered: September 2012 |
Member |
|
|
Hello guys, I was interested in create a new model elements in refining model... I was searching and I was able to found that I should use the "including" instead of "newInstance()". As can be seen in the source code bellow the first including works pretty good. However, when I need to create another element inside of the earlier created I got an error message like this: org.eclipse.m2m.atl.engine.emfvm.VMException: Feature codeElement does not exist on Element
What am I doing wrong? Can someone help me? Thanks in advance.
module testingAllURI;
create OUT : build, OUT1 : code, OUT2 : conceptual, OUT3 : core, OUT4 : data, OUT5 : event, OUT6 : kdm, OUT7 : plat, OUT8 : source, OUT9 : structure, OUT10 : ui, OUT11 : action refining IN : build, IN1 : code, IN2 : conceptual, IN3 : core, IN4 : data, IN5 : event, IN6 : kdm, IN7 : plat, IN8 : source, IN9 : structure, IN10 : ui, IN11 : action;
rule addClassToPackage {
from
source : code!Package (source.name = 'testelucas')
to
target: code!Package (
codeElement <- source.codeElement->including(newClassUnit) //here it works
),
newClassUnit: code!ClassUnit (
name <- 'theNameOfTheClasse',
codeElement <- newClassUnit.codeElement->including(newStorableUnit)//I got the error here....
),
newStorableUnit: code!StorableUnit (
name <- 'theAttribute'
)
}
|
|
| | | | | | | |
Goto Forum:
Current Time: Thu Apr 25 11:40:39 GMT 2024
Powered by FUDForum. Page generated in 0.02790 seconds
|