Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 182539 - [package explorer][working sets] Offer delete on a working set
Summary: [package explorer][working sets] Offer delete on a working set
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.3   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 3.5 M4   Edit
Assignee: Raksha Vasisht CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 186691 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-04-16 08:34 EDT by Remy Suen CLA
Modified: 2008-12-09 04:50 EST (History)
3 users (show)

See Also:


Attachments
The delete button is now enabled for Working Sets when set as top level elements, which helps the user to either remove or hide the Working Set(s) from the PE without having to reconfigure everytime. (12.86 KB, patch)
2008-12-04 10:18 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 Remy Suen CLA 2007-04-16 08:34:25 EDT
If my working set has nothing contained within it, I should be allowed to delete it. Hitting 'Delete' prompts no confirmation dialog and right-clicking on it doesn't work since 'Delete' is greyed out. It is cumbersome to have to go and edit my working sets just for this. If it's completely empty, deleting it should be no loss, and prompting a confirmation dialog should suffice as a deterrent for misclicked deletions.
Comment 1 Martin Aeschlimann CLA 2007-05-03 09:29:40 EDT
It's not clear what delete would do. Remove the working set from the package explorer or delete the working set?
If we add delete support, we should also add it on non-empty working sets
Comment 2 Martin Aeschlimann CLA 2007-05-14 04:47:28 EDT
*** Bug 186691 has been marked as a duplicate of this bug. ***
Comment 3 Willian Mitsuda CLA 2007-05-14 08:33:18 EDT
Quoting my own opinion from bug#186691 about what to do on this case:

"Sometimes I download a bunch of projects from CVS (to make some tests, study
some code, etc.) and put them on a temporary Java Working Set.

After working on that, I'd like to be able to just press <DEL> on the working
set on package explorer, and have the working set and the included projects
deleted."
Comment 4 Dani Megert CLA 2008-11-18 05:36:18 EST
When deleting a working set we should ask whether to remove it only from the Package Explorer or also delete the working set. For now we do not want to allow to delete the resources inside the working set.
Comment 5 Raksha Vasisht CLA 2008-12-04 10:18:15 EST
Created attachment 119510 [details]
The delete button is now enabled for Working Sets when set as top level elements, which helps the user to either remove or hide the Working Set(s) from the PE without having to reconfigure everytime.
Comment 6 Dani Megert CLA 2008-12-05 07:07:30 EST
Hi Raksha, thanks for the patch. I committed it with the following minor changes:

- added missed @since tags
- fixed some Javadoc texts, e.g. "selection" where an object or list was passed
  NOTE: always end first Javadoc sentence with a '.'
- RefactoringAvailabilityTester.isDeleteAvailable(IWorkingSet) not needed
- RefactoringAvailabilityTester.getWorkingSets(Object[]) not needed
- the two methods are not needed - the following test is enough:
  if (ReorgUtils.containsOnlyWorkingSets(Arrays.asList(objects)))
      return true;
- fixes: if (!(workingSet.getName().equals(OthersWorkingSetUpdater.ID)))
  this is not good for two reasons:
  1) should use getId() and not getName()
  2) always use constant.equals(...) because this prevents form potential NPE

Available in builds > N20081204-2000.
Comment 7 Dani Megert CLA 2008-12-09 04:50:01 EST
Verified in  I20081209-0100.