mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[MCP Server] IJPL-208086 Pass progress indicator into find usages
GitOrigin-RevId: b92eff5a9d8f25f0270be0a8193cdf0b51f0eb22
This commit is contained in:
committed by
intellij-monorepo-bot
parent
8e5a1a126f
commit
389f4eb6f3
@@ -16,6 +16,7 @@ import com.intellij.openapi.command.writeCommandAction
|
||||
import com.intellij.openapi.editor.RangeMarker
|
||||
import com.intellij.openapi.fileEditor.FileDocumentManager
|
||||
import com.intellij.openapi.progress.Cancellation
|
||||
import com.intellij.openapi.progress.coroutineToIndicator
|
||||
import com.intellij.openapi.util.TextRange
|
||||
import com.intellij.openapi.vfs.LocalFileSystem
|
||||
import com.intellij.openapi.vfs.VirtualFile
|
||||
@@ -233,12 +234,16 @@ class TextToolset : McpToolset {
|
||||
|
||||
withBackgroundProgress(project, FindBundle.message("find.searching.for.string.in.file.progress", searchTextOrRegex, findModel.directoryName
|
||||
?: FindBundle.message("find.scope.project.title")), cancellable = true) {
|
||||
FindInProjectUtil.findUsages(
|
||||
findModel,
|
||||
project,
|
||||
processor,
|
||||
FindUsagesProcessPresentation(UsageViewPresentation())
|
||||
)
|
||||
coroutineToIndicator { indicator ->
|
||||
FindInProjectUtil.findUsages(
|
||||
findModel,
|
||||
project,
|
||||
indicator,
|
||||
FindUsagesProcessPresentation(UsageViewPresentation()),
|
||||
setOf(),
|
||||
processor,
|
||||
)
|
||||
}
|
||||
}
|
||||
} == null
|
||||
|
||||
|
||||
Reference in New Issue
Block a user