|
|
|
Re: ATL debug, how to use println() to print special var values [message #537204 is a reply to message #537193] |
Tue, 01 June 2010 11:17  |
Eclipse User |
|
|
|
wafaa wrote on Tue, 01 June 2010 11:08 | hi all
i have seen this example and when tried similar did not work
any comment
rule Entity {
from s : UML2!Class(
s.isStereotypeApplied( 'qme::pim::persistence::Entity' ))
to t : UML2!Class (
ownedAttribute <- s.ownedAttribute )
do{
t.applyStereotype( t.getApplicableStereotype( 'EJB3::Entity' ) );
t.setValue( t.getAppliedStereotype( 'EJB3::Entity' ) ,
'tableName', thisModule.ejbConf(t).table );
s.name.println('Entityname: ');
for(field in s.ownedAttribute) {
field.name.debug(' Fieldname: ');
field.type.debug(' Fieldtype: ');
}
}
}
|
There might be a bug with the pile. In order to "consume" the debug elements, you can declare a fake consumer in the using section :
using{
fakeConsumer : OclAny = OclUndefined;
}
and then use it in the do section :
fakeConsumer <- field.name.debug('Fieldname: ');
|
|
|
Powered by
FUDForum. Page generated in 0.05380 seconds