Opened 12 years ago

Closed 9 years ago

Last modified 9 years ago

#1760 closed defect (fixed)

Line number don't match error messages in OMEdit

Reported by: Per Östlund Owned by: Adeel Asghar
Priority: critical Milestone: 1.9.4
Component: OMEdit Version: trunk
Keywords: Cc: Alachew Mengist

Description

OMEdit formats Modelica files after it's own rules, for example by removing any empty lines between models or concatenating multiline expressions into a single line. This means that the line numbers reported in error messages won't match OMEdit's line numbers, unless the file happens to be formatted with OMEdit's format (which is very unlikely for large files).

OMEdit should at the very least allow the user to somehow relate error messages to their files. If possible it would also be nice if the line numbering started on the correct number when viewing submodels in a file. I.e. if a model A starts at line 50 in a file, the line numbering in OMEdit should also start with 50 when viewing the model A. This would mean that a user would be able to find the right line without opening the whole file. I'm not sure what to do when displaying a package consisting of multiple files though.

Change History (12)

comment:1 by Per Östlund, 12 years ago

Milestone: 1.9.0

comment:2 by Adeel Asghar, 12 years ago

Cc: Alachew Mengist added

comment:3 by Per Östlund, 12 years ago

Component: Interactive Model Editor InterfaceOMEdit

comment:4 by Martin Sjölund, 11 years ago

Milestone: 1.9.01.9.1

Postponed until 1.9.1

comment:5 by Martin Sjölund, 10 years ago

Milestone: 1.9.11.9.2

This ticket was not closed for 1.9.1, which has now been released. It was batch modified for milestone 1.9.2 (but maybe an empty milestone was more appropriate; feel free to change it).

comment:6 by Christoph <buchner@…>, 10 years ago

If I may add the experience of a new (Open)Modelica user here: The fact that, in the OMEdit editor, neither the line numbers nor the filename in the top bar correspond to actual line numbers and the correct files for an open component really confused me, when cross-checking file contents with a text editor for example. In the end, I came to the conclusion/workaround to just always assume they are wrong, and ignore them.

To be honest, I don't see the motivation behind OMEdit more or less freely mix-and-matching files' contents, or editing contents before presentation (e.g. stripping "within" statements from a viewed package.mo), and then pretending that you look at a "real" file (as on disk). For me it was just confusing, and I couldn't think of a benefit this would have.

comment:7 by Martin Sjölund, 10 years ago

Milestone: 1.9.21.9.3

Milestone changed to 1.9.3 since 1.9.2 was released.

comment:8 by Martin Sjölund, 9 years ago

Milestone: 1.9.31.9.4

Moved to new milestone 1.9.4

comment:9 by Adeel Asghar, 9 years ago

Status: newaccepted

This issue has now been fixed in a development branch https://github.com/adeas31/OMEdit/tree/indentation for OpenModelica 1.9.4 final release.

comment:10 by Adeel Asghar, 9 years ago

Resolution: fixed
Status: acceptedclosed

The fix is now available via the nightly build.

comment:11 by Martin Sjölund, 9 years ago

Milestone: 1.9.41.9.4-1.9.x

Milestone renamed

comment:12 by Martin Sjölund, 9 years ago

Milestone: 1.9.4-1.9.x1.9.4

Milestone renamed

Note: See TracTickets for help on using tickets.