Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Papyrus/Neon Work Description/Improvements/Navigation

< Papyrus‎ | Neon Work Description
Revision as of 10:39, 1 April 2015 by Shuai.li.cea.fr (Talk | contribs) (Right Click Menu)

Overview

Papyrus has a navigation system where the user can navigate to different diagrams, and Model Explorer semantic elements, when some notation elements are clicked. The navigation system also offers the possibility to add hyperlinks to notation elements. Some noticeable characteristics of the current navigation system are the following:

  • Hyperlinks appear in diagram assistant
  • Hyperlinks management button appears in diagram assistant
  • Double Click on a notation element goes to its default hyperlink(s), if there are any
  • Hyperlinks management menu lets the user create hyperlinks, assign default hyperlinks, and assign heuristics to "try" to "go somewhere" (?) when a notation element without default hyperlinks is double clicked. (Note that the heuristic functionality is broken and not clearly defined currently.)
  • Alt+Click on a notation element goes to its navigable element (e.g. return type for an Operation)

The following section describes the planned changes to this navigation system.

UI Changes

The navigation system is integrated through three menus, arbitrarily named "Alt Menu", "Right Click Menu", and "Double Click Menu". There are also some UI enhancements.

Alt Menu

The Alt Menu is a popup menu. It is shown when the user Alt+Hovers over a notation element in a diagram, and it is contextual. Navigation and hyperlink systems are integrated into this menu, instead of the diagram assistant. The figure below shows the three kinds of items in the Alt Menu:

Papyrus Navigation Alt Menu

Here Operation "op1" of "MyClass" is Alt+Hovered over. The menu shows an item to go to the navigable element of "op1" (i.e. its return type), a hyperlink created for "op1" (points to an ActivityDiagram), and default item to create hyperlinks for "op1".

When the first item is clicked, the following sub-menu appears:

Papyrus Navigation Alt Sub-Menu

The sub-menu shows 3 kinds of item: a default item to show the navigable element in the Model Explorer, and 1-to-several items that show opened diagrams where the navigable element appears, and a "More..." item to show all diagram (including closed) where the navigable element appears. Here the sub-menu shows four items. The first item shows the return type of "op1" in the Model Explorer. The second and third items show the return type of "op1", named "MyEnumeration", which is shown opened diagrams "ClassDiagram2" and "ClassDiagram4". Finally the fourth item makes closed diagrams appear, where the return type of "op1" is shown in.

Right Click Menu

The Right Click Menu is a contextual popup menu. It shows a "Go to" item integrated with other items of the default Right Click Popup Menu. This "Go to" item has a sub-menu with the following items:

  • Children: children of the semantic element corresponding to the notation element
  • Parents: parents of the semantic element corresponding to the notation element
  • Typed by: UML elements typed by the semantic element corresponding to the notation element
  • Diagrams: Diagrams showing the semantic element corresponding to the notation element
  • [Other... (e.g. source/target for a ControlFlow)]

All of these items have sub-menus themselves. These sub-menus are populated dynamically. "Children", "Parents", and "Typed by" show semantic elements. When they are clicked on, they are shown in the Model Explorer. "Diagrams" shows diagrams. When they are clicked on, they open.

Double Click Menu

Currently the user can double click on a notation element to go to its default hyperlink(s). If there aren't any default hyperlink(s), a menu should appear. This menu should propose the user to add default hyperlink(s) to the notation element. The menu proposes existing hyperlinks (not defined as default), as well as other hyperlinks through a heuristic algorithm. There will be some default heuristic algorithms, along with those that the user can define in the existing heuristic menu of the hyperlinks management menu. This menu will be redone since it is currently broken.

Enhancements

Some UI enhancements that will be implemented are:

  • Arrows to navigate between Papyrus diagram tabs, according to the history of opened tabs. The arrows can be emulated by the keyboard. Ctrl+Tab should also go to the next diagram, Ctrl+Shift+Tab should go to the last diagram. This is the behavior in Firefox for example.
  • When navigating to a unopened diagram, the user can chose if he/she prefers to open the diagram in a new tab, or in the current tab. See modern web browser behavior for tabs
  • Alt Menu, in Property View on a referenced field (e.g. OwnedParameters of Operation), should behave like the Alt Menu in a diagram on a notation element
  • Alt Menu, in Model Explorer on a semantic element, should behave like the Alt Menu in a diagram on a notation element
  • Several global Papyrus preferences to configure navigation behaviors

Navigation Graph

Section draft, first ideas:

  • Representation of model as a graph
  • Vertices would be (diagrams, navigable elements, etc... ?), and edges would be (hyperlink, UML semantic relationship, etc... ?)
  • A new DSML can be proposed to describe the graph and its entities (profile, Ecore, other?)
  • A new Papyrus diagram can be contributed to visualize the graph
  • The graph can be used to generate a navigation strategy (e.g. automatic generation of UI arrows and their behavior)
  • The navigation strategy can be used to create a timed/controlled presentation of the model, i.e. start at a vertex, navigate automatically/manually from vertex to vertex.

Bugzilla References

Back to the top