diff --git a/platform/execution-impl/src/com/intellij/execution/impl/RunConfigurationInArbitraryFileScanner.kt b/platform/execution-impl/src/com/intellij/execution/impl/RunConfigurationInArbitraryFileScanner.kt
index e27bab344c6f..2339e7d1c68a 100644
--- a/platform/execution-impl/src/com/intellij/execution/impl/RunConfigurationInArbitraryFileScanner.kt
+++ b/platform/execution-impl/src/com/intellij/execution/impl/RunConfigurationInArbitraryFileScanner.kt
@@ -2,7 +2,7 @@
package com.intellij.execution.impl
import com.intellij.openapi.project.Project
-import com.intellij.openapi.roots.impl.IndexableFileScanner
+import com.intellij.util.indexing.roots.IndexableFileScanner
import com.intellij.openapi.util.text.StringUtil
import com.intellij.openapi.vfs.VirtualFile
import com.intellij.util.PathUtil
diff --git a/platform/projectModel-api/src/com/intellij/openapi/roots/impl/IndexableFileScanner.java b/platform/indexing-api/src/com/intellij/util/indexing/roots/IndexableFileScanner.java
similarity index 98%
rename from platform/projectModel-api/src/com/intellij/openapi/roots/impl/IndexableFileScanner.java
rename to platform/indexing-api/src/com/intellij/util/indexing/roots/IndexableFileScanner.java
index 7415568ee428..9428f50047c0 100644
--- a/platform/projectModel-api/src/com/intellij/openapi/roots/impl/IndexableFileScanner.java
+++ b/platform/indexing-api/src/com/intellij/util/indexing/roots/IndexableFileScanner.java
@@ -1,5 +1,5 @@
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
-package com.intellij.openapi.roots.impl;
+package com.intellij.util.indexing.roots;
import com.intellij.openapi.extensions.ExtensionPointName;
import com.intellij.openapi.project.Project;
diff --git a/platform/projectModel-api/src/com/intellij/util/indexing/roots/IndexableFilesIterator.java b/platform/indexing-api/src/com/intellij/util/indexing/roots/IndexableFilesIterator.java
similarity index 100%
rename from platform/projectModel-api/src/com/intellij/util/indexing/roots/IndexableFilesIterator.java
rename to platform/indexing-api/src/com/intellij/util/indexing/roots/IndexableFilesIterator.java
diff --git a/platform/projectModel-impl/src/com/intellij/openapi/roots/SyntheticLibraryIndexableFilesIterator.java b/platform/indexing-api/src/com/intellij/util/indexing/roots/SyntheticLibraryIndexableFilesIterator.java
similarity index 79%
rename from platform/projectModel-impl/src/com/intellij/openapi/roots/SyntheticLibraryIndexableFilesIterator.java
rename to platform/indexing-api/src/com/intellij/util/indexing/roots/SyntheticLibraryIndexableFilesIterator.java
index 2548e780d553..eec360e7d629 100644
--- a/platform/projectModel-impl/src/com/intellij/openapi/roots/SyntheticLibraryIndexableFilesIterator.java
+++ b/platform/indexing-api/src/com/intellij/util/indexing/roots/SyntheticLibraryIndexableFilesIterator.java
@@ -1,7 +1,7 @@
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
-package com.intellij.openapi.roots;
+package com.intellij.util.indexing.roots;
-import com.intellij.util.indexing.roots.IndexableFilesIterator;
+import com.intellij.openapi.roots.SyntheticLibrary;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
diff --git a/platform/lang-impl/src/com/intellij/openapi/roots/impl/PushedFilePropertiesUpdaterImpl.java b/platform/lang-impl/src/com/intellij/openapi/roots/impl/PushedFilePropertiesUpdaterImpl.java
index bbfd37af8b29..363083362688 100644
--- a/platform/lang-impl/src/com/intellij/openapi/roots/impl/PushedFilePropertiesUpdaterImpl.java
+++ b/platform/lang-impl/src/com/intellij/openapi/roots/impl/PushedFilePropertiesUpdaterImpl.java
@@ -35,10 +35,7 @@ import com.intellij.ui.GuiUtils;
import com.intellij.util.containers.ConcurrentBitSet;
import com.intellij.util.containers.ContainerUtil;
import com.intellij.util.indexing.*;
-import com.intellij.util.indexing.roots.IndexableFilesIterator;
-import com.intellij.util.indexing.roots.ModuleIndexableFilesIterator;
-import com.intellij.util.indexing.roots.ModuleIndexableFilesIteratorImpl;
-import com.intellij.util.indexing.roots.ProjectIndexableFilesIteratorImpl;
+import com.intellij.util.indexing.roots.*;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
diff --git a/platform/lang-impl/src/com/intellij/util/indexing/UnindexedFilesUpdater.java b/platform/lang-impl/src/com/intellij/util/indexing/UnindexedFilesUpdater.java
index f2291308e0c3..6b458bef09a6 100644
--- a/platform/lang-impl/src/com/intellij/util/indexing/UnindexedFilesUpdater.java
+++ b/platform/lang-impl/src/com/intellij/util/indexing/UnindexedFilesUpdater.java
@@ -4,16 +4,14 @@ package com.intellij.util.indexing;
import com.intellij.diagnostic.PerformanceWatcher;
import com.intellij.openapi.application.Application;
import com.intellij.openapi.application.ApplicationManager;
-import com.intellij.openapi.diagnostic.Attachment;
import com.intellij.openapi.diagnostic.ControlFlowException;
import com.intellij.openapi.diagnostic.Logger;
-import com.intellij.openapi.progress.ProcessCanceledException;
import com.intellij.openapi.progress.ProgressIndicator;
import com.intellij.openapi.progress.impl.ProgressSuspender;
import com.intellij.openapi.project.*;
import com.intellij.openapi.roots.ContentIterator;
import com.intellij.openapi.roots.ex.ProjectRootManagerEx;
-import com.intellij.openapi.roots.impl.IndexableFileScanner;
+import com.intellij.util.indexing.roots.IndexableFileScanner;
import com.intellij.openapi.roots.impl.PushedFilePropertiesUpdater;
import com.intellij.openapi.roots.impl.PushedFilePropertiesUpdaterImpl;
import com.intellij.openapi.util.Key;
diff --git a/platform/lang-impl/src/com/intellij/util/indexing/roots/SyntheticLibraryIndexableFilesIteratorImpl.kt b/platform/lang-impl/src/com/intellij/util/indexing/roots/SyntheticLibraryIndexableFilesIteratorImpl.kt
index 449d0aa0931e..b94f417c55ca 100644
--- a/platform/lang-impl/src/com/intellij/util/indexing/roots/SyntheticLibraryIndexableFilesIteratorImpl.kt
+++ b/platform/lang-impl/src/com/intellij/util/indexing/roots/SyntheticLibraryIndexableFilesIteratorImpl.kt
@@ -6,7 +6,6 @@ import com.intellij.openapi.application.runReadAction
import com.intellij.openapi.project.Project
import com.intellij.openapi.roots.ContentIterator
import com.intellij.openapi.roots.SyntheticLibrary
-import com.intellij.openapi.roots.SyntheticLibraryIndexableFilesIterator
import com.intellij.util.containers.ConcurrentBitSet
import com.intellij.util.indexing.IndexingBundle
diff --git a/platform/projectModel-api/intellij.platform.projectModel.iml b/platform/projectModel-api/intellij.platform.projectModel.iml
index 4e28a96cc2bd..00e0a1665cea 100644
--- a/platform/projectModel-api/intellij.platform.projectModel.iml
+++ b/platform/projectModel-api/intellij.platform.projectModel.iml
@@ -15,5 +15,6 @@
+
\ No newline at end of file
diff --git a/platform/projectModel-api/resources/META-INF/ProjectModel.xml b/platform/projectModel-api/resources/META-INF/ProjectModel.xml
index 49a4b382105e..f9e87a8f40a2 100644
--- a/platform/projectModel-api/resources/META-INF/ProjectModel.xml
+++ b/platform/projectModel-api/resources/META-INF/ProjectModel.xml
@@ -3,7 +3,7 @@
-
+
diff --git a/platform/projectModel-impl/src/com/intellij/openapi/roots/AdditionalLibraryRootsProvider.java b/platform/projectModel-api/src/com/intellij/openapi/roots/AdditionalLibraryRootsProvider.java
similarity index 79%
rename from platform/projectModel-impl/src/com/intellij/openapi/roots/AdditionalLibraryRootsProvider.java
rename to platform/projectModel-api/src/com/intellij/openapi/roots/AdditionalLibraryRootsProvider.java
index 39af248e951e..ce1245c0d48b 100644
--- a/platform/projectModel-impl/src/com/intellij/openapi/roots/AdditionalLibraryRootsProvider.java
+++ b/platform/projectModel-api/src/com/intellij/openapi/roots/AdditionalLibraryRootsProvider.java
@@ -1,18 +1,4 @@
-/*
- * Copyright 2000-2017 JetBrains s.r.o.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.openapi.roots;
import com.intellij.openapi.extensions.ExtensionPointName;
diff --git a/platform/projectModel-impl/src/com/intellij/openapi/roots/ImmutableSyntheticLibrary.java b/platform/projectModel-api/src/com/intellij/openapi/roots/ImmutableSyntheticLibrary.java
similarity index 95%
rename from platform/projectModel-impl/src/com/intellij/openapi/roots/ImmutableSyntheticLibrary.java
rename to platform/projectModel-api/src/com/intellij/openapi/roots/ImmutableSyntheticLibrary.java
index a940ad36bf09..e48732b54c0d 100644
--- a/platform/projectModel-impl/src/com/intellij/openapi/roots/ImmutableSyntheticLibrary.java
+++ b/platform/projectModel-api/src/com/intellij/openapi/roots/ImmutableSyntheticLibrary.java
@@ -1,14 +1,16 @@
-// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.openapi.roots;
import com.intellij.openapi.util.Condition;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.util.containers.ContainerUtil;
+import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.*;
+@ApiStatus.Internal
class ImmutableSyntheticLibrary extends SyntheticLibrary {
private final List mySourceRoots;
diff --git a/platform/projectModel-impl/src/com/intellij/openapi/roots/SyntheticLibrary.java b/platform/projectModel-api/src/com/intellij/openapi/roots/SyntheticLibrary.java
similarity index 98%
rename from platform/projectModel-impl/src/com/intellij/openapi/roots/SyntheticLibrary.java
rename to platform/projectModel-api/src/com/intellij/openapi/roots/SyntheticLibrary.java
index 13521de83382..1f60b80ff8a0 100644
--- a/platform/projectModel-impl/src/com/intellij/openapi/roots/SyntheticLibrary.java
+++ b/platform/projectModel-api/src/com/intellij/openapi/roots/SyntheticLibrary.java
@@ -1,4 +1,4 @@
-// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.openapi.roots;
import com.intellij.navigation.ItemPresentation;
@@ -8,7 +8,7 @@ import com.intellij.openapi.util.Condition;
import com.intellij.openapi.vfs.VfsUtilCore;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.util.containers.ContainerUtil;
-import gnu.trove.THashSet;
+import it.unimi.dsi.fastutil.objects.ObjectOpenHashSet;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -166,7 +166,7 @@ public abstract class SyntheticLibrary {
@NotNull
private static Set asSet(@NotNull Collection extends T> collection) {
- return collection instanceof Set ? (Set)collection : new THashSet<>(collection);
+ return collection instanceof Set ? (Set)collection : new ObjectOpenHashSet<>(collection);
}
@NotNull