Shorter quickfix names
This commit is contained in:
@@ -100,7 +100,7 @@ public object SuperClassNotInitialized : JetIntentionActionsFactory() {
|
||||
override fun getText(): String {
|
||||
return "Add constructor parameters from " +
|
||||
superConstructor.getContainingDeclaration().getName().asString() +
|
||||
DescriptorRenderer.SHORT_NAMES_IN_TYPES.renderFunctionParameters(superConstructor)
|
||||
superConstructor.getValueParameters().map { DescriptorRenderer.SHORT_NAMES_IN_TYPES.renderType(it.getType()) }.joinToString(", ", "(", ")")
|
||||
}
|
||||
|
||||
override fun invoke(project: Project, editor: Editor?, file: JetFile) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Add constructor parameters from Base(p1: Int, p2: Int)" "true"
|
||||
open class Base(p1: Int, private val p2: Int)
|
||||
// "Add constructor parameters from Base(Int, Int)" "true"
|
||||
open class Base(p1: Int, private val p2: Int = 0)
|
||||
|
||||
class C(p: Int) : Base<caret>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Add constructor parameters from Base(p1: Int, p2: Int)" "true"
|
||||
open class Base(p1: Int, private val p2: Int)
|
||||
// "Add constructor parameters from Base(Int, Int)" "true"
|
||||
open class Base(p1: Int, private val p2: Int = 0)
|
||||
|
||||
class C(p: Int, p1: Int, p2: Int) : Base<caret>(p1, p2)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Add constructor parameters from Base(p1: Int, p2: Int)" "true"
|
||||
// "Add constructor parameters from Base(Int, Int)" "true"
|
||||
open class Base(p1: Int, val p2: Int)
|
||||
|
||||
class C : Base<caret>
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Add constructor parameters from Base(p1: Int, p2: Int)" "true"
|
||||
// "Add constructor parameters from Base(Int, Int)" "true"
|
||||
open class Base(p1: Int, val p2: Int)
|
||||
|
||||
class C(p1: Int, p2: Int) : Base<caret>(p1, p2)
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Add constructor parameters from Base(p1: T, p2: String, p3: Base<T, String>?)" "true"
|
||||
// "Add constructor parameters from Base(T, String, Base<T, String>?)" "true"
|
||||
trait I
|
||||
|
||||
open class Base<T1, T2>(p1: T1, p2: T2, p3: Base<T1, T2>?)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Add constructor parameters from Base(p1: T, p2: String, p3: Base<T, String>?)" "true"
|
||||
// "Add constructor parameters from Base(T, String, Base<T, String>?)" "true"
|
||||
trait I
|
||||
|
||||
open class Base<T1, T2>(p1: T1, p2: T2, p3: Base<T1, T2>?)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Add constructor parameters from Base(p1: Int, p2: Int)" "true"
|
||||
// "Add constructor parameters from Base(Int, Int)" "true"
|
||||
open class Base(p1: Int, val p2: Int)
|
||||
|
||||
class C private : Base<caret>
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Add constructor parameters from Base(p1: Int, p2: Int)" "true"
|
||||
// "Add constructor parameters from Base(Int, Int)" "true"
|
||||
open class Base(p1: Int, val p2: Int)
|
||||
|
||||
class C private (p1: Int, p2: Int) : Base<caret>(p1, p2)
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Add constructor parameters from Base(`fun`: Int, `class`: Int)" "true"
|
||||
// "Add constructor parameters from Base(Int, Int)" "true"
|
||||
open class Base(`fun`: Int, val `class`: Int)
|
||||
|
||||
class C : Base<caret>
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Add constructor parameters from Base(`fun`: Int, `class`: Int)" "true"
|
||||
// "Add constructor parameters from Base(Int, Int)" "true"
|
||||
open class Base(`fun`: Int, val `class`: Int)
|
||||
|
||||
class C(`fun`: Int, `class`: Int) : Base(`fun`, `class`)
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Add constructor parameters from Base(s: String)" "true"
|
||||
// "Add constructor parameters from Base(String)" "true"
|
||||
open class Base private(p1: Int, val p2: Int) {
|
||||
private constructor() : this(0, 1)
|
||||
protected constructor(s: String) : this(s.length(), 1)
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// "Add constructor parameters from Base(s: String)" "true"
|
||||
// "Add constructor parameters from Base(String)" "true"
|
||||
open class Base private(p1: Int, val p2: Int) {
|
||||
private constructor() : this(0, 1)
|
||||
protected constructor(s: String) : this(s.length(), 1)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Add constructor parameters from Base(p1: Int, p2: Int, p3: Any, p4: String, p5: String)" "true"
|
||||
// "Add constructor parameters from Base(Int, Int, Any, String, String)" "true"
|
||||
// ERROR: Redeclaration: p4
|
||||
// ERROR: Redeclaration: p4
|
||||
// ERROR: Redeclaration: p4
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Add constructor parameters from Base(p1: Int, p2: Int, p3: Any, p4: String, p5: String)" "true"
|
||||
// "Add constructor parameters from Base(Int, Int, Any, String, String)" "true"
|
||||
// ERROR: Redeclaration: p4
|
||||
// ERROR: Redeclaration: p4
|
||||
// ERROR: Redeclaration: p4
|
||||
|
||||
Reference in New Issue
Block a user