|
org.netbeans.modules.java.source 0.13.0 1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.netbeans.api.java.source.JavaSourceTaskFactory
public abstract class JavaSourceTaskFactory
A factory for tasks that will be run in the JavaSource
Java parsing harness.
Please note that there is usually no need to implement this class directly,
as there are support classes for common JavaSourceTaskFactory
implementations.
This factory should be registered in the global lookup by listing its fully qualified
name in file META-INF/services/org.netbeans.api.java.source.JavaSourceTaskFactory
.
EditorAwareJavaSourceTaskFactory
,
CaretAwareJavaSourceTaskFactory
,
LookupBasedJavaSourceTaskFactory
Constructor Summary | |
---|---|
protected |
JavaSourceTaskFactory(JavaSource.Phase phase,
JavaSource.Priority priority)
Construct the JavaSourceTaskFactory with given JavaSource.Phase and JavaSource.Priority . |
Method Summary | |
---|---|
protected abstract CancellableTask<CompilationInfo> |
createTask(FileObject file)
Create task for a given file. |
protected void |
fileObjectsChanged()
Notify the infrastructure that the collection of fileobjects has been changed. |
protected abstract Collection<FileObject> |
getFileObjects()
Specifies on which files should be registered tasks created by this factory. |
protected void |
reschedule(FileObject file)
Re-run task created by this factory for given file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected JavaSourceTaskFactory(JavaSource.Phase phase, JavaSource.Priority priority)
JavaSource.Phase
and JavaSource.Priority
.
phase
- phase to use for tasks created by createTask(org.openide.filesystems.FileObject)
priority
- priority to use for tasks created by createTask(org.openide.filesystems.FileObject)
Method Detail |
---|
protected abstract CancellableTask<CompilationInfo> createTask(FileObject file)
JavaSource
parsing harness with a given priority
and phase
.
Please note that this method should run as quickly as possible.
file
- for which file the task should be created.
CancellableTask
for a given file.protected abstract Collection<FileObject> getFileObjects()
JavaSource
's corresponding to FileObject
s returned from
this method will be registered tasks created by the createTask(org.openide.filesystems.FileObject)
method
of this factory.
If this list changes, a change event should be fired to all registered
ChangeListener
s.
FileObject
on which tasks from this factory should be
registered.createTask(org.openide.filesystems.FileObject)
,
#addChangeListener
,
EditorAwareJavaSourceTaskFactory
,
CaretAwareJavaSourceTaskFactory
protected final void fileObjectsChanged()
getFileObjects()
to get a new collection files.
protected final void reschedule(FileObject file) throws IllegalArgumentException
file
- task created by this factory for this file is re-run.
IllegalArgumentException
|
org.netbeans.modules.java.source 0.13.0 1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |