mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Remove useless settings in IndexingRootsCollectionSettings
GitOrigin-RevId: 2395f35e030069be681730b3f5a0a7b9fc153657
This commit is contained in:
committed by
intellij-monorepo-bot
parent
2acb6fd74c
commit
96bb0a6a03
-23
@@ -77,11 +77,6 @@ public class IndexingRootsCollectionUtil {
|
||||
|
||||
public static class IndexingRootsCollectionSettings {
|
||||
public @Nullable Condition<? super WorkspaceFileIndexContributor<?>> retainCondition = null;
|
||||
public boolean collectModuleAwareContent = true;
|
||||
public @Nullable Condition<ModuleContentOrSourceRootData> retainModuleContentCondition = null;
|
||||
public boolean collectModuleUnawareContent = true;
|
||||
public boolean collectExternalEntities = true;
|
||||
public boolean collectExternalSourceEntities = true;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@@ -217,22 +212,6 @@ public class IndexingRootsCollectionUtil {
|
||||
mySettings = ObjectUtils.notNull(settings, new IndexingRootsCollectionSettings());
|
||||
}
|
||||
|
||||
private boolean shouldIgnore(@NotNull WorkspaceFileKind kind, @Nullable WorkspaceFileSetData data) {
|
||||
if (data instanceof ModuleContentOrSourceRootData) {
|
||||
if (!mySettings.collectModuleAwareContent) return true;
|
||||
|
||||
if (mySettings.retainModuleContentCondition != null &&
|
||||
!mySettings.retainModuleContentCondition.value((ModuleContentOrSourceRootData)data)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return switch (kind) {
|
||||
case CONTENT, TEST_CONTENT -> !mySettings.collectModuleUnawareContent;
|
||||
case EXTERNAL -> !mySettings.collectExternalEntities;
|
||||
case EXTERNAL_SOURCE -> !mySettings.collectExternalSourceEntities;
|
||||
};
|
||||
}
|
||||
|
||||
public void clearNonModuleAwareMaps() {
|
||||
myContentRoots.clear();
|
||||
myLibraryRoots.clear();
|
||||
@@ -355,7 +334,6 @@ public class IndexingRootsCollectionUtil {
|
||||
@NotNull WorkspaceEntity entity,
|
||||
@Nullable WorkspaceFileSetData customData) {
|
||||
if (rootsToCollect != RootType.Included) return;
|
||||
if (shouldIgnore(kind, customData)) return;
|
||||
VirtualFile file = VirtualFileUrls.getVirtualFile(root);
|
||||
if (file != null) {
|
||||
doRegisterFileSet(file, kind, entity, customData);
|
||||
@@ -368,7 +346,6 @@ public class IndexingRootsCollectionUtil {
|
||||
@NotNull WorkspaceEntity entity,
|
||||
@Nullable WorkspaceFileSetData customData) {
|
||||
if (rootsToCollect != RootType.Included) return;
|
||||
if (shouldIgnore(kind, customData)) return;
|
||||
doRegisterFileSet(root, kind, entity, customData);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user