01: /*******************************************************************************
02: * Copyright (c) 2000, 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: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.ui;
11:
12: /**
13: * Plug-ins that register a startup extension will be activated after
14: * the Workbench initializes and have an opportunity to run
15: * code that can't be implemented using the normal contribution
16: * mechanisms.
17: *
18: * @since 2.0
19: */
20: public interface IStartup {
21: /**
22: * Will be called in a separate thread after the workbench initializes.
23: * <p>
24: * Note that most workbench methods must be called in the UI thread
25: * since they may access SWT. For example, to obtain the current workbench
26: * window, use:
27: * <code>
28: * <pre>
29: * final IWorkbench workbench = PlatformUI.getWorkbench();
30: * workbench.getDisplay().asyncExec(new Runnable() {
31: * public void run() {
32: * IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
33: * if (window != null) {
34: * // do something
35: * }
36: * }
37: * });
38: * </pre>
39: * </code>
40: * </p>
41: * @see org.eclipse.swt.widgets.Display#asyncExec
42: * @see org.eclipse.swt.widgets.Display#syncExec
43: */
44: public void earlyStartup();
45: }
|