org.netbeans.spi.tasklist/1 1.15.1 1

org.netbeans.spi.tasklist
Class Task

java.lang.Object
  extended by org.netbeans.spi.tasklist.Task

public final class Task
extends Object

A class holding the description of a single Task that will appear in TaskList's window.


Method Summary
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()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

create

public static Task create(URL resource,
                          String groupName,
                          String description)
Create a new Task

Parameters:
resource - Resource which the Task applies to, cannot be null.
groupName - Name of the group this task belongs to (error, warning, todo, etc).
description - A brief summary of the task (one line if possible), cannot be null.
Returns:
New task.
Since:
1.6

create

public static Task create(URL resource,
                          String groupName,
                          String description,
                          ActionListener defaultAction,
                          Action[] popupActions)
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 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.

Parameters:
resource - Resource which the Task applies to, cannot be null.
groupName - Name of the group this task belongs to (error, warning, 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.
Returns:
New task.
Since:
1.6

create

public static Task create(FileObject resource,
                          String groupName,
                          String description,
                          int line)
Create a new Task

Parameters:
resource - File or folder which the Task applies to, cannot be null.
groupName - Name of the group this task belongs to (error, warning, 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.
Returns:
New task.

create

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.

Parameters:
resource - File or folder which the Task applies to, cannot be null.
groupName - Name of the group this task belongs to (error, warning, 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.
Returns:
New task.

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

org.netbeans.spi.tasklist/1 1.15.1 1

Built on December 5 2011.  |  Portions Copyright 1997-2011 Sun Microsystems, Inc. All rights reserved.