From 49b94aae698bc4d700caa634346107642f26e734 Mon Sep 17 00:00:00 2001 From: Matthias Gugel Date: Thu, 4 Apr 2024 07:14:25 +0200 Subject: [PATCH] Make plugin compatible with idea version 2024.1 --- .idea/kotlinc.xml | 2 +- build.gradle.kts | 4 ++-- gradle.properties | 4 ++-- .../filename_template/CreateFileWithFilenameTemplateAction.kt | 3 ++- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.idea/kotlinc.xml b/.idea/kotlinc.xml index fdf8d99..ae3f30a 100644 --- a/.idea/kotlinc.xml +++ b/.idea/kotlinc.xml @@ -1,6 +1,6 @@ - \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts index e2711b0..48107ce 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -3,8 +3,8 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile fun properties(key: String) = project.findProperty(key).toString() plugins { - id("org.jetbrains.intellij") version "1.15.0" - id("org.jetbrains.kotlin.jvm") version "1.9.0" + id("org.jetbrains.intellij") version "1.17.3" + id("org.jetbrains.kotlin.jvm") version "1.9.21" } group = properties("pluginGroup") diff --git a/gradle.properties b/gradle.properties index 8c2dcf3..c3cb524 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,8 +3,8 @@ kotlin.code.style=official pluginGroup = de.idetools pluginName = filename_template -pluginVersion = 1.2.0-233 -platformVersion = 2023.3 +pluginVersion = 1.2.0-241 +platformVersion = 2024.1 # Java language level used to compile sources and to generate the files for - Java 11 is required since 2020.3 javaVersion = 17 diff --git a/src/main/kotlin/de/idetools/filename_template/CreateFileWithFilenameTemplateAction.kt b/src/main/kotlin/de/idetools/filename_template/CreateFileWithFilenameTemplateAction.kt index 06ec264..b0b4cee 100644 --- a/src/main/kotlin/de/idetools/filename_template/CreateFileWithFilenameTemplateAction.kt +++ b/src/main/kotlin/de/idetools/filename_template/CreateFileWithFilenameTemplateAction.kt @@ -14,10 +14,11 @@ import de.idetools.filename_template.placeholders.* import de.idetools.filename_template.settings.FilenameTemplateSettingsState import java.awt.event.InputEvent import java.util.function.Consumer +import java.util.function.Supplier import kotlin.math.max class CreateFileWithFilenameTemplateAction : - CreateFileAction("Filename Template", "Create a new file based on template", AllIcons.Actions.AddFile) { + CreateFileAction(Supplier { "Filename Template"}, Supplier { "Create a new file based on template"}, Supplier { AllIcons.Actions.AddFile }) { private val placeholders: List = listOf( EpochPlaceholder(),