suggest new param name based on type instead of other params

This commit is contained in:
anna
2010-12-23 16:07:12 +03:00
parent 1e3f864b29
commit e1ac3c6f0a
7 changed files with 73 additions and 3 deletions

View File

@@ -0,0 +1,12 @@
// "Change signature of 'Bar(String)' to 'Bar(Foo<TypeParamName>, String)'" "true"
public class Bar {
Bar(Foo<TypeParamName> typeParamNameFoo, String args) {
}
}
class Foo<TypeParamName> {
void bar() {
Bar bar = new Bar(this, "");
}
}

View File

@@ -0,0 +1,12 @@
// "Change signature of 'bar(String)' to 'bar(Foo<TypeParamName>, String)'" "true"
public class Bar {
static void bar(Foo<TypeParamName> typeParamNameFoo, String args) {
}
}
class Foo<TypeParamName> {
void bar() {
Bar.bar(this, "");
}
}

View File

@@ -0,0 +1,10 @@
// "Change signature of 'f(String)' to 'f(int, String)'" "true"
public class S {
void f(int i, String args) {
}
void bar() {
f(11, "");
}
}

View File

@@ -0,0 +1,12 @@
// "Change signature of 'Bar(String)' to 'Bar(Foo<TypeParamName>, String)'" "true"
public class Bar {
Bar(String args) {
}
}
class Foo<TypeParamName> {
void bar() {
Bar bar = new Bar(th<caret>is, "");
}
}

View File

@@ -0,0 +1,12 @@
// "Change signature of 'bar(String)' to 'bar(Foo<TypeParamName>, String)'" "true"
public class Bar {
static void bar(String args) {
}
}
class Foo<TypeParamName> {
void bar() {
Bar.bar(th<caret>is, "");
}
}

View File

@@ -0,0 +1,10 @@
// "Change signature of 'f(String)' to 'f(int, String)'" "true"
public class S {
void f(String args) {
}
void bar() {
f(1<caret>1, "");
}
}