Package org.eclipse.jface.viewers

Examples of org.eclipse.jface.viewers.StructuredSelection


    /* Viewer */
    fViewer = new TableViewer(customTable.getControl()) {
      @Override
      public ISelection getSelection() {
        StructuredSelection selection = (StructuredSelection) super.getSelection();
        return convertToNews(selection);
      }
    };
    fViewer.getControl().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
    fViewer.setUseHashlookup(true);
View Full Code Here


    for (Object selectedElement : selectedElements) {
      ScoredNews scoredNews = (ScoredNews) selectedElement;
      selectedNews.add(scoredNews.getNews());
    }

    return new StructuredSelection(selectedNews);
  }
View Full Code Here

    else if (event.button == 1 && item.getImageBounds(COL_STICKY).contains(p)) {
      Object data = item.getData();

      /* Toggle State between Sticky / Not Sticky */
      if (data instanceof ScoredNews) {
        new MakeTypesStickyAction(new StructuredSelection(((ScoredNews) data).getNews())).run();
      }
    }
  }
View Full Code Here

      ScoredNews scoredNews = (ScoredNews) selectedElement;
      selectedNews.add(scoredNews.getNews());
    }

    /* Open News */
    new OpenNewsAction(new StructuredSelection(selectedNews), getShell()).run();
  }
View Full Code Here

      if (!fSelectedBookMarkSet.equals(child))
        changeSet((IFolder) child);

      /* Set Selection */
      fViewer.setSelection(new StructuredSelection(mark), true);
    }
  }
View Full Code Here

  private void performNavigation(ITreeNode targetNode, boolean newsScoped, boolean unread) {
    IMark mark = (IMark) targetNode.getData();

    /* Set Selection to Mark */
    ISelection selection = new StructuredSelection(mark);
    fViewer.setSelection(selection);

    /* Open in FeedView */
    try {
      PerformAfterInputSet perform = null;
View Full Code Here

    new EntityGroupItem(group, label2);
    new EntityGroupItem(group, label3);

    Object selectedItems[] = new Object[] { label1, group };

    IStructuredSelection sel = new StructuredSelection(selectedItems);
    List<IEntity> entities = ModelUtils.getEntities(sel);

    assertEquals(3, entities.size());

    int l1 = 0, l2 = 0, l3 = 0;
View Full Code Here

    new EntityGroupItem(group, label2);
    new EntityGroupItem(group, label3);

    Object selectedItems[] = new Object[] { label1, feed1, group };

    IStructuredSelection sel = new StructuredSelection(selectedItems);
    List<ILabel> labels = ModelUtils.getEntities(sel, ILabel.class);

    assertEquals(3, labels.size());

    int l1 = 0, l2 = 0, l3 = 0;
View Full Code Here

    /* Viewer */
    fResultViewer = new TableViewer(customTable.getControl()) {
      @Override
      public ISelection getSelection() {
        StructuredSelection selection = (StructuredSelection) super.getSelection();
        return convertToNews(selection);
      }
    };
    fResultViewer.getControl().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
    fResultViewer.setUseHashlookup(true);
View Full Code Here

    for (Object selectedElement : selectedElements) {
      ScoredNews scoredNews = (ScoredNews) selectedElement;
      selectedNews.add(scoredNews.getNews());
    }

    return new StructuredSelection(selectedNews);
  }
View Full Code Here

TOP

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

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.