 
   popFromCallStack: ->
     @callStack.pop()
-    @emitCallStackUpdate()
+    @emitCallStackUpdated()
     return
 
   saveDocument: ->


  handleWorkspaceEntered: ->
    @handleLevelChanged()
    levelsWorkspaceManager.getWorkspace().getActiveLevelCodeEditor()?.onDidStartExecution => @handleExecutableStarted()
    levelsWorkspaceManager.getWorkspace().getActiveLevelCodeEditor()?.onDidStopExecution => @handleExecutableStopped()
    levelsWorkspaceManager.getWorkspace().onDidChangeActiveLevel => @handleLevelChanged()
    return

  handleWorkspaceExited: ->
    @handleLevelChanged()

  handleExecutableStarted: ->
    if @isExecutableInDebuggingMode

    @positionMarker = levelsWorkspaceManager.addPositionMarker currentPosition

    @emitter.emit 'position-updated', currentPosition
    @emitStatusUpdate StatusUpdateEventFactory.createWaiting @isReplay

    levelsWorkspaceManager.getActiveTextEditor()?.scrollToBufferPosition PositionUtils.toPoint currentPosition
    return

  emitCallStackUpdated: ->
    @emitter.emit 'call-stack-updated'
    return

  emitVariableTableUpdated: ->
    @emitter.emit 'variable-table-updated'
    return

