<commit_before>define ["core/selection", "core/workspace", "core/singleton", "core/keyListener"],
(Selection, Workspace, Singleton, KeyListener) ->

  class NodeProfileView extends Backbone.View

    constructor: (@selection, @keyListener) ->
      @selection.on "change", @update.bind(this)
      super()
      @listenTo @keyListener, "down:80", @toggle

    render: ->
      return this

    update: ->
      @$el.empty()
      selectedNodes = @selection.getSelectedNodes()
      $container = $("<div class=\"node-profile-helper\"/>").appendTo(@$el)
      blacklist = ["index", "x", "y", "px", "py", "fixed", "selected", "weight"]
      _.each selectedNodes, (node) ->
        $nodeDiv = $("<div class=\"node-profile\"/>").appendTo($container)
        $("<div class=\"node-profile-title\">#{node['text']}</div>").appendTo $nodeDiv
        _.each node, (value, property) ->
          $("<div class=\"node-profile-property\">#{property}:  #{value}</div>").appendTo $nodeDiv  if blacklist.indexOf(property) < 0

    toggle: ->
      @$el.toggle()

  class NodeProfileAPI extends Backbone.Model
    constructor: () ->
      selection = Selection.getInstance()
      keyListener = KeyListener.getInstance()
      view = new NodeProfileView(selection, keyListener).render()
      workspace = Workspace.getInstance()
      workspace.addBottomRight view.el

  _.extend NodeProfileAPI, Singleton<commit_msg>turn off node profile by default<commit_after>define ["core/selection", "core/workspace", "core/singleton", "core/keyListener"],
(Selection, Workspace, Singleton, KeyListener) ->

  class NodeProfileView extends Backbone.View

    constructor: (@selection, @keyListener) ->
      @selection.on "change", @update.bind(this)
      super()
      @listenTo @keyListener, "down:80", @toggle

    render: ->
      return this

    update: ->
      @$el.empty()
      selectedNodes = @selection.getSelectedNodes()
      $container = $("<div class=\"node-profile-helper\"/>").appendTo(@$el)
      blacklist = ["index", "x", "y", "px", "py", "fixed", "selected", "weight"]
      _.each selectedNodes, (node) ->
        $nodeDiv = $("<div class=\"node-profile\"/>").appendTo($container)
        $("<div class=\"node-profile-title\">#{node['text']}</div>").appendTo $nodeDiv
        _.each node, (value, property) ->
          $("<div class=\"node-profile-property\">#{property}:  #{value}</div>").appendTo $nodeDiv  if blacklist.indexOf(property) < 0

    toggle: ->
      @$el.toggle()

  class NodeProfileAPI extends Backbone.Model
    constructor: () ->
      selection = Selection.getInstance()
      keyListener = KeyListener.getInstance()
      view = new NodeProfileView(selection, keyListener).render()
      workspace = Workspace.getInstance()
      workspace.addBottomRight view.el
      view.toggle()

  _.extend NodeProfileAPI, Singleton
{'fraction_non_alphanumeric': 0.17435716801690737, 'fraction_numerical': 0.0021134202183867557, 'mean_word_length': 3.4375, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 31, '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': '1184428', 'n_tokens_mistral': 822, 'n_tokens_neox': 817, 'n_words': 175}