#3630 closed defect (fixed)
OMEdit crashes or fumbles up the formatting when duplicating classes or copying and pasting text within the same package
Reported by: | Francesco Casella | Owned by: | Adeel Asghar |
---|---|---|---|
Priority: | blocker | Milestone: | 1.9.4 |
Component: | OMEdit | Version: | |
Keywords: | Cc: | andrea.bartolini@… |
Description
Consider the attached .mo file, which contains a package A with a class M. Open the package with OMEdit.
Select M and duplicate it outside package A. Everything works nicely.
Create a new class N inside package A. Then, copy the second line from the code of class A.M and paste it within A.N. Then save A.N. The formatting is changed to some flavour of omc liking, and it will keep on changing to that forever, every time the model is saved.
Finally, duplicate model A.M inside package A as A.P. Then double click on A.P to open it. OMEdit crashes.
Attachments (1)
Change History (10)
by , 9 years ago
comment:1 by , 9 years ago
Summary: | OMEdit crashes or fumbles up when duplicating classe or copying and pasting text within the same package → OMEdit crashes or fumbles up the formatting when duplicating classes or copying and pasting text within the same package |
---|
comment:2 by , 9 years ago
See also #3606, which reports the same situation on a different test case.
comment:3 by , 9 years ago
The first problem was fixed in b1e94ad
As to the second, when A.M is duplicated inside the package as A.P, the new class also contains the statement within A; (which is weird), but is not saved when the save button is hit, nor does it appear in the package if selecting A.
follow-up: 5 comment:4 by , 9 years ago
Status: | new → assigned |
---|
@Adeel: The problem here is that OMEdit calls diffModelicaFileListings on manual changes in the text layer. It must never do this as it prevents the user from making whitespace changes.
comment:5 by , 9 years ago
Replying to sjoelund.se:
@Adeel: The problem here is that OMEdit calls diffModelicaFileListings on manual changes in the text layer. It must never do this as it prevents the user from making whitespace changes.
Fixed in 104cbca/OMEdit.
comment:6 by , 9 years ago
comment:7 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Test package