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:
anna
2013-04-12 18:31:06 +02:00
parent 2447ab7c9d
commit 33dee73821
10 changed files with 104 additions and 35 deletions
@@ -0,0 +1,12 @@
public enum EEnum {
FOO(0);
private int value;
public int getValue() {
return value;
}
EEnum(int value) {
this.value = value;
}
}
@@ -0,0 +1,6 @@
class Test {
public static final int BAR = 2;
void foo() {
System.out.println(EEnum.FOO.getValue());
}
}
@@ -0,0 +1,9 @@
class Usage {
void foo() {
EEnum i = EEnum.FOO;
}
void bar(int i ) {
i = B;
}
}
@@ -0,0 +1,7 @@
class Test {
public static final int FOO = 0;
public static final int BAR = 2;
void foo() {
System.out.println(FOO);
}
}
@@ -0,0 +1,9 @@
class Usage {
void foo() {
int i = Test.FOO;
}
void bar(int i ) {
i = B;
}
}