Package org.rssowl.ui.internal.editors.feed

Examples of org.rssowl.ui.internal.editors.feed.FeedView


  private void onMinimize() {

    /* Mark displayed News as Read on Minimize if set in Preferences */
    IEditorPart activeEditor = OwlUI.getActiveEditor();
    if (activeEditor != null && activeEditor instanceof FeedView) {
      FeedView feedView = (FeedView) activeEditor;
      feedView.notifyUIEvent(FeedView.UIEvent.MINIMIZE);
    }
  }
View Full Code Here


    }

    private boolean navigateOnActiveFeedView() {

      /* Get active FeedView if any */
      FeedView activeFeedView = OwlUI.getActiveFeedView();

      /* Run on active FeedView if any */
      if (activeFeedView != null) {
        boolean success = activeFeedView.navigate(true, false, fType.isNext(), fType.isUnread());

        /* For unread & next news, consider all news of the active feed */
        if (!success && fType.isNewsScoped() && fType.isUnread() && fType.isNext())
          success = activeFeedView.navigate(false, false, fType.isNext(), fType.isUnread());

        if (success) {
          IWorkbenchPage page = activeFeedView.getSite().getPage();
          page.activate(activeFeedView.getSite().getPart());
          page.activate(activeFeedView);

          return true;
        }
      }
View Full Code Here

    private boolean navigateOnModel() {
      List<IFolderChild> startingNodes = new ArrayList<IFolderChild>();

      /* Check Current Active FeedView */
      FeedView activeFeedView = OwlUI.getActiveFeedView();
      if (activeFeedView != null) {
        IEditorInput input = activeFeedView.getEditorInput();
        if (input != null && input instanceof FeedViewInput) {
          INewsMark mark = ((FeedViewInput) input).getMark();
          if (mark != null)
            startingNodes.add(mark instanceof FolderNewsMark ? ((FolderNewsMark) mark).getFolder() : mark);
        }
View Full Code Here

      }
    });

    /* Set Selection to Input if Empty */
    if (fSelection.isEmpty()) {
      FeedView activeFeedView = OwlUI.getActiveFeedView();
      if (activeFeedView != null) {
        FeedViewInput input = (FeedViewInput) activeFeedView.getEditorInput();
        fSelection = new StructuredSelection(input.getMark());
      }
    }

    /* Run Update */
 
View Full Code Here

      IEditorReference[] editorReferences = page.getEditorReferences();
      for (IEditorReference reference : editorReferences) {
        try {
          IEditorInput editorInput = reference.getEditorInput();
          if (editorInput instanceof FeedViewInput) {
            FeedView feedView = (FeedView) reference.getEditor(true);
            feedView.updateFilterAndGrouping(true);
          }
        } catch (PartInitException e) {
          Activator.getDefault().getLog().log(e.getStatus());
        }
      }
View Full Code Here

      IEditorReference[] editorReferences = page.getEditorReferences();
      for (IEditorReference reference : editorReferences) {
        try {
          IEditorInput editorInput = reference.getEditorInput();
          if (editorInput instanceof FeedViewInput) {
            FeedView feedView = (FeedView) reference.getEditor(true);
            feedView.updateColumns();
          }
        } catch (PartInitException e) {
          Activator.getDefault().getLog().log(e.getStatus());
        }
      }
View Full Code Here

  /*
   * @see org.eclipse.jface.action.Action#run()
   */
  @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

      }

        /* Open */
      case OPEN: {
        IStructuredSelection selection = OwlUI.getActiveFeedViewSelection();
        FeedView feedView = OwlUI.getActiveFeedView();
        if (selection != null && !selection.isEmpty() && feedView != null) {
          OpenInBrowserAction action = new OpenInBrowserAction(selection, WebBrowserContext.createFrom(selection, feedView));
          action.run();
        }
        break;
      }

        /* Save As */
      case SAVE_AS: {
        FeedView activeFeedView = OwlUI.getActiveFeedView();
        if (activeFeedView != null)
          activeFeedView.doSaveAs();
        break;
      }

        /* Print */
      case PRINT: {
        FeedView activeFeedView = OwlUI.getActiveFeedView();
        if (activeFeedView != null)
          activeFeedView.print();
        break;
      }

        /* Fullscreen */
      case FULLSCREEN: {
View Full Code Here

  /*
   * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
   */
  public void run(IAction action) {
    FeedView activeFeedView = OwlUI.getActiveFeedView();
    if (activeFeedView != null) {
      IStructuredSelection selection = (IStructuredSelection) activeFeedView.getSite().getSelectionProvider().getSelection();
      if (selection != null && !selection.isEmpty())
        internalRun(selection, shouldMarkRead(selection));
    }
  }
View Full Code Here

   *
   * @return the selection from the first active <code>FeedView</code> from the
   * PlatformUI facade or <code>StructuredSelection.EMPTY</code> if none.
   */
  public static IStructuredSelection getActiveFeedViewSelection() {
    FeedView feedview = getActiveFeedView();
    if (feedview == null)
      return StructuredSelection.EMPTY;

    ISelectionProvider selectionProvider = feedview.getSite().getSelectionProvider();
    if (selectionProvider == null)
      return StructuredSelection.EMPTY;

    return (IStructuredSelection) selectionProvider.getSelection();
  }
View Full Code Here

TOP

Related Classes of org.rssowl.ui.internal.editors.feed.FeedView

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.