 path = require 'path'
 {$} = require 'atom-space-pen-views'
-{CompositeDisposable} = require 'atom'
+{Disposable, CompositeDisposable} = require 'atom'
 
 module.exports =
 class TabView extends HTMLElement

      @updateTooltip()

    if typeof @item.onDidChangeTitle is 'function'
      @subscriptions.add @item.onDidChangeTitle(titleChangedHandler)
    else if typeof @item.on is 'function'
      #TODO Remove once old events are no longer supported
      @item.on('title-changed', titleChangedHandler)

      @updateModifiedStatus()

    if typeof @item.onDidChangeModified is 'function'
      onDidChangeModifiedDisposable = @item.onDidChangeModified(modifiedHandler)
      if Disposable.isDisposable(onDidChangeModifiedDisposable)
        @subscriptions.add(onDidChangeModifiedDisposable)
      else
        console.warn "::onDidChangeModified does not return a valid disposable!"
    else if typeof @item.on is 'function'
      #TODO Remove once old events are no longer supported
      @item.on('modified-status-changed', modifiedHandler)
