Opened 6 years ago

Closed 6 years ago

#5355 closed defect (fixed)

OMEdit does not rename file and does not update the package.order file when model is renamed

Reported by: Andrea Bartolini Owned by: Adeel Asghar
Priority: blocker Milestone: 1.14.0
Component: OMEdit Version: v1.14.0-dev-nightly
Keywords: Cc: Francesco Casella, Per Östlund

Description (last modified by Andrea Bartolini)

If you create a package with the option to save models in single files and then you rename a model the name inside the model file is updated but not the file name.
Moreover, also the content of package.order file is left unchanged.

The expected behavior is that also the file is renamed, a copy of the original file is kept on disk, renamed as .bak, and the package.order file is updated with the new model name.

In order to reproduce the problem you can open the attached zip, extract the model and execute the following steps:

  • open Test package in OMEdit
  • open M1 model inside the package
  • from the text view, rename the model as you want (e.g. M11)
  • save the model, the text inside the file M1.mo is updated but the name of the file M1.mo doesen't change and the content of the package.order file is left unchanged
  • open the P1 package inside the Test package
  • redo the same for the model M2, the same problem will happen
  • if now you unload and reload the Test package, you get an error (as expected)

OMEdit 1.14.0~dev-45-g9f3d0f7
Connected to OpenModelica 1.14.0~dev-285-g270177b
Connected to OMSimulator unknown-linux

Sysop: Linux Ubuntu 16.04

Attachments (1)

Test.zip (1.3 KB ) - added by Andrea Bartolini 6 years ago.

Download all attachments as: .zip

Change History (6)

by Andrea Bartolini, 6 years ago

Attachment: Test.zip added

comment:1 by Andrea Bartolini, 6 years ago

Cc: casella@… added
Description: modified (diff)

comment:2 by Andrea Bartolini, 6 years ago

Description: modified (diff)
Summary: OMEdit does not rename file when model is renamedOMEdit does not rename file and does not update the package.order file when model is renamed

comment:3 by Francesco Casella, 6 years ago

Cc: Francesco Casella Per Östlund added; casella@… removed

@adeas31, could you please have a look at this and report? Is it a front-end issue?

Version 0, edited 6 years ago by Francesco Casella (next)

comment:4 by Francesco Casella, 6 years ago

Ping...

comment:5 by Adeel Asghar, 6 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.