Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 173095

Summary: [EditorMgmt] "Open With > Other..." dialog should set focus on the list on open
Product: [Eclipse Project] Platform Reporter: Markus Keller <markus.kell.r>
Component: UIAssignee: Markus Keller <markus.kell.r>
Status: VERIFIED FIXED QA Contact: Remy Suen <remy.suen>
Severity: normal    
Priority: P3 CC: b.muskalla, daniel_megert, georg.sendt
Version: 3.3   
Target Milestone: 3.7 M4   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
EditorSelectionDialog patch v1
none
EditorSelectionDialog patch v2
none
Screenshot depicting the change in question.
none
EditorSelectionDialog patch v3
none
Fix for focus problem none

Description Markus Keller CLA 2007-02-06 11:00:24 EST
I20070206-0010

"Open With > Other..." dialog should use tabs and set focus to the list when the dialog is opened.

Ideally, a filter text field would be added, such that users can type parts of the editor name to filter in the list.
Comment 1 Paul Webster CLA 2007-02-06 13:55:15 EST
related to bug 29633
PW
Comment 2 Boris Bokowski CLA 2009-11-17 12:59:25 EST
Remy is now responsible for watching the [EditorMgmt] component area.
Comment 3 Remy Suen CLA 2009-11-17 14:23:08 EST
*** Bug 259227 has been marked as a duplicate of this bug. ***
Comment 4 Remy Suen CLA 2010-02-17 16:21:36 EST
Created attachment 159378 [details]
EditorSelectionDialog patch v1

Work in progress against v1.9 of EditorSelectionDialog.
Comment 5 Remy Suen CLA 2010-04-13 12:10:46 EDT
Created attachment 164741 [details]
EditorSelectionDialog patch v2

Work in progress against v1.11 of EditorSelectionDialog.
Comment 6 Remy Suen CLA 2010-11-09 09:30:39 EST
Created attachment 182717 [details]
Screenshot depicting the change in question.

What do you think about the use of a FilteredTree, Markus?

Technically, it's a flat list and not a tree but I noticed we don't actually have a FilteredTable control.
Comment 7 Markus Keller CLA 2010-11-09 13:14:17 EST
The tabs are looking good, but the tree widget looks ugly in that screenshot. You would at least have to create it with SWT.FULL_SELECTION to make the dotted lines go away.

I would either leave the table, or spend more time on this and create a FilteredTable (of course not copying the FilteredTree but separating the filtering from the concrete widget and then use the same filtering logic for both widgets).

But way more important than that would be to fix bug 173759.
Comment 8 Remy Suen CLA 2010-11-09 14:11:28 EST
Created attachment 182753 [details]
EditorSelectionDialog patch v3

Patch to switch the dialog to use tabs.
Comment 9 Remy Suen CLA 2010-11-09 14:14:13 EST
(In reply to comment #8)
> Created an attachment (id=182753) [details]
> EditorSelectionDialog patch v3

Patch released to CVS HEAD. I'll hold off on the filtering for now.
Comment 10 Markus Keller CLA 2010-11-10 06:16:55 EST
Dani just said to me that tabs could be a bit confusing, since you can have different selections on the two pages, and it's not clear that the selection in the hidden tab has no significance (especially when the dialog is opened from the preference page).

I dug a bit further and found this UI guideline, which explicitly recommends radio buttons for such situations:
http://msdn.microsoft.com/en-us/library/aa511493.aspx#exclusive

Sorry for the hassle, but I now agree you should revert the change to use tabs and just fix the initial focus issue for now. Filtering can be addressed with bug 69200 (and is not a big issue, since it's just a flat and sorted list).
Comment 11 Remy Suen CLA 2010-11-10 06:20:33 EST
(In reply to comment #10)
> Sorry for the hassle, but I now agree you should revert the change to use tabs
> and just fix the initial focus issue for now.

Noted, I will revert the change some time this week. May not get to the focus problem just yet though.

Thanks for the investigation, Markus and Dani.
Comment 12 Remy Suen CLA 2010-11-10 09:12:04 EST
(In reply to comment #11)
> Noted, I will revert the change some time this week.

I have reverted the code.
Comment 13 Markus Keller CLA 2010-11-17 09:06:03 EST
Created attachment 183292 [details]
Fix for focus problem

The only thing left to do is fixing the initial focus. The patch does that and also remembers the current selection for each mode separately.

Remy, if you're OK with that, please release the patch, or assign the bug to me and I'll release it.
Comment 14 Remy Suen CLA 2010-11-17 09:20:32 EST
(In reply to comment #13)
> Remy, if you're OK with that, please release the patch, or assign the bug to me
> and I'll release it.

This looks good to me. Thanks, Markus. Please feel free to release the patch at your prerogative.
Comment 15 Markus Keller CLA 2010-11-17 09:34:27 EST
Fixed in HEAD.
Comment 16 Dani Megert CLA 2010-12-07 08:09:24 EST
Verified in I20101206-1800.
Comment 17 Dani Megert CLA 2011-10-06 03:40:47 EDT
Not all changes made it into the 4.x stream. Manually cherry-picked now :
Commit 10dfb6088cdb013a669d1d4f63ed4557c9792703