/** * Method getWorkbenchErrorHandler() * @see org.eclipse.ui.internal.ide.application.IDEWorkbenchAdvisor#getWorkbenchErrorHandler() */ @Override public synchronized AbstractStatusHandler getWorkbenchErrorHandler() { return new AbstractStatusHandler() { @Override public void handle(final StatusAdapter statusAdapter, final int style) { final int severity = statusAdapter.getStatus().getSeverity(); if ( severity == IStatus.INFO || severity == IStatus.CANCEL ) return; final Throwable e = statusAdapter.getStatus().getException(); final String message = statusAdapter.getStatus().getMessage(); // Stupid Eclipse if ( !message.contains("File toolbar contribution item") ) System.out.println("GAMA Caught a workbench message : " + message); if ( e != null ) { e.printStackTrace(); } } }; }
@Override public synchronized AbstractStatusHandler getWorkbenchErrorHandler() { return new WorkbenchErrorHandler() { @Override public void handle(StatusAdapter statusAdapter, int style) { if (isClosing) { // we are shutting down, so just log WorkbenchPlugin.log(statusAdapter.getStatus()); return; } if ((style & StatusManager.SHOW) != 0) { style = style | StatusManager.BLOCK; } super.handle(statusAdapter, style); } }; }
public synchronized AbstractStatusHandler getWorkbenchErrorHandler() { if (ideWorkbenchErrorHandler == null) { ideWorkbenchErrorHandler = new IDEWorkbenchErrorHandler(getWorkbenchConfigurer()); } return ideWorkbenchErrorHandler; }