public class VcsDirtyScopeVfsListener extends java.lang.Object implements AsyncFileListener, Disposable
AsyncFileListener.ChangeApplier
Disposable.Parent
Constructor and Description |
---|
VcsDirtyScopeVfsListener(Project project) |
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Usually not invoked directly, see class javadoc.
|
static VcsDirtyScopeVfsListener |
getInstance(Project project) |
static void |
install(Project project) |
AsyncFileListener.ChangeApplier |
prepareChange(java.util.List<? extends VFileEvent> events)
Called (possibly on a background thread) when a batch of VFS events is ready to be fired.
|
void |
setForbid(boolean forbid) |
void |
waitForAsyncTaskCompletion() |
public VcsDirtyScopeVfsListener(Project project)
public static VcsDirtyScopeVfsListener getInstance(Project project)
public static void install(Project project)
public void setForbid(boolean forbid)
public void dispose()
Disposable
dispose
in interface Disposable
public void waitForAsyncTaskCompletion()
public AsyncFileListener.ChangeApplier prepareChange(java.util.List<? extends VFileEvent> events)
AsyncFileListener
ProgressManager.checkCanceled()
often enough.
Note that this listener can only observe the state of the system before VFS events, and so
it can't work with anything that would be after them, e.g. there will be no file in
VFileCreateEvent
, FileIndexFacade
won't know anything about the updated state after VFS change, and so on.
Note that the events posted passed might differ from the ones passed into BulkFileListener
.
In particular, there may occasionally be several events about the same file (e.g deletion and then creation, or creation and
then deletion of the file's parent). Hence the order of events is significant. Implementations should be prepared to such situations.
prepareChange
in interface AsyncFileListener