Bug 15822 - [View Mgmt] Support to show a view without making it active
Summary: [View Mgmt] Support to show a view without making it active
Status: CLOSED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P2 enhancement (vote)
Target Milestone: 3.0 M9   Edit
Assignee: Kim Horne CLA
QA Contact:
URL:
Whiteboard:
Keywords: api, investigate
Depends on:
Blocks: 15821
  Show dependency tree
 
Reported: 2002-05-12 07:43 EDT by Erich Gamma CLA
Modified: 2004-07-06 09:32 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Erich Gamma CLA 2002-05-12 07:43:25 EDT
Console views and other output only views (e.g. JUnit Test Results) should show 
up without taking away focus from the currently active part.
 
There is currently no way to do this and the workaround is remember the 
previously active view, show the ouput view, and then give focus back the 
previously active view. This results in some quick activation flicker.

It would be better to have a showView method that can shows a part without 
activating it.
Comment 1 Nick Edgar CLA 2002-05-13 10:32:23 EDT
Should add this, and use it for bug 15821.
Comment 2 Simon Arsenault CLA 2002-05-13 10:52:10 EDT
Need to also consider what this means for a fast view. Without focus, it 
probably will not show up (maybe that's what we want?)
Comment 3 Nick Edgar CLA 2002-05-13 11:37:12 EDT
Erich, please describe the desired behaviour for when the view is a fast view.
Normally it's only visible if it has focus.
Comment 4 Nick Edgar CLA 2002-05-13 11:39:23 EDT
For some cases, it may make sense to open the fast view if needed, but not show 
it.  For example, if show in type hierarchy is selected on open type, the 
editor should have focus and the hierarchy should be available, but it need not 
be initially visible.  In other cases, e.g. console output or showing new 
errors in the task list (not currently supported), you may want to make it 
visible.
Comment 5 Simon Arsenault CLA 2002-06-14 10:15:37 EDT
Just an idea I want to write down before I forget. It may not be possible to be 
correct all the time when in comes to fast view (i.e option one: open as fast 
view but do not show, option two: open as fast view and show with focus). Maybe 
the API needs a extra parameter to indicate the "policy" they want to use 
concerning fast views.
Comment 6 Nick Edgar CLA 2002-06-14 15:47:29 EDT
Post 2.0.
Comment 7 Randy Giffen CLA 2002-08-12 09:43:46 EDT
Reopen for investigation
Comment 8 Kim Horne CLA 2004-01-30 11:22:08 EST
I've commited the initial draft of this to head.  Fast views are made visible
and activated in all cases currently. 
Comment 9 Kim Horne CLA 2004-03-18 11:09:06 EST
I'm going to leave the behaviour as is unless someone objects.  Feel free to reopen.
Comment 10 Kim Horne CLA 2004-03-24 15:02:57 EST
This was broken with the addition of the presentation work.  It works fine in
general, except when the view being opened is in the same folder as the view
that currently has focus.  In this case, the new view steals focus.
Comment 11 Nick Edgar CLA 2004-05-07 15:38:32 EDT
Kim, is this the same case as we were seeing with the dynamic debug views 
getting activated?
Comment 12 Kim Horne CLA 2004-05-07 15:41:58 EDT
There's a strong possibility that it is.  It wouldn't surprise me at all.
Comment 13 Nick Edgar CLA 2004-05-07 16:19:03 EDT
The API work here is complete.  Still some bugs to address.
Comment 14 Kim Horne CLA 2004-05-12 09:50:55 EDT
Fix in HEAD along with some supporting tests and API clarification.
Comment 15 Nick Edgar CLA 2004-05-12 21:33:26 EDT
I notice that getViewStack has been changed to getViewReferenceStack and now
returns IViewReference [].  It still takes an IViewPart as the argument though.
Also note that we generally only include "reference" in the name if it's needed
to disambiguate it with an existing non-reference-based method.

Suggest changing to IViewReference[] getViewStack(IViewReference).
Comment 16 Kim Horne CLA 2004-05-13 07:52:45 EDT
Nick, getViewReferenceStack is an internal private method that is used to drive
getViewStack(IViewPart) and showBusyView (also private).  It takes a view part
because the two methods that uses it have to work with parts, not references. 
It's only a utility method, not API.
Comment 17 Nick Edgar CLA 2004-05-13 10:15:31 EDT
Woops.  Thanks for clarifying.
Comment 18 Kim Horne CLA 2004-05-19 15:44:24 EDT
Verified in 200405190010 by tests.
Comment 19 Kim Horne CLA 2004-07-06 09:32:19 EDT
Closing to keep a tidy house.  Pardon the spam.