Class AddTaskAction

All Implemented Interfaces:
IAction, ISelectionChangedListener

public class AddTaskAction extends SelectionListenerAction
Standard action for adding a task to the currently selected file resource(s).

This class may be instantiated; it is not intended to be subclassed.

Since:
2.1
Restriction:
This class is not intended to be subclassed by clients.
  • Field Details

  • Constructor Details

    • AddTaskAction

      @Deprecated public AddTaskAction(Shell shell)
      Creates a new instance of the receiver.
      Parameters:
      shell - shell to use to show any dialogs
    • AddTaskAction

      public AddTaskAction(IShellProvider provider)
      Creates a new instance of the receiver.
      Parameters:
      provider - the IShellProvider to show any dialogs
      Since:
      3.4
  • Method Details

    • run

      public void run()
      Description copied from class: Action
      The default implementation of this IAction method does nothing. Subclasses should override this method if they do not need information from the triggering event, or override runWithEvent(Event) if they do.
      Specified by:
      run in interface IAction
      Overrides:
      run in class Action
      See Also:
    • updateSelection

      protected boolean updateSelection(IStructuredSelection selection)
      The AddTaskAction implementation of this SelectionListenerAction method enables the action only if the selection contains a single resource and the resource is not a closed project.
      Overrides:
      updateSelection in class BaseSelectionListenerAction
      Parameters:
      selection - the selection to update the enabled state for
      Returns:
      true if the action should be enabled for this selection, and false otherwise