| java.lang.Object org.netbeans.napi.gsfret.source.Source
Source | final public class Source (Code) | | This file is originally from Retouche, the Java Support
infrastructure in NetBeans. I have modified the file as little
as possible to make merging Retouche fixes back as simple as
possible.
This file is based on the JavaSource class in Retouche's org.netbeans.modules.gsfpath.api.source package.
It represents an open source file in the editor.
author: Petr Hrebejk author: Tomas Zezula author: Tor Norbye |
Inner Class :public static enum Priority | |
Inner Class :final public static class InsufficientMemoryException extends IOException | |
Method Summary | |
void | addPhaseCompletionTask(CancellableTask<CompilationInfo> task, Phase phase, Priority priority) Adds a task to given compilation phase. | public static void | clearSourceCache() | public static Source | create(ClasspathInfo cpInfo, Collection<? extends FileObject> files) Returns a
Source instance representing given
org.openide.filesystems.FileObject s
and classpath represented by given
ClasspathInfo . | public static Source | create(ClasspathInfo cpInfo, FileObject... files) Returns a
Source instance representing given
org.openide.filesystems.FileObject s
and classpath represented by given
ClasspathInfo . | ParserTaskImpl | createParserTask(CompilationInfo compilationInfo) | public static Source | forDocument(Document doc) Returns a
Source instance associated to
org.openide.filesystems.FileObject the
Document was created from, it returns null if the
Document is not
associanted with data type providing the
Source .
Parameters: doc - Document for which the Source should be found/created. | public static Source | forFileObject(FileObject fileObject) Returns a
Source instance associated to given
org.openide.filesystems.FileObject ,
it returns null if the
Document is not associanted with data type providing the
Source .
Parameters: fileObject - for which the Source should be found/created. | public ClasspathInfo | getClasspathInfo() | public Collection<FileObject> | getFileObjects() | static void | logTime(FileObject source, Phase phase, long time) | static Phase | moveToPhase(Phase phase, CompilationInfo currentInfo, boolean cancellable) | void | removePhaseCompletionTask(CancellableTask<CompilationInfo> task) Removes the task from the phase queue. | void | rescheduleTask(CancellableTask<CompilationInfo> task) Rerun the task in case it was already run. | void | revalidate() Marks this
Source as modified, causes that the cached information are
cleared and all the PhaseCompletionTasks are restarted.
The only client of this method should be the JavaDataObject or other DataObjects
providing the
Source . | public ModificationResult | runModificationTask(CancellableTask<WorkingCopy> task) Runs a task which permits for modifying the sources. | public void | runUserActionTask(CancellableTask<CompilationController> task, boolean shared) Runs a task which permits for controlling phases of the parsing process.
You probably do not want to call this method unless you are reacting to
some user's GUI input which requires immediate action (e.g. | public void | testUpdateIndex() |
REPARSE_DELAY | static int REPARSE_DELAY(Code) | | Not final for tests.
|
addPhaseCompletionTask | void addPhaseCompletionTask(CancellableTask<CompilationInfo> task, Phase phase, Priority priority) throws IOException(Code) | | Adds a task to given compilation phase. The tasks will run sequentially by
priorty after given phase is reached.
See Also: CancellableTask See Also: for information about implementation requirements |
clearSourceCache | public static void clearSourceCache()(Code) | | |
create | public static Source create(ClasspathInfo cpInfo, Collection<? extends FileObject> files) throws IllegalArgumentException(Code) | | Returns a
Source instance representing given
org.openide.filesystems.FileObject s
and classpath represented by given
ClasspathInfo .
Parameters: cpInfo - the classpaths to be used. Parameters: files - for which the Source should be created a new Source {@link IllegalArgumentException} if fileObject or cpInfo is null |
create | public static Source create(ClasspathInfo cpInfo, FileObject... files) throws IllegalArgumentException(Code) | | Returns a
Source instance representing given
org.openide.filesystems.FileObject s
and classpath represented by given
ClasspathInfo .
Parameters: cpInfo - the classpaths to be used. Parameters: files - for which the Source should be created a new Source {@link IllegalArgumentException} if fileObject or cpInfo is null |
forFileObject | public static Source forFileObject(FileObject fileObject) throws IllegalArgumentException(Code) | | Returns a
Source instance associated to given
org.openide.filesystems.FileObject ,
it returns null if the
Document is not associanted with data type providing the
Source .
Parameters: fileObject - for which the Source should be found/created. Source or null {@link IllegalArgumentException} if fileObject is null |
logTime | static void logTime(FileObject source, Phase phase, long time)(Code) | | |
revalidate | void revalidate()(Code) | | Marks this
Source as modified, causes that the cached information are
cleared and all the PhaseCompletionTasks are restarted.
The only client of this method should be the JavaDataObject or other DataObjects
providing the
Source . If you call this method in another case you are
probably doing something incorrect.
|
runModificationTask | public ModificationResult runModificationTask(CancellableTask<WorkingCopy> task) throws IOException(Code) | | Runs a task which permits for modifying the sources.
Call to this method will cancel processig of all the phase completion tasks until
this task does not finish.
See Also: CancellableTask See Also: for information about implementation requirements Parameters: task - The task which. |
runUserActionTask | public void runUserActionTask(CancellableTask<CompilationController> task, boolean shared) throws IOException(Code) | | Runs a task which permits for controlling phases of the parsing process.
You probably do not want to call this method unless you are reacting to
some user's GUI input which requires immediate action (e.g. code completion popup).
In all other cases use
JavaSourceTaskFactory .
Call to this method will cancel processing of all the phase completion tasks until
this task does not finish.
See Also: org.netbeans.napi.gsfret.source.CancellableTask See Also: for information about implementation requirements Parameters: task - The task which. Parameters: shared - if true the java compiler may be reused by other org.netbeans.napi.gsfret.source.CancellableTasks,the value false may have negative impact on the IDE performance. |
testUpdateIndex | public void testUpdateIndex()(Code) | | For test framework only
|
|
|