@Override quick fixes: suggest to pull method up; pull members up, extract interface/superclass (IDEA-55720 )

This commit is contained in:
anna
2011-09-06 11:37:53 +02:00
parent 4373ad6cfb
commit c09410b3b5
13 changed files with 385 additions and 4 deletions

View File

@@ -0,0 +1,9 @@
// "Pull method 'foo' to 'Int'" "true"
public class Test implements Int {
@Override
public void foo(){}
}
interface Int {
void foo();
}

View File

@@ -0,0 +1,15 @@
// "Pull method 'foo' up and make it abstract" "true"
public class Test{
void main(){
new Int(){
@Override
void foo(){
}
};
}
}
abstract class Int {
abstract void foo();
}

View File

@@ -0,0 +1,7 @@
// "Pull method 'foo' to 'Int'" "true"
public class Test implements Int {
@Overr<caret>ide
void foo(){}
}
interface Int {}

View File

@@ -0,0 +1,7 @@
// "Pull method 'foo' to 'List'" "false"
import java.util.List;
public abstract class Test implements List{
@Overr<caret>ide
void foo(){}
}

View File

@@ -0,0 +1,13 @@
// "Pull method 'foo' up and make it abstract" "true"
public class Test{
void main(){
new Int(){
@Overr<caret>ide
void foo(){
}
};
}
}
class Int {}

View File

@@ -0,0 +1,13 @@
// "Extract interface" "false"
public class Test{
void main(){
new Int(){
@Overr<caret>ide
void foo(){
}
};
}
}
class Int {}

View File

@@ -0,0 +1,7 @@
import java.util.ArrayList;
public abstract class Test extends ArrayList<String> implements Int {
@Overr<caret>ide
void foo(){}
}
interface Int {}