mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 03:13:40 +07:00
IDEA-87401 CreateAssign -> Bind + +HighPriorityAction + tests added
This commit is contained in:
+12
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
+18
@@ -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;
|
||||
}
|
||||
}
|
||||
+18
@@ -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;
|
||||
}
|
||||
}
|
||||
+16
@@ -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;
|
||||
}
|
||||
}
|
||||
+12
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
+12
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// "Bind Method Parameters to Fields" "true"
|
||||
|
||||
class A{
|
||||
void <caret>method(int p1, int p2){
|
||||
}
|
||||
}
|
||||
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
// "Bind Method Parameters to Fields" "false"
|
||||
|
||||
class A{
|
||||
private final String myP1;
|
||||
|
||||
void <caret>f(String p1){
|
||||
myP1 = p1;
|
||||
}
|
||||
}
|
||||
|
||||
+12
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// "Bind Method Parameters to Fields" "false"
|
||||
|
||||
class A{
|
||||
void <caret>f(){
|
||||
}
|
||||
}
|
||||
|
||||
+11
@@ -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();
|
||||
}
|
||||
}
|
||||
+11
@@ -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();
|
||||
}
|
||||
}
|
||||
+10
@@ -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) {
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// "Bind Method Parameters to Fields" "true"
|
||||
|
||||
class A{
|
||||
<T> void f(T p<caret>1, T p2){
|
||||
}
|
||||
}
|
||||
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// "Bind Method Parameters to Fields" "true"
|
||||
|
||||
class A{
|
||||
<T extends String> void f(T p<caret>1, T p2){
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user