Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#4182 closed enhancement (duplicate)

annotations in OMEdit

Reported by: anonymous Owned by: adeas31
Priority: high Milestone: 1.11.0
Component: OMEdit Version:
Keywords: Cc:

Description

I remember some discussion about hiding, or at least greying, annotations to make "operational" Modelica code more visible.
But now cannot find the related ticket.
Nor can I find in OMEdit (v1.11.0-dev-267-gbe0978f) any setting to hide or dim (i.e. grey) annotations. Is there something in place?
Maybe a button or a context menu item to toggle between view/hide (or view/dim) annotations would do the job.

Change History (7)

comment:1 Changed 8 years ago by Christoph Buchner <buchner@…>

This point is discussed in the comments of #3724.

comment:2 Changed 8 years ago by adeas31

  • Resolution set to duplicate
  • Status changed from new to closed

See #2233.
We already have folding annotations support for multi-line annotations. Recently we have also updated so OpenModelica by default generate multi-line annotations.

comment:3 follow-up: Changed 8 years ago by anonymous

What this ticket asked did not refer to folding.
The issue I wanted to address is that annotations, which carry supplemental information, tend to hide the most important part of modelica code especially when they are very long. It would be very useful for me to have a toggle to show/hide annotations, or, according to what is preferred,to show/dim them. By dim I intend to show them lighter (e.g. greyed).
There must be somewhere a ticket (I don't remember which) where another user strongly supports this idea.

comment:4 Changed 8 years ago by Christoph Buchner <buchner@…>

as I said already above, see #3724, specifically comment 6.

comment:5 in reply to: ↑ 3 Changed 8 years ago by adeas31

Replying to anonymous:

What this ticket asked did not refer to folding.
The issue I wanted to address is that annotations, which carry supplemental information, tend to hide the most important part of modelica code especially when they are very long. It would be very useful for me to have a toggle to show/hide annotations, or, according to what is preferred,to show/dim them. By dim I intend to show them lighter (e.g. greyed).
There must be somewhere a ticket (I don't remember which) where another user strongly supports this idea.

We can't just simply remove/hide annotations from the text because we need to map errors to the line numbers.

The folding is enabled by default so your code looks like this,

model N
  M m1 annotation( ...);
end N;

instead of,

model N
  M m1 annotation(
    Placement(visible = true, transformation(origin = {-74, 50}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
end N;

comment:6 Changed 8 years ago by anonymous

I see...
But this is not what happens on the following release:

OMEdit v1.12.0-dev-40-g0af374d (64-bit)
Connected to v1.12.0-dev-54-gc3e6c1b (64-bit)

which is very recent. In this, all annotations are unfolded.
I checked on an older version (OMEdit 1.11.0-dev-188 connected to OM 1.11.0-dev-203). There everything is very good, exactly as you showed.

comment:7 Changed 8 years ago by adeas31

  • Milestone changed from Future to 1.11.0
Note: See TracTickets for help on using tickets.