Package org.rssowl.ui.internal.actions

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


    /* Go to Next News */
    else if (NEXT_NEWS_HANDLER_ID.equals(id)) {
      delayInUI(new Runnable() {
        public void run() {
          NavigationActionFactory factory = new NavigationActionFactory();
          try {
            factory.setInitializationData(null, null, NavigationActionFactory.NavigationActionType.NEXT_FEED.getId());
            IWorkbenchWindowActionDelegate action = (IWorkbenchWindowActionDelegate) factory.create();
            action.run(null);
          } catch (CoreException e) {
            /* Ignore */
          }
        }
      });
    }

    /* Go to Next Unread News */
    else if (NEXT_UNREAD_NEWS_HANDLER_ID.equals(id)) {
      delayInUI(new Runnable() {
        public void run() {
          NavigationActionFactory factory = new NavigationActionFactory();
          try {
            factory.setInitializationData(null, null, NavigationActionFactory.NavigationActionType.NEXT_UNREAD_FEED.getId());
            IWorkbenchWindowActionDelegate action = (IWorkbenchWindowActionDelegate) factory.create();
            action.run(null);
          } catch (CoreException e) {
            /* Ignore */
          }
        }
      });
    }

    /* Go to Previous News */
    else if (PREVIOUS_NEWS_HANDLER_ID.equals(id)) {
      delayInUI(new Runnable() {
        public void run() {
          NavigationActionFactory factory = new NavigationActionFactory();
          try {
            factory.setInitializationData(null, null, NavigationActionFactory.NavigationActionType.PREVIOUS_FEED.getId());
            IWorkbenchWindowActionDelegate action = (IWorkbenchWindowActionDelegate) factory.create();
            action.run(null);
          } catch (CoreException e) {
            /* Ignore */
          }
        }
      });
    }

    /* Go to Previous Unread News */
    else if (PREVIOUS_UNREAD_NEWS_HANDLER_ID.equals(id)) {
      delayInUI(new Runnable() {
        public void run() {
          NavigationActionFactory factory = new NavigationActionFactory();
          try {
            factory.setInitializationData(null, null, NavigationActionFactory.NavigationActionType.PREVIOUS_UNREAD_FEED.getId());
            IWorkbenchWindowActionDelegate action = (IWorkbenchWindowActionDelegate) factory.create();
            action.run(null);
          } catch (CoreException e) {
            /* Ignore */
          }
        }
View Full Code Here


    }

    /* Forward the navigation action to the outer scope */
    delayInUI(new Runnable() {
      public void run() {
        NavigationActionFactory factory = new NavigationActionFactory();
        try {
          NavigationActionFactory.NavigationActionType type = null;
          if (NEXT_NEWS_HANDLER_ID.equals(id))
            type = NavigationActionFactory.NavigationActionType.NEXT_FEED_NEXT_NEWS;
          else if (NEXT_UNREAD_NEWS_HANDLER_ID.equals(id))
            type = NavigationActionFactory.NavigationActionType.NEXT_UNREAD_FEED_NEXT_UNREAD_NEWS;
          else if (PREVIOUS_NEWS_HANDLER_ID.equals(id))
            type = NavigationActionFactory.NavigationActionType.PREVIOUS_FEED_PREVIOUS_NEWS;
          else if (PREVIOUS_UNREAD_NEWS_HANDLER_ID.equals(id))
            type = NavigationActionFactory.NavigationActionType.PREVIOUS_UNREAD_FEED_PREVIOUS_UNREAD_NEWS;

          if (type != null) {
            factory.setInitializationData(null, null, type.getId());
            IWorkbenchWindowActionDelegate action = (IWorkbenchWindowActionDelegate) factory.create();
            action.run(null);
          }
        } catch (CoreException e) {
          /* Ignore */
        }
View Full Code Here

TOP

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

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.