| [news.eclipse.modeling.mdt.ocl] Re: extending the OCL parser and evaluation |
Hi Ed,
Elio
Ed Willink wrote:
Hi Elio
Forgive my ignorance, but I'm unaware of the Apache Tuscany project. A quick Google shows that it is a large professional Open Source project with regular nightly builds. It therefore seems VERY unlikely that it has a 3 year old version of Ecore as a mandatory prerequisite. I suggest that you investigate your statement "it does not seem to work with ecore > 2.2". I think you will find a trivial problem, but of course only trivial in hindsight.
Otherwise you have a variety of horrible alternatives:
Develop an EMF variant with ongoing support for 2.2 bnehaviour.
Develop an OCL variant for Ecore 2.2 (MDT-OCL 1.0 might be a starting point).
Develop a Tuscany variant that supports Ecore 2.5.
Develop a bridge.
Any of which will be a maintenance nightmare. Find the trivial problem.
Regards
Ed Willink
Elio Damaggio wrote:org.eclipse.ocl.utilities.impl.UtilitiesPackageImpl.addETypeParameter(Lorg/eclipse/emf/ecore/EClassifier;Ljava/lang/String;)Lorg/eclipse/emf/ecore/ETypeParameter;Hi Ed,
well, here is my situation:
I have to integrate a modified version of the OCL parser into an application that uses Apache Tuscany SDO implementation (which uses ecore 2.2 and it does not seem to work with ecore > 2.2).
Are you suggesting that I modify the old OCL parser that used ecore 2.2? Does there exist one?
Thanks,
Elio
Ed Willink wrote:
Hi Elio
> do you think there is someway I can modify the ocl evaluation in order > that it does not use the latest features Ecore > 2.2?
It's only software; of course it's possible; just incredibly difficult.
> Any better idea?
Yes. Find out where the true problem is coming in.
Ecore is upward compatible, so you can quite happily use old Ecore models with a later Ecore release.
You appear to have a mishmash of Eclipse contributions, which ought to give you some warnings about version dependencies. If you're using plugins you can invoke Validate on the Plugin page of the launcher to check that they're all consistent.
It's possible that you've just got a bad build state through loading replacement plugins. Try a clean and rebuild. Try a close all projects
and reopen. Try an Eclipse restart. (Incremental builds are not always
correct when Eclipse has more than one choice of org.eclipse.xxxx and
the choice preference changes a little.)
Overall, I would very strongly recommend that you establish why you cannot use all plugins from the same Eclipse vintage.
2.2/2.3/2.4/2.5 Ecore are fundamentally very similar. ?/?/1.2/1.3 MDT-OCL are fairly similar 1.0/1.1 MDT-OCL may lack some functionality.
Regards
Ed Willink
Elio Damaggio wrote:Hi!
I found out that the model I am using is the one used in Tuscany SDO implementation.
It turns out this IS Ecore. However, I have a big problem.
It actually uses Ecore 2.2 (pre generics).
It does not seem compatible with any later version.
Right now I get this exception:
java.lang.NoSuchMethodError:
org.eclipse.ocl.utilities.impl.UtilitiesPackageImpl.initializePackageContentsGen(UtilitiesPackageImpl.java:468)
at
org.eclipse.ocl.utilities.impl.UtilitiesPackageImpl.initializePackageContents(UtilitiesPackageImpl.java:440)
at
org.eclipse.ocl.utilities.impl.UtilitiesPackageImpl.init(UtilitiesPackageImpl.java:176)
at
org.eclipse.ocl.utilities.UtilitiesPackage.<clinit>(UtilitiesPackage.java:85)
at
org.eclipse.ocl.types.impl.TypesPackageImpl.init(TypesPackageImpl.java:206)
at
org.eclipse.ocl.expressions.impl.ExpressionsPackageImpl.init(ExpressionsPackageImpl.java:420)
at org.eclipse.ocl.types.TypesPackage.<clinit>(TypesPackage.java:85) at
org.eclipse.ocl.expressions.ExpressionsPackage.<clinit>(ExpressionsPackage.java:87)
at
org.eclipse.ocl.ecore.EcoreEnvironmentFactory.createEnvironment(EcoreEnvironmentFactory.java:83)
at org.eclipse.ocl.ecore.EcoreEnvironment.<clinit>(EcoreEnvironment.java:91)
at
at org.eclipse.ocl.OCL.<init>(OCL.java:101)
do you think there is someway I can modify the ocl evaluation in order that it does not use the latest features Ecore > 2.2?
Any better idea?
Elio