mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
extract light method object: create class initializer if there is no place to put initializer (IDEA-131912)
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
class Sample {
|
||||
|
||||
void a() {
|
||||
System.out.println("");
|
||||
<caret>}
|
||||
|
||||
private int foo() {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
class Sample {
|
||||
|
||||
void a() {
|
||||
class Local {
|
||||
|
||||
<caret>}
|
||||
}
|
||||
|
||||
private int foo() {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
class Sample {
|
||||
static {<caret>}
|
||||
|
||||
int foo() {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
class Sample {
|
||||
int <caret>i = 0;
|
||||
|
||||
int foo() {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
class Sample {
|
||||
public Sample() {
|
||||
<caret>super();
|
||||
}
|
||||
|
||||
int foo() {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user