com.intellij.ide.projectView.ProjectView exception
Hello,
while executing ProjectView.getInstance(project).refreshView() in my code. It happens only sometimes, and I'm getting an exception like this:
Error during dispatching of java.awt.event.MouseEvent[MOUSE_CLICKED,(198,241),absolute(208,251),button=1,modifiers=Button1,clickCount=1] on frame0: Already disposed
java.lang.AssertionError: Already disposed
at com.intellij.openapi.components.impl.ComponentManagerImpl.getComponent(ComponentManagerImpl.java:160)
at com.intellij.ide.projectView.ProjectView.getInstance(ProjectView.java:1)
I've checked and I see that I've submitted a valid parameter to ProjectView.getInstance(project).refreshView(), so what can be the reason of that exception? (I can handle that with try/catch block, but still I'd like to know the reason, right now I can't find it)...
Thanks
Please sign in to leave a comment.
Hello ALincoln,
You are passing a disposed Project instance to this method. If you tell me
where you get this instance from, I can tell how to fix the bug.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
Dmitry,
this often happens when I try to create new project in IDEA in the overridden method afterRefreshFinish(boolean) of VirtualFileManagerListener
let's take that a newly created project is passed there as a instance...
in fact I don't understand what does it mean that a project is already disposed...
Edited by: ALincoln on May 27, 2008 11:18 PM
Hello ALincoln,
This isn't a detailed enough explanation for me to see where the problem is.
This means that a window in which the project was open has been closed.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
Thank you for the explanation, I'll handle that by myself.