Examples of IWorkbenchWindowActionDelegate


Examples of org.eclipse.ui.IWorkbenchWindowActionDelegate

      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

Examples of org.eclipse.ui.IWorkbenchWindowActionDelegate

  }

  public final void dispose() {
    final IActionDelegate delegate = getDelegate();
    if (delegate instanceof IWorkbenchWindowActionDelegate) {
      final IWorkbenchWindowActionDelegate workbenchWindowDelegate = (IWorkbenchWindowActionDelegate) delegate;
      workbenchWindowDelegate.dispose();
    } else if (delegate instanceof IActionDelegate2) {
      final IActionDelegate2 delegate2 = (IActionDelegate2) delegate;
      delegate2.dispose();
    }
  }
View Full Code Here

Examples of org.eclipse.ui.IWorkbenchWindowActionDelegate

          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
Copyright © 2018 www.massapi.com. 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.