Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » OclInEcore syntax to XMI for Ecore model(How to convert from OclInEcore textual syntax to XMI for an Ecore model)
OclInEcore syntax to XMI for Ecore model [message #1256532] Tue, 25 February 2014 14:36 Go to next message
Rocky Dunlap is currently offline Rocky DunlapFriend
Messages: 12
Registered: July 2009
Junior Member
I have created an Ecore model using the oclinecore textual syntax. (I started from an empty text file--I did not open an existing Ecore model.) How do I convert it to an XMI representation so I can view it using the Sample Ecore Model editor and generate Java code from it?

Thanks!
Re: OclInEcore syntax to XMI for Ecore model [message #1256545 is a reply to message #1256532] Tue, 25 February 2014 14:51 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
HI

Please the OCL newsgroup for OCL questions.

On the right hand button menu there is a Save As option, select Save As
Ecore.

[If you're using Luna M5, it is OCL->Save AS ...]

The OCLinEcore editor now persists whitespace formatting for embedded
OCL and /*...*/ comments in *.ecore, so you may find just using *.ecore
more convenient than *.oclinecore.

Regards

Ed Willink



On 25/02/2014 14:36, Rocky Dunlap wrote:
> I have created an Ecore model using the oclinecore textual syntax. (I
> started from an empty text file--I did not open an existing Ecore
> model.) How do I convert it to an XMI representation so I can view it
> using the Sample Ecore Model editor and generate Java code from it?
>
> Thanks!
Re: OclInEcore syntax to XMI for Ecore model [message #1256666 is a reply to message #1256545] Tue, 25 February 2014 17:11 Go to previous messageGo to next message
Rocky Dunlap is currently offline Rocky DunlapFriend
Messages: 12
Registered: July 2009
Junior Member
Great! Easier than I thought...

As a follow up, can you point me to any resources showing how to do that conversion programmatically?

Thanks,
Rocky
Re: OclInEcore syntax to XMI for Ecore model [message #1258287 is a reply to message #1256666] Thu, 27 February 2014 08:34 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

The OCL::cs2pivot() and OCL::pivot2ecore() methods do most of the work.

org.eclipse.ocl.examples.test.xtext.ValidateTests.doLoadOCLinEcore is an
example of them in use.

Regards

Ed Willink

On 25/02/2014 17:11, Rocky Dunlap wrote:
> Great! Easier than I thought...
>
> As a follow up, can you point me to any resources showing how to do
> that conversion programmatically?
>
> Thanks,
> Rocky
Previous Topic:Adding CDO to Target Platform
Next Topic:How to trigger 'organize imports' from Ant build file
Goto Forum:
  


Current Time: Fri Apr 26 03:30:57 GMT 2024

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

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

Back to the top