mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
introduce constant: reuse existing inner class when extracting from enum constant (IDEA-95810)
(cherry picked from commit d5a3ed5aded47303990ca4a3bc70d9817428edf7)
This commit is contained in:
+4
@@ -3,4 +3,8 @@ enum TestEnum {
|
||||
|
||||
TestEnum(String str) {
|
||||
}
|
||||
|
||||
private class Constants {
|
||||
void foo(){}
|
||||
}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
enum TestEnum {
|
||||
ONE("te<caret>stString");
|
||||
|
||||
TestEnum(String str) {
|
||||
}
|
||||
|
||||
private static class Constants {
|
||||
public static final String FOO = "";
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
enum TestEnum {
|
||||
ONE(Constants.xxx);
|
||||
|
||||
TestEnum(String str) {
|
||||
}
|
||||
|
||||
private static class Constants {
|
||||
public static final String FOO = "";
|
||||
public static final String xxx = "testString";
|
||||
}
|
||||
}
|
||||
+6
-2
@@ -1,10 +1,14 @@
|
||||
enum TestEnum {
|
||||
ONE(Constants.xxx);
|
||||
ONE(Constants1.xxx);
|
||||
|
||||
TestEnum(String str) {
|
||||
}
|
||||
|
||||
private class Constants {
|
||||
private static class Constants1 {
|
||||
public static final String xxx = "testString";
|
||||
}
|
||||
|
||||
private class Constants {
|
||||
void foo(){}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user