-
-
Save johnnykang/eed464578e33f03cdc1b0d06c19c00e4 to your computer and use it in GitHub Desktop.
index weaver
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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