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

Bug 190819

Summary: [WorkingSets] [CommonNavigator] Project Explorer is empty when there is no window working set
Product: [Eclipse Project] Platform Reporter: John Arthorne <john.arthorne>
Component: UIAssignee: Francis Upton IV <francisu>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: aleherb+eclipse, eclipse, litrik, mark.melvin, mik.kersten, rolf, steffen.pingel, walter.brunauer, wmitsuda
Version: 3.3   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description John Arthorne CLA 2007-06-04 10:40:30 EDT
Build: 3.3 RC3

1) Start with a workspace that contains projects and working sets.
2) Configure the Project Explorer to show the window working set
3) Ensure there is no active window working set

-> The Project Explorer is empty.  Other views (such as the Navigator and Package Explorer), will show everything when there is no window working set, rather than showing nothing.
Comment 1 Walter Brunauer CLA 2007-08-24 03:27:03 EDT
Proposed Patch:

In org.eclipse.ui.ResourceWorkingSetFilter:

Old:

    public boolean select(Viewer viewer, Object parentElement, Object element) {
        IResource resource = null;

        if (workingSet == null) {
            return true;
        }

New:

    public boolean select(Viewer viewer, Object parentElement, Object element) {
        IResource resource = null;

        if (workingSet == null || (workingSet.isAggregateWorkingSet() && workingSet.isEmpty())) {
            return true;
        }

Cheers,

Walter
Comment 2 Willian Mitsuda CLA 2008-02-19 13:38:53 EST
Will someone take a look at this patch?

Those UI inconsistencies between Package Explorer and Project Explorer are really annoying and discourages Project Explorer adoption...
Comment 3 Kim Horne CLA 2008-02-19 14:21:49 EST
The patch is consistent with our handling of window working sets.  I've applied it, but I dont believe the patch will address the thrust of this bug - the project explorer doesn't use this class so any change to it wont matter.
Comment 4 Anton Leherbauer CLA 2008-02-20 03:44:14 EST
This is IMHO a dup of bug 157877.
See also bug 212389 which provides a patch to make the PE use the ResourceWorkingSetFilter.
Comment 5 Mik Kersten CLA 2008-02-20 20:35:39 EST
This is a pretty serious problem for Mylyn as well.  We have put an extended working set switcher in the Task List, so users are more likely to use working sets.  In addition, in order to match the majority of users' expectation, the action to trigger no working set to be selected is "Show All", since this is what happens in the Package Explorer.  However, the behavior in the Project Explorer is currently "Hide All".

Is there a chance of getting this fixed for 3.4?  Let us know if it would help for us to assist, but the patch appears trivial.
Comment 6 Mik Kersten CLA 2008-03-11 18:47:36 EDT
Any news on this?  We have a regular stream of confusion that results from the inconsistency.  If it would help Mylyn would be happy to provide a patch as per comment#1.
Comment 7 Mik Kersten CLA 2008-08-04 21:15:48 EDT
(In reply to comment #5)
> Is there a chance of getting this fixed for 3.4?  Let us know if it would help
> for us to assist, but the patch appears trivial.

Is there a chance of getting this fixed for 3.5?  We would be happy to assist if there is any additional work.  Is there anything else blocking this?
Comment 8 Francis Upton IV CLA 2008-08-14 02:11:22 EDT
*** Bug 157877 has been marked as a duplicate of this bug. ***
Comment 9 Francis Upton IV CLA 2008-08-14 02:15:33 EDT
(In reply to comment #7)
> (In reply to comment #5)
> > Is there a chance of getting this fixed for 3.4?  Let us know if it would help
> > for us to assist, but the patch appears trivial.
> 
> Is there a chance of getting this fixed for 3.5?  We would be happy to assist
> if there is any additional work.  Is there anything else blocking this?
> 

Mik, I'm going to take you up on your offer to help.  If you could make a test case in the org.eclipse.ui.tests.navigator for this case, I would be much obliged.  I would be even more thrilled if you test case can include the case of 212389.  I'm going to dup this against bug 212389 where Anton claims his patch will also fix this problem.  I'm also going to get this into 3.4.1 if I can get some help with the testing.

*** This bug has been marked as a duplicate of bug 212389 ***
Comment 10 Francis Upton IV CLA 2008-08-17 06:05:17 EDT
(In reply to comment #9)
> (In reply to comment #7)
> > (In reply to comment #5)
> > > Is there a chance of getting this fixed for 3.4?  Let us know if it would help
> > > for us to assist, but the patch appears trivial.
> > 
> > Is there a chance of getting this fixed for 3.5?  We would be happy to assist
> > if there is any additional work.  Is there anything else blocking this?
> > 
> 
> Mik, I'm going to take you up on your offer to help.  If you could make a test
> case in the org.eclipse.ui.tests.navigator for this case, I would be much
> obliged.  I would be even more thrilled if you test case can include the case
> of 212389.  I'm going to dup this against bug 212389 where Anton claims his
> patch will also fix this problem.  I'm also going to get this into 3.4.1 if I
> can get some help with the testing.
> 
> *** This bug has been marked as a duplicate of bug 212389 ***
> 

Mik, I did the test cases and the fix is awaiting review, it will go into 3.4.1 shortly.

Comment 11 Mik Kersten CLA 2008-09-04 14:06:12 EDT
Francis: Thanks, and sorry for the slow reply.  Is there something else left for me to help out with or are you all set?
Comment 12 Francis Upton IV CLA 2008-09-04 14:08:42 EDT
(In reply to comment #11)
> Francis: Thanks, and sorry for the slow reply.  Is there something else left
> for me to help out with or are you all set?
> 

Everything is all set; things should be much better for 3.4.1; let me know if there are other problems.
Comment 13 Mik Kersten CLA 2008-09-04 14:11:03 EDT
Excelent, thanks Francis!