Package org.eclipse.ui.internal.StartupThreading

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


      // second pass applies all of the window trim
      for (int i = 0; i < areas.length; i++) {
        IMemento area = areas[i];
        final int id = Integer.parseInt(area.getID());
        final List myTrimOrderList = trimOrder[i];
        StartupThreading.runWithoutExceptions(new StartupRunnable() {

          public void runWithException() throws Throwable {
            defaultLayout.updateAreaTrim(id, myTrimOrderList, false);
          }});
       
      }

      // get the trim manager to re-locate any -newly contributed-
      // trim widgets
      // Legacy (3.2) trim
      if (trimMgr2 != null) {
        StartupThreading.runWithoutExceptions(new StartupRunnable() {

          public void runWithException() throws Throwable {
            trimMgr2.updateLocations(knownIds);
          }});
       
      }
     
      // 3.3 Trim Contributions
      if (trimContributionMgr != null) {
        StartupThreading.runWithoutExceptions(new StartupRunnable() {
          public void runWithException() throws Throwable {
            trimContributionMgr.updateLocations(knownIds);

            // Update the GUI with the new locations
            WorkbenchPage page = getActiveWorkbenchPage();
            if (page != null) {
              Perspective perspective = page.getActivePerspective();
              if (perspective != null) {
                // Ensure that only the upper/right editor stack has
                // min/max buttons
                page.getEditorPresentation().updateStackButtons();
               
                // The perspective's onActivate manipulates the trim under the
                // new min/max story so cause it to refresh...
                perspective.onActivate();
              }
            }
          }});
      }
    }
    else {
      // No 3.2 state...check if the FVB has state
      IMemento fastViewMem = memento
          .getChild(IWorkbenchConstants.TAG_FAST_VIEW_DATA);
      if (fastViewMem != null) {
        if (fastViewBar != null) {
              final Integer bigInt = fastViewMem.getInteger(IWorkbenchConstants.TAG_FAST_VIEW_SIDE);
              if (bigInt != null) {
                StartupThreading.runWithoutExceptions(new StartupRunnable() {

              public void runWithException() throws Throwable {
                fastViewBar.dock(bigInt.intValue());
                    getTrimManager().addTrim(bigInt.intValue(), fastViewBar);
              }});
View Full Code Here

TOP

Related Classes of org.eclipse.ui.internal.StartupThreading.StartupRunnable

Copyright © 2018 www.massapicom. 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.