org.netbeans.spi.tasklist/1 1.15.1 1

org.netbeans.spi.tasklist
Class FileTaskScanner

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

public abstract class FileTaskScanner
extends Object

Task Scanner that can provide new Tasks for specified resources (files/folders) when asked by the Task List framework.


Nested Class Summary
static class FileTaskScanner.Callback
          Callback into Task List's framework.
 
Constructor Summary
FileTaskScanner(String displayName, String description, String optionsPath)
          Creates a new instance of FileTaskScanner
 
Method Summary
abstract  void attach(FileTaskScanner.Callback callback)
          Called by the framework when this Task type is enabled/disabled in Task List's filter window.
 void notifyFinish()
          Notification from the Task List framework that the scanning phase ended.
 void notifyPrepare()
          Notification from the Task List framework that the scanning phase is about to begin.
abstract  List<? extends Task> scan(FileObject resource)
          Scan the given resource (file or folder?) for tasks.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileTaskScanner

public FileTaskScanner(String displayName,
                       String description,
                       String optionsPath)
Creates a new instance of FileTaskScanner

Parameters:
displayName - Scanner's display name, will appear in Task List's filter window.
description - Scanner's description, will be used for tooltips.
optionsPath - Path that identifies panel in the global Options dialog window, or null if the scanner has no user settings. When scanner's settings changed the scanner must notify - FileTaskScanner.Callback.refreshAll() - the Task List framework that a re-scan is needed.
Method Detail

notifyPrepare

public void notifyPrepare()
Notification from the Task List framework that the scanning phase is about to begin. (Time to create expensive parsers, compilers etc...)


notifyFinish

public void notifyFinish()
Notification from the Task List framework that the scanning phase ended. (Time to release expensive parsers, compilers etc...)


scan

public abstract List<? extends Task> scan(FileObject resource)
Scan the given resource (file or folder?) for tasks. This method is always called within notifyPrepare() and notifyFinish() calls. Depending on Task List's current scope this method may be called repeatedly for different resources.

Parameters:
resource - Resource to be scanned.
Returns:
List of scanned Tasks or null if the provider is busy at the moment and previously scanned tasks are to be used instead.

attach

public abstract void attach(FileTaskScanner.Callback callback)
Called by the framework when this Task type is enabled/disabled in Task List's filter window.

Parameters:
callback - Callback into Task List's framework, null value indicates that user has disabled this type of Tasks.

org.netbeans.spi.tasklist/1 1.15.1 1

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