protected void enablePreferenceContent(boolean enable) { if (enable) { if (fBlockEnableState != null) { fBlockEnableState.restore(); fBlockEnableState = null; } } else { if (fBlockEnableState == null) { fBlockEnableState = ControlEnableState.disable(fConfigurationBlockControl); } } }
/** * {@inheritDoc} */ @Override protected void enabled(boolean isEnabled) { if (isEnabled) { if (fControlEnableState == null) return; fControlEnableState.restore(); fControlEnableState= null; } else { if (fControlEnableState != null) return; fControlEnableState= ControlEnableState.disable(fCleanUpOptionsComposite); } }
protected void updateCombo( Combo curr ) { ControlData data = (ControlData) curr.getData( ); String currValue = getValue( data.getKey( ) ); curr.select( data.getSelection( currValue ) ); if ( fProject != null ) { if ( ignoreKeys != null && Arrays.asList( ignoreKeys ).contains( data.getKey( ) ) ) { ControlEnableState.disable( curr ); Control label = (Control) fLabels.get( curr ); if ( label != null ) ControlEnableState.disable( label ); } } }
protected void updateCheckBox( Button curr ) { ControlData data = (ControlData) curr.getData( ); String currValue = getValue( data.getKey( ) ); curr.setSelection( data.getSelection( currValue ) == 0 ); if ( fProject != null ) { if ( ignoreKeys != null && Arrays.asList( ignoreKeys ).contains( data.getKey( ) ) ) { ControlEnableState.disable( curr ); } } }
protected void updateRadioComposite( RadioComposite curr ) { ControlData data = (ControlData) curr.getData( ); String currValue = getValue( data.getKey( ) ); curr.setSelection( data.getSelection( currValue ) ); if ( fProject != null ) { if ( ignoreKeys != null && Arrays.asList( ignoreKeys ).contains( data.getKey( ) ) ) { ControlEnableState.disable( curr ); } } }
protected void updateText( Text curr ) { Key key = (Key) curr.getData( ); String currValue = getValue( key ); if ( currValue != null ) { curr.setText( currValue ); } if ( fProject != null ) { if ( ignoreKeys != null && Arrays.asList( ignoreKeys ).contains( key ) ) { ControlEnableState.disable( curr ); Control label = (Control) fLabels.get( curr ); if ( label != null ) ControlEnableState.disable( label ); } } }
protected void enablePreferenceContent( boolean enable ) { if ( enable ) { if ( fBlockEnableState != null ) { fBlockEnableState.restore( ); fBlockEnableState = null; } } else { if ( fBlockEnableState == null ) { fBlockEnableState = ControlEnableState.disable( fConfigurationBlockControl ); } } }
/** copied from PropertyAndPreferencePage */ protected void enablePreferenceContent(boolean enable) { if (enable) { if (blockEnableState != null) { blockEnableState.restore(); blockEnableState = null; } } else { if (blockEnableState == null) { blockEnableState = ControlEnableState.disable(configurationBlockControl); } } }
public void enablePreferenceContent(boolean enable) { if (controlsComposite != null && !controlsComposite.isDisposed()) { if (enable) { if (blockEnableState != null) { blockEnableState.restore(); blockEnableState = null; } } else { if (blockEnableState == null) { blockEnableState = ControlEnableState.disable(controlsComposite); } } } }
@Override protected void reconcileControls() { if (saveActionsButton.getSelection()) { if (saveActionsContainerEnableState != null) { saveActionsContainerEnableState.restore(); saveActionsContainerEnableState = null; } } else { if (saveActionsContainerEnableState == null) { saveActionsContainerEnableState = ControlEnableState.disable(saveActionsContainer); } } }
protected void enableTslintContent(boolean enable) { if (enable) { if (fBlockEnableState != null) { fBlockEnableState.restore(); fBlockEnableState = null; } } else { if (fBlockEnableState == null) { fBlockEnableState = ControlEnableState.disable(controlsComposite); } } }
protected void enablePreferenceContent(boolean enable) { if (enable) { if (blockEnableState != null) { blockEnableState.restore(); blockEnableState = null; } } else { if (blockEnableState == null) { blockEnableState = ControlEnableState.disable(configurationBlockControl); } } }
private void handleSyntaxSeveritySelection(boolean selection) { if (selection) { if (fSyntaxState != null) { fSyntaxState.restore(); fSyntaxState = null; } } else { if (fSyntaxState == null) fSyntaxState = ControlEnableState .disable(fSyntaxValidationGroup); } }
/** * Restores the enabled/disabled state of the wizard dialog's buttons and * the tree of controls for the currently showing page. * * @param state * a map containing the saved state as returned by * <code>saveUIState</code> * @see #saveUIState */ private void restoreUIState(Map state) { restoreEnableState(backButton, state, "back"); //$NON-NLS-1$ restoreEnableState(nextButton, state, "next"); //$NON-NLS-1$ restoreEnableState(finishButton, state, "finish"); //$NON-NLS-1$ restoreEnableState(cancelButton, state, "cancel"); //$NON-NLS-1$ restoreEnableState(helpButton, state, "help"); //$NON-NLS-1$ Object pageValue = state.get("page"); //$NON-NLS-1$ if (pageValue != null) { ((ControlEnableState) pageValue).restore(); } }
/** * Captures and returns the enabled/disabled state of the wizard dialog's * buttons and the tree of controls for the currently showing page. All * these controls are disabled in the process, with the possible exception * of the Cancel button. * * @param keepCancelEnabled * <code>true</code> if the Cancel button should remain * enabled, and <code>false</code> if it should be disabled * @return a map containing the saved state suitable for restoring later * with <code>restoreUIState</code> * @see #restoreUIState */ private Map saveUIState(boolean keepCancelEnabled) { Map savedState = new HashMap(10); saveEnableStateAndSet(backButton, savedState, "back", false); //$NON-NLS-1$ saveEnableStateAndSet(nextButton, savedState, "next", false); //$NON-NLS-1$ saveEnableStateAndSet(finishButton, savedState, "finish", false); //$NON-NLS-1$ saveEnableStateAndSet(cancelButton, savedState, "cancel", keepCancelEnabled); //$NON-NLS-1$ saveEnableStateAndSet(helpButton, savedState, "help", false); //$NON-NLS-1$ if (currentPage != null) { savedState .put( "page", ControlEnableState.disable(currentPage.getControl())); //$NON-NLS-1$ } return savedState; }
protected void enableConfigControls(boolean enable) { if (enable) { if (fBlockEnableState != null) { fBlockEnableState.restore(); fBlockEnableState= null; } } else { if (fBlockEnableState == null) { fBlockEnableState= ControlEnableState.disable(fJavadocComposite); } } }
protected void enablePreferenceContent(boolean enable) { if (enable) { if (fBlockEnableState != null) { fBlockEnableState.restore(); fBlockEnableState= null; } } else { if (fBlockEnableState == null) { fBlockEnableState= ControlEnableState.disable(fConfigurationBlockControl); } } }
public void enablePreferenceContent(boolean enable) { if (fControlsComposite != null && !fControlsComposite.isDisposed()) { if (enable) { if (fBlockEnableState != null) { fBlockEnableState.restore(); fBlockEnableState= null; } } else { if (fBlockEnableState == null) { fBlockEnableState= ControlEnableState.disable(fControlsComposite); } } } }
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); }
/** * Captures and returns the enabled/disabled state of the wizard dialog's * buttons and the tree of controls for the currently showing page. All * these controls are disabled in the process, with the possible exception * of the Cancel button. * * @param keepCancelEnabled * <code>true</code> if the Cancel button should remain enabled, * and <code>false</code> if it should be disabled * @return a map containing the saved state suitable for restoring later * with <code>restoreUIState</code> * @see #restoreUIState */ private Map saveUIState(boolean keepCancelEnabled) { Map savedState = new HashMap(10); saveEnableStateAndSet(backButton, savedState, "back", false); //$NON-NLS-1$ saveEnableStateAndSet(nextButton, savedState, "next", false); //$NON-NLS-1$ saveEnableStateAndSet(finishButton, savedState, "finish", false); //$NON-NLS-1$ saveEnableStateAndSet(cancelButton, savedState, "cancel", keepCancelEnabled); //$NON-NLS-1$ saveEnableStateAndSet(helpButton, savedState, "help", false); //$NON-NLS-1$ if (currentPage != null) { savedState .put("page", ControlEnableState.disable(currentPage.getControl())); //$NON-NLS-1$ } return savedState; }
/** * Controls the enablement of the common content region * of a property or preference page * * @param enable the enabled state of the common content * area */ protected void enablePreferenceContent(boolean enable) { if(enable) { if(fEnablements != null) { fEnablements.restore(); fEnablements = null; } } else { if(fEnablements == null) fEnablements = ControlEnableState.disable(fCommon); } }