List of usage examples for org.eclipse.jface.dialogs IMessageProvider INFORMATION
int INFORMATION
To view the source code for org.eclipse.jface.dialogs IMessageProvider INFORMATION.
Click Source Link
From source file:de.fu_berlin.inf.dpp.videosharing.preferences.XugglerEncoderPreferencePage.java
License:Open Source License
public XugglerEncoderPreferencePage() { super(FieldEditorPreferencePage.GRID); SarosPluginContext.initComponent(this); setPreferenceStore(saros.getPreferenceStore()); setDescription("Settings for the videostream Xuggler produces"); VideoSharingPreferenceHelper.checkXugglerInstallation(this); if (!getPreferenceStore().getString(PreferenceConstants.ENCODING_CODEC).equals(Codec.XUGGLER.name())) setMessage("You should choose Xuggler on the encoder preference-page.", IMessageProvider.INFORMATION); }
From source file:de.lmu.ifi.dbs.knowing.debug.ui.wizard.pages.CreateProcessorPage.java
License:Apache License
private void updateStatus(String message) { setErrorMessage(message);// w w w .j av a 2s . c o m if (message == null) setMessage("Create processor implementation", IMessageProvider.INFORMATION); setPageComplete(message == null); }
From source file:de.lmu.ifi.dbs.medmon.base.ui.validation.FormValidationAdapter.java
License:Open Source License
/** * Configures the <code>FormText</code> to display the errors. * //from ww w.j av a2 s . c om * @param form * The parent <code>Form</code> * @param formText * The <code>FormText</code> to be configured */ private void configureFormText(final Form form, FormText formText) { formText.addHyperlinkListener(new HyperlinkAdapter() { public void linkActivated(HyperlinkEvent e) { String is = (String) e.getHref(); try { int index = Integer.parseInt(is); IMessage[] messages = form.getChildrenMessages(); IMessage message = messages[index]; Control c = message.getControl(); ((FormText) e.widget).getShell().dispose(); if (c != null && !c.isDisposed()) c.setFocus(); } catch (NumberFormatException ex) { } } }); formText.setImage("error", getImage(IMessageProvider.ERROR)); //$NON-NLS-1$ formText.setImage("warning", getImage(IMessageProvider.WARNING)); //$NON-NLS-1$ formText.setImage("info", getImage(IMessageProvider.INFORMATION)); //$NON-NLS-1$ }
From source file:de.lmu.ifi.dbs.medmon.base.ui.validation.FormValidationAdapter.java
License:Open Source License
/** * Creates the content for the error shell. * //from ww w. j a va 2 s .c o m * @param messages * The messages to be displayed * @return the messages as <code>String</code> */ private String createErrorShellContent(IMessage[] messages) { StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); pw.println("<form>"); //$NON-NLS-1$ for (int i = 0; i < messages.length; i++) { IMessage message = messages[i]; pw.print("<li vspace=\"false\" style=\"image\" indent=\"16\" value=\""); //$NON-NLS-1$ switch (message.getMessageType()) { case IMessageProvider.ERROR: pw.print("error"); //$NON-NLS-1$ break; case IMessageProvider.WARNING: pw.print("warning"); //$NON-NLS-1$ break; case IMessageProvider.INFORMATION: pw.print("info"); //$NON-NLS-1$ break; } pw.print("\"> <a href=\""); //$NON-NLS-1$ pw.print(i + ""); //$NON-NLS-1$ pw.print("\">"); //$NON-NLS-1$ if (message.getPrefix() != null) pw.print(message.getPrefix()); pw.print(message.getMessage()); pw.println("</a></li>"); //$NON-NLS-1$ } pw.println("</form>"); //$NON-NLS-1$ pw.flush(); return sw.toString(); }
From source file:de.lmu.ifi.dbs.medmon.base.ui.validation.FormValidationAdapter.java
License:Open Source License
/** * Returns the <code>Image</code> for the given message type. * //from w w w . ja v a2 s. c o m * @param type * The given message typ * @return the <code>Image</code> */ private Image getImage(int type) { switch (type) { case IMessageProvider.ERROR: return null; //$NON-NLS-1$ case IMessageProvider.WARNING: return null; //$NON-NLS-1$ case IMessageProvider.INFORMATION: return null; //$NON-NLS-1$ } return null; }
From source file:de.tub.tfs.henshin.tggeditor.dialogs.TextDialog.java
License:Open Source License
@Override public void create() { super.create(); // This is not necessary; the dialog will become bigger as the text grows but at the same time, // the user will be able to see all (or at least more) of the error message at once //getShell ().setSize (300, 300); setTitle(title);/*from ww w . j a va 2s . c o m*/ setMessage(text, IMessageProvider.INFORMATION); }
From source file:de.walware.ecommons.ui.components.StatusInfo.java
License:Open Source License
/** * Applies the status to the status line of a dialog page. *//*from ww w .j a v a 2s .c om*/ public static void applyToStatusLine(final DialogPage page, final IStatus status) { String message = status.getMessage(); switch (status.getSeverity()) { case IStatus.OK: page.setMessage(null, IMessageProvider.NONE); page.setErrorMessage(null); break; case IStatus.WARNING: page.setMessage(message, IMessageProvider.WARNING); page.setErrorMessage(null); break; case IStatus.INFO: page.setMessage(message, IMessageProvider.INFORMATION); page.setErrorMessage(null); break; default: if (message.isEmpty()) { message = null; } page.setMessage(null); page.setErrorMessage(message); break; } }
From source file:de.walware.ecommons.ui.components.StatusInfo.java
License:Open Source License
/** * Applies the status to the status line of a title area dialog. *//*from ww w. j a v a 2 s .c o m*/ public static void applyToStatusLine(final TitleAreaDialog page, final IStatus status) { String message = status.getMessage(); switch (status.getSeverity()) { case IStatus.OK: if (message.equals("OK") || message.equals(OK_STATUS.getMessage())) { //$NON-NLS-1$ page.setMessage(null, IMessageProvider.NONE); } else { page.setMessage(message, IMessageProvider.NONE); } page.setMessage(!status.getMessage().equals("OK") ? status.getMessage() : null, IMessageProvider.NONE); page.setErrorMessage(null); break; case IStatus.WARNING: page.setMessage(message, IMessageProvider.WARNING); page.setErrorMessage(null); break; case IStatus.INFO: page.setMessage(message, IMessageProvider.INFORMATION); page.setErrorMessage(null); break; default: if (message.length() == 0) { message = null; } page.setMessage(null); page.setErrorMessage(message); break; } }
From source file:de.walware.ecommons.ui.dialogs.TitleAreaStatusUpdater.java
License:Open Source License
@Override public void statusChanged(final IStatus status) { // setErrorMessage(null); switch (status.getSeverity()) { case IStatus.ERROR: fDialog.setMessage(status.getMessage(), IMessageProvider.ERROR); break;/*from w w w.j av a 2 s . c o m*/ case IStatus.WARNING: fDialog.setMessage(status.getMessage(), IMessageProvider.WARNING); break; case IStatus.INFO: fDialog.setMessage(status.getMessage(), IMessageProvider.INFORMATION); break; case IStatus.OK: fDialog.setMessage(fDefaultMessage); break; default: break; } }
From source file:edu.panimalar.ocr.ui.dialogs.OCRSelectionDialog.java
License:Open Source License
@Override protected Control createContents(Composite parent) { Control contents = super.createContents(parent); setTitle("Select OCR"); setMessage("Select OCR by which the image will be read.", IMessageProvider.INFORMATION); return contents; }