Bug 45155 - "Create method" quickfix better return type guessing [quick fix]
Summary: "Create method" quickfix better return type guessing [quick fix]
Status: RESOLVED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: All All
: P3 trivial (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-10-18 10:22 EDT by lorenzo CLA
Modified: 2009-08-30 02:42 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description lorenzo CLA 2003-10-18 10:22:06 EDT
Hi.
If I do

assertFalse(newMethod());

and use quickfix to create newMethod, the method is created with
a return type of String.
I suppose this is due to assertFalse being overloaded with

assertFalse(boolean)
assertFalse(String, boolean)

In this case I am calling assertFalse with just one parameter so I think it
should be possibile to choose the correct version of assertFalse to get the
return type from to use for newMethod.

Thanks
Comment 1 Olivier Thomann CLA 2003-10-20 13:28:44 EDT
Move to JDT/UI for comment.
Comment 2 Martin Aeschlimann CLA 2003-12-22 10:46:28 EST
I'm using methodDeclarion.resolveBinding on 'assertFalse': It returns a guess of
a IMethodBinding as the parameters can't be resolved. (ASTResolving.java, line 91)

In this case it returns the binidng for 'assertFalse(String, boolean)', but
'assertFalse(boolean)' would make more sense.

moving to jdt.core
Comment 3 Frederic Fusier CLA 2004-06-22 07:33:42 EDT
Deferred post 3.0
Comment 4 Eclipse Webmaster CLA 2009-08-30 02:42:51 EDT
As of now 'LATER' and 'REMIND' resolutions are no longer supported.
Please reopen this bug if it is still valid for you.