Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » semantic error
semantic error [message #946540] Tue, 16 October 2012 09:17
dorraaaa Z is currently offline dorraaaa ZFriend
Messages: 22
Registered: June 2012
Junior Member
hi

I hope to have a generated code like this

<UIML:Structure>
<part class="G:TopContainer" id=OO1 name='SystemSuivi' >
<part class="G:Area" id=002 name='Connection' >
<part class="G:UIFieldInManual" id=003 name='Login' />
<part class="G:UIFieldInManual" id=004 name='Password'/>
</part>
..
</part>
</UIML:Structure>

but I when i run the atl i have

<UIML:StructureType/>
<UIML:PartType/>
<UIML:StyleType/>
<UIML:PropertyType/>
<UIML:PartType class="G:Area" id="connection" name="connection"/>
<UIML:PartType/>
<UIML:PartType/>

please help me to find the problem

my code is:

helper context CTT!TaskModelType def : hasRoot() : Boolean =
self.refImmediateComposite().oclIsUndefined();

helper context UIML!PartType def : Task(task:CTT!Task,partTM:UIML!PartType) : UIML!PartType =
self=partTM.part;
-------------------------------------
rule UIMLStructureANDStyleFromTaskModel {
from
tskMdl : CTT!TaskModelType,user:USER!user
to

structure : UIML!StructureType ,
partTaskMdl : UIML!PartType
do{

if (tskMdl.hasRoot()= false){

structure.part <- partTaskMdl;
partTaskMdl.class <- 'G:TopContainer';
partTaskMdl.id <- tskMdl.Id;
partTaskMdl.name <- tskMdl.nameTaskModelID;

for (task in tskMdl.task.asOrderedSet()) {
thisModule.Task (task,partTaskMdl);
}}}}

helper context CTT!Task def : isLeaf() : Boolean = self.SubTask.isEmpty()=true;

rule UIMLStructureFromTask{
from
task : CTT!Task
to
partTask : UIML!PartType
do{
if (task.isLeaf()=true){
if (task.TypeIE='UIFieldInManual'){
partTask.class<- 'G:Text';
partTask.id<-task.identifier;
partTask.name <-task.name;
} else{
if (task.TypeIE='UIFieldInAction'){
partTask.class<- 'G:Button';
partTask.id<-task.identifier;
partTask.name <-task.name;
}else{
if (task.TypeIE='UIFieldOut'){
partTask.class<- 'G:GMLTextRegion';
partTask.id<-task.identifier;
partTask.name <-task.name; }
}}}
else {
partTask.class<- 'G:Area';
partTask.id <- task.identifier;
partTask.name <-task.name;
for (subTask in task.hasFils.asOrderedSet()) {
thisModule.Task (subTask,partTask);
}}}}
Previous Topic:Stereotypes tag values: setValue to copy tag value
Next Topic:method
Goto Forum:
  


Current Time: Mon Dec 22 09:14:22 GMT 2014

Powered by FUDForum. Page generated in 0.01690 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software