Package org.eclipse.ui.internal

Examples of org.eclipse.ui.internal.WorkbenchPage$ActionSwitcher


    if (activePage == null) {
      return;
    }

        if (makeFast) {
            WorkbenchPage wp = (WorkbenchPage) activePage;
          Perspective persp = wp.getActivePerspective();

            // If we're making a fast view then use the new mechanism directly
            boolean useNewMinMax = Perspective.useNewMinMax(persp);
            if (useNewMinMax) {
              IViewReference ref = persp.getViewReference(viewId, null);
              if (ref == null)
                return;

              persp.getFastViewManager().addViewReference(FastViewBar.FASTVIEWBAR_ID, -1, ref, true);
            wp.activate(ref.getPart(true));
           
            return;
            }
           
            IViewReference ref = wp.findViewReference(viewId);
           
            if (ref == null) {
                IViewPart part = wp.showView(viewId, null, IWorkbenchPage.VIEW_CREATE);
                ref = (IViewReference)wp.getReference(part);
            }
           
            if (!wp.isFastView(ref)) {
                wp.addFastView(ref);
            }
            wp.activate(ref.getPart(true));
        } else {
            activePage.showView(viewId);
        }
   
  }
View Full Code Here


   
    //IEditorPart editorPart = page.getActiveEditor();
   
    //IEditorSite editorSite = editorPart.getEditorSite();
   
    WorkbenchPage wPage = (WorkbenchPage)page;
   
    // editorPresentation
    EditorAreaHelper editorAreaHelper = wPage.getEditorPresentation();
   
    EditorSashContainer editorSashContainer = (EditorSashContainer)editorAreaHelper.getLayoutPart();
   
    LayoutTree layoutTree = editorSashContainer.getLayoutTree();
   
View Full Code Here

        PerspectiveDescriptor desc = (PerspectiveDescriptor) objects[i];
        for (int w = 0; w < windows.length; ++w) {
          IWorkbenchWindow window = windows[w];
          IWorkbenchPage[] pages = window.getPages();
          for (int p = 0; p < pages.length; ++p) {
            WorkbenchPage page = (WorkbenchPage) pages[p];
            ClosePerspectiveAction.closePerspective(page, page
                .findPerspective(desc));
          }
        }

        // ((Workbench)PlatformUI.getWorkbench()).getPerspectiveHistory().removeItem(desc);
View Full Code Here

   
    //find all active perspectives currently
    for (int i = 0; i < windows.length; i++) {
      IWorkbenchPage pages[] = windows[i].getPages();
      for (int j = 0; j < pages.length; j++) {
        WorkbenchPage page = (WorkbenchPage) pages[j];
        if (page.findPerspective(desc) != null) {
            MessageDialog
                .openInformation(
                    getShell(),
                    WorkbenchMessages.PerspectivesPreference_cannotdelete_title,
                    NLS.bind(WorkbenchMessages.PerspectivesPreference_cannotdelete_message,desc.getLabel()));
View Full Code Here

        void close() {
            if (editorRef == null) {
        return;
      }
            WorkbenchPage p = ((WorkbenchPartReference) editorRef).getPane()
                    .getPage();
            p.closeEditor(editorRef, true);
        }
View Full Code Here

        return images;
      }
            images = new Image[2];
            if (editorRef != null) {
                images[0] = editorRef.getTitleImage();
                WorkbenchPage p = ((WorkbenchPartReference) editorRef)
                        .getPane().getPage();
                IPerspectiveDescriptor persp = p.getPerspective();
                ImageDescriptor image = persp.getImageDescriptor();
                if (image == null) {
          image = WorkbenchImages
                            .getImageDescriptor(IWorkbenchGraphicConstants.IMG_ETOOL_DEF_PERSPECTIVE);
        }
View Full Code Here

        }

        private void activate() {
            if (editorRef != null) {
                IEditorPart editor = editorRef.getEditor(true);
                WorkbenchPage p = (WorkbenchPage) editor.getEditorSite()
                        .getPage();
                Shell s = p.getWorkbenchWindow().getShell();
                if (s.getMinimized()) {
          s.setMinimized(false);
        }
                s.moveAbove(null);
                p.getWorkbenchWindow().setActivePage(p);
                p.activate(editor);
            } else {
                IWorkbenchPage p = window.getActivePage();
                if (p != null) {
                    try {
                        p.openEditor(input, desc.getId(), true);
                    } catch (PartInitException e) {
                    }
                }
            }
        }
View Full Code Here

     *
     * @param editorSashContainer the <code>EditorSashContainer</code> to set for the returned <code>PartStack</code>
     * @return a new part stack container
     */
    private PartStack createStack(EditorSashContainer editorSashContainer) {
        WorkbenchPage workbenchPage = (WorkbenchPage) PlatformUI.getWorkbench().getActiveWorkbenchWindow()
            .getActivePage();
        EditorStack newWorkbook = EditorStack.newEditorWorkbook(editorSashContainer, workbenchPage);
        return newWorkbook;
    }
View Full Code Here

TOP

Related Classes of org.eclipse.ui.internal.WorkbenchPage$ActionSwitcher

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.