Examples of INewsAction


Examples of org.rssowl.core.INewsAction

  private void applyFilter(ISearchFilter filter, final List<INews> news) {
    final Map<INews, INews> replacements= new HashMap<INews, INews>();
    Collection<IFilterAction> actions = CoreUtils.getActions(filter); //Need to sort structural actions to end
    for (final IFilterAction action : actions) {
      final INewsAction newsAction = fNewsActions.get(action.getActionId());
      if (newsAction != null) {
        SafeRunner.run(new LoggingSafeRunnable() {
          public void run() throws Exception {
            newsAction.run(news, replacements, action.getData());
          }
        });
      }
    }
  }
View Full Code Here

Examples of org.rssowl.core.INewsAction

    final Map<INews, INews> replacements = new HashMap<INews, INews>();

    for (final IFilterAction action : actions) {
      NewsActionDescriptor newsActionDescriptor = fNewsActionPresentationManager.getNewsActionDescriptor(action.getActionId());
      if (newsActionDescriptor != null && newsActionDescriptor.isForcable()) {
        final INewsAction newsAction = newsActionDescriptor.getNewsAction();
        if (newsAction != null) {
          SafeRunnable.run(new ISafeRunnable() {
            public void handleException(Throwable e) {
              Activator.getDefault().logError(e.getMessage(), e);
            }

            public void run() throws Exception {
              List<IEntity> changedEntities = newsAction.run(news, replacements, action.getData());
              entitiesToSave.addAll(changedEntities);
            }
          });
        }
      }
View Full Code Here

Examples of org.rssowl.core.INewsAction

    final Map<INews, INews> replacements = new HashMap<INews, INews>();

    for (final IFilterAction action : actions) {
      NewsActionDescriptor newsActionDescriptor = fNewsActionPresentationManager.getNewsActionDescriptor(action.getActionId());
      if (newsActionDescriptor != null && newsActionDescriptor.isForcable()) {
        final INewsAction newsAction = newsActionDescriptor.getNewsAction();
        if (newsAction != null) {
          SafeRunnable.run(new ISafeRunnable() {
            public void handleException(Throwable e) {
              Activator.getDefault().logError(e.getMessage(), e);
            }

            public void run() throws Exception {
              List<IEntity> changedEntities = newsAction.run(news, replacements, action.getData());
              entitiesToSave.addAll(changedEntities);
            }
          });
        }
      }
View Full Code Here

Examples of org.rssowl.core.INewsAction

        String platform = element.getAttribute("platform"); //$NON-NLS-1$
        if (StringUtils.isSet(platform) && !SWT.getPlatform().equals(platform))
          continue;

        String id = element.getAttribute("id"); //$NON-NLS-1$
        INewsAction newsAction = (INewsAction) element.createExecutableExtension("class"); //$NON-NLS-1$
        String name = element.getAttribute("name"); //$NON-NLS-1$
        String description = element.getAttribute("description"); //$NON-NLS-1$
        String sortKey = element.getAttribute("sortKey"); //$NON-NLS-1$
        String forcable = element.getAttribute("forcable"); //$NON-NLS-1$
View Full Code Here

Examples of org.rssowl.core.INewsAction

  private void applyFilter(final ISearchFilter filter, final List<INews> news) {
    final Map<INews, INews> replacements = new HashMap<INews, INews>();
    Collection<IFilterAction> actions = CoreUtils.getActions(filter); //Need to sort structural actions to end
    for (final IFilterAction action : actions) {
      final INewsAction newsAction = fNewsActions.get(action.getActionId());
      if (newsAction != null) {
        SafeRunner.run(new LoggingSafeRunnable() {
          public void run() throws Exception {
            newsAction.run(news, replacements, action.getData());
          }
        });
      }
    }
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.