Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#4677 closed defect (invalid)

OMEdit: Problem opening classes with annotation preferredView="info"

Reported by: bthiele Owned by: adeas31
Priority: high Milestone: 1.13.0
Component: OMEdit Version: v1.13.0-dev-nightly
Keywords: Cc: sjoelund.se

Description

If one first opens an arbitrary class in OMEdit and after that tries to open a class which has the annotation preferredView="info", the info window is (correctly) opened, but the component view stays at the previously opened class. The problem is now, that it is not possible to switch into a non-info view for a class which has the annotation preferredView="info".

The following picture shows the problem using the Modelica_DeviceDrivers library as an example. If one first opens an example (here TestInputKeyboardKey) and after that tries to open a block like "Blocks.HardwareIO.Comedi.DataWrite" which has the annotation preferredView="info", it is not possible to get a view of this block in the icon, component, or text view.


Attachments (1)

OMEditScreenshot.png (118.6 KB) - added by bthiele 7 years ago.

Download all attachments as: .zip

Change History (6)

Changed 7 years ago by bthiele

comment:1 Changed 7 years ago by adeas31

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

Its not a bug its a feature (see #2249). The double click opens the class based on preferredView or DocumentationClass annotation. If you want to see the other views you can right click the class and choose the view you want to open.

comment:2 Changed 7 years ago by bthiele

Hm, I don't like that feature. It is a bit counter intuitive. It breaks the idea that one can switch between views using the menu buttons at the top for reasons which are not obvious for a user who is clicking through a library.

I suppose the purpose is that a user gets the documentation for a block he is interested in without "cluttering" the component view. However, the additional confusion that this might create doesn't warrant the benefit in my opinion.

My feeling is that one should better open both, document view and component/text view. The user can still select "View Documentation" from the context menu if he wants to avoid the opening in the component view.

comment:3 Changed 7 years ago by adeas31

Well I agree but perhaps Martin will not agree. When you set preferredView=info you want the documentation to appear as default, if we show both then user has to wait for loading of diagram view. This is annoying for users because they want to see just the documentation of the model and they have set the preferredView annotation just for that purpose.

comment:4 Changed 7 years ago by bthiele

I understand the argument, but it probably mostly holds for power users who also know the OpenModelica tool well enough.

In most cases our average user will not even know that this annotation exists. He will use a library that somebody else has written and he will be simply confused why he apparently can't open some of the classes in this library.

If it wasn't my own library my first guess for such a behavior would have been that these classes are protected by some IP protection mechanism and that access to them is intentionally restricted.

My preference would be to simply open both views. However, a compromise that could alleviate the problem a bit could be to add a button in the documentation browser which allows to load the class into the diagram view (similar as there is a button in the diagram view for opening the documentation view). What do you think?

comment:5 Changed 7 years ago by adeas31

  • Cc sjoelund.se added
Note: See TracTickets for help on using tickets.