Make plugin compatible with idea version 2022.3
This commit is contained in:
parent
558e565606
commit
bb6e5398a6
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="CompilerConfiguration">
|
<component name="CompilerConfiguration">
|
||||||
<bytecodeTargetLevel target="1.8" />
|
<bytecodeTargetLevel target="17" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
||||||
6
.idea/kotlinc.xml
Normal file
6
.idea/kotlinc.xml
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="KotlinJpsPluginSettings">
|
||||||
|
<option name="version" value="1.7.22" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
<component name="FrameworkDetectionExcludesConfiguration">
|
<component name="FrameworkDetectionExcludesConfiguration">
|
||||||
<file type="web" url="file://$PROJECT_DIR$" />
|
<file type="web" url="file://$PROJECT_DIR$" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_14" default="true" project-jdk-name="openjdk-14" project-jdk-type="JavaSDK">
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" project-jdk-name="openjdk-19" project-jdk-type="JavaSDK">
|
||||||
<output url="file://$PROJECT_DIR$/out" />
|
<output url="file://$PROJECT_DIR$/out" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="ProjectModuleManager">
|
|
||||||
<modules>
|
|
||||||
<module fileurl="file://$PROJECT_DIR$/.idea/filename_template-merge.iml" filepath="$PROJECT_DIR$/.idea/filename_template-merge.iml" />
|
|
||||||
</modules>
|
|
||||||
</component>
|
|
||||||
</project>
|
|
||||||
|
|
@ -3,8 +3,8 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||||
fun properties(key: String) = project.findProperty(key).toString()
|
fun properties(key: String) = project.findProperty(key).toString()
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id("org.jetbrains.intellij") version "1.5.2"
|
id("org.jetbrains.intellij") version "1.10.0"
|
||||||
id("org.jetbrains.kotlin.jvm") version "1.6.20"
|
id("org.jetbrains.kotlin.jvm") version "1.7.22"
|
||||||
}
|
}
|
||||||
|
|
||||||
group = properties("pluginGroup")
|
group = properties("pluginGroup")
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,8 @@ kotlin.code.style=official
|
||||||
|
|
||||||
pluginGroup = de.idetools
|
pluginGroup = de.idetools
|
||||||
pluginName = filename_template
|
pluginName = filename_template
|
||||||
pluginVersion = 1.2.0-222
|
pluginVersion = 1.2.0-223
|
||||||
platformVersion = 2022.2
|
platformVersion = 2022.3
|
||||||
|
|
||||||
# Java language level used to compile sources and to generate the files for - Java 11 is required since 2020.3
|
# Java language level used to compile sources and to generate the files for - Java 11 is required since 2020.3
|
||||||
javaVersion = 11
|
javaVersion = 11
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,9 @@ import com.intellij.openapi.util.Trinity
|
||||||
import javax.swing.Icon
|
import javax.swing.Icon
|
||||||
|
|
||||||
class CreateWithFilenameTemplateDialogPanel(templates: List<Trinity<String, Icon, String>>) :
|
class CreateWithFilenameTemplateDialogPanel(templates: List<Trinity<String, Icon, String>>) :
|
||||||
CreateWithTemplatesDialogPanel(templates, templates.first().first) {
|
CreateWithTemplatesDialogPanel(templates.first().first, templates.map {
|
||||||
|
trinity -> TemplatePresentation(trinity.first, trinity.second, trinity.third)
|
||||||
|
}) {
|
||||||
|
|
||||||
init {
|
init {
|
||||||
updateSelectedText()
|
updateSelectedText()
|
||||||
|
|
@ -15,7 +17,7 @@ class CreateWithFilenameTemplateDialogPanel(templates: List<Trinity<String, Icon
|
||||||
private fun updateSelectedText() {
|
private fun updateSelectedText() {
|
||||||
val selectedValue = myTemplatesList.selectedValue
|
val selectedValue = myTemplatesList.selectedValue
|
||||||
if (selectedValue != null) {
|
if (selectedValue != null) {
|
||||||
var filename = selectedValue.third
|
var filename = selectedValue.templateName
|
||||||
val caretPosition = determineCaretPosition(filename)
|
val caretPosition = determineCaretPosition(filename)
|
||||||
filename = filename.replace("{|}", "")
|
filename = filename.replace("{|}", "")
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user