[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.mdt.ocl] Re: How to check the types of containment?

Hi, Gilbert,

Update the interpreter example code to set the "implicit root class" parser option to EcorePackage.Literals.EObject in the initialization of the M1 environment.  This is required to access the EObject features in models that do not explicitly extend EObject.

HTH,

Christian


On Tue, 2009-09-15 at 17:07 +0200, Gilbert Mirenque wrote:
I have another problem now. Until now I took an evaluation copy of
Together for designing my ocl constraints in the ocl editor and just
pasted them into my ecore model annotations. But as my copy ran out now
I can't use it anymore and I wanted to try to create my constraints like
described in [1] with the OCL console. Now the problem is if I select M2
 as modeling level I can use expressions like eClass(). But with the
statement

self.model->isUnique(eClass())

I get the message "Unrecognized variable: (model)". So I activated level
M1 and now I can access self.model for example but not eClass() anymore.
Am I doing something wrong? Or how do you create your ocl expressions?

best regards,
Gilbert

[1]
http://help.eclipse.org/galileo/topic/org.eclipse.ocl.doc/references/examples/oclInterpreterExample.html