| Problem whe using "Support UML2 Stereotypes application" in the run configuration's advanc [message #1111498] |
Wed, 18 September 2013 05:49  |
Javier García Messages: 112 Registered: April 2013 |
Senior Member |
|
|
Hi all,
I'm having some problems when using the option mentioned in the title, this problems disappear when I uncheck it but anyways I wondered why does it show the error.
In my program I apply stereotypes which have tagged values, so first I apply the stereotype and then I apply the tagged values. Some of my tagged values are of the type of other stereotypes, so then before applying these tagged values I need to be sure that the stereotype has been applied, so to be sure I was applying the tagged values in an endpoint rule.
The problem is that in order to do this I was pointing to the classes from the output model (which I know is not recommended) and I used a code similar to this (simplified here to ease understanding):
for (src in UML2!Class.allInstancesFrom('OUT')) {
if (not src.getAppliedStereotype('RCP::View').oclIsUndefined()){
src.setValue(src.getAppliedStereotypes().first(), 'viewActions',
thisModule.elementSet);
}
}
So with the "Support UML2 stereotypes application" option checked this didn't work, as the transformation didn't detect any stereotyped class I checked it further and there were no stereotyped classes until the transformation was actually finished, meaning that once the transformation was finished the classes had stereotypes, but during the transformation not even in the endpoint rule the classes where stereotyped.
Then if I do this same transformation with that option unchecked it can properly see all the stereotyped classes from the output model and therefore it's able to set the values of the stereotype's properties without any problem.
So my question is: why does this happen? and is it intended to work this way?
Because I don't understand why this option changes this so much, and wondered if maybe it was a bug or if maybe as mentioned before I shouldn't be checking the output model like this.
Thanks in advance,
regards,
Javier
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.01490 seconds