From 0f6dd78b6eacbdc9293b360f138d4e833ff72408 Mon Sep 17 00:00:00 2001 From: RedNesto Date: Mon, 1 Jan 2024 14:54:35 +0100 Subject: [PATCH] Migrate setting and NBT toolbar to Kotlin UI DSL Also remove the old unused facet editor --- src/main/kotlin/MinecraftConfigurable.form | 117 ---- src/main/kotlin/MinecraftConfigurable.kt | 120 ++--- src/main/kotlin/MinecraftSettings.kt | 6 - .../kotlin/facet/MinecraftFacetEditorTab.form | 504 ------------------ .../kotlin/facet/MinecraftFacetEditorTab.kt | 354 ------------ src/main/kotlin/nbt/editor/NbtToolbar.form | 42 -- src/main/kotlin/nbt/editor/NbtToolbar.kt | 55 +- .../messages/MinecraftDevelopment.properties | 11 +- 8 files changed, 92 insertions(+), 1117 deletions(-) delete mode 100644 src/main/kotlin/MinecraftConfigurable.form delete mode 100644 src/main/kotlin/facet/MinecraftFacetEditorTab.form delete mode 100644 src/main/kotlin/facet/MinecraftFacetEditorTab.kt delete mode 100644 src/main/kotlin/nbt/editor/NbtToolbar.form diff --git a/src/main/kotlin/MinecraftConfigurable.form b/src/main/kotlin/MinecraftConfigurable.form deleted file mode 100644 index 1e94296a4..000000000 --- a/src/main/kotlin/MinecraftConfigurable.form +++ /dev/null @@ -1,117 +0,0 @@ - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/main/kotlin/MinecraftConfigurable.kt b/src/main/kotlin/MinecraftConfigurable.kt index 4d0fb0c1d..f904dbae7 100644 --- a/src/main/kotlin/MinecraftConfigurable.kt +++ b/src/main/kotlin/MinecraftConfigurable.kt @@ -20,80 +20,80 @@ package com.demonwav.mcdev +import com.demonwav.mcdev.asset.MCDevBundle +import com.demonwav.mcdev.asset.PlatformAssets import com.demonwav.mcdev.update.ConfigurePluginUpdatesDialog +import com.intellij.ide.projectView.ProjectView import com.intellij.openapi.options.Configurable -import javax.swing.JButton -import javax.swing.JCheckBox -import javax.swing.JComboBox +import com.intellij.openapi.project.ProjectManager +import com.intellij.openapi.ui.DialogPanel +import com.intellij.ui.EnumComboBoxModel +import com.intellij.ui.components.Label +import com.intellij.ui.dsl.builder.AlignX +import com.intellij.ui.dsl.builder.BottomGap +import com.intellij.ui.dsl.builder.bindItem +import com.intellij.ui.dsl.builder.bindSelected +import com.intellij.ui.dsl.builder.panel +import com.intellij.util.IconUtil import javax.swing.JComponent -import javax.swing.JPanel import org.jetbrains.annotations.Nls class MinecraftConfigurable : Configurable { - private lateinit var panel: JPanel - private lateinit var showProjectPlatformIconsCheckBox: JCheckBox - private lateinit var showEventListenerGutterCheckBox: JCheckBox - private lateinit var showChatColorUnderlinesCheckBox: JCheckBox - private lateinit var chatColorUnderlinesComboBox: JComboBox - private lateinit var showChatGutterIconsCheckBox: JCheckBox - private lateinit var changePluginUpdateChannelButton: JButton + private lateinit var panel: DialogPanel @Nls - override fun getDisplayName() = "Minecraft Development" - - override fun getHelpTopic(): String? = null - - override fun createComponent(): JComponent { - showChatColorUnderlinesCheckBox.addActionListener { setUnderlineBox() } - - return panel - } - - private fun init() { - for (type in MinecraftSettings.UnderlineType.values()) { - chatColorUnderlinesComboBox.addItem(type) - } + override fun getDisplayName() = MCDevBundle("minecraft.settings.display_name") + + override fun createComponent(): JComponent = panel { + row( + Label(MCDevBundle("minecraft.settings.title"), bold = true).apply { + font = font.deriveFont(font.size * 1.5f) + icon = IconUtil.scale(PlatformAssets.MINECRAFT_ICON_2X, null, 1.5f) + } + ) { + button(MCDevBundle("minecraft.settings.change_update_channel")) { + ConfigurePluginUpdatesDialog().show() + }.align(AlignX.RIGHT) + }.bottomGap(BottomGap.MEDIUM) val settings = MinecraftSettings.instance - showProjectPlatformIconsCheckBox.isSelected = settings.isShowProjectPlatformIcons - showEventListenerGutterCheckBox.isSelected = settings.isShowEventListenerGutterIcons - showChatGutterIconsCheckBox.isSelected = settings.isShowChatColorGutterIcons - showChatColorUnderlinesCheckBox.isSelected = settings.isShowChatColorUnderlines - - chatColorUnderlinesComboBox.selectedIndex = settings.underlineTypeIndex - setUnderlineBox() - - changePluginUpdateChannelButton.addActionListener { ConfigurePluginUpdatesDialog().show() } - } - - private fun setUnderlineBox() { - chatColorUnderlinesComboBox.isEnabled = showChatColorUnderlinesCheckBox.isSelected - } - - override fun isModified(): Boolean { - val settings = MinecraftSettings.instance + row { + checkBox(MCDevBundle("minecraft.settings.show_project_platform_icons")) + .bindSelected(settings::isShowProjectPlatformIcons) + } + row { + checkBox(MCDevBundle("minecraft.settings.show_event_listener_gutter_icons")) + .bindSelected(settings::isShowEventListenerGutterIcons) + } + row { + checkBox(MCDevBundle("minecraft.settings.show_chat_color_gutter_icons")) + .bindSelected(settings::isShowChatColorGutterIcons) + } + row { + checkBox(MCDevBundle("minecraft.settings.show_chat_color_underlines")) + .bindSelected(settings::isShowChatColorUnderlines) + }.bottomGap(BottomGap.SMALL) + + group(indent = false) { + row(MCDevBundle("minecraft.settings.chat_color_underline_style")) { + comboBox(EnumComboBoxModel(MinecraftSettings.UnderlineType::class.java)) + .bindItem(settings::underlineType) { settings.underlineType = it!! } + .align(AlignX.LEFT) + } + } - return showProjectPlatformIconsCheckBox.isSelected != settings.isShowProjectPlatformIcons || - showEventListenerGutterCheckBox.isSelected != settings.isShowEventListenerGutterIcons || - showChatGutterIconsCheckBox.isSelected != settings.isShowChatColorGutterIcons || - showChatColorUnderlinesCheckBox.isSelected != settings.isShowChatColorUnderlines || - chatColorUnderlinesComboBox.selectedItem !== settings.underlineType - } + onApply { + for (project in ProjectManager.getInstance().openProjects) { + ProjectView.getInstance(project).refresh() + } + } + }.also { panel = it } - override fun apply() { - val settings = MinecraftSettings.instance + override fun isModified(): Boolean = panel.isModified() - settings.isShowProjectPlatformIcons = showProjectPlatformIconsCheckBox.isSelected - settings.isShowEventListenerGutterIcons = showEventListenerGutterCheckBox.isSelected - settings.isShowChatColorGutterIcons = showChatGutterIconsCheckBox.isSelected - settings.isShowChatColorUnderlines = showChatColorUnderlinesCheckBox.isSelected - settings.underlineType = chatColorUnderlinesComboBox.selectedItem as? MinecraftSettings.UnderlineType - ?: MinecraftSettings.UnderlineType.DOTTED - } + override fun apply() = panel.apply() - override fun reset() { - init() - } + override fun reset() = panel.reset() } diff --git a/src/main/kotlin/MinecraftSettings.kt b/src/main/kotlin/MinecraftSettings.kt index d9dbb0ca1..dcb3a7c50 100644 --- a/src/main/kotlin/MinecraftSettings.kt +++ b/src/main/kotlin/MinecraftSettings.kt @@ -78,12 +78,6 @@ class MinecraftSettings : PersistentStateComponent { state.underlineType = underlineType } - val underlineTypeIndex: Int - get() { - val type = underlineType - return UnderlineType.values().indices.firstOrNull { type == UnderlineType.values()[it] } ?: 0 - } - enum class UnderlineType(private val regular: String, val effectType: EffectType) { NORMAL("Normal", EffectType.LINE_UNDERSCORE), diff --git a/src/main/kotlin/facet/MinecraftFacetEditorTab.form b/src/main/kotlin/facet/MinecraftFacetEditorTab.form deleted file mode 100644 index ede53ece3..000000000 --- a/src/main/kotlin/facet/MinecraftFacetEditorTab.form +++ /dev/null @@ -1,504 +0,0 @@ - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
diff --git a/src/main/kotlin/facet/MinecraftFacetEditorTab.kt b/src/main/kotlin/facet/MinecraftFacetEditorTab.kt deleted file mode 100644 index c48ab5028..000000000 --- a/src/main/kotlin/facet/MinecraftFacetEditorTab.kt +++ /dev/null @@ -1,354 +0,0 @@ -/* - * Minecraft Development for IntelliJ - * - * https://mcdev.io/ - * - * Copyright (C) 2023 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.facet - -import com.demonwav.mcdev.asset.MCDevBundle -import com.demonwav.mcdev.asset.PlatformAssets -import com.demonwav.mcdev.platform.PlatformType -import com.intellij.facet.ui.FacetEditorTab -import com.intellij.util.ui.UIUtil -import javax.swing.JCheckBox -import javax.swing.JComponent -import javax.swing.JLabel -import javax.swing.JPanel - -class MinecraftFacetEditorTab(private val configuration: MinecraftFacetConfiguration) : FacetEditorTab() { - - private lateinit var panel: JPanel - - private lateinit var bukkitEnabledCheckBox: JCheckBox - private lateinit var bukkitAutoCheckBox: JCheckBox - private lateinit var spigotEnabledCheckBox: JCheckBox - private lateinit var spigotAutoCheckBox: JCheckBox - private lateinit var paperEnabledCheckBox: JCheckBox - private lateinit var paperAutoCheckBox: JCheckBox - private lateinit var spongeEnabledCheckBox: JCheckBox - private lateinit var spongeAutoCheckBox: JCheckBox - private lateinit var forgeEnabledCheckBox: JCheckBox - private lateinit var forgeAutoCheckBox: JCheckBox - private lateinit var fabricEnabledCheckBox: JCheckBox - private lateinit var fabricAutoCheckBox: JCheckBox - private lateinit var architecturyEnabledCheckBox: JCheckBox - private lateinit var architecturyAutoCheckBox: JCheckBox - private lateinit var mcpEnabledCheckBox: JCheckBox - private lateinit var mcpAutoCheckBox: JCheckBox - private lateinit var mixinEnabledCheckBox: JCheckBox - private lateinit var mixinAutoCheckBox: JCheckBox - private lateinit var bungeecordEnabledCheckBox: JCheckBox - private lateinit var bungeecordAutoCheckBox: JCheckBox - private lateinit var waterfallEnabledCheckBox: JCheckBox - private lateinit var waterfallAutoCheckBox: JCheckBox - private lateinit var velocityEnabledCheckBox: JCheckBox - private lateinit var velocityAutoCheckBox: JCheckBox - private lateinit var adventureEnabledCheckBox: JCheckBox - private lateinit var adventureAutoCheckBox: JCheckBox - - private lateinit var spongeIcon: JLabel - private lateinit var mcpIcon: JLabel - private lateinit var mixinIcon: JLabel - - private val enableCheckBoxArray: Array by lazy { - arrayOf( - bukkitEnabledCheckBox, - spigotEnabledCheckBox, - paperEnabledCheckBox, - spongeEnabledCheckBox, - forgeEnabledCheckBox, - fabricEnabledCheckBox, - architecturyEnabledCheckBox, - mcpEnabledCheckBox, - mixinEnabledCheckBox, - bungeecordEnabledCheckBox, - waterfallEnabledCheckBox, - velocityEnabledCheckBox, - adventureEnabledCheckBox, - ) - } - - private val autoCheckBoxArray: Array by lazy { - arrayOf( - bukkitAutoCheckBox, - spigotAutoCheckBox, - paperAutoCheckBox, - spongeAutoCheckBox, - forgeAutoCheckBox, - fabricAutoCheckBox, - architecturyAutoCheckBox, - mcpAutoCheckBox, - mixinAutoCheckBox, - bungeecordAutoCheckBox, - waterfallAutoCheckBox, - velocityAutoCheckBox, - adventureAutoCheckBox, - ) - } - - override fun createComponent(): JComponent { - if (UIUtil.isUnderDarcula()) { - spongeIcon.icon = PlatformAssets.SPONGE_ICON_2X_DARK - mcpIcon.icon = PlatformAssets.MCP_ICON_2X_DARK - mixinIcon.icon = PlatformAssets.MIXIN_ICON_2X_DARK - } - - runOnAll { enabled, auto, platformType, _, _ -> - auto.addActionListener { checkAuto(auto, enabled, platformType) } - } - - bukkitEnabledCheckBox.addActionListener { - unique( - bukkitEnabledCheckBox, - spigotEnabledCheckBox, - paperEnabledCheckBox, - ) - } - spigotEnabledCheckBox.addActionListener { - unique( - spigotEnabledCheckBox, - bukkitEnabledCheckBox, - paperEnabledCheckBox, - ) - } - paperEnabledCheckBox.addActionListener { - unique( - paperEnabledCheckBox, - bukkitEnabledCheckBox, - spigotEnabledCheckBox, - ) - } - - bukkitAutoCheckBox.addActionListener { - all(bukkitAutoCheckBox, spigotAutoCheckBox, paperAutoCheckBox)( - SPIGOT, - PAPER, - ) - } - spigotAutoCheckBox.addActionListener { - all(spigotAutoCheckBox, bukkitAutoCheckBox, paperAutoCheckBox)( - BUKKIT, - PAPER, - ) - } - paperAutoCheckBox.addActionListener { - all(paperAutoCheckBox, bukkitAutoCheckBox, spigotAutoCheckBox)( - BUKKIT, - SPIGOT, - ) - } - - forgeEnabledCheckBox.addActionListener { - also(forgeEnabledCheckBox, mcpEnabledCheckBox) - unique(forgeEnabledCheckBox, architecturyEnabledCheckBox) - } - fabricEnabledCheckBox.addActionListener { - also(fabricEnabledCheckBox, mixinEnabledCheckBox, mcpEnabledCheckBox) - unique(fabricEnabledCheckBox, architecturyEnabledCheckBox) - } - architecturyEnabledCheckBox.addActionListener { - unique( - architecturyEnabledCheckBox, - fabricEnabledCheckBox, - forgeEnabledCheckBox, - ) - } - - forgeAutoCheckBox.addActionListener { - all(forgeAutoCheckBox, fabricAutoCheckBox, architecturyAutoCheckBox)( - FABRIC, - ARCHITECTURY, - ) - } - - fabricAutoCheckBox.addActionListener { - all(fabricAutoCheckBox, forgeAutoCheckBox, architecturyAutoCheckBox)( - FORGE, - ARCHITECTURY, - ) - } - - architecturyAutoCheckBox.addActionListener { - all(architecturyAutoCheckBox, forgeAutoCheckBox, fabricAutoCheckBox)( - FORGE, - FABRIC, - ) - } - - mixinEnabledCheckBox.addActionListener { also(mixinEnabledCheckBox, mcpEnabledCheckBox) } - - bungeecordEnabledCheckBox.addActionListener { unique(bungeecordEnabledCheckBox, waterfallEnabledCheckBox) } - waterfallEnabledCheckBox.addActionListener { unique(waterfallEnabledCheckBox, bungeecordEnabledCheckBox) } - - return panel - } - - override fun getDisplayName() = MCDevBundle("facet.editor.name") - - override fun isModified(): Boolean { - var modified = false - - runOnAll { enabled, auto, platformType, userTypes, _ -> - modified += auto.isSelected == platformType in userTypes - modified += !auto.isSelected && enabled.isSelected != userTypes[platformType] - } - - return modified - } - - override fun reset() { - runOnAll { enabled, auto, platformType, userTypes, autoTypes -> - auto.isSelected = platformType !in userTypes - enabled.isSelected = userTypes[platformType] ?: (platformType in autoTypes) - - if (auto.isSelected) { - enabled.isEnabled = false - } - } - } - - override fun apply() { - configuration.state.userChosenTypes.clear() - runOnAll { enabled, auto, platformType, userTypes, _ -> - if (!auto.isSelected) { - userTypes[platformType] = enabled.isSelected - } - } - } - - private inline fun runOnAll( - run: (JCheckBox, JCheckBox, PlatformType, MutableMap, Set) -> Unit, - ) { - val state = configuration.state - for (i in indexes) { - run( - enableCheckBoxArray[i], - autoCheckBoxArray[i], - platformTypes[i], - state.userChosenTypes, - state.autoDetectTypes, - ) - } - } - - private fun unique(vararg checkBoxes: JCheckBox) { - if (checkBoxes.size <= 1) { - return - } - - if (checkBoxes[0].isSelected) { - for (i in 1 until checkBoxes.size) { - checkBoxes[i].isSelected = false - } - } - } - - private fun also(vararg checkBoxes: JCheckBox) { - if (checkBoxes.size <= 1) { - return - } - - if (checkBoxes[0].isSelected) { - for (i in 1 until checkBoxes.size) { - checkBoxes[i].isSelected = true - } - } - } - - private fun all(vararg checkBoxes: JCheckBox): Invoker { - if (checkBoxes.size <= 1) { - return Invoker() - } - - for (i in 1 until checkBoxes.size) { - checkBoxes[i].isSelected = checkBoxes[0].isSelected - } - - return object : Invoker() { - override fun invoke(vararg indexes: Int) { - for (i in indexes) { - checkAuto(autoCheckBoxArray[i], enableCheckBoxArray[i], platformTypes[i]) - } - } - } - } - - private fun checkAuto(auto: JCheckBox, enabled: JCheckBox, type: PlatformType) { - if (auto.isSelected) { - enabled.isEnabled = false - enabled.isSelected = type in configuration.state.autoDetectTypes - } else { - enabled.isEnabled = true - } - } - - private operator fun Boolean.plus(n: Boolean) = this || n - - // This is here so we can use vararg. Can't use parameter modifiers in function type definitions for some reason - open class Invoker { - open operator fun invoke(vararg indexes: Int) {} - } - - companion object { - private const val BUKKIT = 0 - private const val SPIGOT = BUKKIT + 1 - private const val PAPER = SPIGOT + 1 - private const val SPONGE = PAPER + 1 - private const val FORGE = SPONGE + 1 - private const val FABRIC = FORGE + 1 - private const val ARCHITECTURY = FABRIC + 1 - private const val MCP = ARCHITECTURY + 1 - private const val MIXIN = MCP + 1 - private const val BUNGEECORD = MIXIN + 1 - private const val WATERFALL = BUNGEECORD + 1 - private const val VELOCITY = WATERFALL + 1 - private const val ADVENTURE = VELOCITY + 1 - - private val platformTypes = arrayOf( - PlatformType.BUKKIT, - PlatformType.SPIGOT, - PlatformType.PAPER, - PlatformType.SPONGE, - PlatformType.FORGE, - PlatformType.FABRIC, - PlatformType.ARCHITECTURY, - PlatformType.MCP, - PlatformType.MIXIN, - PlatformType.BUNGEECORD, - PlatformType.WATERFALL, - PlatformType.VELOCITY, - PlatformType.ADVENTURE, - ) - - private val indexes = intArrayOf( - BUKKIT, - SPIGOT, - PAPER, - SPONGE, - FORGE, - FABRIC, - ARCHITECTURY, - MCP, - MIXIN, - BUNGEECORD, - WATERFALL, - VELOCITY, - ADVENTURE, - ) - } -} diff --git a/src/main/kotlin/nbt/editor/NbtToolbar.form b/src/main/kotlin/nbt/editor/NbtToolbar.form deleted file mode 100644 index c5d883413..000000000 --- a/src/main/kotlin/nbt/editor/NbtToolbar.form +++ /dev/null @@ -1,42 +0,0 @@ - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
diff --git a/src/main/kotlin/nbt/editor/NbtToolbar.kt b/src/main/kotlin/nbt/editor/NbtToolbar.kt index 2f4af6741..c0830aeba 100644 --- a/src/main/kotlin/nbt/editor/NbtToolbar.kt +++ b/src/main/kotlin/nbt/editor/NbtToolbar.kt @@ -23,46 +23,35 @@ package com.demonwav.mcdev.nbt.editor import com.demonwav.mcdev.asset.MCDevBundle import com.demonwav.mcdev.nbt.NbtVirtualFile import com.demonwav.mcdev.util.runWriteTaskLater -import javax.swing.JButton -import javax.swing.JComboBox -import javax.swing.JLabel -import javax.swing.JPanel +import com.intellij.openapi.ui.DialogPanel +import com.intellij.ui.EnumComboBoxModel +import com.intellij.ui.dsl.builder.bindItem +import com.intellij.ui.dsl.builder.panel class NbtToolbar(nbtFile: NbtVirtualFile) { - lateinit var panel: JPanel - private lateinit var fileTypeLabel: JLabel - private lateinit var compressionBox: JComboBox - lateinit var saveButton: JButton - private var lastSelection: CompressionSelection + private var compressionSelection: CompressionSelection? = + if (nbtFile.isCompressed) CompressionSelection.GZIP else CompressionSelection.UNCOMPRESSED - init { - fileTypeLabel.text = MCDevBundle("nbt.compression.file_type.label") - saveButton.text = MCDevBundle("nbt.compression.save.button") - - compressionBox.addItem(CompressionSelection.GZIP) - compressionBox.addItem(CompressionSelection.UNCOMPRESSED) - compressionBox.selectedItem = - if (nbtFile.isCompressed) CompressionSelection.GZIP else CompressionSelection.UNCOMPRESSED - lastSelection = selection - - if (!nbtFile.isWritable || !nbtFile.parseSuccessful) { - compressionBox.isEnabled = false - } + val selection: CompressionSelection + get() = compressionSelection!! - if (!nbtFile.parseSuccessful) { - panel.isVisible = false - } - - saveButton.addActionListener { - lastSelection = selection + lateinit var panel: DialogPanel - runWriteTaskLater { - nbtFile.writeFile(this) + init { + panel = panel { + row(MCDevBundle("nbt.compression.file_type.label")) { + comboBox(EnumComboBoxModel(CompressionSelection::class.java)) + .bindItem(::compressionSelection) + .enabled(nbtFile.isWritable && nbtFile.parseSuccessful) + button(MCDevBundle("nbt.compression.save.button")) { + panel.apply() + runWriteTaskLater { + nbtFile.writeFile(this) + } + } } + visible(nbtFile.parseSuccessful) } } - - val selection - get() = compressionBox.selectedItem as CompressionSelection } diff --git a/src/main/resources/messages/MinecraftDevelopment.properties b/src/main/resources/messages/MinecraftDevelopment.properties index 1aad5c069..e99e006c3 100644 --- a/src/main/resources/messages/MinecraftDevelopment.properties +++ b/src/main/resources/messages/MinecraftDevelopment.properties @@ -119,7 +119,7 @@ inspection.entity_data_param.fix=Replace other entity class with this entity cla nbt.compression.gzip=GZipped nbt.compression.uncompressed=Uncompressed -nbt.compression.file_type.label=File Type: +nbt.compression.file_type.label=Compression: nbt.compression.save.button=Save nbt.file_type.name=NBT @@ -179,3 +179,12 @@ nbt.file.save_notify.parse_error.content=Due to errors in the text representatio intention.error.cannot.create.class.message=Cannot create class ''{0}''\n{1} intention.error.cannot.create.class.title=Failed to Create Class + +minecraft.settings.display_name=Minecraft Development +minecraft.settings.title=Minecraft Development Settings +minecraft.settings.change_update_channel=Change Plugin Update Channel +minecraft.settings.show_project_platform_icons=Show project platform icons +minecraft.settings.show_event_listener_gutter_icons=Show event listener gutter icons +minecraft.settings.show_chat_color_gutter_icons=Show chat color gutter icons +minecraft.settings.show_chat_color_underlines=Show chat color underlines +minecraft.settings.chat_color_underline_style=Chat color underline style: