   updateSelectors: ->
     @refreshSelectorsButton.hide()
     @selectorList.empty()
+    self = this
 
     for packageName, deprecationsByFile of getSelectorDeprecations()
       @selectorList.append $$ ->

    title = "#{deprecation.getOriginName()} is deprecated."
    stacktrace = stack.map(({functionName, location}) -> "#{functionName} (#{location})").join("\n")
    body = "#{deprecation.getMessage()}\n```\n#{stacktrace}\n```"
    "#{repoUrl}/issues/new?title=#{encodeURI(title)}&body=#{encodeURI(body)}"

  updateCalls: ->

    @on 'click', '.deprecation-info', ->
      $(this).parent().toggleClass('collapsed')

    @on 'click', '.stack-line-location, .source-url', ->
      pathToOpen = @href.replace('file://', '')
      pathToOpen = pathToOpen.replace(/^\//, '') if process.platform is 'win32'
      atom.open(pathsToOpen: [pathToOpen])
