public void update() {
CaptureTypeService service = CaptureTypeService.getInstance();
VirtualFile dir = getCapturesDirectory();
Multimap<CaptureType, Capture> updated = LinkedListMultimap.create();
if (dir != null) {
VirtualFile[] children = VfsUtil.getChildren(dir);
for (CaptureType type : service.getCaptureTypes()) {
Set<VirtualFile> files = findCaptureFiles(children, type);
for (Capture capture : myCaptures.get(type)) {
// If an existing capture exists for a file, use it: Remove it from the files and add the already existing one.
if (files.remove(capture.getFile())) {
updated.put(type, capture);
}
}
for (VirtualFile newFile : files) {
updated.put(type, type.createCapture(newFile));
}
}
}
myCaptures = updated;
}
CaptureService.java 文件源码
java
阅读 23
收藏 0
点赞 0
评论 0
项目:intellij-ce-playground
作者:
评论列表
文章目录