Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 256867 - [package explorer] Assign Working Sets dialog: checking a working set should show it
Summary: [package explorer] Assign Working Sets dialog: checking a working set should ...
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.5   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.5 M5   Edit
Assignee: Raksha Vasisht CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-28 05:16 EST by Dani Megert CLA
Modified: 2009-02-05 03:56 EST (History)
0 users

See Also:


Attachments
Fixed. Any hidden WorkingSet will now appear in the PE once assigned. (2.61 KB, patch)
2008-12-18 07:14 EST, Raksha Vasisht CLA
daniel_megert: review-
Details | Diff
Made the required changes. (2.42 KB, patch)
2009-01-07 00:52 EST, Raksha Vasisht CLA
daniel_megert: review-
Details | Diff
Fixed. (2.38 KB, patch)
2009-01-07 03:52 EST, Raksha Vasisht CLA
daniel_megert: review-
Details | Diff
Fixed the NPE. (2.63 KB, patch)
2009-01-07 08:14 EST, Raksha Vasisht CLA
daniel_megert: iplog+
daniel_megert: review+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dani Megert CLA 2008-11-28 05:16:33 EST
I20081126-000

When choosing to see all working sets in the 'Working Set Assignements' dialog and checking one of the yet hidden working sets it should make the working set(s) visible when clicking 'OK'.
Comment 1 Dani Megert CLA 2008-11-28 05:27:17 EST
>I20081126-000
N20081126-2000.
Comment 2 Raksha Vasisht CLA 2008-12-18 07:14:27 EST
Created attachment 120816 [details]
Fixed. Any hidden WorkingSet will now appear in the PE once assigned.
Comment 3 Dani Megert CLA 2009-01-06 04:04:12 EST
Patch works but has two trivial issues:
- don't use Javadoc inside methods and don't add @since tags for local variables
  ==> use an end of line comment
- only compute 'activeWorkingSets' if 'checkForYetHiddenWorkingSet' is 'true'
Comment 4 Raksha Vasisht CLA 2009-01-07 00:52:13 EST
Created attachment 121754 [details]
Made the required changes.
Comment 5 Dani Megert CLA 2009-01-07 03:11:54 EST
Sorry Raksha, I missed another issue: please always declare variables in the most inner scope possible. In this case, 'checkForYetHiddenWorkingSet' is only used inside "if (isValidWorkingSet..." and hence should not be visible outside that scope.
Comment 6 Raksha Vasisht CLA 2009-01-07 03:52:50 EST
Created attachment 121777 [details]
Fixed.
Comment 7 Dani Megert CLA 2009-01-07 04:19:07 EST
Mmh, I now finally had my coffee and found some more issues with the patch (sorry):
- wording in comments: if it returns (or gets) an array then don't say "set" but
  say what it is i.e. "array"
- 'null' issues:
   - getActiveWorkingSets() returns 'null' but that's not specified in
     the Javadoc. If 'null' is allowed as param or return type then this must be
     specified in the Javadoc
   - Arrays.asList(getActiveWorkingSets()) can cause an NPE
Comment 8 Raksha Vasisht CLA 2009-01-07 08:14:01 EST
Created attachment 121798 [details]
Fixed the NPE.
Comment 9 Dani Megert CLA 2009-01-07 09:25:36 EST
Patch is good. Thanks Raksha.

Note that we normally don't repeat the 'null' case in the normal Javadoc text (along with the tag is good enough unless it is really important).

Also: use <code>null</code> and not just null so that it is rendered as code.

Fixed in HEAD.
Available in builds > N20090106-2000.