public void enableProjectSpecificSettings(boolean useProjectSpecificSettings) { fBrowserBlock.setEnabled(useProjectSpecificSettings); } }
private void updateAdvancedEnableState() { boolean additionalOptionEnabled= isEnabled(fContext) && CleanUpConstants.TRUE.equals(fSettings.get(CleanUpConstants.CLEANUP_ON_SAVE_ADDITIONAL_OPTIONS)); boolean additionalEnabled= additionalOptionEnabled && (!ProjectScope.SCOPE.equals(fContext.getName()) || hasSettingsInScope(fContext)); fSelectedActionsText.setEnabled(additionalEnabled); fConfigureButton.setEnabled(additionalEnabled); }
private void settingsChanged() { fFormatCodeButton.setSelection(CleanUpOptions.TRUE.equals(fSettings.get(CleanUpConstants.FORMAT_SOURCE_CODE))); boolean isFormatting= fFormatCodeButton.getSelection(); fFormatChangedOnlyButton.setSelection(CleanUpOptions.TRUE.equals(fSettings.get(CleanUpConstants.FORMAT_SOURCE_CODE_CHANGES_ONLY))); fFormatAllButton.setSelection(CleanUpOptions.FALSE.equals(fSettings.get(CleanUpConstants.FORMAT_SOURCE_CODE_CHANGES_ONLY))); fFormatChangedOnlyButton.setEnabled(isFormatting); fFormatAllButton.setEnabled(isFormatting); fFormatConfigLink.setEnabled(isFormatting); fOrganizeImportsButton.setSelection(CleanUpOptions.TRUE.equals(fSettings.get(CleanUpConstants.ORGANIZE_IMPORTS))); fOrganizeImportsConfigLink.setEnabled(fOrganizeImportsButton.getSelection()); fAdditionalActionButton.setSelection(CleanUpOptions.TRUE.equals(fSettings.get(CleanUpConstants.CLEANUP_ON_SAVE_ADDITIONAL_OPTIONS))); boolean additionalEnabled= CleanUpOptions.TRUE.equals(fSettings.get(CleanUpConstants.CLEANUP_ON_SAVE_ADDITIONAL_OPTIONS)); fSelectedActionsText.setEnabled(additionalEnabled); fConfigureButton.setEnabled(additionalEnabled); Map<String, String> settings= new HashMap<>(fSettings); settings.put(CleanUpConstants.FORMAT_SOURCE_CODE, CleanUpOptions.FALSE); settings.put(CleanUpConstants.ORGANIZE_IMPORTS, CleanUpOptions.FALSE); CleanUpOptions options= new MapCleanUpOptions(settings); fSelectedActionsText.setText(getSelectedCleanUpsText(options)); }
private void settingsChanged() { fFormatCodeButton.setSelection(CleanUpOptions.TRUE.equals(fSettings.get(CleanUpConstants.FORMAT_SOURCE_CODE))); boolean isFormatting= fFormatCodeButton.getSelection(); fFormatChangedOnlyButton.setSelection(CleanUpOptions.TRUE.equals(fSettings.get(CleanUpConstants.FORMAT_SOURCE_CODE_CHANGES_ONLY))); fFormatAllButton.setSelection(CleanUpOptions.FALSE.equals(fSettings.get(CleanUpConstants.FORMAT_SOURCE_CODE_CHANGES_ONLY))); fFormatChangedOnlyButton.setEnabled(isFormatting); fFormatAllButton.setEnabled(isFormatting); fFormatConfigLink.setEnabled(isFormatting); fOrganizeImportsButton.setSelection(CleanUpOptions.TRUE.equals(fSettings.get(CleanUpConstants.ORGANIZE_IMPORTS))); fOrganizeImportsConfigLink.setEnabled(fOrganizeImportsButton.getSelection()); fAdditionalActionButton.setSelection(CleanUpOptions.TRUE.equals(fSettings.get(CleanUpConstants.CLEANUP_ON_SAVE_ADDITIONAL_OPTIONS))); boolean additionalEnabled= CleanUpOptions.TRUE.equals(fSettings.get(CleanUpConstants.CLEANUP_ON_SAVE_ADDITIONAL_OPTIONS)); fSelectedActionsText.setEnabled(additionalEnabled); fConfigureButton.setEnabled(additionalEnabled); Map<String, String> settings= new HashMap<>(fSettings); settings.put(CleanUpConstants.FORMAT_SOURCE_CODE, CleanUpOptions.FALSE); settings.put(CleanUpConstants.ORGANIZE_IMPORTS, CleanUpOptions.FALSE); CleanUpOptions options= new MapCleanUpOptions(settings); fSelectedActionsText.setText(getSelectedCleanUpsText(options)); }
private void updateEnableState(boolean isCustom, final ListDialogField<IJavaProject> settingsField, Button configureCustom, BulletListBlock bulletListBlock) { settingsField.getListControl(null).setEnabled(!isCustom); if (isCustom) { fEnableState= ControlEnableState.disable(settingsField.getButtonBox(null)); } else if (fEnableState != null) { fEnableState.restore(); fEnableState= null; } bulletListBlock.setEnabled(isCustom); configureCustom.setEnabled(isCustom); }
private void updateEnableState(boolean isCustom, final ListDialogField<IJavaProject> settingsField, Button configureCustom, BulletListBlock bulletListBlock) { settingsField.getListControl(null).setEnabled(!isCustom); if (isCustom) { fEnableState= ControlEnableState.disable(settingsField.getButtonBox(null)); } else if (fEnableState != null) { fEnableState.restore(); fEnableState= null; } bulletListBlock.setEnabled(isCustom); configureCustom.setEnabled(isCustom); }
private void updateEnableState(boolean isCustom, final ListDialogField settingsField, Button configureCustom, BulletListBlock bulletListBlock) { settingsField.getListControl(null).setEnabled(!isCustom); if (isCustom) { fEnableState= ControlEnableState.disable(settingsField.getButtonBox(null)); } else if (fEnableState != null) { fEnableState.restore(); fEnableState= null; } bulletListBlock.setEnabled(isCustom); configureCustom.setEnabled(isCustom); }