Package org.rssowl.ui.internal.actions

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


  @Override
  public void open(MouseEvent e) {

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

    /* Otherwise open Feedview and select the News */
    IBookMark bookMark = Controller.getDefault().getCacheService().getBookMark(fFeedReference);
View Full Code Here


    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

          /* Open News in Browser */
          manager.add(new Action("Open in Browser") {
            @Override
            public void run() {
              new OpenInBrowserAction(selection).run();
            }

            @Override
            public boolean isEnabled() {
              return !selection.isEmpty();
View Full Code Here

  @Override
  public void open(MouseEvent e) {

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

    /* Open Link in Feed View */
    else {
      INews news = fNewsReference.resolve();
View Full Code Here

        /* Open */
        if (!isEntityGroupSelected) {
          manager.add(new Separator("open")); //$NON-NLS-1$

          /* Open News in Browser */
          manager.add(new OpenInBrowserAction(selection, WebBrowserContext.createFrom(selection, activeFeedView)) {
            @Override
            public boolean isEnabled() {
              return !selection.isEmpty();
            }
          });
View Full Code Here

            /* Other Action */
            else {
              Object obj = selection.getFirstElement();
              if (obj != null && obj instanceof INews) {
                String shareLink = provider.toShareUrl((INews) obj);
                new OpenInBrowserAction(new StructuredSelection(shareLink)).run();
              }
            }
          };

          @Override
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

        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

            else if (SyncUtils.isSynchronized(bm))
              uri = new URI(SyncUtils.GOOGLE_READER_URL);
            else
              uri = new URI("http://www.feedvalidator.org/check.cgi?url=" + URIUtils.urlEncode(URIUtils.toHTTP(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();
                }
              });
            }
          }
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.