Make plugin compatible with idea version 2022.1
This commit is contained in:
parent
4fc3b1a11a
commit
ed602312de
|
|
@ -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.3.0"
|
||||
id("org.jetbrains.kotlin.jvm") version "1.5.10"
|
||||
id("org.jetbrains.intellij") version "1.5.2"
|
||||
id("org.jetbrains.kotlin.jvm") version "1.6.20"
|
||||
}
|
||||
|
||||
group = properties("pluginGroup")
|
||||
|
|
|
|||
|
|
@ -3,13 +3,13 @@ kotlin.code.style=official
|
|||
|
||||
pluginGroup = de.idetools
|
||||
pluginName = filename_template
|
||||
pluginVersion = 1.2.0-213
|
||||
platformVersion = 2021.3
|
||||
pluginVersion = 1.2.0-221
|
||||
platformVersion = 2022.1
|
||||
|
||||
# Java language level used to compile sources and to generate the files for - Java 11 is required since 2020.3
|
||||
javaVersion = 11
|
||||
|
||||
gradleVersion = 7.3
|
||||
gradleVersion = 7.4.2
|
||||
|
||||
# Opt-out flag for bundling Kotlin standard library.
|
||||
# See https://plugins.jetbrains.com/docs/intellij/kotlin.html#kotlin-standard-library for details.
|
||||
|
|
|
|||
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
|
|
@ -1,5 +1,5 @@
|
|||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import com.intellij.icons.AllIcons
|
|||
import com.intellij.ide.IdeBundle
|
||||
import com.intellij.ide.actions.CreateFileAction
|
||||
import com.intellij.ide.ui.newItemPopup.NewItemPopupUtil
|
||||
import com.intellij.lang.LangBundle
|
||||
import com.intellij.openapi.actionSystem.AnActionEvent
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.openapi.ui.InputValidatorEx
|
||||
|
|
@ -41,7 +40,7 @@ class CreateFileWithFilenameTemplateAction :
|
|||
override fun invokeDialog(
|
||||
project: Project,
|
||||
directory: PsiDirectory,
|
||||
elementsConsumer: Consumer<Array<PsiElement?>?>
|
||||
elementsConsumer: Consumer<in Array<PsiElement>>
|
||||
) {
|
||||
val settings: FilenameTemplateSettingsState = FilenameTemplateSettingsState.instance
|
||||
settings.filenameTemplates.forEach {
|
||||
|
|
@ -68,11 +67,7 @@ class CreateFileWithFilenameTemplateAction :
|
|||
popup.closeOk(event)
|
||||
elementsConsumer.accept(validator.createdElements)
|
||||
} else {
|
||||
val errorMessage =
|
||||
if (validator is InputValidatorEx)
|
||||
(validator as InputValidatorEx).getErrorText(name)
|
||||
else
|
||||
LangBundle.message("incorrect.name")
|
||||
val errorMessage = (validator as InputValidatorEx).getErrorText(name)
|
||||
contentPanel.setError(errorMessage)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user