private DebuggingModelController(
      Place currentPlace,
      AppContext appContext,
      DebuggingModel debuggingModel,
      Editor editor,
      EditorPopupController editorPopupController,
      DocumentManager documentManager) {
    this.appContext = appContext;
    this.editor = editor;
    this.currentPlace = currentPlace;
    this.debuggingModel = debuggingModel;
    this.leftGutterClickListenerRemover =
        editor.getLeftGutter().getClickListenerRegistrar().add(leftGutterClickListener);

    // Every time we enter workspace, we get a new debugging session id.
    String sessionId =
        BootstrapSession.getBootstrapSession().getActiveClientId()
            + ":"
            + System.currentTimeMillis();
    this.debuggerState = DebuggerState.create(sessionId);

    this.debuggingSidebar = DebuggingSidebar.create(appContext.getResources(), debuggerState);
    this.debuggingModelRenderer =
        DebuggingModelRenderer.create(appContext, editor, debuggingSidebar, debuggerState);
    this.cssLiveEditController = new CssLiveEditController(debuggerState, documentManager);
    this.evaluationPopupController =
        EvaluationPopupController.create(
            appContext.getResources(), editor, editorPopupController, debuggerState);

    this.debuggingModel.addModelChangeListener(debuggingModelChangeListener);
    this.debuggerState.getDebuggerStateListenerRegistrar().add(debuggerStateListener);
    this.debuggingSidebar.getDebuggerCommandListenerRegistrar().add(userCommandListener);
  }
 /**
  * Creates or reuses launchpad window.
  *
  * <p>This method should be called from user initiated event handler.
  *
  * <p>If popup window already exists, it is cleared. Launchpad is filled with disclaimer that
  * informs user that deployment is in progress.
  *
  * <p>Actually, popup is never blocked, because it is initiated by user. But in case it is not
  * truth, we show alert to user that instructs how to enable popups.
  */
 public static Window createOrOpenPopup(AppContext appContext) {
   Window popup =
       Browser.getWindow().open("", BootstrapSession.getBootstrapSession().getActiveClientId());
   if (popup == null) {
     if (!doNotShowPopupBlockedInstruction) {
       doNotShowPopupBlockedInstruction = true;
       PopupBlockedInstructionalPopup.create(appContext.getResources()).show();
     }
   }
   return popup;
 }