Support secondary constructors and delegation calls in Change Signature.
Initial support of Find Usages
This commit is contained in:
committed by
Alexey Sedunov
parent
488754de7d
commit
e05cbf5e9f
@@ -359,6 +359,11 @@ public class JetPsiFactory(private val project: Project) {
|
||||
return createClass("class A: $text").getDelegationSpecifiers().first() as JetDelegatorToSuperCall
|
||||
}
|
||||
|
||||
public fun createConstructorDelegationCall(text: String): JetConstructorDelegationCall {
|
||||
val colonOrEmpty = if (text.isEmpty()) "" else ": "
|
||||
return createClass("class A { constructor()$colonOrEmpty$text {}").getSecondaryConstructors().first().getDelegationCall()!!
|
||||
}
|
||||
|
||||
public inner class IfChainBuilder() {
|
||||
private val sb = StringBuilder()
|
||||
private var first = true
|
||||
|
||||
@@ -83,7 +83,7 @@ public class JetSecondaryConstructor extends JetDeclarationStub<KotlinPlaceHolde
|
||||
@Nullable
|
||||
@Override
|
||||
public PsiElement getColon() {
|
||||
return null;
|
||||
return findChildByType(JetTokens.COLON);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
||||
Reference in New Issue
Block a user