diff --git a/platform/vcs-log/impl/src/com/intellij/vcs/log/impl/VcsLogTabsWatcher.java b/platform/vcs-log/impl/src/com/intellij/vcs/log/impl/VcsLogTabsWatcher.java index 59e56a703555..2b57fd17063c 100644 --- a/platform/vcs-log/impl/src/com/intellij/vcs/log/impl/VcsLogTabsWatcher.java +++ b/platform/vcs-log/impl/src/com/intellij/vcs/log/impl/VcsLogTabsWatcher.java @@ -93,6 +93,20 @@ public class VcsLogTabsWatcher implements Disposable { } } + private void removeListeners() { + myConnection.disconnect(); + + if (myToolWindow != null) { + myToolWindow.getContentManager().removeContentManagerListener(myPostponedEventsListener); + myToolWindow.getContentManager().removeContentManagerListener(myLogEditorListener); + + for (Content content : myToolWindow.getContentManager().getContents()) { + if (content instanceof TabbedContent) { + content.removePropertyChangeListener(myPostponedEventsListener); + } + } + } + } private void processVirtualFile(VirtualFile file) { if (file instanceof GraphViewVirtualFile) { @@ -150,21 +164,6 @@ public class VcsLogTabsWatcher implements Disposable { } } - private void removeListeners() { - myConnection.disconnect(); - - if (myToolWindow != null) { - myToolWindow.getContentManager().removeContentManagerListener(myPostponedEventsListener); - myToolWindow.getContentManager().removeContentManagerListener(myLogEditorListener); - - for (Content content : myToolWindow.getContentManager().getContents()) { - if (content instanceof TabbedContent) { - content.removePropertyChangeListener(myPostponedEventsListener); - } - } - } - } - private void closeLogTabs() { ToolWindow window = (myToolWindow != null) ? myToolWindow : myToolWindowManager.getToolWindow(TOOLWINDOW_ID); if (window != null) {