mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IJPL-191319 - Fixed false positive notification about external file changes in devcontainers
GitOrigin-RevId: db78440d90045a9e4a90b2a0890a0a80501640af
This commit is contained in:
committed by
intellij-monorepo-bot
parent
02764eecc0
commit
490e26eb27
@@ -46,9 +46,10 @@ class EelFileWatcher : PluggableFileWatcher() {
|
||||
override fun isSettingRoots(): Boolean = isOperational() && mySettingRoots.get() > 0
|
||||
|
||||
override fun setWatchRoots(recursive: List<String>, flat: List<String>, shuttingDown: Boolean) {
|
||||
val recursiveFiltered = recursive.mapNotNull { it.getDevcontainerPathInfo() }
|
||||
val flatFiltered = flat.mapNotNull { it.getDevcontainerPathInfo() }
|
||||
val recursiveFiltered = filterAndNotifyManualWatchRoots(recursive)
|
||||
val flatFiltered = filterAndNotifyManualWatchRoots(recursive)
|
||||
if (recursiveFiltered.isEmpty() && flatFiltered.isEmpty()) return
|
||||
|
||||
if (shuttingDown) {
|
||||
myShuttingDown = true
|
||||
shutdownWatcherJobs()
|
||||
@@ -80,6 +81,13 @@ class EelFileWatcher : PluggableFileWatcher() {
|
||||
}
|
||||
}
|
||||
|
||||
private fun filterAndNotifyManualWatchRoots(all: List<String>): List<DevcontainerPathInfo> {
|
||||
val (result, ignored) = all.map { it to it.getDevcontainerPathInfo() }.partition { it.second != null }
|
||||
myNotificationSink.notifyManualWatchRoots(this, ignored.map { it.first })
|
||||
|
||||
return result.mapNotNull { it.second }
|
||||
}
|
||||
|
||||
private fun sortRoots(
|
||||
roots: List<DevcontainerPathInfo>,
|
||||
devcontainerData: MutableMap<String, DevcontainerData>,
|
||||
|
||||
Reference in New Issue
Block a user