Bug 107000 - [quick fix] 'Create method' could be more intelligent.
Summary: [quick fix] 'Create method' could be more intelligent.
Status: RESOLVED DUPLICATE of bug 69471
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.1   Edit
Hardware: PC Linux
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Martin Aeschlimann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-15 05:37 EDT by Michael Stevens CLA
Modified: 2005-08-15 11:13 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 Michael Stevens CLA 2005-08-15 05:37:56 EDT
If I write a junit test:

    assertFalse(moo());

Then use Ctrl-1 to autogenerate the moo method, it will generate one with return
type String.

This will have a compile error on the assertFalse line, as there is no such method.

I can see why it's doing it - there's an assertFalse method with signature
String, boolean, but I think that 'Create Method', should, given a choice, pick
 the method signature that will compile without further changes - ie return type
boolean.
Comment 1 Olivier Thomann CLA 2005-08-15 10:21:49 EDT
Move to JDT/UI
Comment 2 Martin Aeschlimann CLA 2005-08-15 11:13:39 EDT

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