Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » Saving a file in the OCLinEcore Editor deletes its content
Saving a file in the OCLinEcore Editor deletes its content [message #1821578] Sat, 15 February 2020 22:11 Go to next message
Marc WaltersFriend
Messages: 11
Registered: November 2019
Junior Member
Hello everyone,

I am currently running Eclipse 2019-12 with OCL Classic SDK (5.10.1.v20191209-1145) and OCL Examples and Editors SDK (6.10.0.v20191209-1145).

During my attempt to follow the OCLinEcore Tutorial, I ran into the following issue: Whenever I use the OCLinEcore Editor to edit an .ecore file, saving the file (even if it is still the version that I initially opened) removes most of the content from it. This is the only part that remains:
<?xml version="1.0" encoding="UTF-8"?>
<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>


Is anyone able to reproduce this issue? Or is there maybe a plugin whose absence could lead to such a behavior?
Re: Saving a file in the OCLinEcore Editor deletes its content [message #1821579 is a reply to message #1821578] Sun, 16 February 2020 06:02 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6614
Registered: July 2009
Senior Member
Hi

This seems very unlikely. Possible explanations are that you are using the wrong editor or that you have a serious content error. Wrong error is most likely since the 'correct' editor is auto-chosen and recent changes have endeavored to prioritize the Sample Ecore Model Editor. You can force the editor using Open With....

If that doesn't solve it for you, please post the file that you tried to edit, the command sequence that you used, and a screen shot (including the editor tab) just before the failing Ctrl-S.

If it does solve it, please provide more details of your misadventure so that the tutorial can be improved.

Regards

Ed Willink
Re: Saving a file in the OCLinEcore Editor deletes its content [message #1821582 is a reply to message #1821579] Sun, 16 February 2020 09:57 Go to previous messageGo to next message
Marc WaltersFriend
Messages: 11
Registered: November 2019
Junior Member
Hi,

I was unfortunately not able to solve the issue yet. Here are the steps to reproduce the error on my platform:

  1. Switch to a clean, new Eclipse workspace.
  2. Add an Example > OCL (Object Constraint Language) Plug-ins > ECLinEcore Tutorial project to this workspace (org.eclipse.ocl.examples.project.oclinecoretutorial).
  3. Right click the Tutorial.ecore file to Open With > OCLinEcore Editor.
  4. Add a space at a random line and delete it again to mark the view as dirty (see the attached screenshot for an overview of the Eclipse window in this state). Ctrl+S to save the file.
  5. Open the Tutorial.ecore file using the Generic Text Editor. These are the contents of the file:
    <?xml version="1.0" encoding="UTF-8"?>
    <xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
    


Note that I get the same behavior if I

  1. create and try to edit an OCLinEcore Ecore File in another project or
  2. if the *.ecore file is not opened in the Ecore Editor provided by EMF in the meantime.
  • Attachment: ocl-issue.png
    (Size: 314.09KB, Downloaded 10 times)
Re: Saving a file in the OCLinEcore Editor deletes its content [message #1821585 is a reply to message #1821582] Sun, 16 February 2020 14:43 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6614
Registered: July 2009
Senior Member
Hi

Ouch! https://bugs.eclipse.org/bugs/show_bug.cgi?id=560196 raised.

No idea how this escapes JUnit testing.

Regards

Ed Willink
Re: Saving a file in the OCLinEcore Editor deletes its content [message #1821588 is a reply to message #1821585] Sun, 16 February 2020 18:07 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6614
Registered: July 2009
Senior Member
Hi

Workaround. Use OCL 6.9: http://www.eclipse.org/modeling/download.php?file=/modeling/mdt/ocl/downloads/drops/6.9.0/R201909100937/mdt-ocl-Update-6.9.0.zip

I will announce a 6.10.1 release in a couple of days.

Regards

Ed Willink
Re: Saving a file in the OCLinEcore Editor deletes its content [message #1821627 is a reply to message #1821588] Mon, 17 February 2020 18:20 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6614
Registered: July 2009
Senior Member
Hi

A 6.10.1 N-build is available from: http://www.eclipse.org/modeling/download.php?file=/modeling/mdt/ocl/downloads/drops/6.10.1/N202002171722/mdt-ocl-Update-N202002171722.zip

6.10.1 release scheduled for Wednesday.

Regards

Ed Willink
Re: Saving a file in the OCLinEcore Editor deletes its content [message #1822020 is a reply to message #1821627] Tue, 25 February 2020 22:29 Go to previous message
Marc WaltersFriend
Messages: 11
Registered: November 2019
Junior Member
Hi,

I just tested the 6.10.1 build from your post and can confirm that it solves the issue. Thank you very much for your help!

Best regards,
Marc
Previous Topic:CfP: 20th International Workshop on OCL and Textual Modeling (OCL'2020 @ STAF)
Next Topic:Announce OCL 6.10.1
Goto Forum:
  


Current Time: Mon Mar 30 17:49:48 GMT 2020

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

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

Back to the top