mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
do not load image file content into vfs for indexing, use RandomAccessFile with index independent on content
This commit is contained in:
@@ -61,7 +61,7 @@ public class ImageInfoIndex extends SingleEntryFileBasedIndexExtension<ImageInfo
|
||||
private final SingleEntryIndexer<ImageInfo> myDataIndexer = new SingleEntryIndexer<ImageInfo>(false) {
|
||||
@Override
|
||||
protected ImageInfo computeValue(@NotNull FileContent inputData) {
|
||||
final ImageInfoReader.Info info = ImageInfoReader.getInfo(inputData.getContent());
|
||||
final ImageInfoReader.Info info = ImageInfoReader.getInfo(inputData.getFile().getPath());
|
||||
return info != null? new ImageInfo(info.width, info.height, info.bpp) : null;
|
||||
}
|
||||
};
|
||||
@@ -93,9 +93,14 @@ public class ImageInfoIndex extends SingleEntryFileBasedIndexExtension<ImageInfo
|
||||
return myInputFilter;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean dependsOnFileContent() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getVersion() {
|
||||
return 3;
|
||||
return 4;
|
||||
}
|
||||
|
||||
public static class ImageInfo {
|
||||
|
||||
Reference in New Issue
Block a user