Bug 205165 - [assist] Offer local variable after message send completion
Summary: [assist] Offer local variable after message send completion
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: David Audel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-02 07:09 EDT by Jerome Lanneluc CLA
Modified: 2008-08-22 12:24 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 Jerome Lanneluc CLA 2007-10-02 07:09:44 EDT
I20070925

public class X {
  void bar(Y y) {
    y.fo<|> // complete here
  }
}
interface Y {
  int foo();
}

If you complete after "fo", chances are you want to assign the result of foo() to a local variable. We should offer the creation of the local variable, so that the result of the completion would be:

public class X {
  void bar(Y y) {
    int i = y.foo();
  }
}
interface Y {
  int foo();
}