mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 15:27:45 +07:00
create constructor from usage: use "override method body" template when super class contains no default constructor
This commit is contained in:
+16
@@ -0,0 +1,16 @@
|
||||
// "Create Constructor" "true"
|
||||
class Test extends A{
|
||||
|
||||
public Test(String a) {
|
||||
<selection>//To change body of created methods use File | Settings | File Templates.</selection>
|
||||
}
|
||||
|
||||
public void t() {
|
||||
new Test("a"){};
|
||||
}
|
||||
}
|
||||
|
||||
class A {
|
||||
A(String s){}
|
||||
A(){}
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
// "Create Constructor" "true"
|
||||
class Test extends A{
|
||||
|
||||
public Test(String a) {
|
||||
<selection>//To change body of created methods use File | Settings | File Templates.</selection>
|
||||
}
|
||||
|
||||
public void t() {
|
||||
new Test("a"){};
|
||||
}
|
||||
}
|
||||
|
||||
class A {
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
// "Create Constructor" "true"
|
||||
class Test extends A{
|
||||
|
||||
public Test(String a) {
|
||||
<selection>super(a); //To change body of overridden methods use File | Settings | File Templates.</selection>
|
||||
}
|
||||
|
||||
public void t() {
|
||||
new Test("a"){};
|
||||
}
|
||||
}
|
||||
|
||||
class A {
|
||||
A(String s){}
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
// "Create Constructor" "true"
|
||||
class Test extends A{
|
||||
|
||||
public void t() {
|
||||
new Test(<caret>"a"){};
|
||||
}
|
||||
}
|
||||
|
||||
class A {
|
||||
A(String s){}
|
||||
A(){}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
// "Create Constructor" "true"
|
||||
class Test extends A{
|
||||
|
||||
public void t() {
|
||||
new Test(<caret>"a"){};
|
||||
}
|
||||
}
|
||||
|
||||
class A {
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
// "Create Constructor" "true"
|
||||
class Test extends A{
|
||||
|
||||
public void t() {
|
||||
new Test(<caret>"a"){};
|
||||
}
|
||||
}
|
||||
|
||||
class A {
|
||||
A(String s){}
|
||||
}
|
||||
Reference in New Issue
Block a user