void (final int newType) { myTypeChooser.setSelectedItem(newType); final IntList enabledFields = ourEnabledFields.size() > newType ? ourEnabledFields.get(newType) : null; for (int i = 0; i < myTestLocations.length; i++) getTestLocation(i).setEnabled(enabledFields != null && enabledFields.contains(i)); /*if (newType == JUnitConfigurationModel.PATTERN) { myModule.setEnabled(false); } else */if (newType != JUnitConfigurationModel.ALL_IN_PACKAGE && newType != JUnitConfigurationModel.PATTERN && newType != JUnitConfigurationModel.CATEGORY && newType != JUnitConfigurationModel.TAGS && newType != JUnitConfigurationModel.UNIQUE_ID) { myModule.setEnabled(true); } else { onScopeChanged(); } }