Bug 500598 - CleanDialog should offer filter option
Summary: CleanDialog should offer filter option
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.7   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 4.7 M7   Edit
Assignee: David Weiser CLA
QA Contact:
URL:
Whiteboard:
Keywords: noteworthy
Depends on:
Blocks: 516523
  Show dependency tree
 
Reported: 2016-08-31 12:28 EDT by Lars Vogel CLA
Modified: 2017-05-11 13:05 EDT (History)
8 users (show)

See Also:
daniel_megert: review-


Attachments
Screenshot (51.98 KB, image/png)
2016-08-31 12:28 EDT, Lars Vogel CLA
no flags Details
new dialog (18.91 KB, image/png)
2017-03-21 12:58 EDT, David Weiser CLA
no flags Details
new dialog 1 (21.15 KB, image/png)
2017-03-22 08:37 EDT, David Weiser CLA
no flags Details
new dialog 2 (30.77 KB, image/png)
2017-03-22 08:37 EDT, David Weiser CLA
no flags Details
new dialog 3 (29.20 KB, image/png)
2017-03-22 08:38 EDT, David Weiser CLA
no flags Details
new clean dialog 1 (18.12 KB, image/png)
2017-04-04 06:25 EDT, David Weiser CLA
no flags Details
new clean dialog 2 (17.59 KB, image/png)
2017-04-04 06:25 EDT, David Weiser CLA
no flags Details
new clean dialog (16.70 KB, image/png)
2017-04-18 06:15 EDT, David Weiser CLA
no flags Details
new clean dialog (26.76 KB, image/jpeg)
2017-05-02 07:54 EDT, David Weiser CLA
no flags Details
new clean dialog (25.60 KB, image/jpeg)
2017-05-05 06:20 EDT, David Weiser CLA
no flags Details
new clean dialog 1 (27.40 KB, image/jpeg)
2017-05-08 15:10 EDT, David Weiser CLA
no flags Details
new clean dialog 2 (25.08 KB, image/jpeg)
2017-05-08 15:10 EDT, David Weiser CLA
no flags Details
new clean dialog 3 (27.97 KB, image/jpeg)
2017-05-08 15:10 EDT, David Weiser CLA
no flags Details
new clean dialog 4 (25.28 KB, image/jpeg)
2017-05-08 15:11 EDT, David Weiser CLA
no flags Details
new clean dialog 5 (24.98 KB, image/jpeg)
2017-05-08 15:12 EDT, David Weiser CLA
no flags Details
preferences (54.26 KB, image/jpeg)
2017-05-08 15:17 EDT, David Weiser CLA
no flags Details
preferences 2 (43.21 KB, image/jpeg)
2017-05-08 15:17 EDT, David Weiser CLA
no flags Details
Picture showing the good and the ugly (27.67 KB, image/png)
2017-05-09 04:34 EDT, Dani Megert CLA
no flags Details
Picture showing the good and the ugly (6.33 KB, image/png)
2017-05-09 04:36 EDT, Dani Megert CLA
no flags Details
Picture showing the new clean dialog under windows (7.36 KB, image/png)
2017-05-09 09:47 EDT, Lars Vogel CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Vogel CLA 2016-08-31 12:28:15 EDT
Created attachment 263871 [details]
Screenshot

I think our general pattern is to offer a filter box for selection and selection all. I suggest we adjued the CleanDialog.

Super ugly mockup attached to bring the idea across.
Comment 1 Lars Vogel CLA 2016-12-09 13:43:16 EST
Martin, something for you? You seem good at adding filter boxes. See Bug 249374.
Comment 2 Lars Vogel CLA 2017-03-19 12:52:13 EDT
David, can you take this one?
Comment 3 Lars Vogel CLA 2017-03-19 12:52:41 EDT
To trigger the dialog use Project -> Clean from the menu
Comment 4 Eclipse Genie CLA 2017-03-21 12:57:34 EDT
New Gerrit change created: https://git.eclipse.org/r/93555
Comment 5 David Weiser CLA 2017-03-21 12:58:16 EDT
Created attachment 267387 [details]
new dialog
Comment 6 David Weiser CLA 2017-03-21 13:01:24 EDT
I removed the saving of the toggle state (there is no toggle anymore). Maybe we should create a new bug that saves and restores the selection?!
Comment 7 Lars Vogel CLA 2017-03-21 13:07:07 EDT
(In reply to David Weiser from comment #6)
> I removed the saving of the toggle state (there is no toggle anymore). Maybe
> we should create a new bug that saves and restores the selection?!

I suggest to add a persisted check box (Always clean all). If selected the filtered tree gets disabled and selection is only possible if the check box is not selected.

This should be done via this bug to avoid functional loose.
Comment 8 David Weiser CLA 2017-03-22 08:37:30 EDT
Created attachment 267401 [details]
new dialog 1
Comment 9 David Weiser CLA 2017-03-22 08:37:49 EDT
Created attachment 267402 [details]
new dialog 2
Comment 10 David Weiser CLA 2017-03-22 08:38:18 EDT
Created attachment 267403 [details]
new dialog 3
Comment 11 David Weiser CLA 2017-03-22 08:39:24 EDT
I added the checkbox, but moved it to the bottom. Please check the Screenshots. What do you think?
Comment 12 Lars Vogel CLA 2017-03-22 08:56:09 EDT
(In reply to David Weiser from comment #11)
> I added the checkbox, but moved it to the bottom. Please check the
> Screenshots. What do you think?

Looks great. Thanks, I try to review the code change today or tomorrow.
Comment 13 Lars Vogel CLA 2017-03-23 11:58:31 EDT
(In reply to Lars Vogel from comment #12)
> Looks great. Thanks, I try to review the code change today or tomorrow.

See comment in the Gerrit review
Comment 15 Lars Vogel CLA 2017-03-29 15:01:06 EDT
Thanks David, looks great.

Please add to the N&N M7.
Comment 16 Markus Keller CLA 2017-03-30 11:26:27 EDT
Reopening. https://dev.eclipse.org/mhonarc/lists/platform-ui-dev/msg07710.html was mainly for you guys.

The filter field needs the "type filter text" affordance as everywhere else. Reuse the existing implementation. It already contains the necessary workarounds to make sure the text appears when it should.

"The selected projects will be rebuild from scratch." is wrong. Needs to use "rebuilt".

"Always" is a term we only use in MessageDialogWithToggle, where checking the box  will disable the dialog in the future.

Here, "Clean all projects" would be an appropriate label. Removing the second radio button is OK for me (but not necessary).

The button needs to be moved back to the top. UI dependencies are typically arranged top-down (in reading direction).

I don't think this needs an N&N entry. If you add one, then make sure it doesn't need further copy editing, and take the chance to tell users that they the initial selection of this dialog is determined by previously selected element (e.g. in the Problems view or in the Package Explorer).
Comment 17 Dani Megert CLA 2017-03-30 12:59:25 EDT
The dialog was OK except the missing filtering. The current fix now completely reworks the dialog without any hint (existing bug reports) that this has any advantage. Also, it adds a useless redundant 'Select All' button. This functionality is already covered by the '(Always) Clean All'

I'm inclined to revert the whole change.
Comment 18 Lars Vogel CLA 2017-03-31 06:27:02 EDT
(In reply to Dani Megert from comment #17)
> The dialog was OK except the missing filtering. The current fix now
> completely reworks the dialog without any hint (existing bug reports) that
> this has any advantage. Also, it adds a useless redundant 'Select All'
> button. This functionality is already covered by the '(Always) Clean All'

Select All is something different than the '(Always) Clean All' checkbox and is super useful for certain customer scenarios.

For example, I have a customer still using Eclipse ADT. For some weird reason (I assume a bug in the unmaintained ADT) ADT only works if the projects are build in a certain order. We have approximately 30 plug-in and have 3 build steps. First build step: select 4 projects -> trigger build
Second build step: select 1 project -> trigger build
Third build step: select 25 projects -> trigger build

Especially step 3 is very painful. We the Select all box we can select all and afterwards remove the 5 which are not allowed to be in the build.

I have seen other similar scenarios at customer sides, where most of the projects should be build but not all. Select All with the option to remove items is very helpful for this.
Comment 19 Lars Vogel CLA 2017-03-31 06:27:32 EDT
David, please have a look at the feedback from Markus and provide a patch or ask for clarification.
Comment 20 Dani Megert CLA 2017-03-31 08:11:03 EDT
(In reply to Lars Vogel from comment #18)
> For example, I have a customer still using Eclipse ADT. For some weird
> reason (I assume a bug in the unmaintained ADT) ADT only works if the
> projects are build in a certain order. We have approximately 30 plug-in and
> have 3 build steps. First build step: select 4 projects -> trigger build
> Second build step: select 1 project -> trigger build
> Third build step: select 25 projects -> trigger build
> 
> Especially step 3 is very painful. We the Select all box we can select all
> and afterwards remove the 5 which are not allowed to be in the build.
> 
> I have seen other similar scenarios at customer sides, where most of the
> projects should be build but not all. Select All with the option to remove
> items is very helpful for this.

You can already do this now. Simply select all projects in the P* Explorer before invoking Project > Clean...

No need to pollute the Clean dialog.
Comment 21 Markus Keller CLA 2017-04-03 12:24:17 EDT
(In reply to Lars Vogel from comment #18)
The best workaround for that scenario would be:

Preparation:
- Package Explorer view menu > Top Level Elements > Working Sets
- create 3 working sets that contain the projects for each build step

Build:
- for each working set:
  - select the working set, Project > Clean, Enter
Comment 22 Lars Vogel CLA 2017-04-03 13:48:18 EDT
Thanks Dani and Markus for the workarounds, I was already aware of them. 

I still believe a "Select All" button in the clean dialog is helpful. The feature that the package explorer selection can set the initial selection in the Clean dialog is IMHO hard to discover for end users. Also changing the package explorer selection for the purpose of selecting all (are most projects) in the clean dialog is not always desirable. I personally dislike changing package explorer selection for such purposes, I (almost) always link my current editor file with the package explorer.

One potential enhancements request from Markus suggestion would be allow the usage of working sets in the clean dialog. As I rarely use working sets (as I switch relatively frequently machines and visits different clients with different projects), I leave it to you to open a new feature request, if you think this could be useful.
Comment 23 Dani Megert CLA 2017-04-03 13:50:25 EDT
(In reply to Lars Vogel from comment #22)
> Thanks Dani and Markus for the workarounds, I was already aware of them. 
> 
> I still believe a "Select All" button in the clean dialog is helpful. The
> feature that the package explorer selection can set the initial selection in
> the Clean dialog is IMHO hard to discover for end users. Also changing the
> package explorer selection for the purpose of selecting all (are most
> projects) in the clean dialog is not always desirable. I personally dislike
> changing package explorer selection for such purposes, I (almost) always
> link my current editor file with the package explorer.
> 
> One potential enhancements request from Markus suggestion would be allow the
> usage of working sets in the clean dialog. As I rarely use working sets (as
> I switch relatively frequently machines and visits different clients with
> different projects), I leave it to you to open a new feature request, if you
> think this could be useful.

Please split this bug into two. Filter and additional buttons. It is always bad to put more than one feature into a single bug report. The filter feature is not controversial. The other still has my -1.
Comment 24 Lars Vogel CLA 2017-04-03 14:05:30 EDT
(In reply to Dani Megert from comment #23)
> Please split this bug into two. Filter and additional buttons. It is always
> bad to put more than one feature into a single bug report. 

+1 

@David, please create a new bug report for Select All and Deselect and provide a Gerrit for the changes suggested by Markus plus the (hopefully temporary) removal of the buttons for this bug report.
Comment 25 Eclipse Genie CLA 2017-04-04 06:24:37 EDT
New Gerrit change created: https://git.eclipse.org/r/94356
Comment 26 David Weiser CLA 2017-04-04 06:25:17 EDT
Created attachment 267627 [details]
new clean dialog 1
Comment 27 David Weiser CLA 2017-04-04 06:25:58 EDT
Created attachment 267628 [details]
new clean dialog 2
Comment 28 David Weiser CLA 2017-04-04 06:33:58 EDT
I pushed a new change. Please check the new screenshots for the new layout. What do you think?
Comment 29 Noopur Gupta CLA 2017-04-04 07:32:43 EDT
I20170402-2000. Type * in the Clean dialog's filter. We get this exception in Error Log:

java.util.regex.PatternSyntaxException: Dangling meta character '*' near index 2
.**.*
  ^
	at java.util.regex.Pattern.error(Unknown Source)
	at java.util.regex.Pattern.sequence(Unknown Source)
	at java.util.regex.Pattern.expr(Unknown Source)
	at java.util.regex.Pattern.compile(Unknown Source)
	at java.util.regex.Pattern.<init>(Unknown Source)
	at java.util.regex.Pattern.compile(Unknown Source)
	at java.util.regex.Pattern.matches(Unknown Source)
	at java.lang.String.matches(Unknown Source)
	at org.eclipse.ui.internal.ide.dialogs.CleanDialog$2.select(CleanDialog.java:300)
...
Comment 30 David Weiser CLA 2017-04-18 06:15:03 EDT
Created attachment 267837 [details]
new clean dialog
Comment 31 Dani Megert CLA 2017-05-01 11:41:39 EDT
We are in the last week of M7. If we don't get polished solution until Friday this will have to be revert to 4.6 and addressed later.
Comment 32 David Weiser CLA 2017-05-02 07:54:41 EDT
Created attachment 268114 [details]
new clean dialog
Comment 33 Markus Keller CLA 2017-05-03 14:10:51 EDT
(In reply to David Weiser from comment #32)
> Created attachment 268114 [details]
> new clean dialog

Comment 16 has more information for you.
Comment 34 David Weiser CLA 2017-05-03 15:12:16 EDT
(In reply to Markus Keller from comment #33)
> (In reply to David Weiser from comment #32)
> > Created attachment 268114 [details]
> > new clean dialog
> 
> Comment 16 has more information for you.

Sorry Markus, I accidentally threw out the changes. Thanks for your remark.

The typo ("rebuild" -> "rebuilt") is fixed and the checkbox text is changed to "Clean all projects" (with mnemonic).
Comment 35 Lars Vogel CLA 2017-05-04 05:51:36 EDT
(In reply to Dani Megert from comment #31)
> We are in the last week of M7. If we don't get polished solution until
> Friday this will have to be revert to 4.6 and addressed later.

Gerrit awaits your review.
Comment 36 Lars Vogel CLA 2017-05-05 05:06:29 EDT
FYI - the Gerrit review is currently blocked by Danis -2
Comment 37 Vikas Chandra CLA 2017-05-05 05:25:54 EDT
I am someone who uses Clean->Rebuild All many times a day.

As an user, I preferred the old layout and style. The "Select all" and "Deselect all" seems not so intuitive. Shouldn't that have been "Enable All" and "Disable All" ? The empty space below those 2 buttons looks kind-of not so good ( for the lack of better term).
Comment 38 David Weiser CLA 2017-05-05 06:20:06 EDT
Created attachment 268184 [details]
new clean dialog

@Vikas, the select/deselect buttons are not included in my last patch any more. Please check the last screenshot. We are just awaiting Danis feedback.
Comment 39 Dani Megert CLA 2017-05-05 09:46:27 EDT
(In reply to David Weiser from comment #34)
> (In reply to Markus Keller from comment #33)
> > (In reply to David Weiser from comment #32)
> > > Created attachment 268114 [details]
> > > new clean dialog
> > 
> > Comment 16 has more information for you.
> 
> Sorry Markus, I accidentally threw out the changes. Thanks for your remark.
> 
> The typo ("rebuild" -> "rebuilt") is fixed and the checkbox text is changed
> to "Clean all projects" (with mnemonic).


You still ignored the review comment for
"The filter field needs the "type filter text" affordance as everywhere else."

Time is running out. On Monday I will revert to 4.6 if I don't have a complete fix and this will be moved to 4.8.
Comment 40 Lars Vogel CLA 2017-05-08 03:39:15 EDT
(In reply to Dani Megert from comment #39)
> You still ignored the review comment for
> "The filter field needs the "type filter text" affordance as everywhere
> else."

Can you clarify that you mean with "type filter text" affordance?
Comment 41 Lars Vogel CLA 2017-05-08 03:41:05 EDT
(In reply to Lars Vogel from comment #40)
> Can you clarify that you mean with "type filter text" affordance?

The text box uses IMHO the style attributes (SWT.SEARCH | SWT.ICON_CANCEL) and we set the "type filter text". What is missing?
Comment 42 Dani Megert CLA 2017-05-08 04:35:57 EDT
(In reply to Lars Vogel from comment #41)
> (In reply to Lars Vogel from comment #40)
> > Can you clarify that you mean with "type filter text" affordance?
> 
> The text box uses IMHO the style attributes (SWT.SEARCH | SWT.ICON_CANCEL)
> and we set the "type filter text". What is missing?

See my comment in the Gerrit change.
Comment 43 David Weiser CLA 2017-05-08 15:10:12 EDT
Created attachment 268218 [details]
new clean dialog 1
Comment 44 David Weiser CLA 2017-05-08 15:10:32 EDT
Created attachment 268219 [details]
new clean dialog 2
Comment 45 David Weiser CLA 2017-05-08 15:10:53 EDT
Created attachment 268220 [details]
new clean dialog 3
Comment 46 David Weiser CLA 2017-05-08 15:11:42 EDT
Created attachment 268221 [details]
new clean dialog 4
Comment 47 Lars Vogel CLA 2017-05-08 15:12:02 EDT
David, please upload also a screenshot of the preference dialog for comparison.
Comment 48 David Weiser CLA 2017-05-08 15:12:03 EDT
Created attachment 268222 [details]
new clean dialog 5
Comment 49 David Weiser CLA 2017-05-08 15:17:17 EDT
Created attachment 268223 [details]
preferences
Comment 50 David Weiser CLA 2017-05-08 15:17:40 EDT
Created attachment 268224 [details]
preferences 2
Comment 51 Dani Megert CLA 2017-05-09 04:34:42 EDT
Created attachment 268231 [details]
Picture showing the good and the ugly

As you can see, on Windows 7 the 'Clear' button is inside the search field.

Please stop trying to provide a fix for Windows if you don't have access to a Windows machine or another contributor that has one and can provide the fix.
Comment 52 Dani Megert CLA 2017-05-09 04:36:31 EDT
Created attachment 268232 [details]
Picture showing the good and the ugly

(In reply to Dani Megert from comment #51)
> Created attachment 268231 [details]
> Picture showing the good and the ugly

Sorry, wrong screenshot. The right one is coming...
Comment 53 Lars Vogel CLA 2017-05-09 06:15:13 EDT
(In reply to Dani Megert from comment #51)
> Please stop trying to provide a fix for Windows if you don't have access to
> a Windows machine or another contributor that has one and can provide the
> fix.

I now have setup a Windows machine in VirtualBox. @David, please upload the new version and I can test on Windows.
Comment 54 Lars Vogel CLA 2017-05-09 09:47:58 EDT
Created attachment 268248 [details]
Picture showing the new clean dialog under windows

Picture showing the current clean dialog under Windows
Comment 56 Lars Vogel CLA 2017-05-10 01:29:09 EDT
Thanks David for the contribution and Dani for the review.