Domanda

I am trying to create a stand alone Java application that accepts an xmi model and an OCL file containing constraints applied to the model's meta-model. The application then validates the model against the ocl.

I have managed to do this inside eclipse using the EMF. However when I start to create the java app, many libraries are missing. Some of which I was able to locate in the plugins directory but some seem to be missing.

For example

org.eclipse.ocl.examples.library.oclstdlib.OCLstdlib;

cannot be found.

Is there a straight forward way, using the EMF to accomplish what I am trying to do. I have been trying to create something very much like the following:

http://subversion.assembla.com/svn/da_sw_tf/trunk/OCL/src/ocl/OCLEvaluator.java

È stato utile?

Soluzione 2

The eclipse plugins were located in my personal folder under .eclipse. I had completely forgotten about the personal instances of the plugins. Instead I re-installed everything only to realise the the libraries were not in the install directory plugins folder.

Installing the EMF and OCL plugins from the following link were correct.

http://download.eclipse.org/releases/kepler

note: you may have to change the above url to suit your particular eclipse version.

Altri suggerimenti

Something missing, usually means something bad configured. Without more information I can only point you out to the OCL Help, where it explains why and how you need to do some manual registrations in order to execute OCL code in standalone mode.

Taken from the help:

"If you use Eclipse OCL within Eclipse you should find that the appropriate registrations are provided for you automatically by the plugin registration mechanisms.

However if you use Eclipse OCL outside Eclipse, for instance in JUnit tests, you must provide the corresponding registrations in your code."

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top