#4677 closed defect (invalid)
OMEdit: Problem opening classes with annotation preferredView="info"
Reported by: | Bernhard Thiele | Owned by: | Adeel Asghar |
---|---|---|---|
Priority: | high | Milestone: | 1.13.0 |
Component: | OMEdit | Version: | v1.13.0-dev-nightly |
Keywords: | Cc: | Martin Sjölund |
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)
Change History (6)
by , 7 years ago
Attachment: | OMEditScreenshot.png added |
---|
comment:1 by , 7 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:2 by , 7 years ago
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 by , 7 years ago
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 by , 7 years ago
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 by , 7 years ago
Cc: | added |
---|
Its not a bug its a feature (see #2249). The double click opens the class based on
preferredView
orDocumentationClass
annotation. If you want to see the other views you can right click the class and choose the view you want to open.