Package org.rssowl.core.model.util

Examples of org.rssowl.core.model.util.TaskAdapter


      savedFeeds.add(fDao.saveFeed(feed));

    List<ITask> tasks = new ArrayList<ITask>();
    final List<Exception> ex = new ArrayList<Exception>();
    for (final IFeed feed : savedFeeds) {
      tasks.add(new TaskAdapter() {
        public IStatus run(IProgressMonitor monitor) {
          try {
            List<INews> news = fDao.loadFeed(feed.getId()).getNews();
            fAppLayer.setNewsState(news, INews.State.HIDDEN, true, false);
          } catch (PersistenceException e) {
View Full Code Here


    final List<Exception> ex = new ArrayList<Exception>();

    /* Prepare Tasks */
    for (int i = 1; i < FEEDS + 1; i++) {
      final int c = i;
      tasks.add(new TaskAdapter() {
        public IStatus run(IProgressMonitor monitor) {
          try {
            URL feedUrl = fPluginLocation.toURI().resolve("data/performance/" + c + ".xml").toURL();
            IFeed feed = new Feed(feedUrl);

View Full Code Here

  private List<ITask> getSaveFeedsTasks(final List<Exception> ex) {
    List<ITask> tasks = new ArrayList<ITask>();
    List<IFeed> feeds = interpretFeedsHelper();

    for (final IFeed feed : feeds) {
      tasks.add(new TaskAdapter() {
        public IStatus run(IProgressMonitor monitor) {
          try {
            fDao.saveFeed(feed);
          } catch (Exception e) {
            ex.add(e);
View Full Code Here

    final List<Exception> ex = new ArrayList<Exception>();

    /* Prepare Tasks */
    List<FeedReference> feedRefs = saveFeedsHelper();
    for (final FeedReference feedRef : feedRefs) {
      tasks.add(new TaskAdapter() {
        public IStatus run(IProgressMonitor monitor) {
          try {
            accessAllFields(feedRef.resolve());
          } catch (Exception e) {
            ex.add(e);
View Full Code Here

    final List<Exception> ex = new ArrayList<Exception>();

    /* Prepare Tasks */
    List<FeedReference> feedRefs = saveFeedsHelper();
    for (final FeedReference feedRef : feedRefs) {
      tasks.add(new TaskAdapter() {
        public IStatus run(IProgressMonitor monitor) {
          try {
            IFeed feed = feedRef.resolve();
            accessAllFields(feed);

View Full Code Here

    final List<Exception> ex = new ArrayList<Exception>();

    /* Prepare Tasks */
    List<FeedReference> feedRefs = saveFeedsHelper();
    for (final FeedReference feedRef : feedRefs) {
      tasks.add(new TaskAdapter() {
        public IStatus run(IProgressMonitor monitor) {
          try {
            IFeed feed = feedRef.resolve();

            Collection<INews> news = feed.getNews();
View Full Code Here

    final List<Exception> ex = new ArrayList<Exception>();

    /* Prepare Tasks */
    List<FeedReference> feedRefs = saveFeedsHelper();
    for (final FeedReference feedRef : feedRefs) {
      tasks.add(new TaskAdapter() {
        public IStatus run(IProgressMonitor monitor) {
          try {
            IFeed feed = feedRef.resolve();

            if (feed.getAuthor() != null)
View Full Code Here

  private List<ITask> getDeleteFeedsTasks(final List<Exception> ex) throws PersistenceException {
    List<ITask> tasks = new ArrayList<ITask>();

    List<FeedReference> feedRefs = saveFeedsHelper();
    for (final FeedReference feedRef : feedRefs) {
      tasks.add(new TaskAdapter() {
        public IStatus run(IProgressMonitor monitor) {
          try {
            fDao.deleteFeed(feedRef);
          } catch (Exception e) {
            ex.add(e);
View Full Code Here

          // existingFeed[0].merge(feed);
          // break;
        }
      }

      tasks.add(new TaskAdapter() {
        public IStatus run(IProgressMonitor monitor) {
          try {
            // Uncomment this line and comment the following one to use load the
            // full feed before the merge
            // existingFeed[0] =
View Full Code Here

    for (int i = 0; i < limit; i++) {
      final int a = i;

      /* Add Task to save a Feed (88%) */
      if (a % 8 != 0) {
        tasks.add(new TaskAdapter() {
          public IStatus run(IProgressMonitor monitor) {
            try {
              fDao.saveFeed(feeds.get(a + limit));
            } catch (Exception e) {
              ex.add(e);
            }
            return Status.OK_STATUS;
          }
        });
      }

      /* Add Task to resolve a Feed (12%) */
      if (a % 8 == 0) {
        tasks.add(new TaskAdapter() {
          public IStatus run(IProgressMonitor monitor) {
            try {
              IFeed feed = feedRefs.get(a).resolve();

              if (feed.getAuthor() != null)
View Full Code Here

TOP

Related Classes of org.rssowl.core.model.util.TaskAdapter

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.