Examples of toList()


Examples of org.eclipse.jface.viewers.IStructuredSelection.toList()

  }

  private void setTextData(DragSourceEvent event) {
    StringBuilder str = new StringBuilder(""); //$NON-NLS-1$
    IStructuredSelection selection = (IStructuredSelection) getViewer().getSelection();
    List<?> selectedObjects = selection.toList();
    for (Object selectedObject : selectedObjects) {

      /* IBookMark */
      if (selectedObject instanceof IBookMark) {
        IBookMark bookmark = (IBookMark) selectedObject;
View Full Code Here

Examples of org.eclipse.jface.viewers.IStructuredSelection.toList()

  }

  private void setURLData(DragSourceEvent event) {
    StringBuilder str = new StringBuilder(""); //$NON-NLS-1$
    IStructuredSelection selection = (IStructuredSelection) getViewer().getSelection();
    List<?> selectedObjects = selection.toList();
    for (Object selectedObject : selectedObjects) {

      /* IBookMark */
      if (selectedObject instanceof IBookMark) {
        IBookMark bookmark = (IBookMark) selectedObject;
View Full Code Here

Examples of org.eclipse.jface.viewers.IStructuredSelection.toList()

  }

  private boolean isFolderChildsDragged() {
    IStructuredSelection currentSource = (IStructuredSelection) LocalSelectionTransfer.getTransfer().getSelection();
    if (currentSource != null) {
      List<?> draggedItems = currentSource.toList();
      return containsFolderChilds(draggedItems);
    }

    return true;
  }
View Full Code Here

Examples of org.eclipse.jface.viewers.IStructuredSelection.toList()

    /* Selection-Transfer */
    if (data instanceof IStructuredSelection) {
      SafeRunner.run(new LoggingSafeRunnable() {
        public void run() throws Exception {
          IStructuredSelection selection = (IStructuredSelection) data;
          List<?> draggedObjects = selection.toList();

          if (getCurrentTarget() instanceof INewsBin && !containsFolderChilds(draggedObjects))
            perfromNewsDrop(draggedObjects);
          else
            perfromFolderChildDrop(draggedObjects);
View Full Code Here

Examples of org.eclipse.jface.viewers.IStructuredSelection.toList()

    });
  }

  private void setTextData(DragSourceEvent event) {
    IStructuredSelection selection = (IStructuredSelection) LocalSelectionTransfer.getTransfer().getSelection();
    Collection<INews> news = ModelUtils.normalize(selection.toList());

    if (!news.isEmpty()) {
      StringBuilder strB = new StringBuilder();

      for (INews item : news) {
View Full Code Here

Examples of org.eclipse.jface.viewers.IStructuredSelection.toList()

      public boolean performDrop(final Object data) {
        if (data instanceof IStructuredSelection) {
          SafeRunner.run(new LoggingSafeRunnable() {
            public void run() throws Exception {
              IStructuredSelection selection = (IStructuredSelection) data;
              List<?> draggedObjects = selection.toList();
              perfromDrop(draggedObjects, getCurrentTarget());
            }
          });

          return true;
View Full Code Here

Examples of org.eclipse.jface.viewers.IStructuredSelection.toList()

    }
  }

  private void onOpen() {
    IStructuredSelection selection = (IStructuredSelection) fViewer.getSelection();
    List<?> list = selection.toList();
    boolean activateEditor = OpenStrategy.activateOnOpen();
    int openedEditors = 0;
    int maxOpenEditors = EditorUtils.getOpenEditorLimit();

    /* Open Editors for the given Selection */
 
View Full Code Here

Examples of org.eclipse.jface.viewers.IStructuredSelection.toList()

      public boolean performDrop(final Object data) {
        if (data instanceof IStructuredSelection) {
          SafeRunner.run(new LoggingSafeRunnable() {
            public void run() throws Exception {
              IStructuredSelection selection = (IStructuredSelection) data;
              List<?> draggedObjects = selection.toList();
              perfromDrop(draggedObjects, getCurrentTarget());
            }
          });

          return true;
View Full Code Here

Examples of org.eclipse.jface.viewers.IStructuredSelection.toList()

    IStructuredSelection selection = (IStructuredSelection) event.getSelection();
    if (selection.isEmpty())
      return;

    /* Convert Selection to INews */
    List<?> selectedElements = selection.toList();
    List<INews> selectedNews = new ArrayList<INews>();
    for (Object selectedElement : selectedElements) {
      ScoredNews scoredNews = (ScoredNews) selectedElement;
      selectedNews.add(scoredNews.getNews());
    }
View Full Code Here

Examples of org.eclipse.jface.viewers.IStructuredSelection.toList()

    IStructuredSelection selection = (IStructuredSelection) event.getSelection();
    if (selection.isEmpty())
      return;

    /* Convert Selection to INews */
    List<?> selectedElements = selection.toList();
    List<INews> selectedNews = new ArrayList<INews>();
    for (Object selectedElement : selectedElements) {
      ScoredNews scoredNews = (ScoredNews) selectedElement;
      selectedNews.add(scoredNews.getNews());
    }
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.