Bug 194529 - [Manifest][Editors] Extensions Page Up/Down buttons still active while tree is filtered
Summary: [Manifest][Editors] Extensions Page Up/Down buttons still active while tree i...
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4 M1   Edit
Assignee: Peter Friese CLA
QA Contact:
URL:
Whiteboard:
Keywords: bugday, contributed
Depends on:
Blocks:
 
Reported: 2007-06-26 19:39 EDT by Noam Chitayat CLA
Modified: 2007-07-26 10:03 EDT (History)
4 users (show)

See Also:
mike.pawlowski: review+


Attachments
Patch disables up/down buttons if the tree is filtered. (2.60 KB, patch)
2007-07-23 05:10 EDT, Peter Friese CLA
no flags Details | Diff
Updated patch, fixes bug 194529 and 194828 (5.35 KB, patch)
2007-07-23 13:49 EDT, Peter Friese CLA
mike.pawlowski: review+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Noam Chitayat CLA 2007-06-26 19:39:32 EDT
Build ID: I20070608-1718

Steps To Reproduce:
1. Open the org.eclipse.pde.ui plug-in.
2. Go to the Extensions tab.
3. In the filter, type "perspectives" without quotes.
4. There should only be one result. Click on it.
Bug: Down button is enabled.

The Up/Down buttons should be disabled when the filter is used, since users would have no idea what they are moving the selected elements relative to.

Please assign the bug to me, since I need to take care of the same issue in the TOC editor.
Comment 1 Peter Friese CLA 2007-07-23 02:39:34 EDT
I'd like to take care of this bug on the upcoming bugday.
Comment 2 Peter Friese CLA 2007-07-23 05:10:33 EDT
Created attachment 74333 [details]
Patch disables up/down buttons if the tree is filtered.
Comment 3 Wassim Melhem CLA 2007-07-23 07:18:21 EDT
Great.  Assigning to Peter.
Comment 4 Noam Chitayat CLA 2007-07-23 09:59:16 EDT
Thanks for taking care of this one, Peter. :)

The patch looks pretty good to me, but I would add a check, in FormFilteredTree#isFiltered(), to check if the filter text is equal to getInitialText(). Otherwise, the buttons are disabled when the filter contains the default value, "type filter text" (that text deactivates the filter).
Comment 5 Peter Friese CLA 2007-07-23 10:17:40 EDT
(In reply to comment #4)
> Thanks for taking care of this one, Peter. :)
> 
> The patch looks pretty good to me, but I would add a check, in
> FormFilteredTree#isFiltered(), to check if the filter text is equal to
> getInitialText(). Otherwise, the buttons are disabled when the filter contains
> the default value, "type filter text" (that text deactivates the filter).
Thanks for the heads-up - I completely overlooked this one. I will adjust the patch accordingly.

There is one more thing I'd like to discuss: I added an isFiltered() method to the FormFilteredTree class. While this surely works fine, it might be better to push this method up the inheritance tree a bit further. However, FilteredTree is not homed in PDE-land, but in org.eclipse.ui.dialogs. What's the preferred proceeding for situations like these?
Comment 6 Peter Friese CLA 2007-07-23 13:49:53 EDT
Created attachment 74377 [details]
Updated patch, fixes bug 194529 and 194828
Comment 7 Wassim Melhem CLA 2007-07-25 15:00:41 EDT
Mike to review.
Comment 8 Mike Pawlowski CLA 2007-07-26 09:47:40 EDT
Comment on attachment 74377 [details]
Updated patch, fixes bug 194529 and 194828

Tested very well.  Thanks Peter.
Comment 9 Mike Pawlowski CLA 2007-07-26 10:03:08 EDT
Patch released to HEAD.

Target:  3.4 M1

>> I added an isFiltered() method to the FormFilteredTree class. 
>> While this surely works fine, it might be better to
>> push this method up the inheritance tree a bit further. 
>> However, FilteredTree is not homed in PDE-land, but in 
>> org.eclipse.ui.dialogs. What's the preferred proceeding for 
>> situations like these?

The best way to proceed is to open a bug against the Platform/UI 
team (owner of org.eclipse.ui.dialogs).  Outline the problem you 
cited above and reference this bug report. We can then revisit 
the PDE code to implement the new API.

Thanks again.