/** {@inheritDoc} */
  @Override
  public void onToggleSplitterClicked(boolean isShowSplitter) {
    terminalTab.setScopes(isShowSplitter ? EnumSet.allOf(State.class) : EnumSet.of(RUNNERS));

    if (isShowSplitter) {
      panelState.setSplitterState(SPLITTER_ON);

      view.setLeftPropertiesPanel(leftPropertiesContainer);
      view.setRightPropertiesPanel(rightPropertiesContainer);
    } else {
      panelState.setSplitterState(SPLITTER_OFF);

      view.setGeneralPropertiesPanel(rightPropertiesContainer);
    }

    if (TEMPLATE.equals(state)) {
      panelState.setState(TEMPLATE);

      leftTabContainer.showTab(locale.runnerTabTemplates());

      if (SPLITTER_OFF.equals(panelState.getSplitterState())) {
        rightPropertiesContainer.showTab(propertiesTab.getTitle());
      }
    }
  }
  @Inject
  public RunnerManagerPresenter(
      final RunnerManagerView view,
      RunnerActionFactory actionFactory,
      ModelsFactory modelsFactory,
      AppContext appContext,
      DtoFactory dtoFactory,
      ChooseRunnerAction chooseRunnerAction,
      EventBus eventBus,
      final RunnerLocalizationConstant locale,
      @LeftPanel TabContainer leftTabContainer,
      @LeftPropertiesPanel TabContainer leftPropertiesContainer,
      @RightPropertiesPanel TabContainer rightPropertiesContainer,
      PanelState panelState,
      Provider<TabBuilder> tabBuilderProvider,
      final ConsoleContainer consoleContainer,
      TerminalContainer terminalContainer,
      PropertiesContainer propertiesContainer,
      HistoryPanel history,
      TemplatesContainer templateContainer,
      RunnerCounter runnerCounter,
      SelectionManager selectionManager,
      TimerFactory timerFactory,
      GetSystemEnvironmentsAction getSystemEnvironmentsAction,
      RunnerUtil runnerUtil,
      @Run ResourcesLockedActionPermit runActionPermit,
      @Run ActionDenyAccessDialog runActionDenyAccessDialog) {
    this.view = view;
    this.view.setDelegate(this);
    this.locale = locale;
    this.dtoFactory = dtoFactory;
    this.chooseRunnerAction = chooseRunnerAction;
    this.actionFactory = actionFactory;
    this.modelsFactory = modelsFactory;
    this.appContext = appContext;
    this.runnerCounter = runnerCounter;
    this.getSystemEnvironmentsAction = getSystemEnvironmentsAction;
    this.runnerUtil = runnerUtil;
    this.runActionPermit = runActionPermit;
    this.runActionDenyAccessDialog = runActionDenyAccessDialog;

    this.leftTabContainer = leftTabContainer;
    this.leftTabContainer.setLocation(PanelLocation.LEFT);
    this.leftPropertiesContainer = leftPropertiesContainer;
    this.leftPropertiesContainer.setLocation(PanelLocation.LEFT_PROPERTIES);
    this.rightPropertiesContainer = rightPropertiesContainer;
    this.rightPropertiesContainer.setLocation(RIGHT_PROPERTIES);

    this.selectionManager = selectionManager;
    this.selectionManager.addListener(this);

    this.history = history;

    this.panelState = panelState;

    this.consoleContainer = consoleContainer;
    this.templateContainer = templateContainer;
    this.terminalContainer = terminalContainer;
    this.propertiesContainer = propertiesContainer;

    this.runnerActions = new HashMap<>();

    this.runnerTimer =
        timerFactory.newInstance(
            new TimerFactory.TimerCallBack() {
              @Override
              public void onRun() {
                updateRunnerTimer();

                runnerTimer.schedule(ONE_SEC.getValue());
              }
            });

    this.runnerInQueueTimer =
        timerFactory.newInstance(
            new TimerFactory.TimerCallBack() {
              @Override
              public void onRun() {
                if (IN_QUEUE.equals(selectedRunner.getStatus())) {
                  consoleContainer.printInfo(selectedRunner, locale.messageRunnerInQueue());
                }
              }
            });

    eventBus.addHandler(ProjectActionEvent.TYPE, this);
    runnersId = new HashSet<>();

    initializeLeftPanel(panelState, tabBuilderProvider, history, templateContainer);

    initializeLeftPropertiesPanel(tabBuilderProvider);
    initializeRightPropertiesPanel(tabBuilderProvider);

    view.setLeftPanel(leftTabContainer);

    panelState.setSplitterState(SPLITTER_OFF);
    view.setGeneralPropertiesPanel(rightPropertiesContainer);
  }