Bug 118215 - [introduce parameter] should work for local variables
Summary: [introduce parameter] should work for local variables
Status: CLOSED DUPLICATE of bug 44811
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.2   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Markus Keller CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-28 06:17 EST by Thomas Singer CLA
Modified: 2010-09-05 13:54 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Singer CLA 2005-11-28 06:17:08 EST
Example:

  public class Foo {
    public static Foo createInstance(Bar bar) {
      return new Foo(bar);
    }

    private final Bazz bazz;
    public Foo(Bar bar) {
      final Bazz bazz = bar.getBazz();
      this.bazz = bazz;
    }
  }

It should be able to place the caret in 'bazz' (first constructor line) and invoke 'Introduce parameter'. The expected result is:

  public class Foo {
    public static Foo createInstance(Bar bar) {
      return new Foo(bar, bar.getBazz());
    }

    private final Bazz bazz;
    public Foo(Bar bar, Bazz bazz) {
      this.bazz = bazz;
    }
  }
Comment 1 Deepak Azad CLA 2010-09-05 13:54:41 EDT

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