NullPointerException when open editor!

I am using build 1154
I am listening the project change in ProjectManagerListener,
when a new project is opened, then i need to create some file and open then in editor.
But at that time, it will throw null pointer.
What's going on?

at com.intellij.psi.impl.e.a.b.b(
at com.intellij.psi.impl.e.a.b.a(
at com.intellij.psi.impl.e.a.b.a(
at com.intellij.ide.e.k$3.selectionChanged(k$
at com.intellij.openapi.fileEditor.a.f.a(
at com.intellij.openapi.fileEditor.a.f.b(
at com.intellij.openapi.fileEditor.a.f.access$900(
at com.intellij.openapi.fileEditor.a.f$$
at com.intellij.openapi.command.impl.a.executeCommand(
at com.intellij.openapi.fileEditor.a.f.a(
at com.intellij.openapi.fileEditor.a.f.openFile(

Please sign in to leave a comment.