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.
A
SourceTaskFactorySupport that registers tasks to all files that are
opened in the editor and are visible. This factory also listens on the selection in
opened and visible JTextComponents and reschedules the tasks as necessary.
The tasks may access current selection span using
SelectionAwareSourceTaskFactory.getLastSelection method.
since: 0.15 author: Jan Lahoda
public SelectionAwareSourceTaskFactory(Phase phase, Priority priority, String... supportedMimeTypes)(Code)
Construct the SelectionAwareSourceTaskFactory with given
Phase and
Priority .
Parameters: phase - phase to use for tasks created by SelectionAwareSourceTaskFactory.createTask Parameters: priority - priority to use for tasks created by SelectionAwareSourceTaskFactory.createTask Parameters: supportedMimeTypes - a list of mime types on which the tasks created by this factory should be run since: 0.22
public static synchronized int[] getLastSelection(FileObject file)(Code)
Returns current selection span in current
JTextComponent for a given file.
Parameters: file - file from which the position should be found selection span in the current JTextComponent for a given file.null if no selection available so far.
Methods inherited from org.netbeans.napi.gsfret.source.SourceTaskFactory