Bug 370970 - Underscore in Java identifiers should be preserved when overriding a method
Summary: Underscore in Java identifiers should be preserved when overriding a method
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.5.2   Edit
Hardware: PC Windows 7
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-08 11:17 EST by David Lambert CLA
Modified: 2013-02-05 01:20 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Lambert CLA 2012-02-08 11:17:17 EST
Build Identifier: Version: 3.5.2 Build id: M20100211-1343

Eclipse doesn't preserve identifiers having underscore in their name when using completion. This is the case when overriding a class method, or implementing an interface method, where a parameter like file_path is modified into filePath (underscore is removed and the following letter is transformed into an uppercase letter).

Naming convention is area (enterprise, corporation) specific, and Eclipse should not forbid underscore. At least, there should be a preference option to preserve underscore in identifiers. Generally, Eclipse should not make any replacement without having a preference option to disable it.

If there is such option, I haven't found it. In this case, preference option tree should be reviewed.


Reproducible: Always

Steps to Reproduce:
1. Create a class A with method openFile(String file_path)
2. Create a class B extending class A
3. Create an overridden version of the openFile method by starting typing "openF" and use Ctrl+Space to complete with "ile(String filePath)"
What is expected is "ile(String file_path)" instead.
Comment 1 Ayushman Jain CLA 2012-02-09 00:12:55 EST
I couldn't reproduce this with Indigo or 3.8M5. Maybe there's some missing step in the steps to reproduce (eg: A is in a library with doc attached, etc.) or this bug is fixed now. Can you please try a new release? Thanks!