Package org.eclipse.ui

Examples of org.eclipse.ui.IViewReference


      childMem.putString(IWorkbenchConstants.TAG_ACTIVE_PERSPECTIVE,
                    getPerspective().getId());
    }
        if (getActivePart() != null) {
            if (getActivePart() instanceof IViewPart) {
                IViewReference ref = (IViewReference) getReference(getActivePart());
                if (ref != null) {
                    childMem.putString(IWorkbenchConstants.TAG_ACTIVE_PART,
                            ViewFactory.getKey(ref));
                }
            } else {
View Full Code Here


     * Hides the active fast view. Has no effect if there is no fast view active.
     */
    public void hideFastView() {
        Perspective persp = getActivePerspective();
        if (persp != null) {
            IViewReference ref = persp.getActiveFastView();
            if (ref != null) {
                toggleFastView(ref);
            }
        }
    }
View Full Code Here

            ViewStack folder = (ViewStack) container;
            final ArrayList list = new ArrayList(folder.getChildren().length);
            for (int i = 0; i < folder.getChildren().length; i++) {
                LayoutPart layoutPart = folder.getChildren()[i];
                if (layoutPart instanceof ViewPane) {
                    IViewReference view = ((ViewPane) layoutPart)
                            .getViewReference();
                    if (view != null) {
            list.add(view);
          }
                }
View Full Code Here

   * Close the partReference.
   */
  public void close() {
    UIThreadRunnable.syncExec(new VoidResult() {
      public void run() {
        IViewReference viewReference = (IViewReference) partReference;
        viewReference.getPage().hideView(viewReference);
      }
    });
  }
View Full Code Here

   *
   * @return the active view, if any
   * @throws WidgetNotFoundException if there is no active view
   */
  public SWTBotView activeView() {
    IViewReference view = workbenchContentsFinder.findActiveView();
    if (view == null)
      throw new WidgetNotFoundException("There is no active view"); //$NON-NLS-1$
    return new SWTBotView(view, this);
  }
View Full Code Here

   * Close the partReference.
   */
  public void close() {
    UIThreadRunnable.syncExec(new VoidResult() {
      public void run() {
        IViewReference viewReference = (IViewReference) partReference;
        viewReference.getPage().hideView(viewReference);
      }
    });
  }
View Full Code Here

        IWorkbenchPage[] pages = getWorkbenchPages();
        for (int i = 0; i < pages.length; i++) {
          IWorkbenchPage page = pages[i];
          IViewReference[] viewReferences = page.getViewReferences();
          for (int j = 0; j < viewReferences.length; j++) {
            IViewReference viewReference = viewReferences[j];
            result.add(viewReference);
          }
        }
        return result;
      }
View Full Code Here

   * Close the partReference.
   */
  public void close() {
    UIThreadRunnable.syncExec(new VoidResult() {
      public void run() {
        IViewReference viewReference = (IViewReference) partReference;
        viewReference.getPage().hideView(viewReference);
      }
    });
  }
View Full Code Here

   *
   * @return the active view, if any
   * @throws WidgetNotFoundException if there is no active view
   */
  public SWTBotView activeView() {
    IViewReference view = workbenchContentsFinder.findActiveView();
    if (view == null)
      throw new WidgetNotFoundException("There is no active view"); //$NON-NLS-1$
    return new SWTBotView(view, this);
  }
View Full Code Here

     */
    public static IViewPart getView(boolean show, String id) {
        IWorkbenchPage page = PlatformUI.getWorkbench()
                .getActiveWorkbenchWindow().getActivePage();
        IViewReference[] view = page.getViewReferences();
        IViewReference infoRef = null;
        for (IViewReference reference : view) {
            if (reference.getId().equals(id)) {
                infoRef = reference;
                break;
            }
        }
        // JONES: need to get the part and set the selection to null so that the
        // last selected
        // feature will not flash (because it will not be in list any more).
        IViewPart infoView = null;
        if (infoRef == null) {
            try {
                infoView = page.showView(id);
            } catch (PartInitException e1) {
                return null;
            }
            if (infoView == null) {
                return null;
            }
        }
        if (infoRef != null)
            return (IViewPart) infoRef.getPart(show);

        return null;

    }
View Full Code Here

TOP

Related Classes of org.eclipse.ui.IViewReference

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.