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

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


      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


  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 void onClose() {

    /* Mark new News as Unread on Close */
    IEditorPart activeEditor = OwlUI.getActiveEditor();
    if (activeEditor != null && activeEditor instanceof FeedView) {
      FeedView feedView = (FeedView) activeEditor;
      feedView.notifyUIEvent(FeedView.UIEvent.CLOSE);
    }
  }
View Full Code Here

    PerformAfterInputSet perform = PerformAfterInputSet.selectNews(new NewsReference(news.getId()));
    perform.setActivate(false);

    /* Open this Bookmark */
    FeedViewInput fvInput = new FeedViewInput(newsmark, perform);
    FeedView feedview = null;

    /* First check if input already shown */
    IEditorPart existingEditor = page.findEditor(fvInput);
    if (existingEditor != null && existingEditor instanceof FeedView) {
      feedview = (FeedView) existingEditor;

      /* Set Selection and bring to front */
      existingEditor.getSite().getPage().activate(existingEditor);
      feedview.setSelection(new StructuredSelection(news));
    }

    /* Otherwise open the Input in a new Editor */
    else
      OwlUI.openInFeedView(page, new StructuredSelection(newsmark), true, false, perform);
View Full Code Here

        /* Zoom (In, Out, Reset) */
        final MenuManager zoomMenu = new MenuManager(Messages.ApplicationActionBarAdvisor_ZOOM);
        zoomMenu.setRemoveAllWhenShown(true);
        zoomMenu.addMenuListener(new IMenuListener() {
          public void menuAboutToShow(IMenuManager manager) {
            FeedView activeFeedView = OwlUI.getActiveFeedView();
            final boolean isZoomingEnabled = (activeFeedView != null && activeFeedView.isBrowserShowingNews());

            /* Zoom In */
            zoomMenu.add(new Action(Messages.ApplicationActionBarAdvisor_ZOOM_IN) {
              @Override
              public void run() {
View Full Code Here

    newsMenu.addMenuListener(new IMenuListener() {
      public void menuAboutToShow(IMenuManager manager) {
        final IStructuredSelection selection;

        FeedView activeFeedView = OwlUI.getActiveFeedView();
        FeedViewInput activeInput = null;
        if (activeFeedView != null) {
          selection = (IStructuredSelection) activeFeedView.getSite().getSelectionProvider().getSelection();
          activeInput = (FeedViewInput) activeFeedView.getEditorInput();
        } else
          selection = StructuredSelection.EMPTY;

        boolean isEntityGroupSelected = OwlUI.isEntityGroupSelected(selection);
View Full Code Here

   * @return the {@link INewsMark} currently showing in the active feed view if
   * any or <code>null</code> otherwise.
   */
  public static INewsMark getActiveFeedViewNewsMark() {
    try {
      FeedView activeFeedView = getActiveFeedView();
      if (activeFeedView != null) {
        FeedViewInput input = (FeedViewInput) activeFeedView.getEditorInput();
        return input.getMark();
      }
    } catch (Error e) {
      /* Since this method might be called from any thread, protect fully */
    }
View Full Code Here

   *
   * @return the first active <code>FeedView</code> input preferences from the
   * PlatformUI facade or <code>NULL</code> if none.
   */
  public static IPreferenceScope getActiveFeedViewPreferences() {
    FeedView feedView = getActiveFeedView();
    if (feedView != null) {
      IEditorInput input = feedView.getEditorInput();
      if (input instanceof FeedViewInput) {
        FeedViewInput feedViewInput = (FeedViewInput) input;
        if (feedViewInput.getMark() != null) {
          INewsMark mark = feedViewInput.getMark();
          if (mark instanceof FolderNewsMark)
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

            break;
          }

          /* Otherwise replace the input in the first active feed view */
          FeedView activeFeedView = OwlUI.getFirstActiveFeedView();
          if (activeFeedView != null) {
            activeFeedView.setInput(input);
            if (activateEditor)
              page.activate(activeFeedView);
            else
              page.bringToTop(activeFeedView);
            break;
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.