extract method: disable make static when extracting from default method; ensure static extracting from constant in interface (IDEA-134636)

This commit is contained in:
Anna Kozlova
2014-12-23 11:42:42 +01:00
parent a40532d63f
commit afc3e23260
6 changed files with 63 additions and 15 deletions
@@ -0,0 +1,3 @@
interface I {
String FOO = <selection>"hello";</selection>
}
@@ -0,0 +1,10 @@
import org.jetbrains.annotations.NotNull;
interface I {
String FOO = newMethod();
@NotNull
private static String newMethod() {
return "hello";
}
}
@@ -0,0 +1,5 @@
interface I {
static void foo () {
<selection>System.out.println("hello");</selection>
}
}
@@ -0,0 +1,9 @@
interface I {
static void foo () {
newMethod();
}
private static void newMethod() {
System.out.println("hello");
}
}