Eclipse Platform
Release 3.2
org.eclipse.jface.util

Class SafeRunnable

    • Constructor Detail

      • SafeRunnable

        public SafeRunnable()
        Creates a new instance of SafeRunnable with a default error message.
      • SafeRunnable

        public SafeRunnable(String message)
        Creates a new instance of SafeRunnable with the given error message.
        Parameters:
        message - the error message to use
    • Method Detail

      • handleException

        public void handleException(Throwable e)
        Description copied from interface: ISafeRunnable
        Handles an exception thrown by this runnable's run method. The processing done here should be specific to the particular usecase for this runnable. Generalized exception processing (e.g., logging in the platform's log) is done by the Platform's run mechanism.
        Specified by:
        handleException in interface ISafeRunnable
        Parameters:
        e - an exception which occurred during processing the body of this runnable (i.e., in run())
        See Also:
        Platform.run(ISafeRunnable)
      • getIgnoreErrors

        public static boolean getIgnoreErrors(boolean flag)
        Deprecated. use getIgnoreErrors()
        Flag to avoid interactive error dialogs during automated testing.
      • getIgnoreErrors

        public static boolean getIgnoreErrors()
        Flag to avoid interactive error dialogs during automated testing.
        Since:
        3.0
      • setIgnoreErrors

        public static void setIgnoreErrors(boolean flag)
        Flag to avoid interactive error dialogs during automated testing.
      • getRunner

        public static ISafeRunnableRunner getRunner()
        Returns the safe runnable runner.
        Returns:
        the safe runnable runner
        Since:
        3.1
      • setRunner

        public static void setRunner(ISafeRunnableRunner runner)
        Sets the safe runnable runner.
        Parameters:
        runner - the runner to set, or null to reset to the default runner
        Since:
        3.1
      • run

        public static void run(ISafeRunnable runnable)
        Runs the given safe runnable using the safe runnable runner. This is a convenience method, equivalent to: SafeRunnable.getRunner().run(runnable).
        Parameters:
        runnable - the runnable to run
        Since:
        3.1
Eclipse Platform
Release 3.2

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.