IDEA opens the same file multiple times, and they compete with each other.
I've not been able to exactly nail down the circumstances, but I'm seeing I have a file buffer open in IDEA, and then when I do certain actions (such as refactoring or loading a file by clicking on stackframe link) sometimes IDEA opens the file again with a different path and treats them as two different files. Edits in one buffer are not reflected in the other, and worse, only one of them is thought to be part of the project. When I save I have to select between changes in memory and on disk, and hope I don't do work in the "wrong" buffer or else have to port/merge it back.
What I know is it's related to how symlinks are handled. My IdeaProjects/abcd directory is the "real" location, but in my home directory I have a symlink to that directory, since it's much easier for me to access it that way.
Sometimes it opens files through IdeaProjects/abcd/... and other times through the symlink, and when it does they conflict.
I'm not sure what to edit (as far as the IDE config .xml files go) to remove any notion of the symlink directory from the IDE, but it may be discovering it on its own due to the way the filesystem reports the links.
Aside from removing the symlink and recreating the project, is there anything I can do to help prevent this behavior? It's happening maddeningly often and really hurting productivity. I don't have enough specifics to file a bug report, but hope that this might at least raise an awareness for issues in this area, and maybe give me a workaround in the meanwhile.
Thanks!
Chris
Please sign in to leave a comment.
Sorry, but symlinks are known to cause such issues. We do not recommend using them.
See https://youtrack.jetbrains.com/issues?q=project:%20IDEA,IDEABKL%20order%20by:%20updated%20%23symlinks%20%23unresolved .