/** * Updates the status of the ok button to reflect the given status. * Subclasses may override this method to update additional buttons. * * @param status * the status. */ protected void updateButtonsEnableState(IStatus status) { if (fOkButton != null && !fOkButton.isDisposed()) { fOkButton.setEnabled(!status.matches(IStatus.ERROR)); } }
@Override protected void updateButtonsEnableState(IStatus status) { super.updateButtonsEnableState(status); getButton(APPLY_BUTTON).setEnabled(!status.matches(IStatus.ERROR) && somethingChanged); }
@Override public void statusChanged(IStatus status) { setValid(!status.matches(IStatus.ERROR)); StatusUtil.applyToStatusLine(this, status); }
/** * Updates the status line and the OK button according to the given status * * @param status status to apply */ protected void updateStatus(IStatus status) { fCurrStatus= status; setPageComplete(!status.matches(IStatus.ERROR)); if (fPageVisible) { StatusUtil.applyToStatusLine(this, status); } }
void updateStatus(IStatus status) { if (!fFieldsInitialized) return; setValid(!status.matches(IStatus.ERROR)); StatusUtil.applyToStatusLine(this, status); }
void updateStatus(IStatus status) { if (!fFieldsInitialized) return; setValid(!status.matches(IStatus.ERROR)); applyToStatusLine(this, status); }
private boolean updateStatusOnError(Domain domain) { Text textWidget= fDomains.get(domain); if (textWidget.isEnabled()) { IStatus status= domain.validate(textWidget.getText()); if (status.matches(IStatus.ERROR)) { updateStatus(status); return true; } } return false; }
@Override public void statusChanged(IStatus status) { setValid(!status.matches(IStatus.ERROR)); StatusUtil.applyToStatusLine(this, status); }
@Override public void statusChanged(IStatus status) { setValid(!status.matches(IStatus.ERROR)); StatusUtil.applyToStatusLine(this, status); }
public void run() { // Display the error in the wizard header int messageType = IMessageProvider.INFORMATION; if(status.matches(IStatus.ERROR)) { messageType = IMessageProvider.ERROR; } else if(status.matches(IStatus.WARNING)) { messageType = IMessageProvider.WARNING; } ((WizardPage) shellProvider).setMessage(status.getMessage(), messageType); StatusManager.getManager().handle(status); } });
/** * @see IStatusChangeListener#statusChanged(IStatus) */ @Override public void statusChanged(IStatus status) { setValid(!status.matches(IStatus.ERROR)); StatusUtil.applyToStatusLine(this, status); }
/** * Updates the status line and the OK button according to the given status * * @param status status to apply */ protected void updateStatus(IStatus status) { fCurrStatus= status; setPageComplete(!status.matches(IStatus.ERROR)); if (fPageVisible) { StatusUtil.applyToStatusLine(this, status); } }
@Override protected void updateButtonsEnableState(IStatus status) { super.updateButtonsEnableState(status); Button addButton= getButton(ADD_ID); if (addButton != null && !addButton.isDisposed()) addButton.setEnabled(!status.matches(IStatus.ERROR)); }
public void widgetSelected(SelectionEvent e) { boolean value= checkBox.getSelection(); IStatus status= domain.validate(Boolean.valueOf(value)); if (!status.matches(IStatus.ERROR)) fOverlayStore.setValue(preference.getKey(), value); updateStatus(status); } });
public void widgetSelected(SelectionEvent e) { boolean value= checkBox.getSelection(); IStatus status= domain.validate(Boolean.valueOf(value)); if (!status.matches(IStatus.ERROR)) fOverlayStore.setValue(preference.getKey(), value); updateStatus(status); } });
@Override public void widgetSelected(SelectionEvent e) { boolean value= checkBox.getSelection(); IStatus status= domain.validate(Boolean.valueOf(value)); if (!status.matches(IStatus.ERROR)) fOverlayStore.setValue(preference.getKey(), value); updateStatus(status); } });
@Override protected void updateButtonsEnableState(IStatus status) { super.updateButtonsEnableState(status); if (showInButton != null && !showInButton.isDisposed() && openWithButton != null && !openWithButton.isDisposed()) { openWithButton.setEnabled(!status.matches(IStatus.ERROR) && getSelectedItems().size() == 1); showInButton.setEnabled(!status.matches(IStatus.ERROR) && getSelectedItems().size() > 0); } }
@Override public void modifyText(ModifyEvent e) { String value= textControl.getText(); IStatus status= domain.validate(value); if (!status.matches(IStatus.ERROR)) fOverlayStore.setValue(preference.getKey(), value); updateStatus(domain); } });
@Override protected void handleStatusChanged() { super.handleStatusChanged(); boolean valid = true; if (currentStatusStale) { valid = false; } else if (currentStatus != null) { valid = !currentStatus.matches(IStatus.ERROR | IStatus.CANCEL); } ((PreferencePage) getDialogPage()).setValid(valid); } }
private Image findImage(IStatus status) { if (status.isOK()) { return null; } else if (status.matches(IStatus.ERROR)) { return PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJS_ERROR_TSK); } else if (status.matches(IStatus.WARNING)) { return PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJS_WARN_TSK); } else if (status.matches(IStatus.INFO)) { return PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJS_INFO_TSK); } return null; }