[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,

Thanks for your patience in dealing with my inaccuracies ... I hope the process has led you to an even better understanding of things than if I had been more accurate!  ;-)   I've been away from the code so long, now, that probably I should add a disclaimer to every message!

Cheers,

Christian


On Wed, 2009-09-16 at 18:58 +0200, Gilbert Mirenque wrote:
Hi Christian

> Ah, but you are.  The interactive console *is* the example.  :-)
Ohh :)

> That is only because you need to update the console to set EObject as
> the implicit root class when parsing, unless your EClasses explicitly
> extend EObject (which I generally wouldn't recommend).

Ok I now have the code from the example wizards. I now searched like
hell for something about the ParserOptions as you mentioned before.
Couldn't find anything. But fortunately I searched "implicit root class"
and found a little test suite of yourself [1]. There to see that its
name isn't PerserOptions but ParsingOptions ;) Now I could solve the
problem. In the class ModelingLevel in the method setContext(..) I added
those two lines in the M1 case:

OCL ocl = helper.getOCL();
ParsingOptions.setOption(ocl.getEnvironment(),
ParsingOptions.implicitRootClass(ocl.getEnvironment()),
EcorePackage.Literals.EOBJECT);

Now it works finally :) Thanks a lot again for your patience Christian.
Now I just need to export the modified plugin and add it into my eclipse.

best regards,
Gilbert

[1]
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.mdt/org.eclipse.ocl/tests/org.eclipse.ocl.ecore.tests/src/org/eclipse/ocl/ecore/tests/ParsingOptionsTest.java?root=Modeling_Project&view=co