From 27ba9b54815efd31dfe04da958feaa93504a2009 Mon Sep 17 00:00:00 2001 From: Nikolay Krasko Date: Thu, 28 Feb 2019 13:41:54 +0300 Subject: [PATCH] Fix Goto tests by invoking action directly instead of using handler Problem introduced in https://github.com/JetBrains/intellij-community/commit/1f7f3d9fdc2bf849be9a73cd8be4d6a83641ca7a Implementation CodeInsightActionHandler was returned for GotoDeclarationAction later. --- .../kotlin/idea/navigation/AbstractGotoActionTest.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/idea/tests/org/jetbrains/kotlin/idea/navigation/AbstractGotoActionTest.kt b/idea/tests/org/jetbrains/kotlin/idea/navigation/AbstractGotoActionTest.kt index 1b5707cf37a..a3d149aeada 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/navigation/AbstractGotoActionTest.kt +++ b/idea/tests/org/jetbrains/kotlin/idea/navigation/AbstractGotoActionTest.kt @@ -5,7 +5,7 @@ package org.jetbrains.kotlin.idea.navigation -import com.intellij.codeInsight.CodeInsightActionHandler +import com.intellij.codeInsight.actions.CodeInsightAction import com.intellij.openapi.actionSystem.ActionManager import com.intellij.openapi.fileEditor.FileEditorManager import com.intellij.openapi.fileEditor.ex.FileEditorManagerEx @@ -23,8 +23,8 @@ abstract class AbstractGotoActionTest : KotlinLightCodeInsightFixtureTestCase() myFixture.configureByText(KotlinFileType.INSTANCE, parts[0]) - val gotoAction = ActionManager.getInstance().getAction(actionName) as CodeInsightActionHandler - gotoAction.invoke(project, myFixture.editor, myFixture.file) + val gotoAction = ActionManager.getInstance().getAction(actionName) as CodeInsightAction + gotoAction.actionPerformedImpl(project, myFixture.editor) val fileEditorManager = FileEditorManager.getInstance(myFixture.project) as FileEditorManagerEx val currentEditor = fileEditorManager.selectedTextEditor ?: editor