当前位置: 首页>>代码示例>>Java>>正文


Java VirtualFileListener类代码示例

本文整理汇总了Java中com.intellij.openapi.vfs.VirtualFileListener的典型用法代码示例。如果您正苦于以下问题:Java VirtualFileListener类的具体用法?Java VirtualFileListener怎么用?Java VirtualFileListener使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


VirtualFileListener类属于com.intellij.openapi.vfs包,在下文中一共展示了VirtualFileListener类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: markDirty

import com.intellij.openapi.vfs.VirtualFileListener; //导入依赖的package包/类
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);
  }
}
 
开发者ID:pantsbuild,项目名称:intellij-pants-plugin,代码行数:11,代码来源:FileChangeTracker.java

示例2: removeVirtualFileListener

import com.intellij.openapi.vfs.VirtualFileListener; //导入依赖的package包/类
@Override
public void removeVirtualFileListener(@NotNull final VirtualFileListener listener) {
  final VirtualFileListener wrapper = myListenerWrappers.remove(listener);
  if (wrapper != null) {
    VirtualFileManager.getInstance().removeVirtualFileListener(wrapper);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:NewVirtualFileSystem.java

示例3: unregisterProject

import com.intellij.openapi.vfs.VirtualFileListener; //导入依赖的package包/类
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);
    });
}
 
开发者ID:pantsbuild,项目名称:intellij-pants-plugin,代码行数:14,代码来源:FileChangeTracker.java

示例4: addVirtualFileListener

import com.intellij.openapi.vfs.VirtualFileListener; //导入依赖的package包/类
@Override
public void addVirtualFileListener(@NotNull final VirtualFileListener listener) {
  synchronized (myListenerWrappers) {
    VirtualFileListener wrapper = new VirtualFileFilteringListener(listener, this);
    VirtualFileManager.getInstance().addVirtualFileListener(wrapper);
    myListenerWrappers.put(listener, wrapper);
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:9,代码来源:NewVirtualFileSystem.java

示例5: removeVirtualFileListener

import com.intellij.openapi.vfs.VirtualFileListener; //导入依赖的package包/类
@Override
public void removeVirtualFileListener(@NotNull final VirtualFileListener listener) {
  synchronized (myListenerWrappers) {
    final VirtualFileListener wrapper = myListenerWrappers.remove(listener);
    if (wrapper != null) {
      VirtualFileManager.getInstance().removeVirtualFileListener(wrapper);
    }
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:10,代码来源:NewVirtualFileSystem.java

示例6: addVirtualFileListener

import com.intellij.openapi.vfs.VirtualFileListener; //导入依赖的package包/类
@Override
public void addVirtualFileListener(@Nonnull final VirtualFileListener listener) {
  synchronized (myListenerWrappers) {
    VirtualFileListener wrapper = new VirtualFileFilteringListener(listener, this);
    VirtualFileManager.getInstance().addVirtualFileListener(wrapper);
    myListenerWrappers.put(listener, wrapper);
  }
}
 
开发者ID:consulo,项目名称:consulo,代码行数:9,代码来源:NewVirtualFileSystem.java

示例7: removeVirtualFileListener

import com.intellij.openapi.vfs.VirtualFileListener; //导入依赖的package包/类
@Override
public void removeVirtualFileListener(@Nonnull final VirtualFileListener listener) {
  synchronized (myListenerWrappers) {
    final VirtualFileListener wrapper = myListenerWrappers.remove(listener);
    if (wrapper != null) {
      VirtualFileManager.getInstance().removeVirtualFileListener(wrapper);
    }
  }
}
 
开发者ID:consulo,项目名称:consulo,代码行数:10,代码来源:NewVirtualFileSystem.java

示例8: BackgroundTaskByVfsChangeManagerImpl

import com.intellij.openapi.vfs.VirtualFileListener; //导入依赖的package包/类
public BackgroundTaskByVfsChangeManagerImpl(@Nonnull Project project) {
  myProject = project;

  VirtualFileManager.getInstance().addVirtualFileListener(new VirtualFileListener() {
    @Override
    public void contentsChanged(@Nonnull VirtualFileEvent event) {
      runTasks(event.getFile());
    }
  }, this);
}
 
开发者ID:consulo,项目名称:consulo,代码行数:11,代码来源:BackgroundTaskByVfsChangeManagerImpl.java

示例9: addVirtualFileListener

import com.intellij.openapi.vfs.VirtualFileListener; //导入依赖的package包/类
@Override
public void addVirtualFileListener(@NotNull final VirtualFileListener listener) {
  VirtualFileListener wrapper = new VirtualFileFilteringListener(listener, this);
  VirtualFileManager.getInstance().addVirtualFileListener(wrapper);
  myListenerWrappers.put(listener, wrapper);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:7,代码来源:NewVirtualFileSystem.java

示例10: addTracker

import com.intellij.openapi.vfs.VirtualFileListener; //导入依赖的package包/类
void addTracker(
@NotNull String fileUrl,
@NotNull VirtualFileListener listener,
boolean fromRefreshOnly,
@NotNull Disposable parentDisposable);
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:VirtualFileTracker.java

示例11: registerProject

import com.intellij.openapi.vfs.VirtualFileListener; //导入依赖的package包/类
public static void registerProject(@NotNull Project project) {
  VirtualFileListener listener = getNewListener();
  LocalFileSystem.getInstance().addVirtualFileListener(listener);
  listenToProjectMap.put(listener, project);
}
 
开发者ID:pantsbuild,项目名称:intellij-pants-plugin,代码行数:6,代码来源:FileChangeTracker.java

示例12: addTracker

import com.intellij.openapi.vfs.VirtualFileListener; //导入依赖的package包/类
void addTracker(
@Nonnull String fileUrl,
@Nonnull VirtualFileListener listener,
boolean fromRefreshOnly,
@Nonnull Disposable parentDisposable);
 
开发者ID:consulo,项目名称:consulo,代码行数:6,代码来源:VirtualFileTracker.java

示例13: addVFSListenerAfterLocalHistoryOne

import com.intellij.openapi.vfs.VirtualFileListener; //导入依赖的package包/类
public void addVFSListenerAfterLocalHistoryOne(VirtualFileListener virtualFileListener, Disposable disposable) {
  myEventDispatcher.addVirtualFileListener(virtualFileListener, disposable);
}
 
开发者ID:consulo,项目名称:consulo,代码行数:4,代码来源:LocalHistoryImpl.java

示例14: addVirtualFileListener

import com.intellij.openapi.vfs.VirtualFileListener; //导入依赖的package包/类
@Override
public void addVirtualFileListener(@NotNull VirtualFileListener virtualFileListener) {

}
 
开发者ID:hajdam,项目名称:deltahex-intellij-plugin,代码行数:5,代码来源:DeltaHexFileSystem.java

示例15: removeVirtualFileListener

import com.intellij.openapi.vfs.VirtualFileListener; //导入依赖的package包/类
@Override
public void removeVirtualFileListener(@NotNull VirtualFileListener virtualFileListener) {

}
 
开发者ID:hajdam,项目名称:deltahex-intellij-plugin,代码行数:5,代码来源:DeltaHexFileSystem.java


注:本文中的com.intellij.openapi.vfs.VirtualFileListener类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。