boolean (HistoryState state) { myStateLoggingEnabled = false; try { if (state != null) { final PsiElement element = state.getElement(); final boolean shouldOpenInLeftPanel = state.isInLeftPanel(); if (state.isElementExpanded()) { final boolean isLeftPanelCurrentlyActive = myCommander.isLeftPanelActive(); if ((shouldOpenInLeftPanel && !isLeftPanelCurrentlyActive) || (!shouldOpenInLeftPanel && isLeftPanelCurrentlyActive)) { myCommander.switchActivePanel(); } myCommander.enterElementInActivePanel(element); } else { if (shouldOpenInLeftPanel) { myCommander.selectElementInLeftPanel(element, PsiUtilBase.getVirtualFile(element)); } else { myCommander.selectElementInRightPanel(element, PsiUtilBase.getVirtualFile(element)); } } return true; } } finally { myStateLoggingEnabled = true; } return false; }