diff options
author | Vladimir Dolzhenko <vladimir.dolzhenko@jetbrains.com> | 2021-01-08 14:39:03 +0100 |
---|---|---|
committer | kotlin-ide-monorepo-bot <kotlin-ide-monorepo-bot-no-reply@jetbrains.com> | 2021-01-08 14:06:51 +0000 |
commit | fb738ed7e434920b74c1dff88292f3b87009bf5b (patch) | |
tree | ab83a87fffe676fc30b40229e1cf0247c555e42b /analysis | |
parent | 7226be7452e7104b2a11dffd8582d32cbe919083 (diff) | |
download | intellij-kotlin-fb738ed7e434920b74c1dff88292f3b87009bf5b.tar.gz |
Make MoveMemberToCompanionObjectIntention under a progress and cancellable
#EA-249988 Fixed
GitOrigin-RevId: db5685b2e9d928bbcbbefa941561f797e8aeff5e
Diffstat (limited to 'analysis')
-rw-r--r-- | analysis/src/org/jetbrains/kotlin/idea/util/ProjectRootsUtil.kt | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/analysis/src/org/jetbrains/kotlin/idea/util/ProjectRootsUtil.kt b/analysis/src/org/jetbrains/kotlin/idea/util/ProjectRootsUtil.kt index 00fe6245b411..be2c966b279b 100644 --- a/analysis/src/org/jetbrains/kotlin/idea/util/ProjectRootsUtil.kt +++ b/analysis/src/org/jetbrains/kotlin/idea/util/ProjectRootsUtil.kt @@ -15,6 +15,7 @@ import com.intellij.openapi.fileTypes.FileTypeManager import com.intellij.openapi.module.Module import com.intellij.openapi.module.ModulePointerManager import com.intellij.openapi.module.ModuleUtilCore +import com.intellij.openapi.progress.ProgressManager import com.intellij.openapi.project.Project import com.intellij.openapi.roots.FileIndex import com.intellij.openapi.roots.ModuleRootManager @@ -113,8 +114,8 @@ object ProjectRootsUtil { includeScriptDependencies: Boolean, includeScriptsOutsideSourceRoots: Boolean, fileIndex: ProjectFileIndex = ProjectFileIndex.SERVICE.getInstance(project) ): Boolean { - - if (includeProjectSource && fileIndex.isInSourceContentWithoutInjected(file)) return true + ProgressManager.checkCanceled() + if (fileIndex.isInSourceContentWithoutInjected(file)) return includeProjectSource if (includeScriptsOutsideSourceRoots) { if (ProjectRootManager.getInstance(project).fileIndex.isInContent(file) || ScratchUtil.isScratch(file)) { |