Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » Method OCL.parse(OCLInput input) in pivot
Method OCL.parse(OCLInput input) in pivot [message #825454] Tue, 20 March 2012 21:21 Go to next message
Juan Cadavid is currently offline Juan Cadavid
Messages: 49
Registered: July 2009
Location: Rennes, France
Member

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] Wed, 21 March 2012 02:07 Go to previous messageGo to next message
Ed Willink is currently offline Ed Willink
Messages: 4095
Registered: July 2009
Senior Member
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 15:34 Go to previous message
Juan Cadavid is currently offline Juan Cadavid
Messages: 49
Registered: July 2009
Location: Rennes, France
Member

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: Thu Oct 23 21:25:54 GMT 2014

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

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