IDEA-87401 CreateAssign -> Bind + +HighPriorityAction + tests added

This commit is contained in:
Danila Ponomarenko
2012-06-19 16:12:52 +04:00
parent a22650eebe
commit 4e91c6796c
23 changed files with 310 additions and 60 deletions
@@ -0,0 +1,12 @@
// "Bind Method Parameters to Fields" "true"
class A{
private int myP1;
private int myP2;
void method(int p1, int p2){
myP1 = p1;
myP2 = p2;
}
}
@@ -0,0 +1,18 @@
// "Bind Constructor Parameters to Fields" "true"
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
public class TestBefore {
@NotNull
private final String myName;
@NotNull
private final String myName2;
public TestBefore(@NotNull String name, @NotNull String name2) {
super();
myName = name;
myName2 = name2;
}
}
@@ -0,0 +1,18 @@
// "Bind Constructor Parameters to Fields" "true"
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
public class TestBefore {
@Nullable
private final String myName;
@Nullable
private final String myName2;
public TestBefore(@Nullable String name, @Nullable String name2) {
super();
myName = name;
myName2 = name2;
}
}
@@ -0,0 +1,16 @@
// "Bind Constructor Parameters to Fields" "true"
class Bar {
private int myi1;
private int myi2;
private final int myI1;
private final int myI2;
private final String myI3;
Bar(int i1, int i2, String i3) {
myI1 = i1;
myI2 = i2;
myI3 = i3;
}
}
@@ -0,0 +1,12 @@
// "Bind Method Parameters to Fields" "true"
class A{
private Object myP1;
private Object myP2;
<T> void f(T p1, T p2){
myP1 = p1;
myP2 = p2;
}
}
@@ -0,0 +1,12 @@
// "Bind Method Parameters to Fields" "true"
class A{
private String myP1;
private String myP2;
<T extends String> void f(T p1, T p2){
myP1 = p1;
myP2 = p2;
}
}
@@ -0,0 +1,7 @@
// "Bind Method Parameters to Fields" "true"
class A{
void <caret>method(int p1, int p2){
}
}
@@ -0,0 +1,10 @@
// "Bind Method Parameters to Fields" "false"
class A{
private final String myP1;
void <caret>f(String p1){
myP1 = p1;
}
}
@@ -0,0 +1,12 @@
// "Bind Method Parameters to Fields" "false"
class A{
private final String myP1;
private final String myP2;
void <caret>f(String p1, String p2){
myP1 = p1;
myP2 = p2;
}
}
@@ -0,0 +1,7 @@
// "Bind Method Parameters to Fields" "false"
class A{
void <caret>f(){
}
}
@@ -0,0 +1,11 @@
// "Bind Constructor Parameters to Fields" "true"
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
public class TestBefore {
public TestBefore(@NotNull String name<caret>, @NotNull String name2) {
super();
}
}
@@ -0,0 +1,11 @@
// "Bind Constructor Parameters to Fields" "true"
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
public class TestBefore {
public TestBefore(@Nullable String name<caret>, @Nullable String name2) {
super();
}
}
@@ -0,0 +1,10 @@
// "Bind Constructor Parameters to Fields" "true"
class Bar {
private int myi1;
private int myi2;
Bar(int <caret>i1, int i2, String i3) {
}
}
@@ -0,0 +1,7 @@
// "Bind Method Parameters to Fields" "true"
class A{
<T> void f(T p<caret>1, T p2){
}
}
@@ -0,0 +1,7 @@
// "Bind Method Parameters to Fields" "true"
class A{
<T extends String> void f(T p<caret>1, T p2){
}
}