/** * Sets the range of valid values for this field. * * @param min the minimum allowed value (inclusive) * @param max the maximum allowed value (inclusive) */ public void setValidRange(int min, int max) { minValidValue = min; maxValidValue = max; setErrorMessage(JFaceResources.format("IntegerFieldEditor.errorMessageRange", //$NON-NLS-1$ Integer.valueOf(min), Integer.valueOf(max))); }
/** * Sets the range of valid values for this field. * * @param min the minimum allowed value (inclusive) * @param max the maximum allowed value (inclusive) */ public void setValidRange(int min, int max) { minValidValue = min; maxValidValue = max; setErrorMessage(JFaceResources.format("IntegerFieldEditor.errorMessageRange", //$NON-NLS-1$ Integer.valueOf(min), Integer.valueOf(max))); }
/** * Sets the range of valid values for this field. * * @param min the minimum allowed value (inclusive) * @param max the maximum allowed value (inclusive) */ public void setValidRange(int min, int max) { minValidValue = min; maxValidValue = max; setErrorMessage(JFaceResources.format( "IntegerFieldEditor.errorMessageRange", //$NON-NLS-1$ new Object[] { new Integer(min), new Integer(max) })); }
/** * Notifies that a subtask of the main task is beginning. Subtasks are * optional; the main task might not have subtasks. * * @param name * the name (or description) of the subtask * @see IProgressMonitor#subTask(String) */ @Override public void subTask(String name) { String newName; if (name == null) newName = Util.ZERO_LENGTH_STRING; else newName = name; String text; if (fTaskName == null || fTaskName.length() == 0) { text = newName; } else { text = JFaceResources.format("Set_SubTask", fTaskName, newName);//$NON-NLS-1$ } setMessage(text); }
/** * Notifies that a subtask of the main task is beginning. Subtasks are * optional; the main task might not have subtasks. * * @param name * the name (or description) of the subtask * @see IProgressMonitor#subTask(String) */ @Override public void subTask(String name) { String newName; if (name == null) newName = Util.ZERO_LENGTH_STRING; else newName = name; String text; if (fTaskName == null || fTaskName.length() == 0) { text = newName; } else { text = JFaceResources.format("Set_SubTask", fTaskName, newName);//$NON-NLS-1$ } setMessage(text); }
/** * Notifies that a subtask of the main task is beginning. Subtasks are * optional; the main task might not have subtasks. * * @param name * the name (or description) of the subtask * @see IProgressMonitor#subTask(String) */ public void subTask(String name) { String newName; if (name == null) newName = Util.ZERO_LENGTH_STRING; else newName = name; String text; if (fTaskName == null || fTaskName.length() == 0) { text = newName; } else { text = JFaceResources.format( "Set_SubTask", new Object[] { fTaskName, newName });//$NON-NLS-1$ } setMessage(text); }
/** * Return the label for showing tasks * @return String */ private String taskLabel() { boolean hasTask= fTaskName != null && fTaskName.length() > 0; boolean hasSubtask= fSubTaskName != null && fSubTaskName.length() > 0; if (hasTask) { if (hasSubtask) return escapeMetaCharacters(JFaceResources.format("Set_SubTask", fTaskName, fSubTaskName));//$NON-NLS-1$ return escapeMetaCharacters(fTaskName); } else if (hasSubtask) { return escapeMetaCharacters(fSubTaskName); } else { return ""; //$NON-NLS-1$ } }
/** * Return the label for showing tasks * @return String */ private String taskLabel() { boolean hasTask= fTaskName != null && fTaskName.length() > 0; boolean hasSubtask= fSubTaskName != null && fSubTaskName.length() > 0; if (hasTask) { if (hasSubtask) return escapeMetaCharacters(JFaceResources.format("Set_SubTask", fTaskName, fSubTaskName));//$NON-NLS-1$ return escapeMetaCharacters(fTaskName); } else if (hasSubtask) { return escapeMetaCharacters(fSubTaskName); } else { return ""; //$NON-NLS-1$ } }
/** * Return the label for showing tasks * @return String */ private String taskLabel() { boolean hasTask= fTaskName != null && fTaskName.length() > 0; boolean hasSubtask= fSubTaskName != null && fSubTaskName.length() > 0; if (hasTask) { if (hasSubtask) return escapeMetaCharacters(JFaceResources.format( "Set_SubTask", new Object[] { fTaskName, fSubTaskName }));//$NON-NLS-1$ return escapeMetaCharacters(fTaskName); } else if (hasSubtask) { return escapeMetaCharacters(fSubTaskName); } else { return ""; //$NON-NLS-1$ } }
@Override public boolean performOk() { if (idePreferenceStore != null && idePreferenceStore.needsSaving() && idePreferenceStore instanceof IPersistentPreferenceStore) { try { ((IPersistentPreferenceStore) idePreferenceStore).save(); } catch (IOException e) { String message = JFaceResources.format("PreferenceDialog.saveErrorMessage", getTitle(), //$NON-NLS-1$ e.getMessage()); Policy.getStatusHandler().show(new Status(IStatus.ERROR, Policy.JFACE, message, e), JFaceResources.getString("PreferenceDialog.saveErrorTitle")); //$NON-NLS-1$ } } return super.performOk(); }
dialogTitle; this.message = message == null ? status.getMessage() : JFaceResources.format("Reason", message, status.getMessage()); //$NON-NLS-1$ this.status = status; this.displayMask = displayMask;
((IPersistentPreferenceStore) store).save(); } catch (IOException e) { String message = JFaceResources.format("PreferenceDialog.saveErrorMessage", page.getTitle(), //$NON-NLS-1$ e.getMessage()); Policy.getStatusHandler().show(
((IPersistentPreferenceStore) store).save(); } catch (IOException e) { String message = JFaceResources.format("PreferenceDialog.saveErrorMessage", page.getTitle(), //$NON-NLS-1$ e.getMessage()); Policy.getStatusHandler().show(
this.title = dialogTitle == null ? JFaceResources.getString("Problem_Occurred") : //$NON-NLS-1$ dialogTitle; this.message = message == null ? status.getMessage() : JFaceResources.format("Reason", new Object[] { message, status.getMessage()}); //$NON-NLS-1$ this.status = status; statusList = Arrays.asList(status.getChildren());
/** * Create a new instance of the receiver on a status. * * @param status * The status to display. */ SafeRunnableDialog(IStatus status) { super(null, JFaceResources.getString("error"), status.getMessage(), //$NON-NLS-1$ status, IStatus.ERROR); setShellStyle(SWT.DIALOG_TRIM | SWT.MODELESS | SWT.RESIZE | SWT.MIN | SWT.MAX | getDefaultOrientation()); setStatus(status); statuses.add(status); setBlockOnOpen(false); String reason = JFaceResources .getString("SafeRunnableDialog_checkDetailsMessage"); //$NON-NLS-1$ if (status.getException() != null) { reason = status.getException().getMessage() == null ? status .getException().toString() : status.getException() .getMessage(); } this.message = JFaceResources.format("SafeRunnableDialog_reason", //$NON-NLS-1$ status.getMessage(), reason); }
/** * Create a new instance of the receiver on a status. * * @param status * The status to display. */ SafeRunnableDialog(IStatus status) { super(null, JFaceResources.getString("error"), status.getMessage(), //$NON-NLS-1$ status, IStatus.ERROR); setShellStyle(SWT.DIALOG_TRIM | SWT.MODELESS | SWT.RESIZE | SWT.MIN | SWT.MAX | getDefaultOrientation()); setStatus(status); statuses.add(status); setBlockOnOpen(false); String reason = JFaceResources .getString("SafeRunnableDialog_checkDetailsMessage"); //$NON-NLS-1$ if (status.getException() != null) { reason = status.getException().getMessage() == null ? status .getException().toString() : status.getException() .getMessage(); } this.message = JFaceResources.format("SafeRunnableDialog_reason", //$NON-NLS-1$ status.getMessage(), reason); }
/** * Create a new instance of the receiver on a status. * * @param status * The status to display. */ SafeRunnableDialog(IStatus status) { super(null, JFaceResources.getString("error"), status.getMessage(), //$NON-NLS-1$ status, IStatus.ERROR); setShellStyle(SWT.DIALOG_TRIM | SWT.MODELESS | SWT.RESIZE | SWT.MIN | SWT.MAX | getDefaultOrientation()); setStatus(status); statuses.add(status); setBlockOnOpen(false); String reason = JFaceResources .getString("SafeRunnableDialog_checkDetailsMessage"); //$NON-NLS-1$ if (status.getException() != null) { reason = status.getException().getMessage() == null ? status .getException().toString() : status.getException() .getMessage(); } this.message = JFaceResources.format( "SafeRunnableDialog_reason", new Object[] { //$NON-NLS-1$ status.getMessage(), reason }); }
Assert.isNotNull(page.getControl(), JFaceResources.format( JFaceResources.getString("WizardDialog.missingSetControl"), //$NON-NLS-1$ new Object[] { page.getName() }));
JFaceResources.format(JFaceResources.getString("WizardDialog.missingSetControl"), //$NON-NLS-1$ page.getName()));
JFaceResources.format(JFaceResources.getString("WizardDialog.missingSetControl"), //$NON-NLS-1$ page.getName()));