| Will be called in a separate thread after the workbench initializes.
Note that most workbench methods must be called in the UI thread
since they may access SWT. For example, to obtain the current workbench
window, use:
final IWorkbench workbench = PlatformUI.getWorkbench();
workbench.getDisplay().asyncExec(new Runnable() {
public void run() {
IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
if (window != null) {
// do something
}
}
});
See Also: org.eclipse.swt.widgets.Display.asyncExec See Also: org.eclipse.swt.widgets.Display.syncExec |