Package org.eclipse.core.runtime

Examples of org.eclipse.core.runtime.MultiStatus.merge()


    IWorkbenchWindow[] windows = getWorkbenchWindows();
    for (int nX = 0; nX < windows.length; nX++) {
      WorkbenchWindow window = (WorkbenchWindow) windows[nX];
      IMemento childMem = memento
          .createChild(IWorkbenchConstants.TAG_WINDOW);
      result.merge(window.saveState(childMem));
    }
    result.add(getEditorHistory().saveState(
        memento.createChild(IWorkbenchConstants.TAG_MRU_LIST)));
    return result;
  }
View Full Code Here


        .getWorkbenchWindows();
    for (int nX = 0; nX < windows.length; nX++) {
      WorkbenchWindow window = (WorkbenchWindow) windows[nX];
      IMemento childMem = memento
          .createChild(IWorkbenchConstants.TAG_WINDOW);
      result.merge(saveState(window, childMem));
    }
    return result;
  }

  /**
 
View Full Code Here

              .runWithoutExceptions(new StartupRunnable() {

                public void runWithException() throws Throwable {
                  Perspective persp = new Perspective(null,
                      WorkbenchPage.this);
                  result.merge(persp.restoreState(current));
                  final IPerspectiveDescriptor desc = persp
                      .getDesc();
                  if (desc.equals(activeDescriptor)) {
                    activePerspectiveArray[0] = persp;
                  } else if ((activePerspectiveArray[0] == null)
View Full Code Here

                    restoreActivePerspective = true;
                } else {
                    restoreActivePerspective = false;
                    activePerspective = createPerspective((PerspectiveDescriptor) activeDescriptor, true);
                    if (activePerspective == null) {
                        result
                                .merge(new Status(
                                        IStatus.ERROR,
                                        PlatformUI.PLUGIN_ID,
                                        0,
                                        NLS.bind(WorkbenchMessages.Workbench_showPerspectiveError, activeDescriptor.getId() ),
View Full Code Here

                if (activePerspective == null) {
                    activePerspective = perspList.getNextActive();
                    perspList.setActive(activePerspective);
                }
                if (activePerspective != null && restoreActivePerspective) {
          result.merge(activePerspective.restoreState());
        }
   
                if (activePerspective != null) {
                  final Perspective myPerspective = activePerspective;
                  final String myActivePartId = activePartID, mySecondaryId = activePartSecondaryID;
View Full Code Here

                null);

        // Save editor manager.
        IMemento childMem = memento
                .createChild(IWorkbenchConstants.TAG_EDITORS);
        result.merge(editorMgr.saveState(childMem));

        childMem = memento.createChild(IWorkbenchConstants.TAG_VIEWS);
        result.merge(getViewFactory().saveState(childMem));

        // Create persp block.
View Full Code Here

        IMemento childMem = memento
                .createChild(IWorkbenchConstants.TAG_EDITORS);
        result.merge(editorMgr.saveState(childMem));

        childMem = memento.createChild(IWorkbenchConstants.TAG_VIEWS);
        result.merge(getViewFactory().saveState(childMem));

        // Create persp block.
        childMem = memento.createChild(IWorkbenchConstants.TAG_PERSPECTIVES);
        if (getPerspective() != null) {
      childMem.putString(IWorkbenchConstants.TAG_ACTIVE_PERSPECTIVE,
View Full Code Here

        Iterator itr = perspList.iterator();
        while (itr.hasNext()) {
            Perspective persp = (Perspective) itr.next();
            IMemento gChildMem = childMem
                    .createChild(IWorkbenchConstants.TAG_PERSPECTIVE);
            result.merge(persp.saveState(gChildMem));
        }
        // Save working set if set
        if (workingSet != null) {
            memento.putString(IWorkbenchConstants.TAG_WORKING_SET, workingSet
                    .getName());
View Full Code Here

          aggregateWorkingSet = (AggregateWorkingSet) setWithId;
        }
                // Restore editor manager.
                IMemento childMem = memento
                        .getChild(IWorkbenchConstants.TAG_EDITORS);
                result.merge(getEditorManager().restoreState(childMem));
   
                childMem = memento.getChild(IWorkbenchConstants.TAG_VIEWS);
                if (childMem != null) {
          result.merge(getViewFactory().restoreState(childMem));
        }
View Full Code Here

                        .getChild(IWorkbenchConstants.TAG_EDITORS);
                result.merge(getEditorManager().restoreState(childMem));
   
                childMem = memento.getChild(IWorkbenchConstants.TAG_VIEWS);
                if (childMem != null) {
          result.merge(getViewFactory().restoreState(childMem));
        }
   
                // Get persp block.
                childMem = memento.getChild(IWorkbenchConstants.TAG_PERSPECTIVES);
                String activePartID = childMem
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.