Community
Participate
Working Groups
I have the following code: ------------------------------------------------ package test; public @interface Test { E e() default X; enum E { X, Y, Z } } ------------------------------------------------ In the above context, "default X" can mean only one thing: "default E.X". Unfortunately, quick fix only offers two options "create field X" and "create constant X", both of which don't even produce compilable code. Instead, the following two options would be very useful: 1. Static import E.X 2. Qualify X to be E.X The respective output of the two refactorings would be: 1. Static import E.X ------------------------------------------------ package test; import static test.Test.E.X; public @interface Test { E e() default X; enum E { X, Y, Z } } ------------------------------------------------ 2. Qualify X to be E.X ------------------------------------------------ package test; public @interface Test { E e() default E.X; enum E { X, Y, Z } } ------------------------------------------------