public abstract class Scheduler extends Object
SchedulerTask
s (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 SchedulerTask
s registered for this Scheduler and reschedules them.
Implementation of this class should be registered in your manifest.xml file
in "Editors/your mime type" folder.Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
Scheduler() |
Modifier and Type | Method and Description |
---|---|
protected abstract SchedulerEvent |
createSchedulerEvent(SourceModificationEvent event) |
protected Source |
getSource()
Returns active
Source . |
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 Source s for them. |
public static final int DEFAULT_REPARSE_DELAY
public static final Class<? extends Scheduler> CURSOR_SENSITIVE_TASK_SCHEDULER
Scheduler
reschedules all tasks when:
public static final Class<? extends Scheduler> EDITOR_SENSITIVE_TASK_SCHEDULER
Scheduler
reschedules all tasks when:
protected final void schedule(SchedulerEvent event)
this
Scheduler (see
SchedulerTask.getSchedulerClass()
.protected final void schedule(Source source, SchedulerEvent event)
this
Scheduler (see
SchedulerTask.getSchedulerClass()
, and sets new Source
s for them.sources
- A collection of Source
s.@CheckForNull protected final Source getSource()
Source
.
The Scheduler
subclasses should use this method to obtain the active
Source
rather than caching the Source
them self.Source
currently handled by scheduler.protected abstract SchedulerEvent createSchedulerEvent(SourceModificationEvent event)