Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 312156 - Show only selected on Feature based config like plug-ins based ones
Summary: Show only selected on Feature based config like plug-ins based ones
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.6   Edit
Hardware: PC All
: P2 normal (vote)
Target Milestone: 3.6 RC1   Edit
Assignee: Ankur Sharma CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-08 09:38 EDT by Ankur Sharma CLA
Modified: 2010-05-12 11:13 EDT (History)
3 users (show)

See Also:
curtis.windatt.public: review+
darin.eclipse: review+


Attachments
Patch (5.02 KB, patch)
2010-05-08 09:41 EDT, Ankur Sharma CLA
no flags Details | Diff
Patch (10.96 KB, patch)
2010-05-11 04:55 EDT, Ankur Sharma CLA
no flags Details | Diff
Updated patch (11.42 KB, patch)
2010-05-11 12:23 EDT, Ankur Sharma CLA
no flags Details | Diff
Updated Patch II (15.38 KB, patch)
2010-05-11 17:06 EDT, Curtis Windatt CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ankur Sharma CLA 2010-05-08 09:38:25 EDT
Add a 'Show only selected' check box filter on feature based configs. It should behave similar to the one on the plug-ins tab of a plug-ins based config.
Comment 1 Ankur Sharma CLA 2010-05-08 09:41:55 EDT
Created attachment 167600 [details]
Patch
Comment 2 Darin Wright CLA 2010-05-10 11:24:38 EDT
This plays well, but to make it better we should...

* Add a "Select Features..." button, that allows the user to select features from a dialog (like the 'add plug-in' dialog). This allows the user to add features to an empty list. The dialog should filter features that are already selected in the tab
* To avoid flash/flicker when updating the tree, setRedraw(false/true) should be used when updating (for example when pressing "Show selected only", or when adding plug-in, etc).
Comment 3 Darin Wright CLA 2010-05-10 11:31:07 EDT
I've also noticed a bug with text filtering corrupting the selection state:

* with "only show selected" on, add a plug-in to the launch
* plug-in appears
* type some text in the filter to make the plug-in filtered
* clear the filter text

Bug: the plug-in does not re-appear, and when I un-check "only show selected", the plug-in is no longer selected.
Comment 4 Curtis Windatt CLA 2010-05-10 11:39:29 EDT
(In reply to comment #3)
> I've also noticed a bug with text filtering corrupting the selection state:
> 
> * with "only show selected" on, add a plug-in to the launch
> * plug-in appears
> * type some text in the filter to make the plug-in filtered
> * clear the filter text
> 
> Bug: the plug-in does not re-appear, and when I un-check "only show selected",
> the plug-in is no longer selected.

This probably happens anytime there are overlapping viewer filters.  When one filter is removed, we use the cache to check the right items, but the item is still filtered.  When we remove the second filter, not all of the items are checked.  The same problem existed in the target content tab, I'll have to look at the fix we put in there.
Comment 5 Ankur Sharma CLA 2010-05-11 04:55:57 EDT
Created attachment 167877 [details]
Patch

This does not include fix for the multiple viewer filter problem mentioned in comment 3 and 4
Comment 6 Darin Wright CLA 2010-05-11 10:20:02 EDT
The following steps do not work for me:

* Open a new config to the plug-ins tab using feature launch mode
* De-select all
* check "only show selected"
* Press "Select Features..." and choose org.eclipse.pde

Nothing appears in the tree, although the selection count shows '1 of 16'

* press "Select Required"

Nothing gets added, and selection count remains the same

(Note, "Select required" should have a capital 'R' on Required)
("Select features" should use a capital 'F' as well).
Comment 7 Ankur Sharma CLA 2010-05-11 12:23:04 EDT
Created attachment 167960 [details]
Updated patch
Comment 8 Curtis Windatt CLA 2010-05-11 17:06:07 EDT
Created attachment 168040 [details]
Updated Patch II

Catches up to HEAD, fixes button ordering/naming/mnemonics, fixes the filtering issue from earlier comments.

There are still two minor issues that may not be worth fixing for RC1.  On linux, there isn't enough space in the default launch dialog to fit all of the buttons/options in the right column so the x of y selected label gets cut off.  Second, changing the 'selected only' option changes the attribute for both plug-in block and feature block, but if the option is switched in one block, it is not updated in the other.
Comment 9 Curtis Windatt CLA 2010-05-11 17:10:31 EDT
I'm happy with the fix, but I updated the code enough that it needs another reviewer.  Darin, please review/apply the latest patch.
Comment 10 Darin Wright CLA 2010-05-12 11:13:57 EDT
Applied/Fixed. I found one update issue, but I'll file a separate bug for it.