TerminalArrangementState () { if (!isAvailable() || myTerminalToolWindow == null) { // do not save state, reuse previously stored state return null; } TerminalArrangementState state = calcArrangementState(myTerminalToolWindow); TerminalCommandHistoryManager.getInstance().retainCommandHistoryFiles(getCommandHistoryFileNames(state), myProject); return state; }