Package org.rssowl.ui.internal.actions

Examples of org.rssowl.ui.internal.actions.OpenInBrowserAction


    Object firstElem = selection.getFirstElement();

    /* Open News */
    if (firstElem instanceof INews)
      new OpenInBrowserAction(selection).run();

    /* Toggle expanded State of Group */
    else if (firstElem instanceof EntityGroup)
      fViewer.setExpandedState(firstElem, !fViewer.getExpandedState(firstElem));
  }
View Full Code Here


  private void onOpen(IBookMark bookmark, INews news, MouseEvent e) {

    /* Open Link in Browser if Modifier Key is pressed */
    if ((e.stateMask & SWT.MOD1) != 0) {
      new OpenInBrowserAction(new StructuredSelection(news)).run();
      close();
      return;
    }

    /* Otherwise open Feedview and select the News */
 
View Full Code Here

                    action.run(null);
                  } else {
                    IBookMark bookmark = getBookMark(selection);
                    if (bookmark != null) {
                      String shareLink = provider.toShareUrl(bookmark);
                      new OpenInBrowserAction(new StructuredSelection(shareLink)).run();
                    }
                  }
                };

                @Override
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: {
        OwlUI.toggleFullScreen();
        wrappingAction.setChecked(fWindow.getShell().getFullScreen());
        break;
      }

        /* Toggle Bookmarks View */
      case BOOKMARK_VIEW: {
        OwlUI.toggleBookmarks();
        break;
      }

        /* Sticky */
      case STICKY: {
        IStructuredSelection selection = OwlUI.getActiveFeedViewSelection();
        if (selection != null && !selection.isEmpty())
          new MakeNewsStickyAction(selection).run();
        break;
      }

        /* Find more Feeds */
      case FIND_MORE_FEEDS: {
        SearchFeedsAction action = new SearchFeedsAction();
        action.init(fWindow);
        action.run(null);
        break;
      }

        /* Downloads & Activity */
      case ACTIVITIES: {
        ShowActivityAction action = new ShowActivityAction();
        action.init(fWindow);
        action.run(null);
        break;
      }

        /* Preferences */
      case PREFERENCES: {
        IWorkbenchAction action = ActionFactory.PREFERENCES.create(fWindow);
        action.run();
        break;
      }

        /* History */
      case HISTORY: {
View Full Code Here

                  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

    /* Open News */
    if (firstElem instanceof INews) {

      /* Do nothing if the user recently invokved a column action */
      if (System.currentTimeMillis() - fLastColumnActionInvokedMillies > 200)
        new OpenInBrowserAction(selection, WebBrowserContext.createFrom((INews) firstElem, fEditorInput.getMark())).run();
    }

    /* Toggle expanded State of Group */
    else if (firstElem instanceof EntityGroup)
      fViewer.setExpandedState(firstElem, !fViewer.getExpandedState(firstElem));
View Full Code Here

        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

        if (feed.getHomepage() != null) {
          str.append(NLS.bind(Messages.PreviewFeedDialog_FOUND_N_NEWS_HOMEPAGE, newsCount, fBookmark.getName()));
          fStatusLabel.addSelectionListener(new SelectionAdapter() {
            @Override
            public void widgetSelected(SelectionEvent e) {
              new OpenInBrowserAction(new StructuredSelection(feed.getHomepage())).run();
            }
          });
        } else
          str.append(NLS.bind(Messages.PreviewFeedDialog_FOUND_N_NEWS, newsCount, fBookmark.getName()));
View Full Code Here

        @Override
        public void widgetSelected(SelectionEvent e) {
          try {
            URI uri = new URI("http://www.feedvalidator.org/check.cgi?url=" + URIUtils.urlEncode(bm.getFeedLinkReference().getLinkAsText())); //$NON-NLS-1$

            OpenInBrowserAction action = new OpenInBrowserAction();
            action.selectionChanged(null, new StructuredSelection(uri));
            action.run();
          } catch (URISyntaxException ex) {
            Activator.safeLogError(ex.getMessage(), ex);
          }
        }
      });
View Full Code Here

          fHomepageLink.setText(homepage != null ? "<a>" + homepage.toString() + "</a>" : Messages.InformationPropertyPage_NONE); //$NON-NLS-1$ //$NON-NLS-2$
          if (homepage != null) {
            fHomepageLink.addSelectionListener(new SelectionAdapter() {
              @Override
              public void widgetSelected(SelectionEvent e) {
                OpenInBrowserAction action = new OpenInBrowserAction();
                action.selectionChanged(null, new StructuredSelection(homepage));
                action.run();
              }
            });
          }

          /* News Count */
 
View Full Code Here

TOP

Related Classes of org.rssowl.ui.internal.actions.OpenInBrowserAction

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.