Java 类com.intellij.openapi.vfs.VirtualFileListener 实例源码

项目:intellij-ce-playground    文件:NewVirtualFileSystem.java   
@Override
public void removeVirtualFileListener(@NotNull final VirtualFileListener listener) {
  final VirtualFileListener wrapper = myListenerWrappers.remove(listener);
  if (wrapper != null) {
    VirtualFileManager.getInstance().removeVirtualFileListener(wrapper);
  }
}
项目:intellij-pants-plugin    文件:FileChangeTracker.java   
private static void markDirty(@NotNull VirtualFile file, @NotNull VirtualFileListener listener) {
  Project project = listenToProjectMap.get(listener);

  boolean inProject = ProjectRootManager.getInstance(project).getFileIndex().getContentRootForFile(file) != null;
  LOG.debug(String.format("Changed: %s. In project: %s", file.getPath(), inProject));
  if (inProject) {
    markDirty(project);
    notifyProjectRefreshIfNecessary(file, project);
  }
}
项目:intellij-pants-plugin    文件:FileChangeTracker.java   
public static void unregisterProject(@NotNull Project project) {
  projectStates.remove(project);

  // Remove the listener for the project.
  listenToProjectMap.entrySet().stream()
    .filter(s -> s.getValue() == project)
    .findFirst()
    .ifPresent(x -> {
      VirtualFileListener listener = x.getKey();
      listenToProjectMap.remove(listener);
      LocalFileSystem.getInstance().removeVirtualFileListener(listener);
    });
}
项目:tools-idea    文件:NewVirtualFileSystem.java   
@Override
public void addVirtualFileListener(@NotNull final VirtualFileListener listener) {
  synchronized (myListenerWrappers) {
    VirtualFileListener wrapper = new VirtualFileFilteringListener(listener, this);
    VirtualFileManager.getInstance().addVirtualFileListener(wrapper);
    myListenerWrappers.put(listener, wrapper);
  }
}
项目:tools-idea    文件:NewVirtualFileSystem.java   
@Override
public void removeVirtualFileListener(@NotNull final VirtualFileListener listener) {
  synchronized (myListenerWrappers) {
    final VirtualFileListener wrapper = myListenerWrappers.remove(listener);
    if (wrapper != null) {
      VirtualFileManager.getInstance().removeVirtualFileListener(wrapper);
    }
  }
}
项目:consulo    文件:NewVirtualFileSystem.java   
@Override
public void addVirtualFileListener(@Nonnull final VirtualFileListener listener) {
  synchronized (myListenerWrappers) {
    VirtualFileListener wrapper = new VirtualFileFilteringListener(listener, this);
    VirtualFileManager.getInstance().addVirtualFileListener(wrapper);
    myListenerWrappers.put(listener, wrapper);
  }
}
项目:consulo    文件:NewVirtualFileSystem.java   
@Override
public void removeVirtualFileListener(@Nonnull final VirtualFileListener listener) {
  synchronized (myListenerWrappers) {
    final VirtualFileListener wrapper = myListenerWrappers.remove(listener);
    if (wrapper != null) {
      VirtualFileManager.getInstance().removeVirtualFileListener(wrapper);
    }
  }
}
项目:consulo    文件:BackgroundTaskByVfsChangeManagerImpl.java   
public BackgroundTaskByVfsChangeManagerImpl(@Nonnull Project project) {
  myProject = project;

  VirtualFileManager.getInstance().addVirtualFileListener(new VirtualFileListener() {
    @Override
    public void contentsChanged(@Nonnull VirtualFileEvent event) {
      runTasks(event.getFile());
    }
  }, this);
}
项目:intellij-ce-playground    文件:NewVirtualFileSystem.java   
@Override
public void addVirtualFileListener(@NotNull final VirtualFileListener listener) {
  VirtualFileListener wrapper = new VirtualFileFilteringListener(listener, this);
  VirtualFileManager.getInstance().addVirtualFileListener(wrapper);
  myListenerWrappers.put(listener, wrapper);
}
项目:intellij-ce-playground    文件:VirtualFileTracker.java   
void addTracker(
@NotNull String fileUrl,
@NotNull VirtualFileListener listener,
boolean fromRefreshOnly,
@NotNull Disposable parentDisposable);
项目:intellij-pants-plugin    文件:FileChangeTracker.java   
public static void registerProject(@NotNull Project project) {
  VirtualFileListener listener = getNewListener();
  LocalFileSystem.getInstance().addVirtualFileListener(listener);
  listenToProjectMap.put(listener, project);
}
项目:tools-idea    文件:VirtualFileTracker.java   
void addTracker(
@NotNull String fileUrl,
@NotNull VirtualFileListener listener,
boolean fromRefreshOnly,
@NotNull Disposable parentDisposable);
项目:consulo    文件:VirtualFileTracker.java   
void addTracker(
@Nonnull String fileUrl,
@Nonnull VirtualFileListener listener,
boolean fromRefreshOnly,
@Nonnull Disposable parentDisposable);
项目:consulo    文件:LocalHistoryImpl.java   
public void addVFSListenerAfterLocalHistoryOne(VirtualFileListener virtualFileListener, Disposable disposable) {
  myEventDispatcher.addVirtualFileListener(virtualFileListener, disposable);
}
项目:deltahex-intellij-plugin    文件:DeltaHexFileSystem.java   
@Override
public void addVirtualFileListener(@NotNull VirtualFileListener virtualFileListener) {

}
项目:deltahex-intellij-plugin    文件:DeltaHexFileSystem.java   
@Override
public void removeVirtualFileListener(@NotNull VirtualFileListener virtualFileListener) {

}
项目:shared-views    文件:MockVirtualFileManager.java   
@Override
public void addVirtualFileListener(@NotNull VirtualFileListener listener) {

}
项目:shared-views    文件:MockVirtualFileManager.java   
@Override
public void addVirtualFileListener(@NotNull VirtualFileListener listener, @NotNull Disposable parentDisposable) {

}
项目:shared-views    文件:MockVirtualFileManager.java   
@Override
public void removeVirtualFileListener(@NotNull VirtualFileListener listener) {

}
项目:nosql4idea    文件:NoSqlDatabaseFileSystem.java   
@Override
public void addVirtualFileListener(@NotNull VirtualFileListener listener) {

}
项目:nosql4idea    文件:NoSqlDatabaseFileSystem.java   
@Override
public void removeVirtualFileListener(@NotNull VirtualFileListener listener) {

}