Introduce Variable: Fix offset to start template at
#KT-8162 Fixed
This commit is contained in:
+2
-1
@@ -37,12 +37,13 @@ import org.jetbrains.kotlin.psi.psiUtil.getNonStrictParentOfType
|
||||
import java.awt.BorderLayout
|
||||
|
||||
public abstract class AbstractKotlinInplaceIntroducer<D: JetNamedDeclaration>(
|
||||
localVariable: D?,
|
||||
expression: JetExpression?,
|
||||
occurrences: Array<JetExpression>,
|
||||
title: String,
|
||||
project: Project,
|
||||
editor: Editor
|
||||
): AbstractInplaceIntroducer<D, JetExpression>(project, editor, expression, null, occurrences, title, JetFileType.INSTANCE) {
|
||||
): AbstractInplaceIntroducer<D, JetExpression>(project, editor, expression, localVariable, occurrences, title, JetFileType.INSTANCE) {
|
||||
protected fun initFormComponents(init: FormBuilder.() -> Unit) {
|
||||
myWholePanel.setLayout(BorderLayout())
|
||||
|
||||
|
||||
+1
@@ -53,6 +53,7 @@ public class KotlinInplaceParameterIntroducer(
|
||||
project: Project,
|
||||
editor: Editor
|
||||
): AbstractKotlinInplaceIntroducer<JetParameter>(
|
||||
null,
|
||||
originalDescriptor.originalRange.elements.single() as JetExpression,
|
||||
originalDescriptor.occurrencesToReplace
|
||||
.map { it.elements.single() as JetExpression }
|
||||
|
||||
+1
@@ -52,6 +52,7 @@ public class KotlinVariableInplaceIntroducer(
|
||||
project: Project,
|
||||
editor: Editor
|
||||
): AbstractKotlinInplaceIntroducer<JetProperty>(
|
||||
addedVariable,
|
||||
originalExpression,
|
||||
occurrencesToReplace,
|
||||
KotlinIntroduceVariableHandler.INTRODUCE_VARIABLE,
|
||||
|
||||
Reference in New Issue
Block a user