org.netbeans.modules.parsing.api/1 1.55.0 6

org.netbeans.modules.parsing.spi
Class Scheduler

java.lang.Object
  extended by org.netbeans.modules.parsing.spi.Scheduler

public abstract class Scheduler
extends Object

Scheduler defines when tasks should be started. Some SchedulerTasks (like syntax coloring) are current document sensitive only. It means that such SchedulerTask is automatically scheduled when currently edited document is changed. Other tasks may listen on different events. Implementation of Scheduler just listens on various IDE events, and call one of schedule() methods when something interesting happens. Implementation of Parsing API just finds all SchedulerTasks registerred for this Scheduler and reschedules them. Implementation of this class should be registerred in your manifest.xml file in "Editors/your mime type" folder.


Field Summary
static Class<? extends Scheduler> CURSOR_SENSITIVE_TASK_SCHEDULER
          This implementations of Scheduler reschedules all tasks when: current document is changed (file opened, closed, editor tab switched), text in the current document is changed, cusor position is changed
static int DEFAULT_REPARSE_DELAY
          Default reparse delay
static Class<? extends Scheduler> EDITOR_SENSITIVE_TASK_SCHEDULER
          This implementations of Scheduler reschedules all tasks when: current document is changed (file opened, closed, editor tab switched), text in the current document is changed
static Class<? extends Scheduler> SELECTED_NODES_SENSITIVE_TASK_SCHEDULER
          This implementations of Scheduler reschedules all tasks when nodes selected in editor are changed.
 
Constructor Summary
Scheduler()
           
 
Method Summary
protected abstract  SchedulerEvent createSchedulerEvent(SourceModificationEvent event)
           
protected  void schedule(SchedulerEvent event)
          Reschedule all tasks registered for this Scheduler (see SchedulerTask.getSchedulerClass().
protected  void schedule(Source source, SchedulerEvent event)
          Reschedule all tasks registered for this Scheduler (see SchedulerTask.getSchedulerClass(), and sets new Sources for them.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_REPARSE_DELAY

public static final int DEFAULT_REPARSE_DELAY
Default reparse delay

See Also:
Constant Field Values

CURSOR_SENSITIVE_TASK_SCHEDULER

public static final Class<? extends Scheduler> CURSOR_SENSITIVE_TASK_SCHEDULER
This implementations of Scheduler reschedules all tasks when:
  1. current document is changed (file opened, closed, editor tab switched),
  2. text in the current document is changed,
  3. cusor position is changed


EDITOR_SENSITIVE_TASK_SCHEDULER

public static final Class<? extends Scheduler> EDITOR_SENSITIVE_TASK_SCHEDULER
This implementations of Scheduler reschedules all tasks when:
  1. current document is changed (file opened, closed, editor tab switched),
  2. text in the current document is changed


SELECTED_NODES_SENSITIVE_TASK_SCHEDULER

public static final Class<? extends Scheduler> SELECTED_NODES_SENSITIVE_TASK_SCHEDULER
This implementations of Scheduler reschedules all tasks when nodes selected in editor are changed.

Constructor Detail

Scheduler

public Scheduler()
Method Detail

schedule

protected final void schedule(SchedulerEvent event)
Reschedule all tasks registered for this Scheduler (see SchedulerTask.getSchedulerClass().


schedule

protected final void schedule(Source source,
                              SchedulerEvent event)
Reschedule all tasks registered for this Scheduler (see SchedulerTask.getSchedulerClass(), and sets new Sources for them.

Parameters:
sources - A collection of Sources.

createSchedulerEvent

protected abstract SchedulerEvent createSchedulerEvent(SourceModificationEvent event)

org.netbeans.modules.parsing.api/1 1.55.0 6

Built on May 24 2012.  |  Portions Copyright 1997-2012 Oracle. All rights reserved.