<commit_before>{CompositeDisposable} = require('atom')

{BottomPanel} = require('./ui/bottom-panel')
BottomContainer = require('./ui/bottom-container')
BottomStatus = require('./ui/bottom-status')
{Message} = require('./ui/message-element')

class LinterViews
  constructor: (@linter) ->
    @state = @linter.state
    @subscriptions = new CompositeDisposable
    @messages = []
    @panel = new BottomPanel(@state.scope)
    @bottomContainer = new BottomContainer().prepare(@linter.state)
    @bottomBar = null
    @bubble = null
    @count = File: 0, Line: 0, Project: 0

    @subscriptions.add @panel
    @subscriptions.add atom.config.observe('linter.underlineIssues', (underlineIssues) =>
      @underlineIssues = underlineIssues
    )
    @subscriptions.add atom.config.observe('linter.showErrorInline', (showBubble) =>
      @showBubble = showBubble
    )
    @subscriptions.add atom.workspace.onDidChangeActivePaneItem =>
      @classifyMessages(@messages)
      @renderPanelMarkers({added: @messages, removed: @messages})
      @renderBubble()
      @renderCount()
      @panel.refresh(@state.scope)
    @subscriptions.add @bottomContainer.onDidChangeTab =>
      atom.config.set('linter.showErrorPanel', true)
      @panel.refresh(@state.scope)
    @subscriptions.add @bottomContainer.onShouldTogglePanel =><commit_msg>:fire: Remove an unnecessary observer<commit_after>{CompositeDisposable} = require('atom')

{BottomPanel} = require('./ui/bottom-panel')
BottomContainer = require('./ui/bottom-container')
BottomStatus = require('./ui/bottom-status')
{Message} = require('./ui/message-element')

class LinterViews
  constructor: (@linter) ->
    @state = @linter.state
    @subscriptions = new CompositeDisposable
    @messages = []
    @panel = new BottomPanel(@state.scope)
    @bottomContainer = new BottomContainer().prepare(@linter.state)
    @bottomBar = null
    @bubble = null
    @count = File: 0, Line: 0, Project: 0

    @subscriptions.add @panel
    @subscriptions.add atom.config.observe('linter.showErrorInline', (showBubble) =>
      @showBubble = showBubble
    )
    @subscriptions.add atom.workspace.onDidChangeActivePaneItem =>
      @classifyMessages(@messages)
      @renderPanelMarkers({added: @messages, removed: @messages})
      @renderBubble()
      @renderCount()
      @panel.refresh(@state.scope)
    @subscriptions.add @bottomContainer.onDidChangeTab =>
      atom.config.set('linter.showErrorPanel', true)
      @panel.refresh(@state.scope)
    @subscriptions.add @bottomContainer.onShouldTogglePanel =>
{'fraction_non_alphanumeric': 0.13988212180746562, 'fraction_numerical': 0.002357563850687623, 'mean_word_length': 4.1853360488798375, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 14, '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': '2063583', 'n_tokens_mistral': 765, 'n_tokens_neox': 750, 'n_words': 131}