@Override public void getName(AccessibleEvent e) { e.result = JFaceResources.getString("ColorSelector.Name"); //$NON-NLS-1$ } });
/** * @return Returns the error message to display for a wrong limit value. */ protected String getErrorMessage() { return JFaceResources.getString("StringFieldEditor.errorMessage"); //$NON-NLS-1$ }
@Override public void getName(AccessibleEvent e) { e.result = JFaceResources.getString("ColorSelector.Name"); //$NON-NLS-1$ } });
/** * Initialize the list of localized modifiers */ private static void initLocalizedModifiers() { localizedCtrl = JFaceResources.getString("Ctrl").toUpperCase(); //$NON-NLS-1$ localizedShift = JFaceResources.getString("Shift").toUpperCase(); //$NON-NLS-1$ localizedAlt = JFaceResources.getString("Alt").toUpperCase(); //$NON-NLS-1$ localizedCommand = JFaceResources.getString("Command").toUpperCase(); //$NON-NLS-1$ }
/** * Returns the formatted message for the given key in JFace's resource * bundle. * * @param key * the resource name * @param args * the message arguments * @return the string */ public static String format(String key, Object... args) { return MessageFormat.format(getString(key), args); }
@Override public void handleException(Throwable e) { // Workaround to avoid interactive error dialogs during // automated testing if (ignoreErrors) return; if (message == null) message = JFaceResources.getString("SafeRunnable.errorMessage"); //$NON-NLS-1$ Policy.getStatusHandler().show( new Status(IStatus.ERROR, Policy.JFACE, message, e), JFaceResources.getString("SafeRunnable.errorMessage")); //$NON-NLS-1$ }
@Override protected void configureShell(Shell newShell) { super.configureShell(newShell); newShell.setText(JFaceResources.getString("ConfigureColumnsDialog_Title")); //$NON-NLS-1$ }
public void handleException(Throwable e) { // Workaround to avoid interactive error dialogs during // automated testing if (ignoreErrors) return; if (message == null) message = JFaceResources.getString("SafeRunnable.errorMessage"); //$NON-NLS-1$ Policy.getStatusHandler().show( new Status(IStatus.ERROR, Policy.JFACE, message, e), JFaceResources.getString("SafeRunnable.errorMessage")); //$NON-NLS-1$ }
PersistBoundsAction() { super(JFaceResources.getString("PopupDialog.persistBounds"), //$NON-NLS-1$ IAction.AS_CHECK_BOX); setChecked(persistLocation && persistSize); }
PersistLocationAction() { super(JFaceResources.getString("PopupDialog.persistLocation"), //$NON-NLS-1$ IAction.AS_CHECK_BOX); setChecked(persistLocation); }
/** * Shows the "Page Flipping abort" dialog. */ void showPageFlippingAbortDialog() { MessageDialog.open(MessageDialog.ERROR, getShell(), JFaceResources .getString("AbortPageFlippingDialog.title"), //$NON-NLS-1$ JFaceResources.getString("AbortPageFlippingDialog.message"), SWT.SHEET); //$NON-NLS-1$ }
/** * Shows the "Page Flipping abort" dialog. */ void showPageFlippingAbortDialog() { MessageDialog.open(MessageDialog.ERROR, getShell(), JFaceResources .getString("AbortPageFlippingDialog.title"), //$NON-NLS-1$ JFaceResources.getString("AbortPageFlippingDialog.message"), SWT.SHEET); //$NON-NLS-1$ }
@Override public void handleException(Throwable e) { // Workaround to avoid interactive error dialogs during // automated testing if (ignoreErrors) return; if (message == null) message = JFaceResources.getString("SafeRunnable.errorMessage"); //$NON-NLS-1$ Policy.getStatusHandler().show( new Status(IStatus.ERROR, Policy.JFACE, message, e), JFaceResources.getString("SafeRunnable.errorMessage")); //$NON-NLS-1$ }
@Override protected void createButtonsForButtonBar(Composite parent) { parent.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); createButton(parent, DEFAULTS_BUTTON_ID, JFaceResources.getString("defaults"), false); //$NON-NLS-1$ Label l = new Label(parent, SWT.NONE); l.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); l = new Label(parent, SWT.NONE); l.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); GridLayout layout = (GridLayout) parent.getLayout(); layout.numColumns += 2; layout.makeColumnsEqualWidth = false; super.createButtonsForButtonBar(parent); }
@Override public void create() { super.create(); getShell().setText(JFaceResources.getString("ConfigureColumnsDialog_Title")); //$NON-NLS-1$ }
/** * Internal method which returns a string representation of this * selection suitable for debug purposes only. * * @return debug string */ @Override public String toString() { return isEmpty() ? JFaceResources.getString("<empty_selection>") : toList().toString(); //$NON-NLS-1$ } }
protected void configureShell(Shell newShell) { super.configureShell(newShell); newShell.setText(JFaceResources.getString("PreferenceDialog.title")); //$NON-NLS-1$ newShell.addShellListener(new ShellAdapter() { public void shellActivated(ShellEvent e) { if (lastShellSize == null) { lastShellSize = getShell().getSize(); } } }); }
@Override public Object nativeToJava(final TransferData transferData) { final Object convert = super.nativeToJava(transferData); if (isInvalidNativeType(convert)) { RecommendersPlugin.log(new Status(IStatus.ERROR, Policy.JFACE, IStatus.ERROR, JFaceResources .getString("ExtdocProviderTransfer.errorMessage"), null)); //$NON-NLS-1$ } return getExtdocProvider(); }
@Override protected void createButtonsForButtonBar(Composite parent) { // create OK and Cancel buttons by default okButton = createButton(parent, IDialogConstants.OK_ID, JFaceResources.getString("PreferencesDialog.okButtonLabel"), true); //$NON-NLS-1$ getShell().setDefaultButton(okButton); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); }
private ToolBar createHelpImageButton(Composite parent, Image image) { ToolBar toolBar = new ToolBar(parent, SWT.FLAT | SWT.NO_FOCUS); ((GridLayout) parent.getLayout()).numColumns++; toolBar.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_CENTER)); toolBar.setCursor(parent.getDisplay().getSystemCursor(SWT.CURSOR_HAND)); fHelpButton = new ToolItem(toolBar, SWT.CHECK); fHelpButton.setImage(image); fHelpButton.setToolTipText(JFaceResources.getString("helpToolTip")); //$NON-NLS-1$ fHelpButton.addSelectionListener(widgetSelectedAdapter(e -> helpPressed())); return toolBar; }