Bug 195672 - [DetachedView] Search dialog misses some options, if called from detached package explorer
Summary: [DetachedView] Search dialog misses some options, if called from detached pac...
Status: RESOLVED WORKSFORME
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows NT
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-06 12:18 EDT by Andreas Blochberger CLA
Modified: 2014-08-08 09:44 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Blochberger CLA 2007-07-06 12:18:03 EDT
Build ID: I20070621-1340

Steps To Reproduce:
1. Detach the package explorer
2. Select a project in the package explorer you want to search in
3. Focus the main window
4. Open the Search dialog

In the group scope, the items "Selected resources" and "Enclosing projects" are disabled.



More information:
This may be due to the fact, that when the main window get the focus, another view will be focused (Console-View or any other view that is open in the main window)
The action then take the active part of the main window, instead of taking the Package explorer.

Another interesting thing i've noticed is, that if you directly click on the menu, there are display two menubar in one: the one for the package explorer, and the one for the active part of the main window.

A workaround for the search proble is to open the dialog using a keyboard shortcut (Ctrl-H)
Comment 1 Eric Moffatt CLA 2007-07-09 15:00:49 EDT
You are correct (nice synopsis actually). The issue is that by clicking on the menu (or otherwise activating the main window) the currently 'active' part changes away from the Package Explorer, causing the issue. Unfortunatly I don't think that we can really change the current behavior since we'd likely cause as many problems as we solve (i.e. what happens if I had the Navigator as the active view in the Workbench Window? Then I'd -expect- it to use its selection rather than that of the Package Explorer).

Your workaround is nice enough that I may include it in the 'Tips and Tricks' section...;-).
Comment 2 Andreas Blochberger CLA 2007-07-10 03:56:17 EDT
I know that this is a difficult problem. What about the following:
If the active part is in a detached view, focusing the main window should not activate a part in the main window. In your example, you just have to click on a view to activate it. So, focusing the main window should not change the activated part.
If another application is focused and then Eclipse gets activated again, the active part does not change. Only focusing detached windows should activate parts in that window.
The problem seems to be, that there are more than one active parts (each window has its own active part). Now, focusing a window activates its last active part. This is good for detached windows, but the main window must be, well, more intelligent ;-)
Comment 3 Eric Moffatt CLA 2007-07-11 10:45:18 EDT
Andreas, what you call 'more intelligent' I'd likely call 'inconsistent'. Having the part activation behave differently based on the window 'type' might be confusing...
Comment 4 Andreas Blochberger CLA 2007-07-16 04:31:26 EDT
Maybe, but the current implementation simply is wrong. I could live with this inconsistency ;-)
Comment 5 Eric Moffatt CLA 2007-07-16 11:15:12 EDT
Andreas, as stated, I don't think that we can change this behavior at this point (it's been there since DW's can into existence). Since you have a valid workaround I think we'd best leave it...
Comment 6 Andreas Blochberger CLA 2007-07-29 04:16:25 EDT
Detached views all have the problem, that menu based actions won't work at all, except they have a key binding, so i'll consider this as a major issue for all environments with multiple monitors.
Comment 7 Andreas Blochberger CLA 2007-07-29 04:20:17 EDT
A simple way to reproduce the wrong behavior:
1. Open the Plugin-Development perspective
2. Detach the "Console" view
3. Activate the "Package Explorer"
4. Activate the detached console view 
5. Try to open the "Project" menu

-> The Navigate menu pops up!
Comment 8 Paul Webster CLA 2007-07-29 09:59:02 EDT
As stated, this is currently working as designed.  We won't change that in 3.x.

However, we are considering use cases for 4.0 where we have much more flexibility to redefine behaviour.

Eric, that might give us time to consider this ... how the workbench tracks the parts (views) separated from how the views are currently rendered (in the workbench window or a detached window).  If we run the usecases and users can still find their views that might be consistent with the direction we're going.

PW
Comment 9 Eric Moffatt CLA 2007-07-30 08:34:11 EDT
Paul, McQ and I were talking just last week as to how the 'context' (including part activation) are going to be one of he main keys to the 'success' of the new version. Since the new layout is 'component' based (i.e. views inside views, views inside editors....) the activation has to become a 'chain'...(the other pars I expect you to tell me...;-).
Comment 10 Dani Megert CLA 2013-06-05 10:41:27 EDT
Removing outdated target milestone.
Comment 11 Eric Moffatt CLA 2013-06-06 15:00:21 EDT
The changing of the active part makes the main menu unusable for all practical purposes...is there *anything* we can do (duplicate the main menu in DWs?...)
Comment 12 Mauro Molinari CLA 2014-08-08 06:05:26 EDT
I tried all of the following in Eclispe Luna I20140606-1215:
- the steps to repro in the description
- the "Another interesting thing I've noticed" in the description
- the steps to repro in comment #7

All seems to work fine in Luna. Respectively:
- "Selected resources" and "Enclosing projects" are enabled and performing the search produces coherent results
- I just see one menu bar and single menu items
- if I click on the Project menu item in the main menu bar, the Project menu opens, not the Navigate one

So I think this can be closed.
Comment 13 Lars Vogel CLA 2014-08-08 09:44:06 EDT
(In reply to Mauro Molinari from comment #12)
> So I think this can be closed.

Thanks Mauro for the analysis. I mark this bug as WORKSFORME, I assume some development is the past fixed it (so it is actually FIXED) but trying to find the commit would be more time consuming than the value it creates.