Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 174481 - [ViewMgmt] Show View dialog selects wrong entry on Enter
Summary: [ViewMgmt] Show View dialog selects wrong entry on Enter
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 minor (vote)
Target Milestone: 3.6 M3   Edit
Assignee: Oleg Besedin CLA
QA Contact: Boris Bokowski CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-16 13:37 EST by Markus Keller CLA
Modified: 2009-10-27 13:59 EDT (History)
3 users (show)

See Also:


Attachments
Suggested fix to the bug (1.95 KB, patch)
2009-08-24 04:21 EDT, Mohamed Tarief CLA
no flags Details | Diff
suggested fix to the pack (2) (1.95 KB, patch)
2009-09-17 07:08 EDT, Mohamed Tarief CLA
ob1.eclipse: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Keller CLA 2007-02-16 13:37:44 EST
I20070213-0907

- Open the Show View dialog and type "plug"
- Select and open view "Plug-ins"
- Open the Show View dialog again
=> "Plug-ins" is already selected (good)

- type "pl" 
=> depending on how fast you typed, different things happen:

a) typed very fast:
=> "Plug-ins" stays selected (good)
- press "Enter"
=> "Plug-in Dependencies" is selected. It's clearly wrong to select another entry on Enter.

b) typed slowly
=> The folder "PDE" is selected, which does not make sense since they cannot be opened. I would expect that "Plug-ins" stays selected.
- press "Enter"
=> "Plug-in Dependencies" is selected

I would prefer if Enter just opened the selected view. Arrow_Down already moves the focus to the tree.

The selection in the tree should not depend on typing speed, and it should be predictable. The originally selected view should stay selected as long as it matches the pattern. When the selected view gets removed from the tree, the selection should go to the next best match and stay there
Comment 1 Eric Moffatt CLA 2007-02-19 16:32:02 EST
Good one Markus...

Added Boris since he's seen it and may have some input...
Comment 2 Boris Bokowski CLA 2009-03-06 17:24:16 EST
(In reply to comment #0)
> The selection in the tree should not depend on typing speed

This is no longer the case. The other problem is still there, on Enter we change the selection in the tree.
Comment 3 Markus Keller CLA 2009-03-08 07:08:36 EDT
> > The selection in the tree should not depend on typing speed
> 
> This is no longer the case. The other problem is still there, on Enter we
> change the selection in the tree.

It's still the case for me in I20090304-0834. To see b), type "p", wait until the tree has finished refreshing, then type "l".
Comment 4 Mohamed Tarief CLA 2009-08-24 04:21:38 EDT
Created attachment 145387 [details]
Suggested fix to the bug
Comment 5 Oleg Besedin CLA 2009-09-03 16:29:01 EDT
Mohamed, thank you for the patch! It is an interesting way to resolve this problem. 

There are two sections of code modified in the patch; the second section has this:
+				|| previousFilterText
+						.equals(WorkbenchMessages.FilteredTree_ClearToolTip)

Is this something needed? It seems to be triggered if, say, I type "Clear." in the filter, but I don't understand how that helps.
Comment 6 Mohamed Tarief CLA 2009-09-17 07:08:12 EDT
Created attachment 147426 [details]
suggested fix to the pack (2)
Comment 7 Mohamed Tarief CLA 2009-09-17 07:10:02 EDT
(In reply to comment #5)
> Mohamed, thank you for the patch! It is an interesting way to resolve this
> problem. 
> 
> There are two sections of code modified in the patch; the second section has
> this:
> +                || previousFilterText
> +                        .equals(WorkbenchMessages.FilteredTree_ClearToolTip)
> 
> Is this something needed? It seems to be triggered if, say, I type "Clear." in
> the filter, but I don't understand how that helps.

Sorry , it was a mistake , i edit it and resubmitted the patch
its || previousFilterText
> +                        .equals(WorkbenchMessages.FilteredTree_FilterMessage)
Comment 8 Oleg Besedin CLA 2009-09-29 14:48:47 EDT
This seems to work well. "Suggested Fix 2" applied to CVS Head. Thank you!
Comment 9 Oleg Besedin CLA 2009-10-27 13:59:13 EDT
Verified in I20091027-0100.