Example usage for org.eclipse.jface.dialogs IMessageProvider INFORMATION

List of usage examples for org.eclipse.jface.dialogs IMessageProvider INFORMATION

Introduction

In this page you can find the example usage for org.eclipse.jface.dialogs IMessageProvider INFORMATION.

Prototype

int INFORMATION

To view the source code for org.eclipse.jface.dialogs IMessageProvider INFORMATION.

Click Source Link

Document

Constant for an info message (value 1).

Usage

From source file:org.eclipse.gmf.internal.bridge.transform.ModelConfigurationPage.java

License:Open Source License

void setStatusMessage(IStatus status) {
    if (status == null || status.isOK()) {
        setMessage(null);//from ww  w  .  j a  v  a  2s  .c  o m
        setErrorMessage(null);
    } else if (IStatus.INFO == status.getSeverity()) {
        setMessage(status.getMessage(), IMessageProvider.INFORMATION);
        setErrorMessage(null);
    } else if (IStatus.WARNING == status.getSeverity()) {
        setMessage(status.getMessage(), IMessageProvider.WARNING);
        setErrorMessage(null);
    } else if (IStatus.ERROR == status.getSeverity()) {
        setMessage(null);
        setErrorMessage(status.getMessage());
    } else if (IStatus.CANCEL == status.getSeverity()) {
        setMessage(null);
        setErrorMessage(status.getMessage());
    }
}

From source file:org.eclipse.gmf.internal.bridge.transform.ViewmapProducerWizardPage.java

License:Open Source License

private void setStatus(IStatus s) {
    if (s.isOK()) {
        setMessage(null);/* ww w. j  a  v a  2 s  .  c  o  m*/
        setPageComplete(true);
    } else {
        setMessage(s.getMessage(), IMessageProvider.INFORMATION);
        setPageComplete(s.getSeverity() < IStatus.WARNING);
    }
}

From source file:org.eclipse.gmf.internal.graphdef.codegen.ui.ConverterSection.java

License:Open Source License

public void validateOptions(TemplateOption changed) {
    if ((myUseRuntimeFiguresOption.equals(changed) || myNeedsMapModeOption.equals(changed))
            && shouldWarnLiteVerstionDoesNotSupportMapMode) {
        boolean useRuntimeFigures = myUseRuntimeFiguresOption.isSelected();
        boolean needsMapMode = myNeedsMapModeOption.isSelected();
        if (!useRuntimeFigures && needsMapMode) {
            getTheOnlyPage().setMessage("It is not recommended to use IMapMode for pure-GEF diagram editors",
                    IMessageProvider.INFORMATION);
        } else {//from   w w w  .  ja  v a 2s  .  c o  m
            getTheOnlyPage().setMessage(null);
        }
    }
    if (OPTION_NEEDS_MAP_MODE.equals(changed)) {
        //does not affect state
        return;
    }
    if (validateInputPath() && validatePackageName() && validateOutputOption(myOutputDiagramElementsPathOption)
            && validateOutputOption(myOutputGalleryPathOption)) {
        resetPageState();
    }
}

From source file:org.eclipse.gmf.internal.graphdef.codegen.ui.FigureGeneratorOptionsDialog.java

License:Open Source License

protected void warnLiteVerstionDoesNotSupportMapMode() {
    if (!useRuntimeFiguresButton.getSelection() && useMapModeButton.getSelection()) {
        setMessage("It is not recommended to use IMapMode for pure-GEF diagram editors",
                IMessageProvider.INFORMATION);
    } else {// w  w  w . j  a  v a2 s.  c  om
        setMessage(null);
    }
}

From source file:org.eclipse.ice.client.widgets.ICEFormEditor.java

License:Open Source License

/**
 * This operation posts a status message to the ICEFormEditor should be
 * displayed to the user or system viewing the widget. It is a simple
 * string./*w  w w. ja  va 2  s . co m*/
 * 
 * @param statusMessage
 *            The status message.
 */
public void updateStatus(String statusMessage) {

    // Local Declarations
    final String message = statusMessage;

    // Sync with the display
    PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
        @Override
        public void run() {
            // Post the message to the update manager
            if (getHeaderForm() != null) {
                final IMessageManager messageManager = getHeaderForm().getMessageManager();
                messageManager.addMessage("statusUpdate", message, null, IMessageProvider.INFORMATION);
            }
        }
    });
}

From source file:org.eclipse.jdt.debug.ui.launchConfigurations.AbstractVMInstallPage.java

License:Open Source License

/**
 * Sets this page's message based on the status severity.
 * /*from w w w.  j av a2s  .c om*/
 * @param status status with message and severity
 */
protected void setStatusMessage(IStatus status) {
    if (status.isOK()) {
        setMessage(status.getMessage());
    } else {
        switch (status.getSeverity()) {
        case IStatus.ERROR:
            setMessage(status.getMessage(), IMessageProvider.ERROR);
            break;
        case IStatus.INFO:
            setMessage(status.getMessage(), IMessageProvider.INFORMATION);
            break;
        case IStatus.WARNING:
            setMessage(status.getMessage(), IMessageProvider.WARNING);
            break;
        default:
            break;
        }
    }
}

From source file:org.eclipse.jpt.jpa.ui.internal.properties.DataModelPropertyPage.java

License:Open Source License

/**
 * Set the error message for this page based on the last error in the ValidationStatus.
 *///from   www  .j  a v a 2s. c  o  m
protected void setErrorMessage() {
    String error = status.getLastErrMsg();
    if (error == null) {
        if (getErrorMessage() != null)
            setErrorMessage((String) null);
        String warning = status.getLastWarningMsg();
        if (warning == null) {
            if (getMessage() != null && getMessageType() == IMessageProvider.WARNING)
                setMessage(null, IMessageProvider.WARNING);
            else {
                String info = status.getLastInfoMsg();
                if (info == null) {
                    if (getMessage() != null && getMessageType() == IMessageProvider.INFORMATION)
                        setMessage(null, IMessageProvider.INFORMATION);
                } else if (!info.equals(getMessage())) {
                    setMessage(info, IMessageProvider.INFORMATION);
                }
            }
        } else if (!warning.equals(getMessage()))
            setMessage(warning, IMessageProvider.WARNING);
    } else if (!error.equals(getErrorMessage()))
        setErrorMessage(error);
}

From source file:org.eclipse.jst.ws.internal.axis.consumption.ui.preferences.AxisEmitterPreferencePage.java

License:Open Source License

private void applyToStatusLine(DialogPage page, IStatus status) {
    String message = status.getMessage();
    switch (status.getSeverity()) {
    case IStatus.OK:
        page.setMessage(null, IMessageProvider.NONE);
        page.setErrorMessage(null);//  ww  w.j a  v a2 s  .  c o m
        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:org.eclipse.jst.ws.internal.consumption.ui.wizard.RuntimeServerSelectionDialog.java

License:Open Source License

public void validateServerRuntimeSelection() {
    IStatus status = getStatus();// w ww  . j  a  v  a2 s  .  c  o m
    String message = new String(messageBanner_);
    message = new String(status.getMessage());
    if (status.getSeverity() == Status.ERROR) {
        setMessage(message, IMessageProvider.ERROR);
        getButton(IDialogConstants.OK_ID).setEnabled(false);
    }
    if (status.getSeverity() == Status.WARNING) {
        setMessage(message, IMessageProvider.WARNING);
        getButton(IDialogConstants.OK_ID).setEnabled(true);
    }
    if (status.getSeverity() == Status.INFO) {
        setMessage(message, IMessageProvider.INFORMATION);
        getButton(IDialogConstants.OK_ID).setEnabled(false);
    }
    if (status.getSeverity() == Status.OK) {
        setMessage(messageBanner_);
        getButton(IDialogConstants.OK_ID).setEnabled(true);
    }
}

From source file:org.eclipse.libra.framework.editor.ui.internal.AbstractBundleEditorPage.java

License:Open Source License

/**
 * Sets the status message of the editor with the provide info message. 
 * //w  w w .  jav a 2 s .  c om
 * @param message info message to set. 
 */
public void setInfoStatus(String message) {
    sform.getForm().setMessage(message, IMessageProvider.INFORMATION);
}