Package org.eclipse.ui.views

Examples of org.eclipse.ui.views.IViewRegistry.find()


    IViewRegistry registry = PlatformUI.getWorkbench().getViewRegistry();
    String serversViewID = SERVERS_VIEW_ID;

    // fast check to verify that the servers View is available.
    IViewDescriptor serversViewDescriptor = registry.find(serversViewID);
    if (serversViewDescriptor != null) {

      // Granular null checks required as any of the workbench components
      // may not be available at some given point in time (e.g., during
      // start/shutdown)
View Full Code Here


    // Keep a cache, rather than creating a new action each time,
    // so that image caching in ActionContributionItem works.
    IAction action = (IAction) actions.get(id);
    if (action == null) {
      IViewRegistry reg = WorkbenchPlugin.getDefault().getViewRegistry();
      IViewDescriptor desc = reg.find(id);
      if (desc != null) {
        action = new ShowViewAction(window, desc, makeFast);
        action.setActionDefinitionId(id);
        actions.put(id, action);
      }
View Full Code Here

        ArrayList descs = new ArrayList();
        IViewRegistry reg = WorkbenchPlugin.getDefault().getViewRegistry();
        for (Iterator i = ids.iterator(); i.hasNext();) {
            String id = (String) i.next();
            if (!id.equals(srcId)) {
                IViewDescriptor desc = reg.find(id);
                if (desc != null) {
                    descs.add(desc);
                }
            }
        }
View Full Code Here

        case DATE:
          segments.add(data.get(IPartData.DATE));
          break;
        case WORKBENCH_TOOL:
          String id = data.get(IPartData.PART_ID);
          IWorkbenchPartDescriptor part = viewRegistry.find(id);
          if (part == null) {
            part = editorRegistry.findEditor(id);
          }
          if (part == null) {
            part = new UndefinedWorkbenchPartDescriptor(id);
View Full Code Here

        // check that primary view id is valid, but only if it has no wildcard
        String primaryId = ViewFactory.extractPrimaryId(id);
        if (!ViewFactory.hasWildcard(primaryId)) {
          IViewRegistry reg = WorkbenchPlugin.getDefault().getViewRegistry();
          IViewDescriptor desc = reg.find(primaryId);
          if (desc == null) {
              // cannot safely open the dialog so log the problem
              WorkbenchPlugin.log("Unable to find view with id: " + primaryId + ", when creating perspective " + getDescriptor().getId()); //$NON-NLS-1$ //$NON-NLS-2$
              return false;
          }
View Full Code Here

     */
    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);
        }
View Full Code Here

    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

    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

     * @param sp
     */
    public ShowInShellAction(ISelectionProvider sp) {
      super(sp, null);
      IViewRegistry reg = PlatformUI.getWorkbench().getViewRegistry();
      IViewDescriptor desc = reg.find(KarafUIPlugin.TERMINAL_VIEW_ID);
      setText(desc.getLabel());
      setImageDescriptor(desc.getImageDescriptor());
    }

    /*
 
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.