[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.m2m] Re: [ATL] NullPointerException--ERROR

Hi Hugo,

Yes, I pass the definition of the profile as follow

module CopyClass_3; -- Module Template
create OUT : UML from IN : UML, IN_profile : UML;

I?ve just applied the use case ?Verifying UML profiled models? using the same source files ?sample.uml? and ?sample.profile.uml?. I tried to complete the ATL transformation file which shown on its web site by defining the two helpers ?hasStereotype? and ?getTaggedValue?.

I got this helper which works well for this transformation from Frederic Thomas
helper context UML2!Element def : getTagValue(stereo :
UML2!Stereotype,tag : UML2!Property ) : UML2!Element =
self.getValue(self.getAppliedStereotype(stereo.name),tag.name);


In this use case, the value of the property of the given stereotype is a string. However, when I tried the getValue method with String as follow, I still get the same error.

helper context UML!"uml::Element" def: getTaggedValue(stereo :
String ,tag : String) : String =
self.getValue(self.getAppliedStereotype(stereo),tag);

Your help is greatly appreciated,
Rasha