Refactored "Change to constructor invocation" and new "Add constructor parameters and use them" quickfixes into one factory, making the first one always available

This commit is contained in:
Valentin Kipyatkov
2015-05-08 20:27:39 +03:00
parent cd419c2ddf
commit a5dabac296
10 changed files with 136 additions and 207 deletions
@@ -1,4 +1,4 @@
// "Add constructor parameters and use them" "false"
// "class org.jetbrains.kotlin.idea.quickfix.SuperClassNotInitialized$AddParametersFix" "false"
// ACTION: Change to constructor invocation
// ERROR: This type has a constructor, and thus must be initialized here
open class Base
@@ -1,4 +1,4 @@
// "class org.jetbrains.kotlin.idea.quickfix.ChangeToConstructorInvocationFix" "false"
// ERROR: This type has a constructor, and thus must be initialized here
// "Change to constructor invocation" "true"
// ERROR: No value passed for parameter x
open class A(x : Int) {}
class B : A<caret> {}
@@ -0,0 +1,4 @@
// "Change to constructor invocation" "true"
// ERROR: No value passed for parameter x
open class A(x : Int) {}
class B : A(<caret>) {}
@@ -1,3 +1,3 @@
// "Change to constructor invocation" "true"
open class A(x : Int = 42, vararg y : Int) {}
class B() : A<caret>() {}
class B() : A(<caret>) {}