Bug 212389 - [CommonNavigator] working set issues: missing project, window working set inconsistency
Summary: [CommonNavigator] working set issues: missing project, window working set inc...
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: 3.4.1   Edit
Assignee: Francis Upton IV CLA
QA Contact:
URL:
Whiteboard: ready
Keywords:
: 131575 162966 190819 198583 202933 220090 226949 226952 239465 (view as bug list)
Depends on: 244673
Blocks:
  Show dependency tree
 
Reported: 2007-12-10 06:49 EST by Anton Leherbauer CLA
Modified: 2009-01-15 11:02 EST (History)
14 users (show)

See Also:
pwebster: review+


Attachments
Proposed fix (14.10 KB, patch)
2007-12-11 05:00 EST, Anton Leherbauer CLA
no flags Details | Diff
Revisions to proposed fix (14.69 KB, patch)
2008-08-17 01:07 EDT, Francis Upton IV CLA
no flags Details | Diff
Test cases for this bug (19.58 KB, patch)
2008-08-17 01:11 EDT, Francis Upton IV CLA
no flags Details | Diff
Further Revised to add fix for 220090 (15.21 KB, patch)
2008-08-17 05:48 EDT, Francis Upton IV CLA
no flags Details | Diff
Test Cases, revised to add tests for 220090 (21.12 KB, patch)
2008-08-17 05:49 EDT, Francis Upton IV CLA
no flags Details | Diff
Tests revised again to use a better approach for public classes (21.73 KB, patch)
2008-08-17 15:54 EDT, Francis Upton IV CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Anton Leherbauer CLA 2007-12-10 06:49:55 EST
 
Comment 1 Anton Leherbauer CLA 2007-12-10 06:57:37 EST
(In reply to comment #0)

Description:
If a working set does not contain the project node, the Project Explorer shows the flat working set elements, instead of a filtered view of the resource structure.

Steps to reproduce:
Create resource structure
- project 'P'
  - file 'F1'
  - file 'F2'
  - file 'F3'

Create working set containing only the files 'F1' and 'F2'
Select working set in PE

PE shows

- file 'F1'
- file 'F2'

Expected:

- project 'P'
  - file 'F1'
  - file 'F2'

Comment 2 Anton Leherbauer CLA 2007-12-11 05:00:59 EST
Created attachment 84942 [details]
Proposed fix

The fix uses a ResourceWorkingSetFilter to make the PE behave like the Resource Navigator. It fixes also bug 157877.
Comment 3 Francis Upton IV CLA 2008-08-14 02:15:33 EDT
*** Bug 190819 has been marked as a duplicate of this bug. ***
Comment 4 Francis Upton IV CLA 2008-08-17 00:58:07 EDT
*** Bug 162966 has been marked as a duplicate of this bug. ***
Comment 5 Francis Upton IV CLA 2008-08-17 01:07:26 EDT
Created attachment 110156 [details]
Revisions to proposed fix

Thanks for your contribution; I revised it a little, added the correct copyright notice; removed some unecessary checking for null, and inlined a method you has that was called only once.
Comment 6 Francis Upton IV CLA 2008-08-17 01:11:38 EDT
Created attachment 110157 [details]
Test cases for this bug

Attached are the test suite modifications and new test cases.

To make these work, I had to add a class to org.eclipse.ui.navigator to help get access to some otherwise unavailable methods.  This class is clearly marked as non-API.  Ideally it should not show up in the Javadoc, but I don't know if that's possible.  I welcome comments or corrections about this.
Comment 7 Francis Upton IV CLA 2008-08-17 01:16:09 EDT
Kim, can you have a look at this?  (Boris said that I should have all 3.4.1 changed reviewed by someone).

I'm particularly interested in your comments about how I approach the testing, I had added a new class to support the testing to the org.eclipse.ui.navigator package, and I hope I have marked it correctly that it can not be construed as API.  Ideally I would like it not to be present in the Javadoc as well.  If there is a better way to handle this, I'm interested.

Thanks!

PS - if you think someone else would be better to review this, please pass it to them.
Comment 8 Francis Upton IV CLA 2008-08-17 05:48:12 EDT
Created attachment 110160 [details]
Further Revised to add fix for 220090

Since this fix was in the same code.
Comment 9 Francis Upton IV CLA 2008-08-17 05:49:50 EDT
Created attachment 110161 [details]
Test Cases, revised to add tests for 220090
Comment 10 Francis Upton IV CLA 2008-08-17 05:59:20 EDT
*** Bug 220090 has been marked as a duplicate of this bug. ***
Comment 11 Francis Upton IV CLA 2008-08-17 06:13:28 EDT
Oh, and Kim, please excuse the printlns in the patch, I will remove them.
Comment 12 Francis Upton IV CLA 2008-08-17 15:54:40 EDT
Created attachment 110173 [details]
Tests revised again to use a better approach for public classes

Moved TestAccessHelper into the tests
Comment 13 Francis Upton IV CLA 2008-08-17 17:37:37 EDT
*** Bug 239465 has been marked as a duplicate of this bug. ***
Comment 14 Francis Upton IV CLA 2008-08-17 17:55:54 EDT
*** Bug 202933 has been marked as a duplicate of this bug. ***
Comment 15 Paul Webster CLA 2008-08-19 14:07:45 EDT
It seems fine, please remove any System.out and System.err calls before you commit it

PW
Comment 16 Francis Upton IV CLA 2008-08-19 15:03:56 EDT
Released to 3.4.1, HEAD (35M2)
Comment 17 Markus Keller CLA 2008-08-20 06:00:57 EDT
You should not release .api_filters without PMC approval.

The filter is necessary due to a bug in the API tools. Since I didn't find a corresponding bug, I've opened a new one: Bug 244673.

Furthermore, the released filter is too broad. Only the last entry is necessary:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<component id="org.eclipse.ui.navigator" version="2">
    <resource path="src/org/eclipse/ui/navigator/NavigatorActionService.java" type="org.eclipse.ui.navigator.NavigatorActionService">
        <filter id="338944126">
            <message_arguments>
                <message_argument value="org.eclipse.ui.navigator.NavigatorActionService"/>
                <message_argument value="getActionProviderInstance(CommonActionProviderDescriptor)"/>
            </message_arguments>
        </filter>
    </resource>
</component>
Comment 18 Francis Upton IV CLA 2008-08-20 10:05:28 EDT
RE-resolving this bug, opened bug 244697 to track the issue with the .api-filter.
Comment 19 Francis Upton IV CLA 2008-08-25 00:47:07 EDT
*** Bug 226949 has been marked as a duplicate of this bug. ***
Comment 20 Francis Upton IV CLA 2008-08-25 17:33:47 EDT
*** Bug 131575 has been marked as a duplicate of this bug. ***
Comment 21 Francis Upton IV CLA 2008-08-26 12:35:41 EDT
*** Bug 198583 has been marked as a duplicate of this bug. ***
Comment 22 Francis Upton IV CLA 2008-09-01 03:10:34 EDT
Verified the case described in this bug works, and that when the project explorer is set to include selected working sets and there are no working sets that everything is shown.  Also verified that working sets are shown correctly as the top level view.  All verified in M20080827-2000.  Finally test case that was added ran in that build.
Comment 23 Chris Aniszczyk CLA 2008-09-17 12:27:26 EDT
*** Bug 247679 has been marked as a duplicate of this bug. ***
Comment 24 Francis Upton IV CLA 2009-01-15 11:02:32 EST
*** Bug 226952 has been marked as a duplicate of this bug. ***