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

Bug 548415

Summary: [code mining] Show parameter names not shown properly
Product: [Eclipse Project] JDT Reporter: Gavin Yang <gavinyang1985>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: CLOSED INVALID QA Contact:
Severity: normal    
Priority: P3 CC: mistria
Version: 4.12   
Target Milestone: ---   
Hardware: PC   
OS: Windows 10   
Whiteboard:
Attachments:
Description Flags
screenshot
none
Main.java none

Description Gavin Yang CLA 2019-06-18 23:33:15 EDT
Created attachment 278992 [details]
screenshot

As the attached screenshot, the parameter names for "productKey" in line 100 is not shown properly.
Comment 1 Gavin Yang CLA 2019-06-18 23:46:14 EDT
Created attachment 278993 [details]
Main.java

Reproduce steps:

1. Use http://mirror.dkm.cz/eclipse/technology/epp/downloads/release/2019-06/R/eclipse-jee-2019-06-R-win32-x86_64.zip

2. In Window -> Preferences -> Java -> Editor -> Code Minings, check all checkbox and apply.

3. Create a Java Project and paste the attachment Main.java.

4. The parameter name "key" is not shown for param "productKey".
Comment 2 Mickael Istria CLA 2019-06-20 03:32:29 EDT
The description is a bit misleading, but the behavior is expected: the parameter names would only be shown for cases where they are most likely helpful. In your case, the value (productKey) contains the parameter name (key), so the code mining is skipped because rules assume it's easy enough to read that code without the code mining.
I don't think it's worth changing the behavior, but the description should be improved. It's already the topic of some other ticket (can't find it right now).
If you're willing to help more, please suggest some enhancement in the description and submit them via Gerrit.