Package org.rssowl.core.persist

Examples of org.rssowl.core.persist.IBookMark


    INews news2 = fFactory.createNews(null, feed, new Date());
    news2.setTitle("News #2");
    news2.setPublishDate(new Date(today - 7 * DAY));
    fFactory.createNews(null, feed, new Date()).setTitle("News #3");

    IBookMark bookmark = (IBookMark) folder.getMarks().get(0);
    assertEquals(103, countNews(feed));

    /* Preferences */
    IPreferenceScope prefs1 = Owl.getPreferenceService().getEntityScope(bookmark);

View Full Code Here


    INews news2 = fFactory.createNews(null, feed, new Date());
    news2.setTitle("News #2");
    news2.setPublishDate(new Date(today - 7 * DAY));
    fFactory.createNews(null, feed, new Date()).setTitle("News #3");

    IBookMark bookmark = (IBookMark) folder.getMarks().get(0);
    assertEquals(103, countNews(feed));

    /* Preferences */
    IPreferenceScope prefs1 = Owl.getPreferenceService().getEntityScope(bookmark);

View Full Code Here

    INews news2 = fFactory.createNews(null, feed, new Date());
    news2.setTitle("News #2");
    news2.setPublishDate(new Date(today - 7 * DAY));
    fFactory.createNews(null, feed, new Date()).setTitle("News #3");

    IBookMark bookmark = (IBookMark) folder.getMarks().get(0);
    assertEquals(103, countNews(feed));

    /* Preferences */
    IPreferenceScope prefs1 = Owl.getPreferenceService().getEntityScope(bookmark);

View Full Code Here

    INews news2 = fFactory.createNews(null, feed, new Date());
    news2.setTitle("News #2");
    news2.setPublishDate(new Date(today - 7 * DAY));
    fFactory.createNews(null, feed, new Date()).setTitle("News #3");

    IBookMark bookmark = (IBookMark) folder.getMarks().get(0);
    assertEquals(103, countNews(feed));

    /* Preferences */
    IPreferenceScope prefs1 = Owl.getPreferenceService().getEntityScope(bookmark);

View Full Code Here

        }
      }
    }

    else if (entity instanceof IBookMark) {
      IBookMark bookmark = new BookMarkReference(entity.getId()).resolve();
      count += bookmark.getFeedLinkReference().resolve().getVisibleNews().size();
    }

    else if (entity instanceof IFeed) {
      count += ((IFeed) entity).getVisibleNews().size();
    }
View Full Code Here

  /*
   * @see org.eclipse.ui.IEditorInput#getImageDescriptor()
   */
  public ImageDescriptor getImageDescriptor() {
    if (fIsBookMark) {
      IBookMark bookmark = (IBookMark) fMark;
      ImageDescriptor favicon = OwlUI.getFavicon(bookmark);
      if (favicon != null)
        return favicon;
      return OwlUI.BOOKMARK;
    } else if (fMark instanceof ISearchMark)
View Full Code Here

              Set<Entry<IBookMark, IFolder>> entries = reparentedBookMarks.entrySet();
              Set<IFolder> parentsToUpdate = new HashSet<IFolder>();
              try {
                fViewer.getControl().getParent().setRedraw(false);
                for (Entry<IBookMark, IFolder> entry : entries) {
                  IBookMark reparentedBookMark = entry.getKey();
                  IFolder oldParent = entry.getValue();

                  /* Reparent while keeping the Selection */
                  ISelection selection = fViewer.getSelection();
                  fViewer.remove(oldParent, new Object[] { reparentedBookMark });
                  fViewer.refresh(reparentedBookMark.getParent(), false);
                  fViewer.setSelection(selection);

                  /* Remember to update parents */
                  parentsToUpdate.add(oldParent);
                  parentsToUpdate.add(reparentedBookMark.getParent());
                }
              } finally {
                fViewer.getControl().getParent().setRedraw(true);
              }

View Full Code Here

    if (activeFeedView != null) {
      IEditorInput input = activeFeedView.getEditorInput();
      if (input instanceof org.rssowl.ui.internal.editors.feed.FeedViewInput) {
        org.rssowl.ui.internal.editors.feed.FeedViewInput feedInput = (org.rssowl.ui.internal.editors.feed.FeedViewInput) input;
        if (feedInput.getMark() instanceof IBookMark) {
          final IBookMark bm = (IBookMark) feedInput.getMark();
          final URI feedLink = bm.getFeedLinkReference().getLink();

          try {
            final IProtocolHandler handler = Owl.getConnectionService().getHandler(feedLink);
            if (handler instanceof org.rssowl.core.internal.connection.DefaultProtocolHandler) {
              Job downloadJob = new Job(Messages.ViewFeedSourceAction_DOWNLOAD_FEED_SOURCE) {
                @Override
                protected IStatus run(IProgressMonitor monitor) {
                  monitor.beginTask(bm.getName(), IProgressMonitor.UNKNOWN);

                  File tmpFile = null;
                  InputStream in = null;
                  FileOutputStream out = null;
                  boolean canceled = false;
View Full Code Here

    if (activeFeedView != null) {
      IEditorInput input = activeFeedView.getEditorInput();
      if (input instanceof org.rssowl.ui.internal.editors.feed.FeedViewInput) {
        org.rssowl.ui.internal.editors.feed.FeedViewInput feedInput = (org.rssowl.ui.internal.editors.feed.FeedViewInput) input;
        if (feedInput.getMark() instanceof IBookMark) {
          IBookMark bm = (IBookMark) feedInput.getMark();
          try {
            URI uri = new URI("http://www.feedvalidator.org/check.cgi?url=" + URIUtils.urlEncode(bm.getFeedLinkReference().getLinkAsText())); //$NON-NLS-1$

            org.rssowl.ui.internal.actions.OpenInBrowserAction openAction = new org.rssowl.ui.internal.actions.OpenInBrowserAction();
            openAction.selectionChanged(null, new StructuredSelection(uri));
            openAction.run();
          } catch (URISyntaxException ex) {
View Full Code Here

                  if (SendLinkAction.ID.equals(provider.getId())) {
                    IActionDelegate action = new SendLinkAction();
                    action.selectionChanged(null, selection);
                    action.run(null);
                  } else {
                    IBookMark bookmark = getBookMark(selection);
                    if (bookmark != null) {
                      String shareLink = provider.toShareUrl(bookmark);
                      new OpenInBrowserAction(new StructuredSelection(shareLink)).run();
                    }
                  }
View Full Code Here

TOP

Related Classes of org.rssowl.core.persist.IBookMark

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.