0

Evrything is in the title : I have an OCL AST (with as root an org.eclipse.ocl.ecore.Constraint) which I have modified. I would like to parse it again, but I only find the "one-line OCL grammar" that you get when printing a constraint (or any OCL thing) - provided in their toString() method.

Anybody knows a way to get a final parseable OCL string from an EMF OCL Constraint ? (or from any TypedElement) (or from any OCLExpression or ExpressionInOCL) ??

Thanks ! Edouard

1 Answers1

0

As I have answered a number of times on the Eclipse OCL Forum.... http://eclipse.org/forums/eclipse.modeling.mdt.ocl

If you use the old OCL you have old faclities.

If you use the new Pivot-based OCL you get new extensible facilities such as the PrettyPrinter.

Regards

Ed Willink

Ed Willink
  • 1,205
  • 7
  • 8
  • Exactly, YOU answered. Maybe too technicaly restricted, too standard, too much ! I posted here to avoid the patriarchist monopole you maintain on the Eclipse forum. I'm looking for actual users. Please develop to a neophytes what is it you talk about with "Pivot-Based OCL" and how can one migrate from the classical OCL (?) to this. What is the actual impact on source code ? Please don't refer me to the documentation as everybody knows the Eclipse and OCL doc lacks the essentials. Thanks. – Edouard Batot Feb 27 '17 at 15:28