From 9a91444a5055bbb904c9f34e03092f5859df6a52 Mon Sep 17 00:00:00 2001 From: HuangYongliang Date: Wed, 8 Nov 2023 09:08:27 +0000 Subject: [PATCH] fix JCheckBox save failed --- .../plugin/idea/config/IdeaPluginCodeGenSettingsDialog.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/cn/hylstudio/skykoma/plugin/idea/config/IdeaPluginCodeGenSettingsDialog.java b/src/main/java/cn/hylstudio/skykoma/plugin/idea/config/IdeaPluginCodeGenSettingsDialog.java index 873524e..d233a82 100644 --- a/src/main/java/cn/hylstudio/skykoma/plugin/idea/config/IdeaPluginCodeGenSettingsDialog.java +++ b/src/main/java/cn/hylstudio/skykoma/plugin/idea/config/IdeaPluginCodeGenSettingsDialog.java @@ -54,14 +54,14 @@ public JComponent createComponent() { @Override public boolean isModified() { - return !(Objects.equals(generateCurrentMethodName.isSelected(), propertiesComponent.getBoolean(GENERATE_CURRENT_METHOD_NAME_ENABLED, GENERATE_CURRENT_METHOD_NAME_ENABLED_DEFAULT)) && + return !(Objects.equals(String.valueOf(generateCurrentMethodName.isSelected()), String.valueOf(propertiesComponent.getBoolean(GENERATE_CURRENT_METHOD_NAME_ENABLED, GENERATE_CURRENT_METHOD_NAME_ENABLED_DEFAULT))) && Objects.equals(logVariableName.getText(), propertiesComponent.getValue(GENERATE_LOG_VARIABLE_NAME, GENERATE_LOG_VARIABLE_NAME_DEFAULT)) ); } @Override public void apply() throws ConfigurationException { - propertiesComponent.setValue(GENERATE_CURRENT_METHOD_NAME_ENABLED, generateCurrentMethodName.isSelected()); + propertiesComponent.setValue(GENERATE_CURRENT_METHOD_NAME_ENABLED, String.valueOf(generateCurrentMethodName.isSelected())); propertiesComponent.setValue(GENERATE_LOG_VARIABLE_NAME, logVariableName.getText()); } }