01: /*******************************************************************************
02: * Copyright (c) 2005, 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * Chris Gross (schtoo@schtoo.com) - initial API and implementation
10: * (bug 49497 [RCP] JFace dependency on org.eclipse.core.runtime enlarges standalone JFace applications)
11: *******************************************************************************/package org.eclipse.jface.util;
12:
13: import org.eclipse.core.runtime.ISafeRunnable;
14:
15: /**
16: * Runs a safe runnables.
17: * <p>
18: * Clients may provide their own implementation to change
19: * how safe runnables are run from within JFace.
20: * </p>
21: *
22: * @see SafeRunnable#getRunner()
23: * @see SafeRunnable#setRunner(ISafeRunnableRunner)
24: * @see SafeRunnable#run(ISafeRunnable)
25: * @since 3.1
26: */
27: public interface ISafeRunnableRunner {
28:
29: /**
30: * Runs the runnable. All <code>ISafeRunnableRunners</code> must catch any exception
31: * thrown by the <code>ISafeRunnable</code> and pass the exception to
32: * <code>ISafeRunnable.handleException()</code>.
33: * @param code the code executed as a save runnable
34: *
35: * @see SafeRunnable#run(ISafeRunnable)
36: */
37: public abstract void run(ISafeRunnable code);
38:
39: }
|