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

Bug 251465

Summary: Name of generated variable name from methodName could be smarter
Product: [Eclipse Project] JDT Reporter: Tomasz Bartczak <kretes>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: RESOLVED DUPLICATE QA Contact:
Severity: enhancement    
Priority: P3 CC: b.muskalla, daniel_megert
Version: 3.4   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Tomasz Bartczak CLA 2008-10-20 15:40:21 EDT
Steps To Reproduce:
1. invoke a method with name like 'createAdapter' returning something ( not void )
2. hit ctrl +2, l
3. Look at the variable name - it is 'createAdapter', while it could be better 'createdAdapter' 


Of course this needs to be generalized to any verb in english language.
Comment 1 Benjamin Muskalla CLA 2008-10-20 15:55:31 EDT
Other user, other opinion :)

I think this can be marked as dup of bug 251369 as I don't think that "this needs to be generalized to any verb in english language" can be implemented in such a general way.

And seriously, Dani, I've nothing to do with this. But a remarkable coincidence.
Comment 2 Tomasz Bartczak CLA 2008-10-20 16:16:00 EDT
But this could be left configureable to the user - sometimes it is needed to have a var name from a factory name. like this one, when we already have a var with the 'normal' name.

Adapter adapter = new Adapter();

Adapter xxx = copyAdapter(adapter);

the second var should be 'copiedAdapter' - I think it's better than 'adapter2' or aAdapter or anything else.

Comment 3 Dani Megert CLA 2008-10-21 03:51:20 EDT

*** This bug has been marked as a duplicate of bug 251369 ***