use of org.eclipse.che.api.vfs.impl.file.FileWatcherNotificationListener in project che by eclipse.
the class ProjectManager method initWatcher.
void initWatcher() throws IOException {
FileWatcherNotificationListener defaultListener = new FileWatcherNotificationListener(file -> !(file.getPath().toString().contains(".che") || file.getPath().toString().contains(".#"))) {
@Override
public void onFileWatcherEvent(VirtualFile virtualFile, FileWatcherEventType eventType) {
LOG.debug("FS event detected: " + eventType + " " + virtualFile.getPath().toString() + " " + virtualFile.isFile());
}
};
fileWatchNotifier.addNotificationListener(defaultListener);
try {
fileWatcher.startup();
} catch (IOException e) {
LOG.error(e.getMessage(), e);
fileWatchNotifier.removeNotificationListener(defaultListener);
}
}
Aggregations