From da3ae9c2e935590d91fd64cf55e9f0967908021f Mon Sep 17 00:00:00 2001 From: Michael Keppler Date: Mon, 11 Sep 2023 20:31:16 +0200 Subject: [PATCH] Module configuration editor does not open This partially reverts 3e27bdc0e329e719140539c70b87f1dbc76c57a5. Boolean expressions with side effects MUST NOT be modified in such a way that short circuit evaluation will remove the side effect. That's a ground rule for all kinds of code optimizations and transformations. --- config/checkstyle_sevntu_checks.xml | 8 +++++++- .../ui/config/CheckConfigurationConfigureDialog.java | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/config/checkstyle_sevntu_checks.xml b/config/checkstyle_sevntu_checks.xml index 4c10dc201..697c9303d 100644 --- a/config/checkstyle_sevntu_checks.xml +++ b/config/checkstyle_sevntu_checks.xml @@ -182,7 +182,13 @@ ### InnerInterface(.*) ### InnerClass(.*)"/> - + + + + diff --git a/net.sf.eclipsecs.ui/src/net/sf/eclipsecs/ui/config/CheckConfigurationConfigureDialog.java b/net.sf.eclipsecs.ui/src/net/sf/eclipsecs/ui/config/CheckConfigurationConfigureDialog.java index 1f2480e2b..3cf85230e 100644 --- a/net.sf.eclipsecs.ui/src/net/sf/eclipsecs/ui/config/CheckConfigurationConfigureDialog.java +++ b/net.sf.eclipsecs.ui/src/net/sf/eclipsecs/ui/config/CheckConfigurationConfigureDialog.java @@ -139,7 +139,7 @@ public class CheckConfigurationConfigureDialog extends TitleAreaDialog { /** Button to remove a module. */ private Button mRemoveButton; - /** Button to remove a module. */ + /** Button to edit a module. */ private Button mEditButton; /** Group containing the table viewer. */ @@ -663,7 +663,7 @@ private void openModule(ISelection selection) { RuleConfigurationEditDialog dialog = new RuleConfigurationEditDialog(getShell(), workingCopy, !mConfigurable, Messages.CheckConfigurationConfigureDialog_titleModuleConfigEditor); - if (mConfigurable && Window.OK == dialog.open()) { + if (Window.OK == dialog.open() && mConfigurable) { mModules.set(mModules.indexOf(module), workingCopy); mIsDirty = true; mTableViewer.refresh(true);