mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-04 08:51:02 +07:00
EA-26800 drop caches in the completion file copy
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
class Foo extends Super {
|
||||
public void f<caret>oo() {
|
||||
}
|
||||
}
|
||||
|
||||
class Super {
|
||||
public void foo() {
|
||||
}
|
||||
}
|
||||
@@ -11,6 +11,7 @@ import com.intellij.codeInsight.lookup.impl.LookupImpl;
|
||||
import com.intellij.openapi.command.WriteCommandAction;
|
||||
import com.intellij.openapi.roots.ModifiableRootModel;
|
||||
import com.intellij.openapi.roots.ModuleRootManager;
|
||||
import com.intellij.openapi.vfs.LocalFileSystem;
|
||||
import com.intellij.psi.JavaPsiFacade;
|
||||
|
||||
/**
|
||||
@@ -60,4 +61,13 @@ public class HeavyNormalCompletionTest extends CompletionTestCase{
|
||||
assertEquals("AyByCyDyEy", myItems[0].getLookupString());
|
||||
}
|
||||
|
||||
public void testMapsInvalidation() throws Exception {
|
||||
configureByFile("/codeInsight/completion/normal/" + getTestName(false) + ".java");
|
||||
assert myFile.getVirtualFile().getFileSystem() instanceof LocalFileSystem; // otherwise the completion copy won't be preserved which is critical here
|
||||
assertStringItems("finalize", "foo");
|
||||
myEditor.getCaretModel().moveToOffset(myEditor.getCaretModel().getOffset() + 2);
|
||||
complete();
|
||||
assertNull(myItems);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user