Opened 9 years ago

Closed 7 years ago

#3912 closed defect (fixed)

Do not change the formatting when duplicating models in OMEdit

Reported by: Francesco Casella Owned by: Adeel Asghar
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 by Adeel Asghar, 7 years ago

Resolution: fixed
Status: newclosed

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.