Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 541414

Summary: [code mining] Enabling code mining should enable "Show references" and "Show implementations"
Product: [Eclipse Project] JDT Reporter: Vikas Chandra <Vikas.Chandra>
Component: UIAssignee: Angelo ZERR <azerr>
Status: VERIFIED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: azerr, daniel_megert, jjohnstn, mistria, noopur_gupta
Version: 4.10Flags: noopur_gupta: review+
Target Milestone: 4.10 RC1   
Hardware: All   
OS: All   
See Also: https://git.eclipse.org/r/132856
https://git.eclipse.org/r/132866
https://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=cf06059a975abc71973b463ffceb83b86e18ede8
Whiteboard:
Bug Depends on: 529127    
Bug Blocks:    

Description Vikas Chandra CLA 2018-11-21 10:52:16 EST
Currently if you check "Enable code minings", nothing happens.

The user needs to check "Show References" or "Show Implementation" or both manually.

A better usability will be by checking "Enable code minings", everything ( including field reference) is selected and the user manually unchecks options he or she doesn't need.
Comment 1 Angelo ZERR CLA 2018-11-21 11:41:26 EST
Perhaps a better mean is to enable references and implementation in the default preferences. Imho i think its a bad idea to activate by default on fields because it draws so many information in the editor.two many informations Kill the information
Comment 2 Eclipse Genie CLA 2018-11-21 14:20:33 EST
New Gerrit change created: https://git.eclipse.org/r/132856
Comment 3 Angelo ZERR CLA 2018-11-21 14:23:38 EST
Please review my very simply gerrit patch https://git.eclipse.org/r/#/c/132856/

Keep in mind  that there will have other code minings in this preference page. Developping a custom behaviour (when enabled code mining is checked, it changed enabled of references and implementations) is strange for me.

I prefer having default preferences which enable references and implementations by default, but which not work since global enable code mining is disabled by default.

The first time, user go at code mining preferences pages and check enable code mining. As references and implementions are checked by default, code minings will appear.

Hope you will agree with me.
Comment 4 Eclipse Genie CLA 2018-11-21 17:19:08 EST
New Gerrit change created: https://git.eclipse.org/r/132866
Comment 5 Jeff Johnston CLA 2018-11-21 18:18:13 EST
(In reply to Eclipse Genie from comment #4)
> New Gerrit change created: https://git.eclipse.org/r/132866

Ignore this gerrit change (132866) as my patch is identical and has thus been abandoned in lieu of Angelo's.
Comment 6 Noopur Gupta CLA 2018-11-23 00:55:31 EST
(In reply to Angelo ZERR from comment #1)
> Imho i think its a bad idea to activate by default on
> fields because it draws so many information in the editor.two many
> informations Kill the information

I would also prefer to keep references on fields off by default. But Vikas and Dani prefer to have everything enabled when enabling the code minings feature. So, we can keep the field references on by default and can look into changing the default if requested by other users also.
Comment 7 Angelo ZERR CLA 2018-11-23 01:42:26 EST
Is https://git.eclipse.org/r/132856 follows your idea?
Comment 9 Noopur Gupta CLA 2018-11-23 01:52:45 EST
(In reply to Angelo ZERR from comment #7)
> Is https://git.eclipse.org/r/132856 follows your idea?
Along with that, I have enabled field references also by default:
https://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=eb5b6f701974388ef7a472068f5b6fa050bc26ef
Comment 10 Dani Megert CLA 2018-11-23 12:26:55 EST
+1 for RC1.
Comment 11 Vikas Chandra CLA 2018-11-26 01:35:50 EST
verified on
Version: 2018-12 (4.10)
Build id: I20181125-0600