Skip to content

Instantly share code, notes, and snippets.

Created Dec 22, 2016
What would you like to do?
index weaver
@Around("execution(* com.intellij.util.indexing.FileBasedIndexImpl.a(com.intellij.openapi.vfs.VirtualFile, com.intellij.util.indexing.ID<?,?>))")
public Object advice(ProceedingJoinPoint joinPoint) throws Throwable {
VirtualFile o = (VirtualFile) joinPoint.getArgs()[0];
VirtualFileSystem fileSystem = o.getFileSystem();
if (JarFileSystem.class.isAssignableFrom(fileSystem.getClass())) {
File file = VfsImplUtil.getHandler((JarFileSystemImpl) fileSystem, o, JarHandler::new).getFile();
for (Pattern s : skip) {
if (s.matcher(file.getName()).matches()) {
// System.out.println("bye bye ::" + file);
return false;
return joinPoint.proceed();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment