public final class Task extends Object
Modifier and Type | Method and Description |
---|---|
static Task |
create(FileObject resource,
String groupName,
String description,
ActionListener al)
Create a new Task
|
static Task |
create(FileObject resource,
String groupName,
String description,
int line)
Create a new Task
|
static Task |
create(URL resource,
String groupName,
String description)
Create a new Task
|
static Task |
create(URL resource,
String groupName,
String description,
ActionListener defaultAction,
Action[] popupActions)
Create a new Task
|
boolean |
equals(Object o) |
int |
hashCode() |
String |
toString() |
public static Task create(URL resource, String groupName, String description)
resource
- Resource which the Task applies to, cannot be null.groupName
- Name of the group this task belongs to (nb-tasklist-error
, nb-tasklist-warning
, nb-tasklist-todo
, etc).description
- A brief summary of the task (one line if possible), cannot be null.public static Task create(URL resource, String groupName, String description, ActionListener defaultAction, Action[] popupActions)
Since version 1.4 the Task List implementation uses Indexing API to persist tasks created by FileTaskScanners. If a file hasn't changed since the last scan then the tasks associated with that file are loaded from cache to improve Task List performance. Therefore task's ActionListener and popup Actions aren't available when the task is restored from cache. Task providers must switch to PushTaskScanner if ActionListener and popup actions are required to be available at all times.
resource
- Resource which the Task applies to, cannot be null.groupName
- Name of the group this task belongs to (nb-tasklist-error
, nb-tasklist-warning
, nb-tasklist-todo
, etc).description
- A brief summary of the task (one line if possible), cannot be null.defaultAction
- Task's default action, e.g. double-click or Enter key in the Task List window.popupActions
- Actions to show in task's popup menu.public static Task create(FileObject resource, String groupName, String description, int line)
resource
- File or folder which the Task applies to, cannot be null.groupName
- Name of the group this task belongs to (nb-tasklist-error
, nb-tasklist-warning
, nb-tasklist-todo
, etc).description
- A brief summary of the task (one line if possible), cannot be null.line
- Line number in a text file, use negative value if line number is not applicable.public static Task create(FileObject resource, String groupName, String description, ActionListener al)
Create a new Task
Since version 1.4 the Task List implementation uses Indexing API to persist tasks created by FileTaskScanners. If a file hasn't changed since the last scan then the tasks associated with that file are loaded from cache to improve Task List performance. Therefore task's ActionListener isn't available when the task is restored from cache. Task providers must switch to PushTaskScanner if ActionListener is required to be available at all times.
resource
- File or folder which the Task applies to, cannot be null.groupName
- Name of the group this task belongs to (nb-tasklist-error
, nb-tasklist-warning
, nb-tasklist-todo
, etc).description
- A brief summary of the task (one line if possible), cannot be null.al
- Task's default action, e.g. double-click or Enter key in the Task List window.