Package org.eclipse.ui.navigator

Examples of org.eclipse.ui.navigator.CommonNavigator


            shell = outline.getSite().getShell();
            targetId = "org.eclipse.ui.views.ContentOutline";
            patternFilter = erlangOutlinePage.getPatternFilter();
            viewer = erlangOutlinePage.getTreeViewer();
        } else if (activePart instanceof CommonNavigator) {
            final CommonNavigator commonNavigator = (CommonNavigator) activePart;
            targetId = "commonNavigator";
            shell = commonNavigator.getSite().getShell();
            patternFilter = null;
            viewer = null;
        } else {
            return null;
        }
View Full Code Here


                public void run() {
                  CommonViewer viewer = null;
                  try {
                    IViewPart view = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView(viewerId);
                    if (view instanceof CommonNavigator) {
                      CommonNavigator navigator = (CommonNavigator) view;
                      viewer = navigator.getCommonViewer();
                    }
                  } catch (PartInitException e) {
                  }
                  if (viewer != null) {
                    Object[] addedArray = addedUris.toArray();
View Full Code Here

              public void run() {
                CommonViewer viewer = null;
                try {
                  IViewPart view = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView(viewerId);
                  if (view instanceof CommonNavigator) {
                    CommonNavigator navigator = (CommonNavigator) view;
                    viewer = navigator.getCommonViewer();
                  }
                } catch (PartInitException e) {
                }

                if (viewer != null) {
                  viewer.refresh(true);
                }
              }
            });
          }
        } else if (notification.getNotifier() instanceof ZooKeeperServer) {
          int featureID = notification.getFeatureID(ZooKeeperServer.class);
          if (featureID == HadoopPackage.ZOO_KEEPER_SERVER__STATUS_CODE) {
            if (notification.getEventType() == Notification.SET) {
              display.asyncExec(new Runnable() {
                @Override
                public void run() {
                  CommonViewer viewer = null;
                  try {
                    IViewPart view = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView(viewerId);
                    if (view instanceof CommonNavigator) {
                      CommonNavigator navigator = (CommonNavigator) view;
                      viewer = navigator.getCommonViewer();
                    }
                  } catch (PartInitException e) {
                  }

                  if (viewer != null) {
View Full Code Here

              public void run() {
                CommonViewer viewer = null;
                try {
                  IViewPart view = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView(viewerId);
                  if (view instanceof CommonNavigator) {
                    CommonNavigator navigator = (CommonNavigator) view;
                    viewer = navigator.getCommonViewer();
                  }
                } catch (PartInitException e) {
                }

                if (viewer != null) {
                  viewer.refresh(true);
                }
              }
            });
          }
        } else if (notification.getNotifier() instanceof ZooKeeperServer) {
          int featureID = notification.getFeatureID(ZooKeeperServer.class);
          if (featureID == HadoopPackage.ZOO_KEEPER_SERVER__STATUS_CODE) {
            if (notification.getEventType() == Notification.SET) {
              display.asyncExec(new Runnable() {
                @Override
                public void run() {
                  CommonViewer viewer = null;
                  try {
                    IViewPart view = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView(viewerId);
                    if (view instanceof CommonNavigator) {
                      CommonNavigator navigator = (CommonNavigator) view;
                      viewer = navigator.getCommonViewer();
                    }
                  } catch (PartInitException e) {
                  }

                  if (viewer != null) {
View Full Code Here

    }
  }
  public static void showInEditor(ToolComponent cls){
    try{
      //get an handle to the Tool navigator
      CommonNavigator toolNavigator = (CommonNavigator)PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView(ToolPlugin.TOOL_NAVIGATOR_ID);
      //open it in the active page
      IWorkbenchWindow window=PlatformUI.getWorkbench().getActiveWorkbenchWindow();
      IWorkbenchPage page = window.getActivePage();
      //get the IFile for the class
      IFile cdf = cls.getFile();
      StructuredSelection target = null;
      if (cdf == null){
        // we have a library class
        target = new StructuredSelection(cls);
      } else {
        target = new StructuredSelection(cdf);
      }
      //select and reveal the cdf in the navigator
//      CommonViewer viewer = toolNavigator.getCommonViewer();
//      viewer.expandToLevel(target, 1);
      toolNavigator.selectReveal(target);
      if (cdf!=null){
        //now open it in the cdf editor
        IEditorInput editorInput = new FileEditorInput(cdf);
        //invoke the editor
        page.openEditor(editorInput, ClassEditor.ID);
View Full Code Here

                        collection.reinitializeCloud();
                        IWorkbenchPage page = FindbugsPlugin.getActiveWorkbenchWindow().getActivePage();
                        if (page != null) {
                            IViewPart view = page.findView(FindbugsPlugin.TREE_VIEW_ID);
                            if (view instanceof CommonNavigator) {
                                CommonNavigator nav = ((CommonNavigator) view);
                                nav.getCommonViewer().refresh(true);
                            }
                        }
                    }
                }
            }
View Full Code Here

    @Override
    public void run() {
      if (PlatformUI.isWorkbenchRunning()) {
        IViewPart view = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView(IPageLayout.ID_PROJECT_EXPLORER);
        if (view instanceof CommonNavigator) {
          CommonNavigator navigator = (CommonNavigator) view;
          navigator.getCommonViewer().refresh();
        }
      }
    }
  });
  }
View Full Code Here

  public List<StructuredViewer> getViewers() {
    List<StructuredViewer> viewers = new ArrayList<StructuredViewer>();

    IViewPart view = super.getPartForAction();
    if (view instanceof CommonNavigator) {
      CommonNavigator navigator = (CommonNavigator) view;
      viewers.add(navigator.getCommonViewer());
      if (navigator instanceof AopReferenceModelNavigator) {
        this.navigator = (AopReferenceModelNavigator) navigator;
      }
    }
    return viewers;
View Full Code Here

  public List<StructuredViewer> getViewers() {
    List<StructuredViewer> viewers = new ArrayList<StructuredViewer>();

    IViewPart view = super.getPartForAction();
    if (view instanceof CommonNavigator) {
      CommonNavigator navigator = (CommonNavigator) view;
      viewers.add(navigator.getCommonViewer());
    }
    return viewers;
  }
View Full Code Here

            TreeViewer treeViewer = viewPart.getTreeViewer();
            selection = treeViewer.getSelection();
          }
          else if (view instanceof CommonNavigator)
          {
            CommonNavigator navigator = (CommonNavigator) view;
            CommonViewer commonViewer = navigator.getCommonViewer();
            selection = commonViewer.getSelection();
          }

          if (selection instanceof IStructuredSelection)
          {
View Full Code Here

TOP

Related Classes of org.eclipse.ui.navigator.CommonNavigator

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.