Examples of StartupRunnable


Examples of org.eclipse.ui.internal.StartupThreading.StartupRunnable

   * Initialize the workbench colors.
   *
   * @since 3.0
   */
  private void initializeColors() {
    StartupThreading.runWithoutExceptions(new StartupRunnable() {
      public void runWithException() {
        WorkbenchColors.startup();
      }});
  }
View Full Code Here

Examples of org.eclipse.ui.internal.StartupThreading.StartupRunnable

   * initializing the command-based services, this also parses the registry
   * and hooks up all the required listeners.
   */
  private final void initializeDefaultServices() {
   
    StartupThreading.runWithoutExceptions(new StartupRunnable() {

      public void runWithException() {
        serviceLocator.registerService(IWorkbench.class,
            Workbench.this);
      }
    });
   
    // TODO Correctly order service initialization
    // there needs to be some serious consideration given to
    // the services, and hooking them up in the correct order
    final EvaluationService evaluationService = new EvaluationService();
   
    StartupThreading.runWithoutExceptions(new StartupRunnable() {

      public void runWithException() {
        serviceLocator.registerService(IEvaluationService.class,
            evaluationService);
      }
    });
   
   

    StartupThreading.runWithoutExceptions(new StartupRunnable() {

      public void runWithException() {
        serviceLocator.registerService(ISaveablesLifecycleListener.class,
            new SaveablesList());
      }});
   
    /*
     * Phase 1 of the initialization of commands. When this phase completes,
     * all the services and managers will exist, and be accessible via the
     * getService(Object) method.
     */
    StartupThreading.runWithoutExceptions(new StartupRunnable() {

      public void runWithException() {
        Command.DEBUG_COMMAND_EXECUTION = Policy.DEBUG_COMMANDS;
        commandManager = new CommandManager();
      }});
   
    final CommandService [] commandService = new CommandService[1];
    StartupThreading.runWithoutExceptions(new StartupRunnable() {

      public void runWithException() {
        commandService[0] = new CommandService(commandManager);
        commandService[0].readRegistry();
        serviceLocator.registerService(ICommandService.class, commandService[0]);

      }});
   
    StartupThreading.runWithoutExceptions(new StartupRunnable() {

      public void runWithException() {
        ContextManager.DEBUG = Policy.DEBUG_CONTEXTS;
        contextManager = new ContextManager();
        }});
   
    final IContextService contextService = new ContextService(
        contextManager);
   
    StartupThreading.runWithoutExceptions(new StartupRunnable() {

      public void runWithException() {
        contextService.readRegistry();
        }});
   
    serviceLocator.registerService(IContextService.class, contextService);
 
   
    final IHandlerService [] handlerService = new IHandlerService[1];
 
    StartupThreading.runWithoutExceptions(new StartupRunnable() {

      public void runWithException() {
        handlerService[0] = new HandlerService(
            commandService[0], evaluationService);
        handlerService[0].readRegistry();
      }});
   
    serviceLocator.registerService(IHandlerService.class, handlerService[0]);

    final IBindingService [] bindingService = new BindingService[1];
   
    StartupThreading.runWithoutExceptions(new StartupRunnable() {

      public void runWithException() {
        BindingManager.DEBUG = Policy.DEBUG_KEY_BINDINGS;
        bindingManager = new BindingManager(contextManager, commandManager);
        bindingService[0] = new BindingService(
            bindingManager, commandService[0], Workbench.this);
       
      }});
   
    bindingService[0].readRegistryAndPreferences(commandService[0]);
    serviceLocator.registerService(IBindingService.class, bindingService[0]);

    final CommandImageManager commandImageManager = new CommandImageManager();
    final CommandImageService commandImageService = new CommandImageService(
        commandImageManager, commandService[0]);
    commandImageService.readRegistry();
    serviceLocator.registerService(ICommandImageService.class,
        commandImageService);
   
    final WorkbenchMenuService menuService = new WorkbenchMenuService(serviceLocator);
   
    serviceLocator.registerService(IMenuService.class, menuService);
    // the service must be registered before it is initialized - its
    // initialization uses the service locator to address a dependency on
    // the menu service
    StartupThreading.runWithoutExceptions(new StartupRunnable() {

      public void runWithException() {
        menuService.readRegistry();
      }});

    /*
     * Phase 2 of the initialization of commands. The source providers that
     * the workbench provides are creating and registered with the above
     * services. These source providers notify the services when particular
     * pieces of workbench state change.
     */
    final ISourceProviderService sourceProviderService = new SourceProviderService();
    serviceLocator.registerService(ISourceProviderService.class,
        sourceProviderService);
    StartupThreading.runWithoutExceptions(new StartupRunnable() {

      public void runWithException() {
        final ActiveShellSourceProvider activeShellSourceProvider = new ActiveShellSourceProvider(
            Workbench.this);
        evaluationService.addSourceProvider(activeShellSourceProvider);
        handlerService[0].addSourceProvider(activeShellSourceProvider);
        contextService.addSourceProvider(activeShellSourceProvider);
        menuService.addSourceProvider(activeShellSourceProvider);
        sourceProviderService.registerProvider(activeShellSourceProvider);   
      }});
   
    StartupThreading.runWithoutExceptions(new StartupRunnable() {

      public void runWithException() {
        final ActivePartSourceProvider activePartSourceProvider = new ActivePartSourceProvider(
            Workbench.this);
        evaluationService.addSourceProvider(activePartSourceProvider);
        handlerService[0].addSourceProvider(activePartSourceProvider);
        contextService.addSourceProvider(activePartSourceProvider);
        menuService.addSourceProvider(activePartSourceProvider);
        sourceProviderService.registerProvider(activePartSourceProvider);
      }});
    StartupThreading.runWithoutExceptions(new StartupRunnable() {

      public void runWithException() {
        final ActiveContextSourceProvider activeContextSourceProvider = new ActiveContextSourceProvider(
            contextService);
        evaluationService.addSourceProvider(activeContextSourceProvider);
        handlerService[0].addSourceProvider(activeContextSourceProvider);
        menuService.addSourceProvider(activeContextSourceProvider);
        sourceProviderService.registerProvider(activeContextSourceProvider);
      }});
    StartupThreading.runWithoutExceptions(new StartupRunnable() {

      public void runWithException() {
        final CurrentSelectionSourceProvider currentSelectionSourceProvider = new CurrentSelectionSourceProvider(
            Workbench.this);
        evaluationService.addSourceProvider(currentSelectionSourceProvider);
View Full Code Here

Examples of org.eclipse.ui.internal.StartupThreading.StartupRunnable

      win = getWorkbenchWindows()[0];
    }
   
    final String threadPerspId = perspId;
    final IWorkbenchWindow threadWin = win;
      StartupThreading.runWithoutExceptions(new StartupRunnable() {
      public void runWithException() throws Throwable {
        try {
          showPerspective(threadPerspId, threadWin);
        } catch (WorkbenchException e) {
          String msg = "Workbench exception showing specified command line perspective on startup."; //$NON-NLS-1$
View Full Code Here

Examples of org.eclipse.ui.internal.StartupThreading.StartupRunnable

  }

  private void doOpenFirstTimeWindow() {
    try {
      final IAdaptable input [] = new IAdaptable[1];
      StartupThreading.runWithoutExceptions(new StartupRunnable() {

        public void runWithException() throws Throwable {
          input[0] = getDefaultPageInput();
        }});
     
      busyOpenWorkbenchWindow(getPerspectiveRegistry()
          .getDefaultPerspective(), input[0]);
    } catch (final WorkbenchException e) {
      // Don't use the window's shell as the dialog parent,
      // as the window is not open yet (bug 76724).
      StartupThreading.runWithoutExceptions(new StartupRunnable() {

        public void runWithException() throws Throwable {
          ErrorDialog.openError(null,
              WorkbenchMessages.Problems_Opening_Page, e.getMessage(), e
                  .getStatus());
View Full Code Here

Examples of org.eclipse.ui.internal.StartupThreading.StartupRunnable

        // Restore the saved state
        final IStatus restoreResult = restoreState(memento);
        reader.close();
        if (restoreResult.getSeverity() == IStatus.ERROR) {
          StartupThreading
              .runWithoutExceptions(new StartupRunnable() {

                public void runWithException() throws Throwable {
                  ErrorDialog
                      .openError(
                          null,
                          WorkbenchMessages.Workspace_problemsTitle,
                          WorkbenchMessages.Workbench_problemsRestoringMsg,
                          restoreResult);
                }
              });

        }
      }

      public void handleException(final Throwable e) {
        StartupThreading.runWithoutExceptions(new StartupRunnable() {

          public void runWithException() {
            handle(e);
            String msg = e.getMessage() == null ? "" : e.getMessage(); //$NON-NLS-1$
            result[0] = new Status(IStatus.ERROR,
View Full Code Here

Examples of org.eclipse.ui.internal.StartupThreading.StartupRunnable

        .createWriteRoot(IWorkbenchConstants.TAG_WORKBENCH);
    final IStatus status = saveState(memento);
    if (status.getSeverity() != IStatus.OK) {
      // don't use newWindow as parent because it has not yet been opened
      // (bug 76724)
      StartupThreading.runWithoutExceptions(new StartupRunnable() {

        public void runWithException() throws Throwable {
          ErrorDialog.openError(null,
              WorkbenchMessages.Workbench_problemsSaving,
              WorkbenchMessages.Workbench_problemsSavingMsg, status);
View Full Code Here

Examples of org.eclipse.ui.internal.StartupThreading.StartupRunnable

    // Read the workbench windows.
    for (int i = 0; i < children.length; i++) {
      childMem = children[i];
      final WorkbenchWindow [] newWindow = new WorkbenchWindow[1];
     
      StartupThreading.runWithoutExceptions(new StartupRunnable() {

        public void runWithException() {
          newWindow[0] = newWorkbenchWindow();
          newWindow[0].create()
        }});
      createdWindows[i] = newWindow[0];

      // allow the application to specify an initial perspective to open
      // @issue temporary workaround for ignoring initial perspective
      // String initialPerspectiveId =
      // getAdvisor().getInitialWindowPerspectiveId();
      // if (initialPerspectiveId != null) {
      // IPerspectiveDescriptor desc =
      // getPerspectiveRegistry().findPerspectiveWithId(initialPerspectiveId);
      // result.merge(newWindow.restoreState(childMem, desc));
      // }
      // add the window so that any work done in newWindow.restoreState
      // that relies on Workbench methods has windows to work with
      windowManager.add(newWindow[0]);

      // now that we've added it to the window manager we need to listen
      // for any exception that might hose us before we get a chance to
      // open it. If one occurs, remove the new window from the manager.
      // Assume that the new window is a phantom for now
      boolean restored = false;
      try {
        status.merge(newWindow[0].restoreState(childMem, null));
        try {
          newWindow[0].fireWindowRestored();
        } catch (WorkbenchException e) {
          status.add(e.getStatus());
        }
        // everything worked so far, don't close now
        restored = true;
      } finally {
        if (!restored) {
          // null the window in newWindowHolder so that it won't be
          // opened later on
          createdWindows[i] = null;
          StartupThreading.runWithoutExceptions(new StartupRunnable() {

            public void runWithException() throws Throwable {
              newWindow[0].close();
            }});
        }
View Full Code Here

Examples of org.eclipse.ui.internal.StartupThreading.StartupRunnable

    // now open the windows (except the ones that were nulled because we
    // closed them above)
    for (int i = 0; i < createdWindows.length; i++) {
      if (createdWindows[i] != null) {
        final WorkbenchWindow myWindow = createdWindows[i];
        StartupThreading.runWithoutExceptions(new StartupRunnable() {

          public void runWithException() throws Throwable {
            boolean opened = false;
            try {
              myWindow.open();
View Full Code Here

Examples of org.eclipse.ui.internal.StartupThreading.StartupRunnable

          final boolean restoreOnUnzoom = (boolVal > 0);
         
          final String selId = bars[i].getString(IWorkbenchConstants.TAG_FAST_VIEW_SEL_ID);
         
          // Create the stack
              StartupThreading.runWithoutExceptions(new StartupRunnable() {
            public void runWithException() throws Throwable {
              ViewStackTrimToolBar vstb = getTrimForViewStack(id, side, orientation);
              vstb.setRestoreOnUnzoom(restoreOnUnzoom);
              if (selId != null)
                vstb.setSelectedTabId(selId);
View Full Code Here

Examples of org.eclipse.ui.internal.StartupThreading.StartupRunnable

          .restoreState(actionBarAdvisorState));
    }

    // Read window's bounds and state.
    final Rectangle [] displayBounds = new Rectangle[1];
    StartupThreading.runWithoutExceptions(new StartupRunnable() {

      public void runWithException() {
        displayBounds[0] = getShell().getDisplay().getBounds();
       
      }});
    final Rectangle shellBounds = new Rectangle(0, 0, 0, 0);

    final IMemento fastViewMem = memento
        .getChild(IWorkbenchConstants.TAG_FAST_VIEW_DATA);
    if (fastViewMem != null) {
      if (fastViewBar != null) {
        StartupThreading.runWithoutExceptions(new StartupRunnable() {

          public void runWithException() {
            fastViewBar.restoreState(fastViewMem);
          }});
       
      }
    }
    Integer bigInt = memento.getInteger(IWorkbenchConstants.TAG_X);
    shellBounds.x = bigInt == null ? 0 : bigInt.intValue();
    bigInt = memento.getInteger(IWorkbenchConstants.TAG_Y);
    shellBounds.y = bigInt == null ? 0 : bigInt.intValue();
    bigInt = memento.getInteger(IWorkbenchConstants.TAG_WIDTH);
    shellBounds.width = bigInt == null ? 0 : bigInt.intValue();
    bigInt = memento.getInteger(IWorkbenchConstants.TAG_HEIGHT);
    shellBounds.height = bigInt == null ? 0 : bigInt.intValue();
    if (!shellBounds.isEmpty()) {
      StartupThreading.runWithoutExceptions(new StartupRunnable() {

        public void runWithException() {
          if (!shellBounds.intersects(displayBounds[0])) {
            Rectangle clientArea = getShell().getDisplay().getClientArea();
            shellBounds.x = clientArea.x;
            shellBounds.y = clientArea.y;
          }
          getShell().setBounds(shellBounds);
        }});
    }
    if ("true".equals(memento.getString(IWorkbenchConstants.TAG_MAXIMIZED))) { //$NON-NLS-1$
      StartupThreading.runWithoutExceptions(new StartupRunnable() {

        public void runWithException() {
          getShell().setMaximized(true);
        }});
     
    }
    if ("true".equals(memento.getString(IWorkbenchConstants.TAG_MINIMIZED))) { //$NON-NLS-1$
      // getShell().setMinimized(true);
    }

    // restore the width of the perspective bar
    if (perspectiveSwitcher != null) {
      perspectiveSwitcher.restoreState(memento);
    }

    // Restore the cool bar order by creating all the tool bar contribution
    // items
    // This needs to be done before pages are created to ensure proper
    // canonical creation
    // of cool items
    final ICoolBarManager2 coolBarMgr = (ICoolBarManager2) getCoolBarManager2();
        if (coolBarMgr != null) {
      IMemento coolBarMem = memento
          .getChild(IWorkbenchConstants.TAG_COOLBAR_LAYOUT);
      if (coolBarMem != null) {
        // Check if the layout is locked
        final Integer lockedInt = coolBarMem
            .getInteger(IWorkbenchConstants.TAG_LOCKED);
        StartupThreading.runWithoutExceptions(new StartupRunnable(){

          public void runWithException() {
            if ((lockedInt != null) && (lockedInt.intValue() == 1)) {
              coolBarMgr.setLockLayout(true);
            } else {
              coolBarMgr.setLockLayout(false);
            }
          }});
       
        // The new layout of the cool bar manager
        ArrayList coolBarLayout = new ArrayList();
        // Traverse through all the cool item in the memento
        IMemento contributionMems[] = coolBarMem
            .getChildren(IWorkbenchConstants.TAG_COOLITEM);
        for (int i = 0; i < contributionMems.length; i++) {
          IMemento contributionMem = contributionMems[i];
          String type = contributionMem
              .getString(IWorkbenchConstants.TAG_ITEM_TYPE);
          if (type == null) {
            // Do not recognize that type
            continue;
          }
          String id = contributionMem
              .getString(IWorkbenchConstants.TAG_ID);

          // Prevent duplicate items from being read back in.
          IContributionItem existingItem = coolBarMgr.find(id);
          if ((id != null) && (existingItem != null)) {
            if (Policy.DEBUG_TOOLBAR_DISPOSAL) {
              System.out
                  .println("Not loading duplicate cool bar item: " + id); //$NON-NLS-1$
            }
            coolBarLayout.add(existingItem);
            continue;
          }
          IContributionItem newItem = null;
          if (type.equals(IWorkbenchConstants.TAG_TYPE_SEPARATOR)) {
            if (id != null) {
              newItem = new Separator(id);
            } else {
              newItem = new Separator();
            }
          } else if (id != null) {
            if (type
                .equals(IWorkbenchConstants.TAG_TYPE_GROUPMARKER)) {
              newItem = new GroupMarker(id);

            } else if (type
                .equals(IWorkbenchConstants.TAG_TYPE_TOOLBARCONTRIBUTION)
                || type
                    .equals(IWorkbenchConstants.TAG_TYPE_PLACEHOLDER)) {

              // Get Width and height
              Integer width = contributionMem
                  .getInteger(IWorkbenchConstants.TAG_ITEM_X);
              Integer height = contributionMem
                  .getInteger(IWorkbenchConstants.TAG_ITEM_Y);
              // Look for the object in the current cool bar
              // manager
              IContributionItem oldItem = coolBarMgr.find(id);
              // If a tool bar contribution item already exists
              // for this id then use the old object
              if (oldItem != null) {
                newItem = oldItem;
              } else {
                IActionBarPresentationFactory actionBarPresentation = getActionBarPresentationFactory();
                newItem = actionBarPresentation.createToolBarContributionItem(
                    actionBarPresentation.createToolBarManager(), id);
                if (type
                    .equals(IWorkbenchConstants.TAG_TYPE_PLACEHOLDER)) {
                  IToolBarContributionItem newToolBarItem = (IToolBarContributionItem) newItem;
                  if (height != null) {
                    newToolBarItem.setCurrentHeight(height
                        .intValue());
                  }
                  if (width != null) {
                    newToolBarItem.setCurrentWidth(width
                        .intValue());
                  }
                  newItem = new PlaceholderContributionItem(
                      newToolBarItem);
                }
                // make it invisible by default
                newItem.setVisible(false);
                // Need to add the item to the cool bar manager
                // so that its canonical order can be preserved
                IContributionItem refItem = findAlphabeticalOrder(
                    IWorkbenchActionConstants.MB_ADDITIONS,
                    id, coolBarMgr);
                if (refItem != null) {
                  coolBarMgr.insertAfter(refItem.getId(),
                      newItem);
                } else {
                  coolBarMgr.add(newItem);
                }
              }
              // Set the current height and width
              if ((width != null)
                  && (newItem instanceof IToolBarContributionItem)) {
                ((IToolBarContributionItem) newItem)
                    .setCurrentWidth(width.intValue());
              }
              if ((height != null)
                  && (newItem instanceof IToolBarContributionItem)) {
                ((IToolBarContributionItem) newItem)
                    .setCurrentHeight(height.intValue());
              }
            }
          }
          // Add new item into cool bar manager
          if (newItem != null) {
            coolBarLayout.add(newItem);
            newItem.setParent(coolBarMgr);
            coolBarMgr.markDirty();
          }
        }

        // We need to check if we have everything we need in the layout.
        final ArrayList finalLayout = new ArrayList();
        IContributionItem[] existingItems = coolBarMgr.getItems();
        for (int i = 0; i < existingItems.length; i++) {
          IContributionItem existingItem = existingItems[i];

          /*
           * This line shouldn't be necessary, but is here for
           * robustness.
           */
          if (existingItem == null) {
            continue;
          }

          boolean found = false;
          Iterator layoutItemItr = coolBarLayout.iterator();
          while (layoutItemItr.hasNext()) {
            IContributionItem layoutItem = (IContributionItem) layoutItemItr
                .next();
            if ((layoutItem != null)
                && (layoutItem.equals(existingItem))) {
              found = true;
              break;
            }
          }

          if (!found) {
            if (existingItem != null) {
              finalLayout.add(existingItem);
            }
          }
        }

        // Set the cool bar layout to the given layout.
        finalLayout.addAll(coolBarLayout);
        final IContributionItem[] itemsToSet = new IContributionItem[finalLayout
            .size()];
        finalLayout.toArray(itemsToSet);
        StartupThreading.runWithoutExceptions(new StartupRunnable() {

          public void runWithException() {
            coolBarMgr.setItems(itemsToSet);
          }});
       
      } else {
        // For older workbenchs
        coolBarMem = memento
            .getChild(IWorkbenchConstants.TAG_TOOLBAR_LAYOUT);
        if (coolBarMem != null) {
          // Restore an older layout
          restoreOldCoolBar(coolBarMem);
        }
      }
    }

    // Recreate each page in the window.
    IWorkbenchPage newActivePage = null;
    IMemento[] pageArray = memento
        .getChildren(IWorkbenchConstants.TAG_PAGE);
    for (int i = 0; i < pageArray.length; i++) {
      final IMemento pageMem = pageArray[i];
      String strFocus = pageMem.getString(IWorkbenchConstants.TAG_FOCUS);
      if (strFocus == null || strFocus.length() == 0) {
        continue;
      }

      // Get the input factory.
      final IAdaptable [] input = new IAdaptable[1];
      final IMemento inputMem = pageMem.getChild(IWorkbenchConstants.TAG_INPUT);
      if (inputMem != null) {
        final String factoryID = inputMem
            .getString(IWorkbenchConstants.TAG_FACTORY_ID);
        if (factoryID == null) {
          WorkbenchPlugin
              .log("Unable to restore page - no input factory ID."); //$NON-NLS-1$
          result.add(unableToRestorePage(pageMem));
          continue;
        }
        try {
          UIStats.start(UIStats.RESTORE_WORKBENCH,
              "WorkbenchPageFactory"); //$NON-NLS-1$
          StartupThreading
              .runWithoutExceptions(new StartupRunnable() {

                public void runWithException() throws Throwable {
                  IElementFactory factory = PlatformUI
                      .getWorkbench().getElementFactory(
                          factoryID);
                  if (factory == null) {
                    WorkbenchPlugin
                        .log("Unable to restore page - cannot instantiate input factory: " + factoryID); //$NON-NLS-1$
                    result
                        .add(unableToRestorePage(pageMem));
                    return;
                  }

                  // Get the input element.
                  input[0] = factory.createElement(inputMem);
                }
              });
         
          if (input[0] == null) {
            WorkbenchPlugin
                .log("Unable to restore page - cannot instantiate input element: " + factoryID); //$NON-NLS-1$
            result.add(unableToRestorePage(pageMem));
            continue;
          }
        } finally {
          UIStats.end(UIStats.RESTORE_WORKBENCH, factoryID,
              "WorkbenchPageFactory"); //$NON-NLS-1$
        }
      }
      // Open the perspective.
      final IAdaptable finalInput = input[0];
      final WorkbenchPage [] newPage = new WorkbenchPage[1];
      try {
        StartupThreading.runWithWorkbenchExceptions(new StartupRunnable(){

          public void runWithException() throws WorkbenchException {
            newPage[0] = new WorkbenchPage(WorkbenchWindow.this, finalInput);
          }});
       
        result.add(newPage[0].restoreState(pageMem, activeDescriptor));
        pageList.add(newPage[0]);
        StartupThreading.runWithoutExceptions(new StartupRunnable() {

          public void runWithException() throws Throwable {
            firePageOpened(newPage[0]);
          }});
       
      } catch (WorkbenchException e) {
        WorkbenchPlugin
            .log(
                "Unable to restore perspective - constructor failed.", e); //$NON-NLS-1$
        result.add(e.getStatus());
        continue;
      }

      if (strFocus != null && strFocus.length() > 0) {
        newActivePage = newPage[0];
      }
    }

    // If there are no pages create a default.
    if (pageList.isEmpty()) {
      try {
        final String defPerspID = getWorkbenchImpl().getPerspectiveRegistry()
            .getDefaultPerspective();
        if (defPerspID != null) {
          final WorkbenchPage [] newPage = new WorkbenchPage[1];
          StartupThreading.runWithWorkbenchExceptions(new StartupRunnable() {
           
            public void runWithException() throws Throwable {
              newPage[0] = new WorkbenchPage(WorkbenchWindow.this, defPerspID,
                  getDefaultPageInput());
            }});
         
          pageList.add(newPage[0]);
          StartupThreading.runWithoutExceptions(new StartupRunnable() {

            public void runWithException() throws Throwable {
              firePageOpened(newPage[0]);
            }});
        }
      } catch (WorkbenchException e) {
        WorkbenchPlugin
            .log(
                "Unable to create default perspective - constructor failed.", e); //$NON-NLS-1$
        result.add(e.getStatus());
        String productName = WorkbenchPlugin.getDefault()
            .getProductName();
        if (productName == null) {
          productName = ""; //$NON-NLS-1$
        }
        getShell().setText(productName);
      }
    }

    // Set active page.
    if (newActivePage == null) {
      newActivePage = pageList.getNextActive();
    }
    final IWorkbenchPage myPage = newActivePage;
    StartupThreading.runWithoutExceptions(new StartupRunnable() {

      public void runWithException() throws Throwable {
        setActivePage(myPage);
      }});
   

    final IMemento introMem = memento.getChild(IWorkbenchConstants.TAG_INTRO);
    if (introMem != null) {
      StartupThreading.runWithoutExceptions(new StartupRunnable() {

        public void runWithException() throws Throwable {
          getWorkbench()
              .getIntroManager()
              .showIntro(
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.