Directories created in file system don't show in project window without restart

  • 6
  • 16

Prior to 2.7.2 I didn't have this issue. Now, when I create a directory via the file system outside of PyCharm the change is not picked up in the project window. I have to restart the IDE to pick up the change. Any thoughts on why this is happening?

I'm running 2.7.2 on Fedora 17 (3.8.4-102.fc17.x86_64)
I think Synchronize (Ctrl+Alt+Y by default) should show these new directories.

I'm also affected by this. Whenever I try to create a directory it won't show up, pycharm gives me "Cannot find directory in ..." as an error message and a java.lang.IndexOutOfBoundsException Exception together with a traceback pops up in my .xsession-error logs.

java.lang.IndexOutOfBoundsException: Index: 903, Size: 902
	at java.util.ArrayList.rangeCheck(ArrayList.java:604)
	at java.util.ArrayList.get(ArrayList.java:382)
	at com.intellij.openapi.roots.impl.DirectoryIndexImpl$IndexState$12.execute(DirectoryIndexImpl.java:1199)
	at com.intellij.openapi.roots.impl.DirectoryIndexImpl$IndexState$12.execute(DirectoryIndexImpl.java:1192)
	at gnu.trove.TObjectIntHashMap.forEachEntry(TObjectIntHashMap.java:381)
	at com.intellij.openapi.roots.impl.DirectoryIndexImpl$IndexState.copy(DirectoryIndexImpl.java:1192)
	at com.intellij.openapi.roots.impl.DirectoryIndexImpl$IndexState.access$1100(DirectoryIndexImpl.java:486)
	at com.intellij.openapi.roots.impl.DirectoryIndexImpl$MyVirtualFileListener.updateStateWithNewFile(DirectoryIndexImpl.java:202)
	at com.intellij.openapi.roots.impl.DirectoryIndexImpl$MyVirtualFileListener.fileCreated(DirectoryIndexImpl.java:157)
	at com.intellij.openapi.vfs.impl.BulkVirtualFileListenerAdapter.fireAfter(BulkVirtualFileListenerAdapter.java:80)
	at com.intellij.openapi.vfs.impl.BulkVirtualFileListenerAdapter.after(BulkVirtualFileListenerAdapter.java:56)
	at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
        [...]

I'm running 2.7.2 on Archlinux, Kernel 3.8.11, Jdk7.21-1

This is a known issue:
http://youtrack.jetbrains.com/issue/IDEA-106111
We hope that we'll be able to include the fix for it in PyCharm 2.7.3.
--
Dmitry Jemerov, Chief Technology Officer, JetBrains

Thanks for pointing out the ticket. Hopefully it will be fixed soon, it's starting to be really annoying to restart pycharm every time I want to create a new package :(. I've voted for this issue.

Depends on your platform and how you've installed pycharm. You can download an older Version from the website by copying the download url to the tarball and adjust the version information.