public abstract class LookupBasedJavaSourceTaskFactory extends JavaSourceTaskFactory
JavaSourceTaskFactory
that registers tasks to all files that are
found in the given Lookup
.
This factory searches for FileObject
, DataObject
and Node
in the lookup. If Node
(s) are found, its/their lookup is searched for
FileObject
and DataObject
.Constructor and Description |
---|
LookupBasedJavaSourceTaskFactory(JavaSource.Phase phase,
JavaSource.Priority priority)
Construct the LookupBasedJavaSourceTaskFactory with given
JavaSource.Phase and JavaSource.Priority . |
LookupBasedJavaSourceTaskFactory(JavaSource.Phase phase,
JavaSource.Priority priority,
String... supportedMimeTypes)
Construct the LookupBasedJavaSourceTaskFactory with given
JavaSource.Phase and JavaSource.Priority . |
LookupBasedJavaSourceTaskFactory(JavaSource.Phase phase,
JavaSource.Priority priority,
TaskIndexingMode taskIndexingMode,
String... supportedMimeTypes)
Construct the LookupBasedJavaSourceTaskFactory with given
JavaSource.Phase and JavaSource.Priority . |
Modifier and Type | Method and Description |
---|---|
List<FileObject> |
getFileObjects() |
protected void |
lookupContentChanged()
This method is called when the provided Lookup's content changed.
|
protected void |
setLookup(Lookup lookup)
Sets a new
Lookup to search. |
createTask, fileObjectsChanged, reschedule
public LookupBasedJavaSourceTaskFactory(JavaSource.Phase phase, JavaSource.Priority priority)
JavaSource.Phase
and JavaSource.Priority
.phase
- phase to use for tasks created by JavaSourceTaskFactory.createTask(org.openide.filesystems.FileObject)
priority
- priority to use for tasks created by JavaSourceTaskFactory.createTask(org.openide.filesystems.FileObject)
public LookupBasedJavaSourceTaskFactory(JavaSource.Phase phase, JavaSource.Priority priority, String... supportedMimeTypes)
JavaSource.Phase
and JavaSource.Priority
.phase
- phase to use for tasks created by JavaSourceTaskFactory.createTask(org.openide.filesystems.FileObject)
priority
- priority to use for tasks created by JavaSourceTaskFactory.createTask(org.openide.filesystems.FileObject)
public LookupBasedJavaSourceTaskFactory(@NonNull JavaSource.Phase phase, @NonNull JavaSource.Priority priority, @NonNull TaskIndexingMode taskIndexingMode, @NonNull String... supportedMimeTypes)
JavaSource.Phase
and JavaSource.Priority
.phase
- phase to use for tasks created by JavaSourceTaskFactory.createTask(org.openide.filesystems.FileObject)
priority
- priority to use for tasks created by JavaSourceTaskFactory.createTask(org.openide.filesystems.FileObject)
taskIndexingMode
- the awareness of indexing. For tasks which can run
during indexing use TaskIndexingMode.ALLOWED_DURING_SCAN
for tasks
which cannot run during indexing use TaskIndexingMode.DISALLOWED_DURING_SCAN
.supportedMimeTypes
- a list of mime types on which the tasks created by this factory should be run,
empty array falls back to default text/x-java.protected final void setLookup(Lookup lookup)
Lookup
to search.lookup
- new Lookup
public List<FileObject> getFileObjects()
getFileObjects
in class JavaSourceTaskFactory
protected void lookupContentChanged()