Example usage for org.eclipse.jface.util SafeRunnable getIgnoreErrors

List of usage examples for org.eclipse.jface.util SafeRunnable getIgnoreErrors

Introduction

In this page you can find the example usage for org.eclipse.jface.util SafeRunnable getIgnoreErrors.

Prototype

public static boolean getIgnoreErrors() 

Source Link

Document

Flag to avoid interactive error dialogs during automated testing.

Usage

From source file:org.eclipse.e4.ui.internal.workbench.swt.E4Testable.java

License:Open Source License

/**
 * The <code>WorkbenchTestable</code> implementation of this
 * <code>TestableObject</code> method ensures that the workbench has been
 * set.//from  w ww  . j  a va  2  s .  co  m
 */
public void testingStarting() {
    Assert.isNotNull(workbench);
    oldAutomatedMode = ErrorDialog.AUTOMATED_MODE;
    ErrorDialog.AUTOMATED_MODE = true;
    oldIgnoreErrors = SafeRunnable.getIgnoreErrors();
    SafeRunnable.setIgnoreErrors(true);
}

From source file:org.fusesource.ide.camel.test.util.editor.AbstractCamelEditorIT.java

License:Open Source License

@Before
public void setup() throws Exception {
    IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
    IWorkbenchPart welcomePage = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage()
            .getActivePart();//from  w w w  .  j  a  va2  s  . c  o  m
    welcomePage.dispose();
    page.closeAllEditors(false);
    page.closeAllPerspectives(false, false);
    PlatformUI.getWorkbench().showPerspective(FusePerspective.ID, page.getWorkbenchWindow());
    safeRunnableIgnoreErrorStateBeforeTests = SafeRunnable.getIgnoreErrors();
    SafeRunnable.setIgnoreErrors(false);
    statusHandlerBeforetest = Policy.getStatusHandler();
    statusHandlerCalled = false;
    Policy.setStatusHandler(new StatusHandler() {

        @Override
        public void show(IStatus status, String title) {
            statusHandlerCalled = true;
        }
    });
}