Java Code Examples for org.eclipse.ui.statushandlers.StatusManager#SHOW

The following examples show how to use org.eclipse.ui.statushandlers.StatusManager#SHOW . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Activator.java    From eip-designer with Apache License 2.0 5 votes vote down vote up
/**
 * Handle an error. The error is logged. If <code>show</code> is
 * <code>true</code> the error is shown to the user.
 * @param message a localized message
 * @param throwable
 * @param show
 */
public static void handleError(String message, Throwable throwable, boolean show) {
   IStatus status = new Status(IStatus.ERROR, getPluginId(), message, throwable);
   int style = StatusManager.LOG;
   if (show) {
      style |= StatusManager.SHOW;
   }
   StatusManager.getManager().handle(status, style);
}
 
Example 2
Source File: Activator.java    From eip-designer with Apache License 2.0 5 votes vote down vote up
/**
 * Handle an error. The error is logged. If <code>show</code> is
 * <code>true</code> the error is shown to the user.
 * @param message a localized message
 * @param throwable
 * @param show
 */
public static void handleError(String message, Throwable throwable, boolean show) {
   IStatus status = new Status(IStatus.ERROR, getPluginId(), message, throwable);
   int style = StatusManager.LOG;
   if (show) {
      style |= StatusManager.SHOW;
   }
   StatusManager.getManager().handle(status, style);
}
 
Example 3
Source File: BonitaStatusHandler.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void handle(StatusAdapter statusAdapter, int style) {
    if (style == StatusManager.SHOW) {
        String message = statusAdapter.getStatus().getMessage();
        if (message != null && message.contains("Server Tomcat")) {
            return;
        }else {
            super.handle(statusAdapter, style);
        }
    } else {
        super.handle(statusAdapter, style);
    }
}