           marker, type: 'highlight', class: "linter-highlight #{message.class}"
         )
 
-      if @_scope is 'line'
-        return if @_lineMessages.indexOf(message) is -1
-
-      Element = Message.fromMessage(message, addPath: @_scope is 'project', cloneNode: true)
-
-      @_panel.appendChild Element
+      if @scope is 'line'
+        return if @lineMessages.indexOf(message) is -1
+
+      Element = Message.fromMessage(message, addPath: @scope is 'project', cloneNode: true)
+
+      @panel.appendChild Element
     @updateBubble()
 
 
-  _removeMarkers: ->
-    return unless @_markers.length
-    for marker in @_markers
+  removeMarkers: ->
+    return unless @markers.length
+    for marker in @markers
       try marker.destroy()
-    @_markers = []
+    @markers = []
 
   # This method is called in render, and classifies the messages according to scope
-  _extractMessages: (Gen, counts) ->
-    isProject = @_scope is 'project'
+  extractMessages: (Gen, counts) ->
+    isProject = @scope is 'project'
     activeEditor = atom.workspace.getActiveTextEditor()
     activeFile = activeEditor?.getPath()
     Gen.forEach (Entry) =>

        else
          counts.project++
          message.currentFile = false
        @_messages.add message

module.exports = LinterViews


class LinterViews
  constructor: (@linter) ->
    @showPanel = true # Altered by config observer in linter-plus
    @showBubble = true # Altered by the config observer in linter-plus
    @underlineIssues = true # Altered by config observer in linter-plus

    @messages = new Set
    @markers = []
    @statusTiles = []

    @tabs = new Map
    @tabs.set 'line', new BottomTab()
    @tabs.set 'file', new BottomTab()
    @tabs.set 'project', new BottomTab()

    @panel = document.createElement 'div'
    @bubble = null
    @bottomStatus = new BottomStatus()

    @tabs.get('line').initialize 'Line', => @changeTab('line')
    @tabs.get('file').initialize 'File', => @changeTab('file')
    @tabs.get('project').initialize 'Project', => @changeTab('project')

    @bottomStatus.initialize()
    @bottomStatus.addEventListener 'click', ->
      atom.commands.dispatch atom.views.getView(atom.workspace), 'linter:next-error'
    @panelWorkspace = atom.workspace.addBottomPanel item: @panel, visible: false

    # Set default tab
    visibleTabs = @getVisibleTabKeys()

    @scope = atom.config.get('linter.defaultErrorTab', 'file')
    if visibleTabs.indexOf(@scope) is -1
      @scope = visibleTabs[0]

    @tabs.forEach (tab, key) =>
      tab.visible = false
      tab.active = @scope is key

    @panel.id = 'linter-panel'

  getMessages: ->
    @messages

# consumed in views/panel
  setPanelVisibility: (Status) ->
    if Status
      @panelWorkspace.show() unless @panelWorkspace.isVisible()
    else
      @panelWorkspace.hide() if @panelWorkspace.isVisible()

  # Called in config observer of linter-plus.coffee
  setShowPanel: (showPanel) ->
    atom.config.set('linter.showErrorPanel', showPanel)
    @showPanel = showPanel
    if showPanel
      @panel.removeAttribute('hidden')
    else
      @panel.setAttribute('hidden', true)

  # Called in config observer of linter-plus.coffee
  setShowBubble: (@showBubble) ->

  setUnderlineIssues: (@underlineIssues) ->

  setBubbleOpaque: ->
    bubble = document.getElementById('linter-inline')
