mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-18 08:50:57 +07:00
@Override quick fixes: suggest to pull method up; pull members up, extract interface/superclass (IDEA-55720 )
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
// "Pull method 'foo' to 'Int'" "true"
|
||||
public class Test implements Int {
|
||||
@Override
|
||||
public void foo(){}
|
||||
}
|
||||
|
||||
interface Int {
|
||||
void foo();
|
||||
}
|
||||
@@ -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();
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// "Pull method 'foo' to 'Int'" "true"
|
||||
public class Test implements Int {
|
||||
@Overr<caret>ide
|
||||
void foo(){}
|
||||
}
|
||||
|
||||
interface Int {}
|
||||
@@ -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(){}
|
||||
}
|
||||
@@ -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 {}
|
||||
@@ -0,0 +1,13 @@
|
||||
// "Extract interface" "false"
|
||||
public class Test{
|
||||
void main(){
|
||||
new Int(){
|
||||
@Overr<caret>ide
|
||||
void foo(){
|
||||
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
class Int {}
|
||||
@@ -0,0 +1,7 @@
|
||||
import java.util.ArrayList;
|
||||
public abstract class Test extends ArrayList<String> implements Int {
|
||||
@Overr<caret>ide
|
||||
void foo(){}
|
||||
}
|
||||
|
||||
interface Int {}
|
||||
Reference in New Issue
Block a user