From 35d4aa90dd2f30515ee371e4511a15f8fcbbf6a4 Mon Sep 17 00:00:00 2001 From: Alexey Kudravtsev Date: Tue, 22 Oct 2013 18:32:44 +0400 Subject: [PATCH] do not commit in closed project --- .../lang-impl/src/com/intellij/ide/todo/TodoPanel.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/platform/lang-impl/src/com/intellij/ide/todo/TodoPanel.java b/platform/lang-impl/src/com/intellij/ide/todo/TodoPanel.java index ee2e6e5f8e2c..d3d607e287f6 100644 --- a/platform/lang-impl/src/com/intellij/ide/todo/TodoPanel.java +++ b/platform/lang-impl/src/com/intellij/ide/todo/TodoPanel.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2013 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -671,8 +671,10 @@ abstract class TodoPanel extends SimpleToolWindowPanel implements OccurenceNavig private final class MyVisibilityWatcher extends VisibilityWatcher { @Override public void visibilityChanged() { - PsiDocumentManager.getInstance(myProject).commitAllDocuments(); - myTodoTreeBuilder.setUpdatable(isShowing()); + if (myProject.isOpen()) { + PsiDocumentManager.getInstance(myProject).commitAllDocuments(); + myTodoTreeBuilder.setUpdatable(isShowing()); + } } }