Opened 8 years ago

Closed 7 years ago

#3912 closed defect (fixed)

Do not change the formatting when duplicating models in OMEdit

Reported by: casella Owned by: adeas31
Priority: high Milestone: 2.0.0
Component: OMEdit Version:
Keywords: Cc:

Description

A common usage pattern for development is to start from an existing model (e.g. from the MSL), copy it and then apply some modifications.

When this operation is carried out in OMEdit, the pretty-printing routine destroys the original formatting and applies OMC's own one. This is quite inconvenient.

In ticket:2905#comment:21, @sjolund.se suggests :

You can use the diff API using the original file(s) for the class and compare them to the new ones. This should be able to preserve some things better.

Change History (1)

comment:1 Changed 7 years ago by adeas31

  • Resolution set to fixed
  • Status changed from new to closed

In 32af475/OMEdit I implemented Martin's suggestion. However, the diff API works well for toy examples and doesn't work well for big models but I assume its another issue #4671. When the diff API fails the pretty-printing is used.

Note: See TracTickets for help on using tickets.