User: rednesto
Date: 30 Sep 24 13:29
Revision: 50e016968d68c186da0de6a13c71031d13c46c44
Summary:
Remove creator test action
TeamCity URL: https://ci.mcdev.io/viewModification.html?tab=vcsModificationFiles&modId=9749&personal=false
Index: src/main/kotlin/creator/custom/EvaluateTemplateExpressionAction.kt
===================================================================
--- src/main/kotlin/creator/custom/EvaluateTemplateExpressionAction.kt (revision 3f69d9a59488c044ccd8eb7e4912141df5c27f27)
+++ src/main/kotlin/creator/custom/EvaluateTemplateExpressionAction.kt (revision 3f69d9a59488c044ccd8eb7e4912141df5c27f27)
@@ -1,81 +0,0 @@
-/*
- * Minecraft Development for IntelliJ
- *
- * https://mcdev.io/
- *
- * Copyright (C) 2024 minecraft-dev
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, version 3.0 only.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
- */
-
-package com.demonwav.mcdev.creator.custom
-
-import com.demonwav.mcdev.creator.custom.model.ClassFqn
-import com.intellij.openapi.actionSystem.AnAction
-import com.intellij.openapi.actionSystem.AnActionEvent
-import com.intellij.openapi.editor.EditorFactory
-import com.intellij.openapi.editor.ex.EditorEx
-import com.intellij.openapi.ui.DialogWrapper
-import com.intellij.openapi.util.Disposer
-import com.intellij.ui.components.JBTextField
-import com.intellij.ui.dsl.builder.Align
-import com.intellij.ui.dsl.builder.panel
-import javax.swing.JComponent
-
-class EvaluateTemplateExpressionAction : AnAction() {
- override fun actionPerformed(e: AnActionEvent) {
-
- val dialog = EvaluateDialog()
- dialog.isModal = false
- dialog.show()
- }
-
- private class EvaluateDialog : DialogWrapper(null, false, IdeModalityType.IDE) {
- val document = EditorFactory.getInstance().createDocument("")
- val editor = EditorFactory.getInstance().createEditor(document) as EditorEx
-
- lateinit var field: JBTextField
-
- init {
- title = "Evaluate Template Expression"
- isOKActionEnabled = true
- setValidationDelay(0)
-
- Disposer.register(disposable) {
- EditorFactory.getInstance().releaseEditor(editor)
- }
-
- init()
- }
-
- override fun createCenterPanel(): JComponent = panel {
- row {
- cell(editor.component).align(Align.FILL)
- }
-
- row("Result:") {
- field = textField().align(Align.FILL).component
- field.isEditable = false
- }
- }
-
- override fun doOKAction() {
- val props = mapOf(
- "BUILD_SYSTEM" to "gradle",
- "USE_PAPER_MANIFEST" to false,
- "MAIN_CLASS" to ClassFqn("io.github.rednesto.test.Test")
- )
- field.text = TemplateEvaluator.evaluate(props, document.text).toString()
- }
- }
-}
Index: src/main/resources/META-INF/plugin.xml
===================================================================
--- src/main/resources/META-INF/plugin.xml (revision 3f69d9a59488c044ccd8eb7e4912141df5c27f27)
+++ src/main/resources/META-INF/plugin.xml (revision 50e016968d68c186da0de6a13c71031d13c46c44)
@@ -1577,8 +1577,5 @@
description="Copy the reference to clipboard in Access Widener format">
-