misunderstanding of oclIsTypeOf [message #32713] |
Wed, 11 July 2007 05:03  |
Eclipse User |
|
|
|
Originally posted by: firstname.name.gmail.com
Hello,
I am certainly missing some key points on the use of oclIsTypeOf.
I use the ocl console interpreter to test my understanding.
My context is a stereotype, and I do queries at the M2 Level.
Evaluating:
self.oclAsType(uml::Type)
Results:
Stereotype MyStereotype
Evaluating:
self.oclIsKindOf(uml::Stereotype)
Results:
true
Evaluating:
self.oclIsTypeOf(uml::Stereotype)
Results:
false
What I do not understand is why the last return false. In my mind, both
oclIsKindOf/OclIsTypeOf should have returned true..
best regards.
--
F. Lagarde
|
|
|
Re: misunderstanding of oclIsTypeOf [message #32862 is a reply to message #32713] |
Wed, 11 July 2007 13:19  |
Eclipse User |
|
|
|
Originally posted by: cdamus.ca.ibm.com
Hi, François,
Your understanding is correct: the metaclass of your stereotype element is
exactly Stereotype.
The UMLEvaluationEnvironment::isTypeOf() method has a bug. A reference to
"classifier" should be to "eclassifier" instead.
https://bugs.eclipse.org/bugs/enter_bug.cgi?product=MDT& version=1.1.0&component=OCL
Thanks for finding this,
Christian
François Lagarde wrote:
> Hello,
>
> I am certainly missing some key points on the use of oclIsTypeOf.
> I use the ocl console interpreter to test my understanding.
>
> My context is a stereotype, and I do queries at the M2 Level.
>
> Evaluating:
> self.oclAsType(uml::Type)
> Results:
> Stereotype MyStereotype
>
> Evaluating:
> self.oclIsKindOf(uml::Stereotype)
> Results:
> true
>
> Evaluating:
> self.oclIsTypeOf(uml::Stereotype)
> Results:
> false
>
>
> What I do not understand is why the last return false. In my mind, both
> oclIsKindOf/OclIsTypeOf should have returned true..
>
> best regards.
>
|
|
|
Powered by
FUDForum. Page generated in 0.02751 seconds