Examples of StructuredSelection


Examples of org.eclipse.jface.viewers.StructuredSelection

      if (newsbin != null) {
        fFilteredTree.getPatternFilter().setPattern(""); //$NON-NLS-1$
        fFilteredTree.getFilterControl().setText(""); //$NON-NLS-1$
        fViewer.refresh();
        fViewer.expandAll();
        fViewer.setSelection(new StructuredSelection(newsbin), true);
        fViewer.setChecked(newsbin, true);
        fCheckedElementsCache.add(newsbin);
      }
    }
View Full Code Here

Examples of org.eclipse.jface.viewers.StructuredSelection

    /* Normalize the dragged entities */
    for (IFolder folder : draggedFolders)
      CoreUtils.normalize(folder, draggedEntities);

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

Examples of org.eclipse.jface.viewers.StructuredSelection

  private void perfromNewsDrop(List<?> draggedObjects) {
    int operation = getCurrentOperation();
    INewsBin dropTarget = (INewsBin) getCurrentTarget();

    new MoveCopyNewsToBinAction(new StructuredSelection(draggedObjects), dropTarget, operation == DND.DROP_MOVE).run();
  }
View Full Code Here

Examples of org.eclipse.jface.viewers.StructuredSelection

  @Override
  public void run() {
    FeedView activeFeedView = OwlUI.getActiveFeedView();
    if (activeFeedView != null) {
      FeedViewInput input = (FeedViewInput) activeFeedView.getEditorInput();
      new MarkTypesReadAction(new StructuredSelection(input.getMark())).run();
    }
  }
View Full Code Here

Examples of org.eclipse.jface.viewers.StructuredSelection

      @Override
      public Menu createMenu(Control parent) {
        MenuManager shareMenu = new MenuManager();

        String url = fBrowser.getControl().getUrl();
        final IStructuredSelection selection = URIUtils.ABOUT_BLANK.equals(url) ? StructuredSelection.EMPTY : new StructuredSelection(url);

        List<ShareProvider> providers = Controller.getDefault().getShareProviders();
        for (final ShareProvider provider : providers) {
          if (provider.isEnabled()) {
            shareMenu.add(new Action(provider.getName()) {
              @Override
              public void run() {
                if (SendLinkAction.ID.equals(provider.getId())) {
                  IActionDelegate action = new SendLinkAction();
                  action.selectionChanged(null, selection);
                  action.run(null);
                } else {
                  Object obj = selection.getFirstElement();
                  if (StringUtils.isSet((String) obj) && !URIUtils.ABOUT_BLANK.equals(obj)) {
                    String shareLink = provider.toShareUrl((String) obj, null);
                    new OpenInBrowserAction(new StructuredSelection(shareLink)).run();
                  }
                }
              };

              @Override
View Full Code Here

Examples of org.eclipse.jface.viewers.StructuredSelection

    PerformAfterInputSet perform = null;
    if (newsReference != null)
      perform = PerformAfterInputSet.selectNews(newsReference);

    if (newsMark != null)
      OwlUI.openInFeedView(fEditorSite.getPage(), new StructuredSelection(newsMark), true, false, perform);
  }
View Full Code Here

Examples of org.eclipse.jface.viewers.StructuredSelection

    };

    /* Retrieve and select new Target Node */
    ITreeNode targetNode = (next ? traverse.nextNode() : traverse.previousNode());
    if (targetNode != null) {
      ISelection selection = new StructuredSelection(targetNode.getData());
      return selection;
    }

    return null;
  }
View Full Code Here

Examples of org.eclipse.jface.viewers.StructuredSelection

        return;

      /* Open News */
      Object element = item.getData();
      if (element instanceof INews)
        new OpenInBrowserAction(new StructuredSelection(element), WebBrowserContext.createFrom((INews) element, fEditorInput.getMark())).run();
    }
  }
View Full Code Here

Examples of org.eclipse.jface.viewers.StructuredSelection

      /* Toggle State between Sticky / Not Sticky */
      if (data instanceof INews) {
        Runnable runnable = new Runnable() {
          public void run() {
            new MakeNewsStickyAction(new StructuredSelection(data)).run();
          }
        };

        INews news = (INews) data;
        if (news.getState() != INews.State.READ && isGroupingByStickyness()) //Workaround for Bug 1279
          JobRunner.runInBackgroundThread(50, runnable);
        else
          runnable.run();

        fLastColumnActionInvokedMillies = System.currentTimeMillis();
      }
    }

    /* Mouse-Up over Attachments-Column */
    else if (event.button == 1 && isInImageBounds(item, NewsColumn.ATTACHMENTS, p)) {
      Object data = item.getData();

      MenuManager contextMenu = new MenuManager();
      ApplicationActionBarAdvisor.fillAttachmentsMenu(contextMenu, new StructuredSelection(data), fEditorSite, true);

      if (fAttachmentsMenu != null)
        fAttachmentsMenu.dispose();

      fAttachmentsMenu = contextMenu.createContextMenu(fViewer.getControl());
View Full Code Here

Examples of org.eclipse.jface.viewers.StructuredSelection

        /* Display selected Feed since its existing already */
        else {
          IWorkbenchPage page = OwlUI.getPage();
          if (page != null)
            OwlUI.openInFeedView(page, new StructuredSelection(existingBookMark));
        }
      }
    });
  }
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.