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 caret on
opened and visible JTextComponents and reschedules the tasks as necessary.
The tasks may access current caret position using
CaretAwareSourceTaskFactory.getLastPosition method.
author: Jan Lahoda
public static synchronized int getLastPosition(FileObject file)(Code)
Returns current caret position in current
JTextComponent for a given file.
Parameters: file - file from which the position should be found caret position in the current JTextComponent for a given file.
setLastPosition
static synchronized void setLastPosition(FileObject file, int position)(Code)
Methods inherited from org.netbeans.napi.gsfret.source.SourceTaskFactory