Platform UI/Multi-instance Properties View
Brainstorming bug 248103:
- Pin PV to current selection (stop following selection)
- Inherit parents settings (For PV org.eclipse.ui.part.WorkbenchPart.getPartProperties() might be an option)
- Inherit parents input (requires API to get the Input from the parent)
- Setting parents state/input requires additional API whereas freezing (pinning) the parent and opening a "fresh" PV wouldn't require any additional API
- The console view for example gets the parents content in org.eclipse.ui.internal.console.ConsoleView.consolesAdded(IConsole[])
- New one has focus?
- Open the new view either on the same stack or else where? (If the user wants to compare two objects, a stacked view doesn't fit)
- Back and forward buttons to navigate between the property view instances
- Multiple PV instances are still restorable?
- Only restore the master property view (the first one)?
- Only restore property view instances which are pinned?
- Restore all property views
- Open the properties view from the context menu of the current selection (show in) (Object id might be used for secondary view id).
- When a second view is opened from the original view, what should happen? Should the original stop following selection or should the second one?
Use cases
Pinning selection
Allowing a user to pin the view to a given selection provides the user with the capability of see the properties of the given selection while providing them with the freedom to select alternate items. The current 'Properties' view implementation "always" follows the current workbench's selection and prevents the user from multitasking.
- Window > Show View > Other... > Properties
- Select an interested item. The 'Properties' view should now be displaying the properties of the selected item.
- Pin the selection on the 'Properties' view.
- Proceed to select other items / work on other things while still being able to refer to the properties of the original item.
- Unpin the selection from the 'Properties' view when the item is of no interest and repeat again when desired to view the contents of another interested item.
Constructing new instances from the 'Properties' view itself
A user can also create new instances of the 'Properties' view from an existing one. The existing one will be pinned to the contents it is currently displaying and the new instance will be set to follow the workbench's selection.
- Window > Show View > Other... > Properties
- Select an interested item. The 'Properties' view should now be displaying the properties of the selected item.
- Create another 'Properties' view from the current instance.
- Select other items for comparison purposes.
Multiple instances
By letting the user spawn multiple instances of the 'Properties' view, they are now able to compare the properties of N+1 items. This is different from the Compare framework's textual compare as the information provided in the 'Properties' view is defined by the selection's adapted IPropertySource
and is often not the textual content of the selection, if the selection even has textual content.
- Window > Show View > Other... > Properties
- Select an interested item. The 'Properties' view should now be displaying the properties of the selected item.
- Pin the selection on the 'Properties' view.
- Create a new instance of the 'Properties' view with the existing one.
- Move it around so that you can also see the original view that the new one was spawned from.
- Select another interested item.
- Repeat until the desired number of items to compare has been reached.
- When the comparisons are completed, the user would likely have to close all of the extraneous instances.
- The user may close all the views.
- The user may close all but the most recently opened view, which would probably be unpinned.
- The user would close the views starting from the one that was most recently opened, to the first one. The user would have to unpin this first view.
Users can use the 'Show In' context menu as they may already be familiar with to display the current selection in a 'Properties' view. A new view will be constructed if all current views are set to be pinned or there are no 'Properties' view in the current perspective.
- Select an item of interest.
- Context menu > Show In > Properties
- Repeat until all of the interested items have been shown. Reorganize them on the workbench as desired.
- The user may close all the views.
- The user may close all but the most recently opened view, which would probably be unpinned.
- The user would close the views starting from the one that was most recently opened, to the first one. The user would have to unpin this first view.
Secondary instance visibility behavior upon workbench shutdown
Any secondary instances of the 'Properties' view are hidden upon workbench shutdown. Note that other views provided by the SDK currently stay up. This would arguably be dependent on whether the contents the view is rendering is persistent upon workbench shutdowns (for local files) or not (for remote content).
Closing secondary instances
It may be helpful for all views that has its allowMultiple
attribute set to true
to have some sort of a view action that will allow the user to hide all instances or all-but-the-current-one.
Existing behaviour
View | Open secondary instance by | Inherit parent's content | Inherit parent's settings | Same "input" opens new view | Name new instance |
---|---|---|---|---|---|
Search |
Pin parent and rerun search | no | no | ? | no |
History |
Pin and call Team > Show History on a different resource | no | yes | ? | no |
Memory |
"New" button View toolbar | ? | yes | ? | no |
Bookmarks |
"New ... View" from View menubar | yes¹ | no | n/a | yes |
Markers |
"New ... View" from View menubar | yes¹ | no | n/a | yes |
Problems |
"New ... View" from View menubar | yes¹ | no | n/a | yes |
Tasks |
"New ... View" from View menubar | yes¹ | no | n/a | yes |
Console |
Can be opened explicitly | yes | ? | ? | ? |
¹ Content comes from workspace
Use cases bug 248103#c12
Compare properties of two or more resources in the workbench Prakash's Blog