From ea895d17473178176ab9c2e9fdede66517041a0f Mon Sep 17 00:00:00 2001 From: Eugene Zhuravlev Date: Mon, 23 Jan 2012 15:45:28 +0100 Subject: [PATCH] compile-server: when renaming a file send "deleted" notification for the old path --- .../compiler/impl/TranslatingCompilerFilesMonitor.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/java/compiler/impl/src/com/intellij/compiler/impl/TranslatingCompilerFilesMonitor.java b/java/compiler/impl/src/com/intellij/compiler/impl/TranslatingCompilerFilesMonitor.java index 65b733bf71a0..1cbe72c57400 100644 --- a/java/compiler/impl/src/com/intellij/compiler/impl/TranslatingCompilerFilesMonitor.java +++ b/java/compiler/impl/src/com/intellij/compiler/impl/TranslatingCompilerFilesMonitor.java @@ -1270,7 +1270,13 @@ public class TranslatingCompilerFilesMonitor implements ApplicationComponent { private class MyVfsListener extends VirtualFileAdapter { public void propertyChanged(final VirtualFilePropertyEvent event) { if (VirtualFile.PROP_NAME.equals(event.getPropertyName())) { - markDirtyIfSource(event.getFile(), false); + final VirtualFile file = event.getFile(); + final VirtualFile parent = event.getParent(); + if (parent != null) { + final String oldName = (String)event.getOldValue(); + CompileServerManager.getInstance().notifyFilesDeleted(Collections.singleton(parent.getPath() + "/" + oldName)); + } + markDirtyIfSource(file, false); } }