Minor: Move and rename KotlinFunctionSignatureComponent
This commit is contained in:
+1
-1
@@ -53,7 +53,7 @@
|
|||||||
<properties/>
|
<properties/>
|
||||||
<border type="none" title="Signature Preview"/>
|
<border type="none" title="Signature Preview"/>
|
||||||
<children>
|
<children>
|
||||||
<component id="7722b" class="org.jetbrains.kotlin.idea.refactoring.introduce.extractFunction.ui.KotlinFunctionSignatureComponent" binding="signaturePreviewField" custom-create="true">
|
<component id="7722b" class="org.jetbrains.kotlin.idea.refactoring.introduce.ui.KotlinSignatureComponent" binding="signaturePreviewField" custom-create="true">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false">
|
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false">
|
||||||
<minimum-size width="500" height="100"/>
|
<minimum-size width="500" height="100"/>
|
||||||
|
|||||||
+3
-2
@@ -34,6 +34,7 @@ import org.jetbrains.kotlin.idea.core.KotlinNameSuggester;
|
|||||||
import org.jetbrains.kotlin.idea.refactoring.KotlinRefactoringUtilKt;
|
import org.jetbrains.kotlin.idea.refactoring.KotlinRefactoringUtilKt;
|
||||||
import org.jetbrains.kotlin.idea.refactoring.KotlinRefactoringBundle;
|
import org.jetbrains.kotlin.idea.refactoring.KotlinRefactoringBundle;
|
||||||
import org.jetbrains.kotlin.idea.refactoring.introduce.extractionEngine.*;
|
import org.jetbrains.kotlin.idea.refactoring.introduce.extractionEngine.*;
|
||||||
|
import org.jetbrains.kotlin.idea.refactoring.introduce.ui.KotlinSignatureComponent;
|
||||||
import org.jetbrains.kotlin.idea.util.IdeDescriptorRenderers;
|
import org.jetbrains.kotlin.idea.util.IdeDescriptorRenderers;
|
||||||
import org.jetbrains.kotlin.lexer.KtTokens;
|
import org.jetbrains.kotlin.lexer.KtTokens;
|
||||||
import org.jetbrains.kotlin.types.KotlinType;
|
import org.jetbrains.kotlin.types.KotlinType;
|
||||||
@@ -49,7 +50,7 @@ public class KotlinExtractFunctionDialog extends DialogWrapper {
|
|||||||
private JPanel contentPane;
|
private JPanel contentPane;
|
||||||
private TitledSeparator inputParametersPanel;
|
private TitledSeparator inputParametersPanel;
|
||||||
private JComboBox visibilityBox;
|
private JComboBox visibilityBox;
|
||||||
private KotlinFunctionSignatureComponent signaturePreviewField;
|
private KotlinSignatureComponent signaturePreviewField;
|
||||||
private JPanel functionNamePanel;
|
private JPanel functionNamePanel;
|
||||||
private NameSuggestionsField functionNameField;
|
private NameSuggestionsField functionNameField;
|
||||||
private JLabel functionNameLabel;
|
private JLabel functionNameLabel;
|
||||||
@@ -82,7 +83,7 @@ public class KotlinExtractFunctionDialog extends DialogWrapper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void createUIComponents() {
|
private void createUIComponents() {
|
||||||
this.signaturePreviewField = new KotlinFunctionSignatureComponent("", project);
|
this.signaturePreviewField = new KotlinSignatureComponent("", project);
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isVisibilitySectionAvailable() {
|
private boolean isVisibilitySectionAvailable() {
|
||||||
|
|||||||
+3
-3
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2010-2015 JetBrains s.r.o.
|
* Copyright 2010-2016 JetBrains s.r.o.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -14,13 +14,13 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jetbrains.kotlin.idea.refactoring.introduce.extractFunction.ui
|
package org.jetbrains.kotlin.idea.refactoring.introduce.ui
|
||||||
|
|
||||||
import com.intellij.openapi.project.Project
|
import com.intellij.openapi.project.Project
|
||||||
import org.jetbrains.kotlin.idea.KotlinFileType
|
import org.jetbrains.kotlin.idea.KotlinFileType
|
||||||
import com.intellij.refactoring.ui.MethodSignatureComponent
|
import com.intellij.refactoring.ui.MethodSignatureComponent
|
||||||
|
|
||||||
class KotlinFunctionSignatureComponent(
|
class KotlinSignatureComponent(
|
||||||
signature: String, project: Project
|
signature: String, project: Project
|
||||||
) : MethodSignatureComponent(signature, project, KotlinFileType.INSTANCE) {
|
) : MethodSignatureComponent(signature, project, KotlinFileType.INSTANCE) {
|
||||||
private val myFileName = "dummy." + KotlinFileType.EXTENSION
|
private val myFileName = "dummy." + KotlinFileType.EXTENSION
|
||||||
Reference in New Issue
Block a user