Examples of IViewDescriptor


Examples of org.eclipse.ui.views.IViewDescriptor

        if (miscCategory != null) {
          miscCategory.clear();
        }
       
        for (Iterator i = views.iterator(); i.hasNext(); ) {
              IViewDescriptor desc = (IViewDescriptor) i.next();
              Category cat = null;
              String[] catPath = desc.getCategoryPath();
              if (catPath != null) {
                  String rootCat = catPath[0];
                  cat = internalFindCategory(rootCat);
              }
              if (cat != null) {
                  if (!cat.hasElement(desc)) {
                      cat.addElement(desc);
                  }
              } else {
                  if (miscCategory == null) {
                      miscCategory = new Category();
                      add(miscCategory);                   
                  }
                  if (catPath != null) {
                      // If we get here, this view specified a category which
                      // does not exist. Add this view to the 'Other' category
                      // but give out a message (to the log only) indicating
                      // this has been done.
                      String fmt = "Category {0} not found for view {1}.  This view added to ''{2}'' category."; //$NON-NLS-1$
                      WorkbenchPlugin.log(MessageFormat
                              .format(fmt, new Object[] { catPath[0],
                                      desc.getId(), miscCategory.getLabel() }));
                  }
                  miscCategory.addElement(desc);
              }
          }         
      }
View Full Code Here

Examples of org.eclipse.ui.views.IViewDescriptor

     */
    public float getFastViewWidthRatio(IViewReference ref) {
        ViewLayoutRec rec = getViewLayoutRec(ref, true);
        if (rec.fastViewWidthRatio == IPageLayout.INVALID_RATIO) {
            IViewRegistry reg = WorkbenchPlugin.getDefault().getViewRegistry();
            IViewDescriptor desc = reg.find(ref.getId());
            rec.fastViewWidthRatio =
                (desc != null
                    ? desc.getFastViewWidthRatio()
                    : IPageLayout.DEFAULT_FASTVIEW_RATIO);
        }
        return rec.fastViewWidthRatio;
    }
View Full Code Here

Examples of org.eclipse.ui.views.IViewDescriptor

    IFolderLayout bottomRight = layout.createFolder(
        "bottomRight", IPageLayout.BOTTOM, (float) 0.5, "topRight");//$NON-NLS-1$
    IViewRegistry viewRegistry = WorkbenchPlugin.getDefault()
        .getViewRegistry();
    IViewDescriptor containedInTextGrid = viewRegistry
        .find("info.textgrid.lab.navigator.view");
    if (containedInTextGrid != null) {
      // contained in textgrid
      bottomRight.addView("info.textgrid.lab.navigator.view");
                                   
View Full Code Here

Examples of org.eclipse.ui.views.IViewDescriptor

    if (part != null && part.getSite() != null) {
      return part.getSite().getRegisteredName();
    }

    IViewRegistry reg = this.factory.viewReg;
    IViewDescriptor desc = reg.find(getId());
    if (desc != null) {
      return desc.getLabel();
    }
    return getTitle();
  }
View Full Code Here

Examples of org.eclipse.ui.views.IViewDescriptor

      // Pass the error to the status handling facility
      StatusManager.getManager().handle(logStatus);
      StatusManager.getManager()
          .handle(displayStatus, StatusManager.SHOW);

      IViewDescriptor desc = factory.viewReg.find(getId());
      String label = getId();
      if (desc != null) {
        label = desc.getLabel();
      }

      ErrorViewPart part = new ErrorViewPart(displayStatus);

      PartPane pane = getPane();
View Full Code Here

Examples of org.eclipse.ui.views.IViewDescriptor

    IMemento stateMem = null;
    if (memento != null) {
      stateMem = memento.getChild(IWorkbenchConstants.TAG_VIEW_STATE);
    }

    IViewDescriptor desc = factory.viewReg.find(getId());
    if (desc == null) {
      throw new PartInitException(
          WorkbenchMessages.ViewFactory_couldNotCreate);
    }

    // Create the part pane
    PartPane pane = getPane();

    // Create the pane's top-level control
    pane.createControl(factory.page.getClientComposite());

    String label = desc.getLabel(); // debugging only

    // Things that will need to be disposed if an exception occurs (they are
    // listed here
    // in the order they should be disposed)
    Composite content = null;
    IViewPart initializedView = null;
    ViewSite site = null;
    ViewActionBars actionBars = null;
    // End of things that need to be explicitly disposed from the try block

    try {
      IViewPart view = null;
      try {
        UIStats.start(UIStats.CREATE_PART, label);
        view = desc.createView();
      } finally {
        UIStats.end(UIStats.CREATE_PART, view, label);
      }

      if (view instanceof IWorkbenchPart3) {
View Full Code Here

Examples of org.eclipse.ui.views.IViewDescriptor

        if (pageLayout.checkPartInLayout(viewId)) {
      return;
    }

        try {
            IViewDescriptor descriptor = viewFactory.getViewRegistry().find(
                    ViewFactory.extractPrimaryId(viewId));
            if (descriptor == null) {
                throw new PartInitException("View descriptor not found: " + viewId); //$NON-NLS-1$
            }
            if (WorkbenchActivityHelper.filterItem(descriptor)) {
View Full Code Here

Examples of org.eclipse.ui.views.IViewDescriptor

    super.dispose();
  }
 
  public boolean performOk() {
   
    IViewDescriptor desc = workbench.getViewRegistry().find(Activator.PLUGIN_ID + ".views.HudsonView");
    if (desc != null) {
      try {
        IViewPart part = desc.createView();
        System.out.println(part);
      } catch (CoreException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
      }
View Full Code Here

Examples of org.eclipse.ui.views.IViewDescriptor

    super.dispose();
  }

  public boolean performOk() {

    IViewDescriptor desc = workbench.getViewRegistry().find(Activator.PLUGIN_ID + ".views.HudsonView");
    if (desc != null) {
      try {
        IViewPart part = desc.createView();
        System.out.println(part);
      } catch (CoreException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
      }
View Full Code Here

Examples of org.eclipse.ui.views.IViewDescriptor

    super.dispose();
  }

  public boolean performOk() {

    IViewDescriptor desc = workbench.getViewRegistry().find(Activator.PLUGIN_ID + ".views.HudsonView");
    if (desc != null) {
      try {
        IViewPart part = desc.createView();
        System.out.println(part);
      } catch (CoreException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
      }
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.