com.intellij.util.indexing.FileBasedIndexExtension Java Examples
The following examples show how to use
com.intellij.util.indexing.FileBasedIndexExtension.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: BasicProvidedExtensionLocator.java From consulo with Apache License 2.0 | 5 votes |
@Nullable @Override public <K, V> ProvidedIndexExtension<K, V> findProvidedIndexExtension(@Nonnull FileBasedIndexExtension<K, V> originalExtension) { File root = getPrebuiltIndexPath(); if (root == null || !new File(root, StringUtil.toLowerCase(originalExtension.getName().getName())).exists()) return null; return originalExtension.getName().equals(StubUpdatingIndex.INDEX_ID) ? (ProvidedIndexExtension<K, V>)new StubProvidedIndexExtension(root) : new ProvidedIndexExtensionImpl<>(root, originalExtension); }
Example #2
Source File: BasicProvidedExtensionLocator.java From consulo with Apache License 2.0 | 4 votes |
private ProvidedIndexExtensionImpl(@Nonnull File file, @Nonnull FileBasedIndexExtension<K, V> originalExtension) { myIndexFile = file; myIndexId = originalExtension.getName(); myKeyDescriptor = originalExtension.getKeyDescriptor(); myValueExternalizer = originalExtension.getValueExternalizer(); }
Example #3
Source File: ProvidedIndexExtensionLocator.java From consulo with Apache License 2.0 | 4 votes |
@Nullable <K, V> ProvidedIndexExtension<K, V> findProvidedIndexExtension(@Nonnull FileBasedIndexExtension<K, V> originalExtension);
Example #4
Source File: ProvidedIndexExtensionLocator.java From consulo with Apache License 2.0 | 4 votes |
@Nullable static <K, V> ProvidedIndexExtension<K, V> findProvidedIndexExtensionFor(@Nonnull FileBasedIndexExtension<K, V> originalExtension) { return EP_NAME.getExtensionList().stream().map(ex -> ex.findProvidedIndexExtension(originalExtension)).filter(Objects::nonNull).findFirst().orElse(null); }