       item.saveAs(path)
       nextAction?()
 
-  # Public: Saves all items in this pane.
+  # Public: Saves all items.
   saveItems: ->
     @saveItem(item) for item in @getItems()
 
-  # Public: Finds the first item that matches the given uri.
+  # Public: Returns the first item that matches the given URI or undefined if
+  # none exists.
   itemForUri: (uri) ->
     find @items, (item) -> item.getUri?() is uri
 
-  # Public: Focuses the first item that matches the given uri.
+  # Public: Activates the first item that matches the given URI. Returns a
+  # boolean indicating whether a matching item was found.
   showItemForUri: (uri) ->
     if item = @itemForUri(uri)
       @showItem(item)

      when 1 then false
      when 2 then true

  # Public: Saves the currently focused item.
  saveActiveItem: ->
    @saveItem(@activeItem)

  # Public: Save and prompt for path for the currently focused item.
  saveActiveItemAs: ->
    @saveItemAs(@activeItem)

  # Public: Saves the specified item and call the next action when complete.
  saveItem: (item, nextAction) ->
    if item.getUri?()
      item.save?()

    else
      false

  # Public: Destroys all items and destroys the pane.
  destroyItems: ->
    @destroyItem(item) for item in @getItems()

  # Public: Destroys all items but the active one.
  destroyInactiveItems: ->
    @destroyItem(item) for item in @getItems() when item isnt @activeItem

  # Private: Called by model superclass.
  destroyed: ->
    @container.activateNextPane() if @isActive()
    item.destroy?() for item in @items.slice()

  # Public: Prompts the user to save the given item if it can be saved and is
  # currently unsaved.
  promptToSaveItem: (item) ->
    return true unless item.shouldPromptToSave?()

