[ATL][UML] TargetInvocationException on getValue(Stereotype, nameOfTaggedValue) [message #64210] |
Thu, 18 October 2007 05:48  |
Eclipse User |
|
|
|
Originally posted by: schwaban.web.de
Hello all,
while being shure, that my modelElement has the specified stereotype and
tagged value I get sometimes a magic TargetInvocationException on
calling getValue(...) stemming from an IllegalArgumentException thrown in
org.exlipse.uml2.uml.internal.operations.ElementOperations line #524
There are two cases very similiar to each other. In the first case the
exception is not thrown, in the second it is thrown:
1. I get the modelElementA (with the taggedValue) by calling a helper
from a matchedRule matching on a different(!) modelElementB.
The helper fetches the needed taggedValue of the modelElementA like this:
let modelElementA : Uml!Class = thisModule.inClasses('In')->select(c |
c.hasStereotype('DisplayWidth'))->first() in
let stereotype : Uml!Stereotype =
thisModule.getStereotypeFromProfile('DisplayWidth',
'DeviceProfile') in
modelElementA.getValue(stereotype, '@value')
where inClasses(..), hasStereotype(..) and getStereotypeFromProfile(..)
are selfdefined helpers
2. I try to get the needed modelElementA (with the taggedValue)
beforehand in the entrypoint rule, where I call the helper described in (1.)
In the second case I get the above mentioned exception.
What can be the reason?
Is the result dependent on the time, when I try to get the TaggedValue??
Thanks in advance
Andreas Schwab
|
|
|
|
Powered by
FUDForum. Page generated in 0.03648 seconds