From a402e6d40f7017a74cc8a7275bde25fd27cefd26 Mon Sep 17 00:00:00 2001 From: Piotr Kukielka Date: Wed, 31 Jul 2024 12:09:51 +0200 Subject: [PATCH] Fix CodyActionPromoter --- .../com/sourcegraph/cody/util/CodyIntegrationTextFixture.kt | 2 +- src/main/kotlin/com/sourcegraph/cody/edit/EditCommandPrompt.kt | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/integrationTest/kotlin/com/sourcegraph/cody/util/CodyIntegrationTextFixture.kt b/src/integrationTest/kotlin/com/sourcegraph/cody/util/CodyIntegrationTextFixture.kt index 08f6cb1f8c..aca42e5816 100644 --- a/src/integrationTest/kotlin/com/sourcegraph/cody/util/CodyIntegrationTextFixture.kt +++ b/src/integrationTest/kotlin/com/sourcegraph/cody/util/CodyIntegrationTextFixture.kt @@ -39,9 +39,9 @@ open class CodyIntegrationTextFixture : BasePlatformTestCase(), LensListener { override fun setUp() { super.setUp() + myProject = project configureFixture() checkInitialConditions() - myProject = project LensesService.getInstance(project).addListener(this) } diff --git a/src/main/kotlin/com/sourcegraph/cody/edit/EditCommandPrompt.kt b/src/main/kotlin/com/sourcegraph/cody/edit/EditCommandPrompt.kt index 1f411bd0bd..05ed980b83 100644 --- a/src/main/kotlin/com/sourcegraph/cody/edit/EditCommandPrompt.kt +++ b/src/main/kotlin/com/sourcegraph/cody/edit/EditCommandPrompt.kt @@ -279,6 +279,8 @@ class EditCommandPrompt( shape = makeCornerShape(width, height) updateDialogPosition() isVisible = true + + project.putUserData(EDIT_COMMAND_PROMPT_KEY, this) } fun isOkActionEnabled() = okButtonGroup.isEnabled && model != null