Package org.eclipse.jface.viewers

Examples of org.eclipse.jface.viewers.ITreeSelection


    treeViewer.setLabelProvider(new TestResultLabelProvider());
    treeViewer.setInput("root");
    treeViewer.addSelectionChangedListener(new ISelectionChangedListener() {
     
      public void selectionChanged(SelectionChangedEvent event) {
        ITreeSelection selection = (ITreeSelection) treeViewer.getSelection();
        TestResult testResult = (TestResult) selection.getFirstElement();
        if (testResult == null) {
          text.setText("");
          return;
        }
        text.setText(testResult.getMessage());
View Full Code Here


  public FilterWizardPage(ISelection selection) {
    super("Filter details");
    setTitle(getCaption("filterWizard.title"));
    setDescription(getCaption("filterWizard.detail"));

    ITreeSelection treeSelection = (ITreeSelection) selection;
    Object obj = treeSelection.getFirstElement();
    if (!(obj instanceof Collection) && !(obj instanceof Filter))
      throw new IllegalStateException(obj.getClass().getSimpleName()
          + getCaption("filterWizard.error.noCollection"));

    TreeParent parent = (TreeParent) obj;
View Full Code Here

                    null);
            StatusManager.getManager().handle(executionStatus, StatusManager.SHOW);
            return;
        }

        final ITreeSelection treeSelection = (ITreeSelection) selection;

        final StatsTreeObject obj = (StatsTreeObject) treeSelection.getFirstElement();

        if (obj.getClass().equals(ModuleStats.class)) {

            openInEditor(obj.getLabel() + ".erl");
View Full Code Here

                    null);
            StatusManager.getManager().handle(executionStatus, StatusManager.SHOW);
            return;
        }

        final ITreeSelection treeSelection = (ITreeSelection) selection;

        log.info(treeSelection.getFirstElement().getClass());

        perform((StatsTreeObject) treeSelection.getFirstElement());
    }
View Full Code Here

                    null);
            StatusManager.getManager().handle(executionStatus, StatusManager.SHOW);
            return;
        }

        final ITreeSelection treeSelection = (ITreeSelection) selection;

        log.info(treeSelection.getFirstElement());
        log.info(treeSelection.getFirstElement().getClass().getName());
        log.info(treeSelection.getPaths());

        final StatsTreeObject selObj = (StatsTreeObject) treeSelection.getFirstElement();

        final BrowserDialog browser = new BrowserDialog(shell);

        if (selObj instanceof FunctionStats) {
            final ModuleStats module = (ModuleStats) selObj.getParent();
View Full Code Here

   * if the selection is not a server)
   *
   * @return the currently selected server entry
   */
  public HadoopServer getSelectedServer() {
    ITreeSelection selection = (ITreeSelection) viewer.getSelection();
    Object first = selection.getFirstElement();
    if (first instanceof HadoopServer) {
      return (HadoopServer) first;
    }
    return null;
  }
View Full Code Here

   * if the selection is not a server)
   *
   * @return the currently selected server entry
   */
  public HadoopServer getSelectedServer() {
    ITreeSelection selection = (ITreeSelection) viewer.getSelection();
    Object first = selection.getFirstElement();
    if (first instanceof HadoopServer) {
      return (HadoopServer) first;
    }
    return null;
  }
View Full Code Here

    if (!(selection instanceof ITreeSelection))
      throw new IllegalStateException(selection.getClass()
          .getSimpleName()
          + getCaption("filterWizard.error.noITreeSelection"));

    ITreeSelection treeSelection = (ITreeSelection) selection;
    Object obj = treeSelection.getFirstElement();
    if (!(obj instanceof Collection) && !(obj instanceof Filter))
      throw new IllegalStateException(obj.getClass().getSimpleName()
          + getCaption("filterWizard.error.noCollection"));

    TreeParent parent = (TreeParent) obj;
View Full Code Here

     
        MenuManager menuMgr = new MenuManager("#CampaignViewPopupMenu");
        menuMgr.setRemoveAllWhenShown(true);
        menuMgr.addMenuListener(new IMenuListener() {
            public void menuAboutToShow(IMenuManager manager) {
                ITreeSelection sel = (ITreeSelection)viewer.getSelection();
                logger.trace("sel: " + sel);

                if(sel != null) {
                    logger.debug("filling context menu");
                    CampaignView.this.fillContextMenu(manager, sel);
View Full Code Here

        MenuManager menuMgr = new MenuManager("#CampaignViewPopupMenu");
        menuMgr.setRemoveAllWhenShown(true);
        menuMgr.addMenuListener(new IMenuListener() {
            public void menuAboutToShow(IMenuManager manager) {
                ITreeSelection sel = (ITreeSelection)viewer.getSelection();
                logger.trace("sel: " + sel);

                if(sel != null) {
                    logger.debug("filling context menu");
                    EncounterTrackerView.this.fillContextMenu(manager, sel);
View Full Code Here

TOP

Related Classes of org.eclipse.jface.viewers.ITreeSelection

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.