Example usage for org.eclipse.jface.wizard WizardPage getMessage

List of usage examples for org.eclipse.jface.wizard WizardPage getMessage

Introduction

In this page you can find the example usage for org.eclipse.jface.wizard WizardPage getMessage.

Prototype

@Override
    public String getMessage() 

Source Link

Usage

From source file:org.kalypso.contribs.eclipse.jface.wizard.WizardPageUtilities.java

License:Open Source License

/**
 * Appends a warning message to the existing ones. If none exists, a new one is set.
 * /*from   w  w  w .j av a2  s .  c  om*/
 * @param message
 *          The warning that should be appended.
 * @param page
 *          The wizard page, which should display the warning.
 */
public static void appendWarning(final String message, final WizardPage page) {
    /* If the message should be resetted ... */
    if (message == null || "".equals(message)) //$NON-NLS-1$
    {
        /* ... do it! */
        page.setMessage(null);
        return;
    }

    if (page.getMessage() == null)
        page.setMessage(message, IMessageProvider.WARNING);
    else
        page.setMessage(page.getMessage() + "\n" + message, IMessageProvider.WARNING);
}

From source file:org.kalypso.contribs.eclipse.jface.wizard.WizardPageUtilities.java

License:Open Source License

/**
 * Appends an error message to the existing ones. If none exists, a new one is set.
 * /*from ww  w  .  j  a va  2s  .  c o m*/
 * @param message
 *          The error that should be appended.
 * @param page
 *          The wizard page, which should display the error.
 */
public static void appendError(final String message, final WizardPage page) {
    /* If the message should be resetted ... */
    if (message == null || "".equals(message)) //$NON-NLS-1$
    {
        /* ... do it! */
        page.setErrorMessage(null);
        return;
    }

    if (page.getMessage() == null)
        page.setErrorMessage(message);
    else
        page.setErrorMessage(page.getMessage() + "\n" + message);
}