/** * Set the message text. If the message line currently displays an error, * the message is stored and will be shown after a call to clearErrorMessage * <p> * Shortcut for <code>setMessage(newMessage, NONE)</code> * </p> * * @param newMessage * the message, or <code>null</code> to clear the message */ public void setMessage(String newMessage) { setMessage(newMessage, IMessageProvider.NONE); }
/** * Set the message text. If the message line currently displays an error, * the message is stored and will be shown after a call to clearErrorMessage * <p> * Shortcut for <code>setMessage(newMessage, NONE)</code> * </p> * * @param newMessage * the message, or <code>null</code> to clear the message */ public void setMessage(String newMessage) { setMessage(newMessage, IMessageProvider.NONE); }
/** * Set the message text. If the message line currently displays an error, * the message is stored and will be shown after a call to clearErrorMessage * <p> * Shortcut for <code>setMessage(newMessage, NONE)</code> * </p> * * @param newMessage * the message, or <code>null</code> to clear the message */ public void setMessage(String newMessage) { setMessage(newMessage, IMessageProvider.NONE); }
public void run() { dialog.create(); dialog.setMessage(targetNode.getLabelText()); result[0]= (dialog.open() == Window.OK); } });
public void run() { dialog.create(); dialog.setMessage(targetNode.getLabelText()); dialog.open(); } });
private boolean showPreferencePage(final IPreferenceNode targetNode, Shell shell) { PreferenceManager manager = new PreferenceManager(); manager.addToRoot(targetNode); final PreferenceDialog dialog = new PreferenceDialog(shell, manager); final boolean[] result = new boolean[] {false}; BusyIndicator.showWhile(shell.getDisplay(), () -> { dialog.create(); dialog.setMessage(targetNode.getLabelText()); if (dialog.open() == Window.OK) result[0] = true; }); return result[0]; }
protected void showPreferencePage(String id, IPreferencePage page) { final IPreferenceNode targetNode = new PreferenceNode(id, page); PreferenceManager manager = new PreferenceManager(); manager.addToRoot(targetNode); final PreferenceDialog dialog = new PreferenceDialog(DebugUIPlugin.getShell(), manager); final boolean [] result = new boolean[] { false }; BusyIndicator.showWhile(DebugUIPlugin.getStandardDisplay(), () -> { dialog.create(); dialog.setMessage(targetNode.getLabelText()); result[0] = (dialog.open() == Window.OK); }); }
@Override public void run() { final IPreferenceNode targetNode = new TargetPlatformPreferenceNode(); PreferenceManager manager = new PreferenceManager(); manager.addToRoot(targetNode); Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(); final PreferenceDialog dialog = new PreferenceDialog(shell, manager); BusyIndicator.showWhile(Display.getCurrent(), () -> { dialog.create(); dialog.setMessage(targetNode.getLabelText()); dialog.open(); }); }
/** * Shows the string variables preference page and returns <code>true</code> if OK was pressed. * * @return whether OK was pressed */ private boolean showVariablesPage() { StringVariablePreferencePage page = new StringVariablePreferencePage(); page.setTitle(StringSubstitutionMessages.StringVariableSelectionDialog_1); final IPreferenceNode targetNode = new PreferenceNode("org.eclipse.debug.ui.StringVariablePreferencePage", page); //$NON-NLS-1$ PreferenceManager manager = new PreferenceManager(); manager.addToRoot(targetNode); final PreferenceDialog dialog = new PreferenceDialog(DebugUIPlugin.getShell(), manager); final boolean [] result = new boolean[] { false }; BusyIndicator.showWhile(DebugUIPlugin.getStandardDisplay(), () -> { dialog.create(); dialog.setMessage(targetNode.getLabelText()); result[0] = (dialog.open() == Window.OK); }); return result[0]; }