From a8416cecca89510764dbd3f24603cc5ba4e40017 Mon Sep 17 00:00:00 2001 From: Piotr Kukielka Date: Mon, 5 Aug 2024 17:41:06 +0200 Subject: [PATCH] Minor changes for review --- .../config/actions/OpenCodySettingsEditorAction.kt | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/main/kotlin/com/sourcegraph/cody/config/actions/OpenCodySettingsEditorAction.kt b/src/main/kotlin/com/sourcegraph/cody/config/actions/OpenCodySettingsEditorAction.kt index c884162d35..85fc6bff62 100644 --- a/src/main/kotlin/com/sourcegraph/cody/config/actions/OpenCodySettingsEditorAction.kt +++ b/src/main/kotlin/com/sourcegraph/cody/config/actions/OpenCodySettingsEditorAction.kt @@ -17,12 +17,7 @@ import kotlin.io.path.name class OpenCodySettingsEditorAction : DumbAwareEDTAction("Open Cody Settings Editor") { override fun actionPerformed(e: AnActionEvent) { - val project = - e.project - ?: run { - logger.warn("Project cannot be null") - return - } + val project = e.project ?: return val settingsVf = CodyEditorUtil.createFileOrScratchFromUntitled( @@ -51,10 +46,12 @@ class OpenCodySettingsEditorAction : DumbAwareEDTAction("Open Cody Settings Edit configName, JsonSchemaVersion.SCHEMA_7, schemaFile.toString(), - false, + /* applicationDefined = */ false, listOf( UserDefinedJsonSchemaConfiguration.Item( - "*/${ConfigUtil.getSettingsFile(project).name}", true, false))) + "*/${ConfigUtil.getSettingsFile(project).name}", + /* isPattern = */ true, + /* isDirectory = */ false))) val schemaMapping = JsonSchemaMappingsProjectConfiguration.getInstance(project)