Bug 293512 [Workbench] Make IWorkbench into an OSGi service
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 Build Identifier: I would like to be when the IWorkbench is available for use. I am currently being started before the IWorkbench is ready and it is causing severe problems. If IWorkbench was a OSGi service, then I could use a ServiceTracker to acquire the initialized IWorkbench when it is available. Reproducible: Always
tests/org.eclipse.ui.tests.harness/src/org/eclipse/ui/tests/harness/util/UITestCase.java
public void closeAllTestWindows() {
        Iterator iter = new ArrayList(testWindows).iterator();
        while (iter.hasNext()) {
            IWorkbenchWindow win = (IWorkbenchWindow) iter.next();
            win.close();
        }
        testWindows.clear();
    }
    /**
     * Open a test page with the empty perspective in a window.
     */
    public IWorkbenchPage openTestPage(IWorkbenchWindow win) {
        IWorkbenchPage[] pages = openTestPage(win, 1);
        if (pages != null)
            return pages[0];
        else
            return null;
    }
    /**
     * Open "n" test pages with the empty perspective in a window.
     */
    public IWorkbenchPage[] openTestPage(IWorkbenchWindow win, int pageTotal) {
        try {
            IWorkbenchPage[] pages = new IWorkbenchPage[pageTotal];
            IAdaptable input = getPageInput();
            for (int i = 0; i < pageTotal; i++) {
                pages[i] = win.openPage(EmptyPerspective.PERSP_ID, input);
            }
            return pages;
        } catch (WorkbenchException e) {