mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
extract enum: do not include constants when user don't ask to; check that variable was already migrated and getter is already not needed (IDEA-103509)
This commit is contained in:
+12
@@ -0,0 +1,12 @@
|
||||
public enum EEnum {
|
||||
FOO(0);
|
||||
private int value;
|
||||
|
||||
public int getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
EEnum(int value) {
|
||||
this.value = value;
|
||||
}
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
class Test {
|
||||
public static final int BAR = 2;
|
||||
void foo() {
|
||||
System.out.println(EEnum.FOO.getValue());
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
class Usage {
|
||||
void foo() {
|
||||
EEnum i = EEnum.FOO;
|
||||
}
|
||||
|
||||
void bar(int i ) {
|
||||
i = B;
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
class Test {
|
||||
public static final int FOO = 0;
|
||||
public static final int BAR = 2;
|
||||
void foo() {
|
||||
System.out.println(FOO);
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
class Usage {
|
||||
void foo() {
|
||||
int i = Test.FOO;
|
||||
}
|
||||
|
||||
void bar(int i ) {
|
||||
i = B;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user