<commit_before>/* jshint -W097 */
"use strict";

import {Controller}   from "./controller";
import {Debugger}     from "./debugger";
import {SourceMessage, SymbolMessage, StoppedMessage, StackTraceResponse,
  SectionBreakpointType, ScopesResponse, VariablesResponse } from "./messages";
import {LineBreakpoint, MessageBreakpoint,
  createLineBreakpoint, createMsgBreakpoint} from "./breakpoints";
import {dbgLog}       from "./source";
import {displayMessageHistory, resetLinks, updateStrings, updateData} from "./visualizations";
import {View}         from "./view";
import {VmConnection} from "./vm-connection";

/**
 * The controller binds the domain model and the views, and mediates their
 * interaction.
 */
export class UiController extends Controller {
  private dbg: Debugger;
  private view: View;

  constructor(dbg, view, vmConnection: VmConnection) {
    super(vmConnection);
    this.dbg = dbg;
    this.view = view;
  }

  toggleConnection() {
    if (this.vmConnection.isConnected()) {
      this.vmConnection.disconnect();
    } else {
      this.vmConnection.connect();
    }
  }<commit_msg>Added missing ThreadsResponse import<commit_after>/* jshint -W097 */
"use strict";

import {Controller}   from "./controller";
import {Debugger}     from "./debugger";
import {SourceMessage, SymbolMessage, StoppedMessage, StackTraceResponse,
  SectionBreakpointType, ScopesResponse, VariablesResponse,
  ThreadsResponse } from "./messages";
import {LineBreakpoint, MessageBreakpoint,
  createLineBreakpoint, createMsgBreakpoint} from "./breakpoints";
import {dbgLog}       from "./source";
import {displayMessageHistory, resetLinks, updateStrings, updateData} from "./visualizations";
import {View}         from "./view";
import {VmConnection} from "./vm-connection";

/**
 * The controller binds the domain model and the views, and mediates their
 * interaction.
 */
export class UiController extends Controller {
  private dbg: Debugger;
  private view: View;

  constructor(dbg, view, vmConnection: VmConnection) {
    super(vmConnection);
    this.dbg = dbg;
    this.view = view;
  }

  toggleConnection() {
    if (this.vmConnection.isConnected()) {
      this.vmConnection.disconnect();
    } else {
      this.vmConnection.connect();
    }
  }
{'fraction_non_alphanumeric': 0.11902654867256637, 'fraction_numerical': 0.002654867256637168, 'mean_word_length': 4.197701149425288, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5505471', 'n_tokens_mistral': 634, 'n_tokens_neox': 618, 'n_words': 180}