Introduce Lambda Parameter: Use IDEA-provided action
This commit is contained in:
@@ -116,13 +116,6 @@
|
|||||||
<add-to-group group-id="IntroduceActionsGroup" anchor="after" relative-to-action="IntroduceField"/>
|
<add-to-group group-id="IntroduceActionsGroup" anchor="after" relative-to-action="IntroduceField"/>
|
||||||
</action>
|
</action>
|
||||||
|
|
||||||
<action id="IntroduceLambdaParameter"
|
|
||||||
class="org.jetbrains.kotlin.idea.refactoring.introduce.introduceParameter.IntroduceLambdaParameterAction"
|
|
||||||
text="La_mbda Parameter...">
|
|
||||||
<keyboard-shortcut keymap="$default" first-keystroke="control shift P"/>
|
|
||||||
<add-to-group group-id="IntroduceActionsGroup" anchor="after" relative-to-action="IntroduceParameter"/>
|
|
||||||
</action>
|
|
||||||
|
|
||||||
<action id="CopyAsDiagnosticTest" class="org.jetbrains.kotlin.idea.actions.internal.CopyAsDiagnosticTestAction"
|
<action id="CopyAsDiagnosticTest" class="org.jetbrains.kotlin.idea.actions.internal.CopyAsDiagnosticTestAction"
|
||||||
text="Copy Current File As Diagnostic Test">
|
text="Copy Current File As Diagnostic Test">
|
||||||
<keyboard-shortcut keymap="$default" first-keystroke="control alt shift T"/>
|
<keyboard-shortcut keymap="$default" first-keystroke="control alt shift T"/>
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ class KotlinRefactoringSupportProvider : RefactoringSupportProvider() {
|
|||||||
|
|
||||||
override fun getIntroduceParameterHandler() = KotlinIntroduceParameterHandler()
|
override fun getIntroduceParameterHandler() = KotlinIntroduceParameterHandler()
|
||||||
|
|
||||||
fun getIntroduceLambdaParameterHandler(): RefactoringActionHandler = KotlinIntroduceLambdaParameterHandler()
|
override fun getIntroduceFunctionalParameterHandler() = KotlinIntroduceLambdaParameterHandler()
|
||||||
|
|
||||||
fun getIntroducePropertyHandler(): RefactoringActionHandler = KotlinIntroducePropertyHandler()
|
fun getIntroducePropertyHandler(): RefactoringActionHandler = KotlinIntroducePropertyHandler()
|
||||||
|
|
||||||
|
|||||||
-27
@@ -1,27 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2010-2015 JetBrains s.r.o.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package org.jetbrains.kotlin.idea.refactoring.introduce.introduceParameter
|
|
||||||
|
|
||||||
import com.intellij.lang.refactoring.RefactoringSupportProvider
|
|
||||||
import com.intellij.refactoring.RefactoringActionHandler
|
|
||||||
import org.jetbrains.kotlin.idea.refactoring.KotlinRefactoringSupportProvider
|
|
||||||
import org.jetbrains.kotlin.idea.refactoring.introduce.AbstractIntroduceAction
|
|
||||||
|
|
||||||
class IntroduceLambdaParameterAction : AbstractIntroduceAction() {
|
|
||||||
override fun getRefactoringHandler(provider: RefactoringSupportProvider): RefactoringActionHandler? =
|
|
||||||
(provider as? KotlinRefactoringSupportProvider)?.getIntroduceLambdaParameterHandler()
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user