hi alex
thanks for your reply
thats it, i just took the false imports
but for me its still a problem, what is the analog call to
ocl = OCL.newInstance(EcoreEnvironmentFactory.INSTANCE);
i want to have an UMLEnvironment but UMLEnvironmentFactory has no static fiel INSTANCE, i tried to call this:
ocl = OCL.newInstance(new UMLEnvironmentFactory().createEnvironment());
which causes again an compileerror
so maybe you can tell me the rigth call

If you use F4, Open Type hierrachy you will discover four UML variants
of OCL.newInstance. The closest has a UMLEnvironmentFactory argument so
you could do OCL.newInstance(new UMLEnvironmentFactory()).

We are not entirely clear whether the asymmetry between the UML and
Ecore binding is really necessary. It's a pain for us too.

Regards

Ed Willink

On 05/07/2011 09:57, stoehm wrote:
> hi alex
> thanks for your reply
> thats it, i just took the false imports :blush: but for me its still
> a problem, what is the analog call to
> ocl = OCL.newInstance(EcoreEnvironmentFactory.INSTANCE);
> i want to have an UMLEnvironment but UMLEnvironmentFactory has no
> static fiel INSTANCE, i tried to call this:
> ocl = OCL.newInstance(new
> UMLEnvironmentFactory().createEnvironment());
> which causes again an compileerror
> so maybe you can tell me the rigth call
>
> best regards
> stoehm
>

The helper requires a Class argument, which you may obtain by naigating
your UML meta-model using UML's helper operations such as getOwnedType(c1);

Regards

Ed Willink

On 05/07/2011 10:56, stoehm wrote:
> hi
> trying to run the example, i have another question now
> is there an easy way to set the context of an OCLHelper object
> for example i have an example.uml which is located in any location,
> and this example.uml contains a package p1, with a class c1, now i
> want to set the context of an OCLHelper something like this
> helper.setContext(pathOfTheExampleUML.p1.c1)
>
> best regards