Package org.eclipse.jface.viewers

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


    /* Try to select and reveal editor input in the Explorer */
    IEditorInput editorInput = part.getEditorInput();
    if (editorInput instanceof FeedViewInput) {
      FeedViewInput feedViewInput = (FeedViewInput) editorInput;
      fViewer.setSelection(new StructuredSelection(feedViewInput.getMark()), true);
    }
  }
View Full Code Here

    /* Mark All Read */
    fViewSite.getActionBars().setGlobalActionHandler(RetargetActions.MARK_ALL_READ, new Action("Mark all Folders as Read") {
      @Override
      public void run() {
        IFolder root = fSelectedBookMarkSet;
        new MarkReadAction(new StructuredSelection(root)).run();
      }
    });

    /* Cut */
    fViewSite.getActionBars().setGlobalActionHandler(ActionFactory.CUT.getId(), new Action() {
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

    fFieldViewer.setContentProvider(new ComboContentProvider());
    fFieldViewer.setLabelProvider(new ComboLabelProvider());
    fFieldViewer.setInput(fCondition);

    /* Select the Condition's Field */
    fFieldViewer.setSelection(new StructuredSelection(fCondition.getField()));

    /* Listen to Changes */
    fFieldViewer.addSelectionChangedListener(new ISelectionChangedListener() {
      public void selectionChanged(SelectionChangedEvent event) {
        fModified = true;
View Full Code Here

    fSpecifierViewer.setContentProvider(new ComboContentProvider());
    fSpecifierViewer.setLabelProvider(new ComboLabelProvider());
    fSpecifierViewer.setInput(fCondition.getField());

    /* Select the Condition's Specifier */
    fSpecifierViewer.setSelection(new StructuredSelection(fCondition.getSpecifier()));

    /* Listen to Selection Changes in the Field-Viewer */
    fFieldViewer.addSelectionChangedListener(new ISelectionChangedListener() {
      public void selectionChanged(SelectionChangedEvent event) {
        IStructuredSelection selection = (IStructuredSelection) event.getSelection();
View Full Code Here

      Object data = item.getData();

      /* Toggle State between Sticky / Not Sticky */
      if (data instanceof INews) {
        disableTrackerTemporary = false;
        new MakeNewsStickyAction(new StructuredSelection(data)).run();
      }
    }

    /*
     * This is a workaround: Immediately after the mouse-down-event has been
View Full Code Here

      public void entitiesAdded(Set<FolderEvent> events) {
        for (FolderEvent folderEvent : events) {
          IFolder folder = folderEvent.getEntity();
          if (folder.getParent() == null) {
            fViewer.add(folder);
            fViewer.setSelection(new StructuredSelection(folder));
          }
        }
      }
    };
View Full Code Here

    /* Pre-Select the current visible Set */
    Set<IFolder> rootFolders = fCacheService.getRootFolders();
    for (IFolder rootFolder : rootFolders) {
      if (rootFolder.equals(fSelectedSet)) {
        fViewer.setSelection(new StructuredSelection(rootFolder));
        break;
      }
    }

    /* Separator */
 
View Full Code Here

    fViewer.refresh();

    /* Select and Focus the added Set */
    Table table = fViewer.getTable();
    Object lastItem = table.getItem(table.getItemCount() - 1).getData();
    fViewer.setSelection(new StructuredSelection(lastItem));
    table.setFocus();
  }
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.