#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 , 12 years ago
Milestone: | → 1.9.0 |
---|
comment:2 by , 12 years ago
Cc: | added |
---|
comment:3 by , 12 years ago
Component: | Interactive Model Editor Interface → OMEdit |
---|
comment:4 by , 11 years ago
Milestone: | 1.9.0 → 1.9.1 |
---|
comment:5 by , 10 years ago
Milestone: | 1.9.1 → 1.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 , 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 , 10 years ago
Milestone: | 1.9.2 → 1.9.3 |
---|
Milestone changed to 1.9.3 since 1.9.2 was released.
comment:9 by , 9 years ago
Status: | new → accepted |
---|
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 , 9 years ago
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
The fix is now available via the nightly build.
Postponed until 1.9.1