commit in EOL [message #1758000] |
Wed, 22 March 2017 12:58  |
Eclipse User |
|
|
|
Hi,
I am writing EOL code including nested loop with nested if statements and inside the loop i am calling some update operations to add elements to a model and i am querying the model inside the loop and each time i got error even i can see the new element in the model,i am wondering if i can query the update(new element added to the model) during the loop or i have to query the update after exiting the loop?
Can i explicitly commit the changes during the execution or is there any trick to do that??
Thanks ,
Taghreed
|
|
|
|
Re: commit in EOL [message #1758012 is a reply to message #1758001] |
Wed, 22 March 2017 14:15   |
Eclipse User |
|
|
|
Hi Dimitris,
Unfortunately it didn't work 
I don't know why,i am adding example1Trace .store() after call addTrace operation .
Below is part of the code
else{//else part when right is not defined
var LeftElementName=getName(UmlIdLeft);
if (isTraceExists(LeftElementName)=false){
var UmlType=getType(UmlIdLeft);
"yssssssssssssss".println();
if (TransferredElements.includes(UmlType)){
if (UmlType<>"ControlFlow"){
"no Trace for this left because no right(old)".println();
var DeviceParent=getDeviceForArtifact(LeftElementName).println();//first we need to add the parent
"DeviceParent".print()+DeviceParent.println();
addChild(Lqn!processor,DeviceParent.name,LeftElementName);//from mapping we are able to know that device is processor and parent for artifact
addTrace(LeftElementName,UmlType,"task");
example1Trace.store();
"pleaseeeeee".print()+isTraceExists(LeftElementName).println();
}else { for (flow in UML!ControlFlow) {
if (flow.name=LeftElementName){
if (guardForControlFlowToPrecedence(flow)=true){
"create new elemet its type = control flow".println();
addSyncall(flow.source,flow.target);
[b] addTrace(LeftElementName,UmlType,"synchcall");
example1Trace.store();[/b]
}else if(controlflowProcessingforSyncCall(flow)=true){
"create new elemet its type = control flow".println();
addSyncall(flow.source,flow.target.name);
addTrace(LeftElementName,UmlType,"synchcall");}else if(controlflowProcessingforASyncCall(flow)="true"){
"create new elemet its type = control flow".println();
addASyncall(flow.source,flow.target);
[b]addTrace(LeftElementName,UmlType,"Asynchcall");
example1Trace.store();[/b]}
}
[Updated on: Wed, 22 March 2017 14:18] by Moderator
|
|
|
|
|
|
|
|
|
|
|
|
Re: commit in EOL [message #1758427 is a reply to message #1758362] |
Tue, 28 March 2017 10:53  |
Eclipse User |
|
|
|
Hi Dimitris,
Thanks very much for your patience and your help,i appreciated so much.Frankly no specific reason for querying and modifying the model as XMI ,Do you recommend to query the model as EMF model??
Cheers,
Taghreed
|
|
|
Powered by
FUDForum. Page generated in 0.05631 seconds