Opened 8 years ago
Closed 7 years ago
#4233 closed defect (fixed)
Consecutive end <class> statements on the same lines wreak havoc in OMEdit
Reported by: | Francesco Casella | Owned by: | Martin Sjölund |
---|---|---|---|
Priority: | critical | Milestone: | 1.12.0 |
Component: | Interactive Environment | Version: | |
Keywords: | Cc: | Martin Sjölund |
Description
Through a sequence of operations that unfortunatly I cannot reproduce, I ended up with a .mo file with this content:
package P package Q model M1 end M1; model M2 end M2; end Q; end P;
i.e., the newline after end M2
got lost. This should also be fixed, but unfortunatly I have no idea how to reproduce this part.
AFAIK, this is perfectly legal Modelica code, but OMEdit cannot handle it: if I select model P.Q.M2, I see
model M2 end M2; end Q;
and whatever modification I apply, I get a syntax error.
Change History (7)
comment:1 by , 8 years ago
Cc: | added |
---|
follow-up: 4 comment:2 by , 8 years ago
As far as I remember, this happens when you start with something like:
package P package Q model M1 end M1; end Q; end P;
And then add a model M2 (or a component). The diff will not insert extra line endings, which means you end up with the model in the ticket.
comment:3 by , 8 years ago
Milestone: | 1.11.0 → 1.12.0 |
---|
comment:4 by , 8 years ago
Component: | OMEdit → Interactive Environment |
---|---|
Owner: | changed from | to
Status: | new → assigned |
Replying to sjoelund.se:
As far as I remember, this happens when you start with something like:
package P package Q model M1 end M1; end Q; end P;And then add a model M2 (or a component). The diff will not insert extra line endings, which means you end up with the model in the ticket.
So do we need to fix this?
OMEdit can already handle if there is no extra line ending.
comment:5 by , 8 years ago
Please do, if possible for 1.11 already. I guess that's how we ended up in the situation reported here.
comment:6 by , 8 years ago
Probably the package in question was initially built with a text editor, which is legitimate, and lacked the trailing newline, which is also perfectly legitimate.
comment:7 by , 7 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Seems to be fixed now, as I could no longer reproduce the error.
I made OMEdit handle such code 4bf74df/OMEdit.
I guess
diffModelicaFileListings
somehow removed the newline. @Martin do you have any idea?