How to delete a model element of rule ? [message #1003957] |
Tue, 22 January 2013 10:23 |
Nicolas Fauvergue Messages: 5 Registered: January 2013 |
Junior Member |
|
|
Hi all,
I am developing an ATL plug-in and i have a problem.
This is the following :
In fact i create an output model element from an input model element and in some cases, this output element musn't be created.
For the moment, i succeed to recognize if i have to delete this element or not by this following implementation :
helper def : lastNode : tc463!NodeType = OclUndefined;
rule Step{
from
step : tc50!Step
to
node : tc463!NodeType(
transition <- transition463
),
transition463 : tc463!TransitionType(
x <- step50.x;
)
do{
if(thisModule.lastNode.oclIsUndefined()){
thisModule.lastNode <- node463;
}else{
if(thisModule.lastNode.id = node463.id){
thisModule.lastNode.transition <- node463.transition;
--I have to delete node463 here
}else{
thisModule.lastNode <- node463;
}
}
}
}
I tryed to delete this element by affect "OclUndefined" to this element but it didin't work.
Have you an idea to make this action ?
Thank you a lot in advance.
Nicolas
[Updated on: Tue, 22 January 2013 14:12] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03321 seconds