diff --git a/plugins/junit/src/com/intellij/execution/junit2/configuration/JUnitConfigurable.java b/plugins/junit/src/com/intellij/execution/junit2/configuration/JUnitConfigurable.java index 20aff168149c..07ba7c0d7f5e 100644 --- a/plugins/junit/src/com/intellij/execution/junit2/configuration/JUnitConfigurable.java +++ b/plugins/junit/src/com/intellij/execution/junit2/configuration/JUnitConfigurable.java @@ -436,7 +436,7 @@ public class JUnitConfigurable extends SettingsEditor implem getTestLocation(i).setEnabled(enabledFields.contains(i)); /*if (newType == JUnitConfigurationModel.PATTERN) { myModule.setEnabled(false); - } else */if (newType != JUnitConfigurationModel.ALL_IN_PACKAGE) { + } else */if (newType != JUnitConfigurationModel.ALL_IN_PACKAGE && newType != JUnitConfigurationModel.PATTERN) { myModule.setEnabled(true); } else { @@ -486,7 +486,8 @@ public class JUnitConfigurable extends SettingsEditor implem } private void onScopeChanged() { - final boolean allInPackageAllInProject = ((Integer)myTypeChooser.getSelectedItem()) == JUnitConfigurationModel.ALL_IN_PACKAGE && myWholeProjectScope.isSelected(); + final Integer selectedItem = (Integer)myTypeChooser.getSelectedItem(); + final boolean allInPackageAllInProject = (selectedItem == JUnitConfigurationModel.ALL_IN_PACKAGE || selectedItem == JUnitConfigurationModel.PATTERN) && myWholeProjectScope.isSelected(); myModule.setEnabled(!allInPackageAllInProject); if (allInPackageAllInProject) { myModule.getComponent().setSelectedItem(null); diff --git a/plugins/testng/src/com/theoryinpractice/testng/configuration/TestNGConfigurationEditor.java b/plugins/testng/src/com/theoryinpractice/testng/configuration/TestNGConfigurationEditor.java index 91cc9bf75991..a7e498e6e18e 100644 --- a/plugins/testng/src/com/theoryinpractice/testng/configuration/TestNGConfigurationEditor.java +++ b/plugins/testng/src/com/theoryinpractice/testng/configuration/TestNGConfigurationEditor.java @@ -179,7 +179,6 @@ public class TestNGConfigurationEditor extends SettingsEditor