Examples of IWorkbenchPartReference


Examples of org.eclipse.ui.IWorkbenchPartReference

        }
       
        try {
            UIStats.start(UIStats.BRING_PART_TO_TOP, label);
           
            IWorkbenchPartReference ref = getReference(part);
            ILayoutContainer activeEditorContainer = getContainer(getActiveEditor());
            ILayoutContainer activePartContainer = getContainer(getActivePart());
            ILayoutContainer newPartContainer = getContainer(part);
           
            if (newPartContainer == activePartContainer) {
View Full Code Here

Examples of org.eclipse.ui.IWorkbenchPartReference

        // Show the view.
        view = persp.showView(viewID, secondaryID);
        if (view != null) {
            busyShowView(view, mode);
           
            IWorkbenchPartReference partReference = getReference(view);
            PartPane partPane = getPane(partReference);
            partPane.setInLayout(true);

            window.firePerspectiveChanged(this, getPerspective(),
                    partReference, CHANGE_VIEW_SHOW);
View Full Code Here

Examples of org.eclipse.ui.IWorkbenchPartReference

          return;
        }
        if (mode == VIEW_ACTIVATE) {
      activate(part);
    } else if (mode == VIEW_VISIBLE) {
            IWorkbenchPartReference ref = getActivePartReference();
            // if there is no active part or it's not a view, bring to top
            if (ref == null || !(ref instanceof IViewReference)) {
        bringToTop(part);
      } else {
                // otherwise check to see if the we're in the same stack as the active view
View Full Code Here

Examples of org.eclipse.ui.IWorkbenchPartReference

       
        if (isDeferred()) {
            return;
        }
       
        IWorkbenchPartReference oldActivePart = partList.getActivePartReference();
        IWorkbenchPartReference oldActiveEditor = partList.getActiveEditorReference();
        IWorkbenchPartReference newActivePart = null;
        IEditorReference newActiveEditor = null;
       
        if (!window.isClosing()) {
            // If an editor is active, try to keep an editor active
            if (oldActivePart == oldActiveEditor) {
View Full Code Here

Examples of org.eclipse.ui.IWorkbenchPartReference

    /**
     * See IWorkbenchPage#closeEditor
     */
    public boolean closeEditor(IEditorPart editor, boolean save) {
        IWorkbenchPartReference ref = getReference(editor);
        if (ref instanceof IEditorReference) {
          return closeEditors(new IEditorReference[] {(IEditorReference) ref}, save);
        }
        return false;
    }
View Full Code Here

Examples of org.eclipse.ui.IWorkbenchPartReference

 
    public ISaveablePart[] getDirtyParts() {
        List result = new ArrayList(3);
        IWorkbenchPartReference[] allParts = getAllParts();
        for (int i = 0; i < allParts.length; i++) {
            IWorkbenchPartReference reference = allParts[i];
           
            IWorkbenchPart part = reference.getPart(false);
            if (part != null && part instanceof ISaveablePart) {
                ISaveablePart saveable = (ISaveablePart)part;
                if (saveable.isDirty()) {
                    result.add(saveable);
                }
View Full Code Here

Examples of org.eclipse.ui.IWorkbenchPartReference

       
        // Rather than calling editor.setInput on the editor directly, we do it through the part reference.
        // This case lets us detect badly behaved editors that are not firing a PROP_INPUT event in response
        // to the input change... but if all editors obeyed their API contract, the "else" branch would be
        // sufficient.
        IWorkbenchPartReference ref = getReference(editor);
        if (ref instanceof EditorReference) {
            EditorReference editorRef = (EditorReference) ref;
           
            editorRef.setInput(input);
        } else {
View Full Code Here

Examples of org.eclipse.ui.IWorkbenchPartReference

         */
        void setActive(IWorkbenchPart part) {
            if (parts.size() <= 0) {
        return;
      }
      IWorkbenchPartReference ref = getReference(part);
      if (ref != null) {
        if (ref == parts.get(parts.size() - 1)) {
          return;
        }
        parts.remove(ref);
View Full Code Here

Examples of org.eclipse.ui.IWorkbenchPartReference

         * Returns the last (most recent) index of the given container in the activation list, or returns
         * -1 if the given container does not appear in the activation list.
         */
        int lastIndexOfContainer(ILayoutContainer container) {
            for (int i = parts.size() - 1; i >= 0; i--) {
                IWorkbenchPartReference ref = (IWorkbenchPartReference)parts.get(i);

                ILayoutContainer cnt = getContainer(ref);
                if (cnt == container) {
                    return i;
                }
View Full Code Here

Examples of org.eclipse.ui.IWorkbenchPartReference

      }
            return getActive(parts.size() - 2);
        }

        private IWorkbenchPart getActive(int start) {
            IWorkbenchPartReference ref = getActiveReference(start, false);
           
            if (ref == null) {
                return null;
            }
           
            return ref.getPart(true);
        }
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.