Bug 563533 - [code mining] Preferences page: Enable code minings doesn't enable other controls
Summary: [code mining] Preferences page: Enable code minings doesn't enable other cont...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.14   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 4.16 RC2   Edit
Assignee: Jeff Johnston CLA
QA Contact:
URL:
Whiteboard:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2020-05-24 19:00 EDT by Mateusz Matela CLA
Modified: 2020-06-04 01:49 EDT (History)
8 users (show)

See Also:
daniel_megert: review+


Attachments
Screenshot (60.57 KB, image/png)
2020-06-02 06:07 EDT, Noopur Gupta CLA
no flags Details
Linux before changes to OptionsConfigurationBlock (56.07 KB, image/png)
2020-06-03 17:00 EDT, Jeff Johnston CLA
no flags Details
Linux after changes to OptionsConfigurationBlock (58.31 KB, image/png)
2020-06-03 17:01 EDT, Jeff Johnston CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mateusz Matela CLA 2020-05-24 19:00:00 EDT
Using M3.
Go to preferences -> Java -> Editor -> Code Minings.
Change the state of the "Enable code minigns" checkbox.
All the other controls on the page should change their enabled state to match the new checkbox state. This doesn't happen. I have to click "Apply and Close" and then open the prefences window again to see the correct enabled state.
Comment 1 Andrey Loskutov CLA 2020-05-25 04:30:26 EDT
Regression is caused by another "optimization" patch https://git.eclipse.org/r/#/c/162024/ that does not even have an appropriated bug.

I plan to revert this "optimization" for 4.16 RC1.
Comment 2 Andrey Loskutov CLA 2020-05-25 04:41:17 EDT
Revert patch: https://git.eclipse.org/r/163512.

Requires another revert patch https://git.eclipse.org/r/#/c/163450/ for another "optimization" patch https://git.eclipse.org/r/#/c/163450/ that went into RC1 without a bug and approval.

Noopur, please check & approve.
Comment 4 Andrey Loskutov CLA 2020-05-26 10:42:39 EDT
Apologize, looks like we have another issue here.

Clicking exact on the checkbox square disables/enables everything fine, clicking a pixel away from it on the text of the checkbox only switches the check mark inside the checkbox, but does not changes the state of the underlined options.

So while bisecting I've probably had bad luck to click few pixels away.

Now knowing that crazy behavior of this checkbox, I see this is a regression is from 4.14, not from 4.16.
Comment 5 Eclipse Genie CLA 2020-05-28 21:44:11 EDT
New Gerrit change created: https://git.eclipse.org/r/163808
Comment 6 Noopur Gupta CLA 2020-06-02 06:07:25 EDT
Created attachment 283114 [details]
Screenshot

(In reply to Eclipse Genie from comment #5)
> New Gerrit change created: https://git.eclipse.org/r/163808

After changes in OptionsConfigurationBlock, I see that the text with a link is moved to the right e.g. in the null annotations preference. See attached screenshot. It was due to the "gd.horizontalIndent= 4;" line.

The change that was setting offset to 0 on Linux is probably fine but I couldn't test it as I don't have a Linux machine. Please open a bug for 4.17 M1 if it needs to be changed.

I have reverted both the changes in OptionsConfigurationBlock in the above patch.

+1 to release the remaining part for RC2 which fixes the enable code minings issue.
Comment 8 Noopur Gupta CLA 2020-06-03 02:02:19 EDT
Mateusz/Andrey, can you please verify if the reported issue is fixed for you?
Comment 9 Andrey Loskutov CLA 2020-06-03 03:33:50 EDT
(In reply to Noopur Gupta from comment #8)
> Mateusz/Andrey, can you please verify if the reported issue is fixed for you?

Comment 4 is still valid on I20200602-0510, in I20200602-1800 bug is fixed.
Comment 10 Jeff Johnston CLA 2020-06-03 17:00:58 EDT
Created attachment 283141 [details]
Linux before changes to OptionsConfigurationBlock
Comment 11 Jeff Johnston CLA 2020-06-03 17:01:43 EDT
Created attachment 283142 [details]
Linux after changes to OptionsConfigurationBlock
Comment 12 Jeff Johnston CLA 2020-06-03 17:03:48 EDT
(In reply to Noopur Gupta from comment #6)
> Created attachment 283114 [details]
> Screenshot
> 
> (In reply to Eclipse Genie from comment #5)
> > New Gerrit change created: https://git.eclipse.org/r/163808
> 
> After changes in OptionsConfigurationBlock, I see that the text with a link
> is moved to the right e.g. in the null annotations preference. See attached
> screenshot. It was due to the "gd.horizontalIndent= 4;" line.
> 
> The change that was setting offset to 0 on Linux is probably fine but I
> couldn't test it as I don't have a Linux machine. Please open a bug for 4.17
> M1 if it needs to be changed.
> 
> I have reverted both the changes in OptionsConfigurationBlock in the above
> patch.
> 
> +1 to release the remaining part for RC2 which fixes the enable code minings
> issue.

Hi Noopur.  After experimenting, the correct solution is to change the -2 to 4  (instead of 0) and remove the gd.horizontalIndent so it won't affect Windows/Mac.  I will open a separate bug against Linux for 4.17 and propose the fix.
Comment 13 Noopur Gupta CLA 2020-06-04 01:44:19 EDT
(In reply to Andrey Loskutov from comment #9)
> Comment 4 is still valid on I20200602-0510, in I20200602-1800 bug is fixed.
Thanks, Andrey.
Comment 14 Noopur Gupta CLA 2020-06-04 01:49:35 EDT
(In reply to Jeff Johnston from comment #12)
> Hi Noopur.  After experimenting, the correct solution is to change the -2 to
> 4  (instead of 0) and remove the gd.horizontalIndent so it won't affect
> Windows/Mac.  I will open a separate bug against Linux for 4.17 and propose
> the fix.

Sure, thanks Jeff. The text is indeed overlapping in your screenshot. We will check with other Linux users also to verify it as this hasn't been reported yet by anyone.