Using the OCLEditor with arbitrary EMF based meta-models
It is also possible creating OCL expressions on arbitrary meta-models
which have to be EMF/MOF based. In this section you will create an
OCL project at this level.
- add the new meta-model to the OCLEditor SQUAM preferences. Make sure
that the meta-model has the file extension ".ecore" or ".xsd" (Window >
Preferences > OCLEditor Community Edition > Metamodel > Add new metamodel). Select the
meta-model in the FileDialog.

-
select the new
meta-model from the list, and finally select the adequate
default context for OCL tests:
Creating the project
- Inside Eclipse select the menu item File > New > Project.... to open the New Project wizard.
- Select OCL Library Project then click Next to start the
New OCL Library Project wizard. Finally give
the project a name.

On this page select the added meta-model as a standard meta-model
and click Finish.
- Create a new OCL library newmetatest.oclx : File > New >
Other > SQUAM > New OCL Library. Use templates(Strg + Space) to
create basic OCL Library structure:

Select the new meta-model in the metamodel proposal of the
template.
Now everything is set in order to write OCL expressions on arbitrary
meta-models.
New OCL Library Project Wizard