@Nullable
  @Override
  public TerminalArrangementState getState() {
    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;
  }
@Nullable
  @Override
  public TerminalArrangementState getState()