mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-168764 modules.xml is not updated if module path is changed
This commit is contained in:
@@ -48,6 +48,7 @@ internal class ModuleFileListener(private val moduleManager: ModuleManagerCompon
|
||||
}
|
||||
|
||||
val parentPath = event.file.parent?.path ?: return
|
||||
var someModulePathIsChanged = false
|
||||
for (module in moduleManager.modules) {
|
||||
if (!module.isLoaded) {
|
||||
continue
|
||||
@@ -57,8 +58,13 @@ internal class ModuleFileListener(private val moduleManager: ModuleManagerCompon
|
||||
val moduleFilePath = module.moduleFilePath
|
||||
if (FileUtil.isAncestor(ancestorPath, moduleFilePath, true)) {
|
||||
setModuleFilePath(module, "$parentPath/${event.newValue}/${FileUtil.getRelativePath(ancestorPath, moduleFilePath, '/')}")
|
||||
someModulePathIsChanged = true
|
||||
}
|
||||
}
|
||||
|
||||
if (someModulePathIsChanged) {
|
||||
moduleManager.incModificationCount()
|
||||
}
|
||||
}
|
||||
|
||||
private fun fileMoved(event: VFileMoveEvent) {
|
||||
|
||||
Reference in New Issue
Block a user