     bubble
 
   _renderPanel: ->
-    @_panel.innerHTML = ''
-    @_removeMarkers()
-    @_removeBubble()
-    if not @_messages.size
+    @panel.innerHTML = ''
+    @removeMarkers()
+    @removeBubble()
+    if not @messages.size
       return @setPanelVisibility(false)
     @setPanelVisibility(true)
     activeEditor = atom.workspace.getActiveTextEditor()
-    @_messages.forEach (message) =>
-      if @_scope is 'file' then return unless message.currentFile
-      if @_underlineIssues and message.currentFile and message.range #Add the decorations to the current TextEditor
-        @_markers.push marker = activeEditor.markBufferRange message.range, {invalidate: 'never'}
+    @messages.forEach (message) =>
+      if @scope is 'file' then return unless message.currentFile
+      if @underlineIssues and message.currentFile and message.range #Add the decorations to the current TextEditor
+        @markers.push marker = activeEditor.markBufferRange message.range, {invalidate: 'never'}
         activeEditor.decorateMarker(
           marker, type: 'line-number', class: "linter-highlight #{message.class}"
         )
         activeEditor.decorateMarker(
           marker, type: 'highlight', class: "linter-highlight #{message.class}"
         )
-      Element = Message.fromMessage(message, addPath: @_scope is 'project', cloneNode: true)
-      @_panel.appendChild Element
+      Element = Message.fromMessage(message, addPath: @scope is 'project', cloneNode: true)
+      @panel.appendChild Element
     @updateBubble()
 
 
   _removeMarkers: ->
-    return unless @_markers.length
-    for marker in @_markers
+    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'
+    isProject = @scope is 'project'
     activeEditor = atom.workspace.getActiveTextEditor()
     activeFile = activeEditor?.getPath()
     Gen.forEach (Entry) =>

  # This message is called in editor-linter.coffee
  render: ->
    counts = {project: 0, file: 0}
    @_messages.clear()
    @linter.eachEditorLinter (editorLinter) =>
      @_extractMessages(editorLinter.getMessages(), counts)
    @._extractMessages(@linter.getProjectMessages(), counts)

    @_renderPanel()
    @_bottomTabFile.count = counts.file
    @_bottomTabProject.count = counts.project
    @_bottomStatus.count = counts.project
    hasActiveEditor = typeof atom.workspace.getActiveTextEditor() isnt 'undefined'
    @_bottomTabFile.visibility = hasActiveEditor
    @_bottomTabProject.visibility = hasActiveEditor

  # consumed in editor-linter, _renderPanel
  updateBubble: (point) ->
    @_removeBubble()
    return unless @_showBubble
    return unless @_messages.size
    activeEditor = atom.workspace.getActiveTextEditor()
    return unless activeEditor?.getPath()
    point = point || activeEditor.getCursorBufferPosition()
    try @_messages.forEach (message) =>
      return unless message.currentFile
      return unless message.range?.containsPoint point
      @_bubble = activeEditor.markBufferRange([point, point], {invalidate: 'never'})
      activeEditor.decorateMarker(
        @_bubble
        {
          type: 'overlay',
          position: 'tail',
          item: @_renderBubble(message)
        }
      )
      throw null

  # This method is called when we get the status-bar service
  attachBottom: (statusBar) ->
    @_statusTiles.push statusBar.addLeftTile
      item: @_bottomTabFile,
      priority: -1001
    @_statusTiles.push statusBar.addLeftTile
      item: @_bottomTabProject,
      priority: -1000
    statusIconPosition = atom.config.get('linter.statusIconPosition')
    @_statusTiles.push statusBar["add#{statusIconPosition}Tile"]
      item: @_bottomStatus,
      priority: 999

  # this method is called on package deactivate
  destroy: ->
    @_messages.clear()
    @_removeMarkers()
    @_panelWorkspace.destroy()
    @_removeBubble()
    for statusTile in @_statusTiles
      statusTile.destroy()

  _changeTab: (Tab) ->
    if @_bottomTabFile.active and Tab is 'file'
      @_showPanel = not @_showPanel
    else if @_bottomTabProject.active and Tab is 'project'
      @_showPanel = not @_showPanel
    else
      @_showPanel = true
    @setShowPanel(@_showPanel)
    if @_showPanel
      @_scope = Tab
      @_bottomTabProject.active = Tab is 'project'
      @_bottomTabFile.active = Tab is 'file'
      @_renderPanel()
    else
      @_bottomTabProject.active = no
      @_bottomTabFile.active = no

  _removeBubble: ->
    return unless @_bubble
    @_bubble.destroy()
    @_bubble = null

  _renderBubble: (message) ->
    bubble = document.createElement 'div'

        else
          counts.project++
          message.currentFile = false
        @messages.add message
module.exports = LinterViews
