org.netbeans.spi.tasklist/1 1.15.1 1

org.netbeans.spi.tasklist
Class TaskScanningScope

java.lang.Object
  extended by org.netbeans.spi.tasklist.TaskScanningScope
All Implemented Interfaces:
Iterable<FileObject>, Lookup.Provider

public abstract class TaskScanningScope
extends Object
implements Iterable<FileObject>, Lookup.Provider

A class that defines the set of resources (files and/or folders) that will be scanned for Tasks.


Nested Class Summary
static class TaskScanningScope.Callback
          Callback to Task List's framework.
 
Constructor Summary
TaskScanningScope(String displayName, String description, Image icon)
          Create a new instance
TaskScanningScope(String displayName, String description, Image icon, boolean isDefault)
          Create a new instance
 
Method Summary
abstract  void attach(TaskScanningScope.Callback callback)
          Called by the framework when the user switches to this scanning scope.
abstract  Lookup getLookup()
          Lookup with scope's contents.
abstract  boolean isInScope(FileObject resource)
          Check whether the given resource is in this scanning scope.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.lang.Iterable
iterator
 

Constructor Detail

TaskScanningScope

public TaskScanningScope(String displayName,
                         String description,
                         Image icon)
Create a new instance

Parameters:
displayName - Label for Task List's popup menu
description - Description for tooltips Task List's toolbar
icon - Icon to be displayed in Task List's toolbar

TaskScanningScope

public TaskScanningScope(String displayName,
                         String description,
                         Image icon,
                         boolean isDefault)
Create a new instance

Parameters:
displayName - Label for Task List's popup menu
description - Description for tooltips Task List's toolbar
icon - Icon to be displayed in Task List's toolbar
isDefault - True if this scope should be selected by default when the Task List is opened for the first time.
Method Detail

isInScope

public abstract boolean isInScope(FileObject resource)
Check whether the given resource is in this scanning scope.

Parameters:
resource - Resource to be checked.
Returns:
True if the given resource is in this scope.

attach

public abstract void attach(TaskScanningScope.Callback callback)
Called by the framework when the user switches to this scanning scope.

Parameters:
callback -

getLookup

public abstract Lookup getLookup()
Lookup with scope's contents.

Specified by:
getLookup in interface Lookup.Provider
Returns:
Lookup that contains either the FileObjects to be scanned (for example when the scope is 'currently edited file') or org.netbeans.api.project.Projects that are in this scope.

org.netbeans.spi.tasklist/1 1.15.1 1

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