Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 65944 - "Clean selected projects" should use last selection as default
Summary: "Clean selected projects" should use last selection as default
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 2000
: P3 enhancement with 1 vote (vote)
Target Milestone: 3.1 M5   Edit
Assignee: John Arthorne CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-07 07:28 EDT by Andreas Hochsteger CLA
Modified: 2005-02-11 16:17 EST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Hochsteger CLA 2004-06-07 07:28:43 EDT
From a usability perspective if I select a project and then select
Project/Clean... from the menu I would expect to be the option "Clean selected
projects" selected as default.
Comment 1 Tod Creasey CLA 2004-06-08 13:01:51 EDT
We will not be changing the defaults
Comment 2 Andreas Hochsteger CLA 2004-06-08 13:18:12 EDT
I don't want to be annoying, but I don't understand the decision that this won't
be changed.
The observations I made from how my colleagues and I were using this function
show exactly the opposite: To about 100% of all cases we had to select "Clean
selected projects" instead of "Clean all projects".

Could you please at least explain to me, why this won't be changed?
Perhaps then I can understand the decision better.

Thanks,
Andreas.
Comment 3 Patrick Dubroy CLA 2004-11-09 14:38:23 EST
I was going to open a bug report on this same issue. I am also curious what the
reasoning is behind the current default. It's confusing to me because the other
items in the "Project" menu pertain to the selected project. I have personally
never used "Clean all projects" either.
Comment 4 MH CLA 2004-11-10 07:27:41 EST
Same for me and all of my coworkers. It's annoying to always have to click the 
project in an additional step. Nobody wants to clean all projects (by 
default) ...
Comment 5 Tod Creasey CLA 2004-11-10 09:07:26 EST
I actually do the opposite - I only clean when I turned off autobuild becuase 
of a large refactoring so clearly there is a usecase for both.

I think the compormise is that the dialog should remember your last selection 
and make that the default next time.
Comment 6 tonis CLA 2004-12-16 10:11:59 EST
Also, should detect project more intelligently, from currently selected project
resource(java or any other file). Now I must click on project name in navigator
or package explorer. Because I must clean often it is quite annoying now :(  
Comment 7 John Arthorne CLA 2004-12-16 10:39:47 EST
Re comment #6: I believe you are mistaken.  The clean dialog takes its selection
from the selection service's active selection. If this is not available, it
checks if the active part is an editor, and if so derives the selection from the
editor's input.  I.e., select project A in Package Explorer, and then select an
editor on a file in project B.  The clean dialog's default selection will be
project B.

Your comment is correct for the "Build Project" action, for which bug 77871 has
been entered.
Comment 8 tonis CLA 2004-12-18 09:11:00 EST
Sorry, I didn't give correct details. Detecting project works if selection is in
editor and navigator. But doesn't work if selection is for example in Java
outline view etc.
Comment 9 Tod Creasey CLA 2004-12-20 08:05:50 EST
The navigator set the selection in the selection service but the Outline view 
does not so the navigator/package explorer selection will take precendence.
Comment 10 Ilja Preuss CLA 2005-01-18 03:24:55 EST
"I only clean when I turned off autobuild because of a large refactoring so 
clearly there is a usecase for both."

I'm curious - why don't you just use "Build All"?
Comment 11 Darin Swanson CLA 2005-02-11 15:25:19 EST
(In reply to comment #5)
> I think the compormise is that the dialog should remember your last 
selection 
> and make that the default next time.
I have implemented this comprimise

Changes to CleanDialog to use dialog settings to persist the user 
customization of the "session" with the dialog.
Size, location and when to build all of clean selected is remembered.
Comment 12 Darin Swanson CLA 2005-02-11 15:25:50 EST
Please verify John.
Comment 13 John Arthorne CLA 2005-02-11 16:15:29 EST
Verified.  I made one small change.  The "Build immediately" checkbox default
value changed to "false", since when there is no saved dialog settings,
IDialogSettings.getBoolean() returns false by default.  I changed this to use
IDialogSettings.get(), and then set the selection to "true" when there is no
saved value. This preserves the old behaviour.

While testing I got an invalid thread access exception, because
CleanDialog.buttonPressed called GlobalBuildAction.run() from a job, and this
can prompt the user in some cases.  I changed this call to
GlobalBuildAction.doBuild(), which doesn't prompt the user.
Comment 14 John Arthorne CLA 2005-02-11 16:17:04 EST
Comment #13 should have gone into bug 61838 (very similar bug).