Skip to main content



      Home
Home » Modeling » OCL » Method OCL.parse(OCLInput input) in pivot
Method OCL.parse(OCLInput input) in pivot [message #825454] Tue, 20 March 2012 17:21 Go to next message
Eclipse UserFriend
Hello,

I have been using for some time Eclipse OCL for my research on the conjunct usage of Ecore and OCL, reason for which I have always used the old Ecore binding with generics to build my prototypes; but I've decided it's finally time to migrate the code to using the pivot metamodel. I have been able to decipher some of the differences by looking at the pivot code. There is however one thing I haven't been able to find; how to parse entire .ocl documents. In the old OCL, there was this method taking the OCL document as parameter and then returning the list of constraints:

public List<CT> parse(OCLInput input)

which I can't find now in the OCL pivot plugin. Has this been implemented already? Is there another way to accomplish parsing an entire document?

PD. Just cross-checking, I realized this question was made already Smile
http://www.eclipse.org/forums/index.php/mv/msg/243456/754603/#msg_754603
However there was no answer so I though I'd ask.

Many thanks in advance,

Juan Cadavid
Re: Method OCL.parse(OCLInput input) in pivot [message #825586 is a reply to message #825454] Tue, 20 March 2012 22:07 Go to previous messageGo to next message
Eclipse UserFriend
Hi Juan

There was an answer to the earlier message; but to the wrong question.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=374846 raised to provide
some approximation of the old parse() API.

doLoad_OCL in
/org.eclipse.ocl.examples.xtext.tests/src/org/eclipse/ocl/examples/test/xtext/LoadTests.java
or
/org.eclipse.ocl.examples.xtext.completeocl/src/org/eclipse/ocl/examples/xtext/completeocl/validation/CompleteOCLEObjectValidator.java
shows what to do.

Beware that the Pivot code is of examples quality and is certain to
change, at least in package names, before promotion for the Kepler release.

Regards

Ed Willink



On 20/03/2012 17:21, Juan Cadavid wrote:
> Hello,
>
> I have been using for some time Eclipse OCL for my research on the
> conjunct usage of Ecore and OCL, reason for which I have always used
> the old Ecore binding with generics to build my prototypes; but I've
> decided it's finally time to migrate the code to using the pivot
> metamodel. I have been able to decipher some of the differences by
> looking at the pivot code. There is however one thing I haven't been
> able to find; how to parse entire .ocl documents. In the old OCL,
> there was this method taking the OCL document as parameter and then
> returning the list of constraints:
>
> public List<CT> parse(OCLInput input)
>
> which I can't find now in the OCL pivot plugin. Has this been
> implemented already? Is there another way to accomplish parsing an
> entire document?
>
> PD. Just cross-checking, I realized this question was made already :)
> http://www.eclipse.org/forums/index.php/mv/msg/243456/754603/#msg_754603
> However there was no answer so I though I'd ask.
>


> Many thanks in advance,
>
> Juan Cadavid
Re: Method OCL.parse(OCLInput input) in pivot [message #826047 is a reply to message #825586] Wed, 21 March 2012 11:34 Go to previous message
Eclipse UserFriend
Hi Ed,

Thank you so much for your answer! I will keep into account your remarks on the current status on the pivot meta-model.

Cheers,

Juan
Previous Topic:Class.allInstances() does not work
Next Topic:OCLinEcore editor and comment lines
Goto Forum:
  


Current Time: Sat Jun 14 08:17:45 EDT 2025

Powered by FUDForum. Page generated in 0.05198 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top