Opened 12 years ago

Closed 8 years ago

#2233 closed enhancement (fixed)

OMEdit: Hiding annotations in text view

Reported by: Christian Schubert Owned by: Adeel Asghar
Priority: normal Milestone: 1.11.0
Component: OMEdit Version: trunk
Keywords: Cc:

Description

Is it possible to hide (or collapse as in Dymola) the annotations in text view (by default).

It would be helpful for teaching as to not to overburden students with too much source code.

(An "empty" has the following text representation which is hard to understand for a beginner:

model EmptyModel
  annotation(Icon(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2,2})), Diagram(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2,2})));
end EmptyModel;

Change History (15)

comment:1 by Lennart Ochel, 12 years ago

I already wanted to open the same ticket. This feature would also for me very useful.

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

Milestone: 1.9.01.9.1

Postponed until 1.9.1

comment:3 by anonymous, 10 years ago

how do you do this?

comment:4 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:5 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:6 by anonymous, 9 years ago

Dear developers,

I think that postponing again and again the implementation of this essential feature of OMEdit is a big mistake. I am pretty sure that many people willing to use the software give up pretty soon, tired to filter out useless information when reading non-toy models.

Sincerely

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

Milestone: 1.9.31.9.4

Moved to new milestone 1.9.4

comment:8 by anonymous, 9 years ago

Dear developers,

As pointed out before, the code is very hard to read with all the annotation in it.
This information has no use to the modeller. It is generated by graphic editor and only used by that editor.

Surely, It can't be too hard to show the user a filtered version of the code, and keep the full model in the background.
I'm seriously considering just modelling without the graphical editor, to make it readable.

Please could you make this a priority.

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

Milestone: 1.9.41.9.5

Milestone pushed to 1.9.5

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

Milestone: 1.9.51.10.0

Milestone renamed

comment:11 by Adeel Asghar, 9 years ago

736e098/OMEdit have support for annotation folding.

in reply to:  11 comment:12 by Lennart Ochel, 9 years ago

Replying to adeas31:

736e098/OMEdit have support for annotation folding.

Thanks, I've tested it and it works well. However, can you extend that feature to also fold single line annotations?

comment:13 by Christoph <buchner@…>, 9 years ago

Would it also be possible to fold annotations at the end of a line? That's actually where I typically find the vast majority of annotations, and they sometimes blow up the length of a line by a factor of 3 or so.

The ellipsis highlight could replace the arguments of the annotation, and (ideally) clicking on the ellipsis would expnd/collapse the annotation.

For example, the single line

inner Modelica.Fluid.System system annotation(Placement(visible = true, transformation(origin = {62, -56}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));

could become

inner Modelica.Fluid.System system annotation(...);

which imho very much improves readability, especially when encountering multiple annotated statements.

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

Milestone: 1.10.01.11.0

Ticket retargeted after milestone closed

comment:15 by Adeel Asghar, 8 years ago

Resolution: fixed
Status: newclosed

OMEdit can now fold/unfold multi line annotations also OMC is by default producing multi line annotations so the code is very much readable.

Note: See TracTickets for help on using tickets.