Bug 39269 - [ViewMgmt] programmatically show a view relative to another (with patch)
Summary: [ViewMgmt] programmatically show a view relative to another (with patch)
Status: RESOLVED INVALID
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: api, needinfo
: 98131 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-06-24 10:03 EDT by Dan Rubel CLA
Modified: 2009-08-30 02:11 EDT (History)
4 users (show)

See Also:


Attachments
The new ShowViewAction source (9.19 KB, text/plain)
2003-06-24 10:06 EDT, Dan Rubel CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Rubel CLA 2003-06-24 10:03:23 EDT
Both the public API for showing views

	org.eclipse.ui.IWorkbenchPage#showView(String viewIdentifier)
	
and the internal class for doing the same

	org.eclipse.ui.internal.ShowViewAction
	
show views at a location predefined in the plugin manifest.

We want to programmatically show a view relative to another view, but that 
relationship is not known until the user actually selects one of our commands to 
perform the operation.  For example, we can specify that our view appear stacked 
on top of another view in a known perspective, but we cannot specify such a 
relationship for perspectives that are not known at build time such as custom 
user perspectives.

For this purpose, I created

	org.eclipse.ui.actions.ShowViewAction

based upon the original internal ShowViewAction type. The new ShowViewAction 
supports the original's behavior plus the ability to programmatically specify 
where the new view should show up in relation to an existing view.

This new action is based upon Eclipse 2.1 and so might need some changes for 
Eclipse 3.0 M2, but no other classes would need to be modified.  Both versions 
of the ShowViewAction can co-exist peacefully so there would be no need to 
immediately remove the old ShowViewAction or change any code that relies on 
it.

Please consider this new ShowViewAction for inclusion in the Eclipse 3.0 M2 
build.
Comment 1 Dan Rubel CLA 2003-06-24 10:06:42 EDT
Created attachment 5285 [details]
The new ShowViewAction source
Comment 2 Nick Edgar CLA 2003-09-29 22:00:29 EDT
I have the following concerns with the suggested enhancement:

1. It provides an action to open a view, giving more control over where it's 
placed.  Normally we provide API on the main interfaces and/or extension 
points, rather than as actions.

2. This doesn't add any new constraints for when the user opens the view using 
the regular Show View actions.  We could consider augmenting the XML with 
layout constraints that are independent of perspectives.  E.g. always position 
Package Explorer and Navigator in the same folder.  Would that address your 
needs or would you still need more control for particular actions?  

3. Providing the new constraints via an action means that there will be 
duplicate and inconsistent actions for showing views in the UI.

4. As with bug 39513, new API should not be introduced as actions, but should 
go on the primary interfaces, e.g. an enhanced showView method on 
IWorkbenchPage, or inhanced attributes on the views extension point.

It would help to have some concrete use cases to back up the proposed 
enhancement.
Comment 3 Nick Edgar CLA 2004-05-07 11:47:44 EDT
Not for 3.0.
Comment 4 Nick Edgar CLA 2005-06-03 10:47:41 EDT
*** Bug 98131 has been marked as a duplicate of this bug. ***
Comment 5 Nick Edgar CLA 2006-03-15 13:27:55 EST
Reassigning bugs in component areas that are changing ownership.
Comment 6 Boris Bokowski CLA 2006-10-24 21:14:07 EDT
(In reply to comment #2)
> It would help to have some concrete use cases to back up the proposed 
> enhancement.

Yes. Feel free to reopen if you have concrete use cases.
Comment 7 Denis Roy CLA 2009-08-30 02:11:34 EDT
As of now 'LATER' and 'REMIND' resolutions are no longer supported.
Please reopen this bug if it is still valid for you.