Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 341109 - [package explorer] Remove filters on "Show In > Package Explorer" removes too many filters
Summary: [package explorer] Remove filters on "Show In > Package Explorer" removes too...
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.6   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: 3.7 M7   Edit
Assignee: Markus Keller CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-28 10:08 EDT by Randy Hudson CLA
Modified: 2011-04-04 13:56 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Randy Hudson CLA 2011-03-28 10:08:34 EDT
When invoking "Show In->Package Explorer" action on a Type that come from "Libraries from external", I choose "Yes" to remove some filters so that the Type can be shown.

BUG:
Both "Empty library containers" and "Libraries from external" filters are removed.

EXPECTED:
Only "Libraries from external" should be removed.

I assume this is just a naive algorithm that removes filters until the Type can be shown.  Once it has removed enough filters to show the type, the algorithm should then go back and attempt to turn on all (except maybe the last) filters to see if they were unnecessarily removed.

As a result, the User must re-enable 2 or more filters instead of just the one which allowed the Type to be shown.
Comment 1 Markus Keller CLA 2011-04-04 13:56:21 EDT
The problem is that the EmptyLibraryContainerFilter checks the emptiness of the library container w.r.t. to the currently shown children, so from its viewpoint, it is really hiding a parent of the element to show.

In general, to find a minimal set of filters whose removal would be enough to show the element, we would have to try disabling all combinations of filters that are currently involved in hiding the element.

I've added a workaround for the specific case from comment 0 to CustomFiltersActionGroup.
Comment 2 Markus Keller CLA 2011-04-04 13:56:37 EDT
.