function getSelectedItem() {
        // Prefer file tree context, then file tree selection, else use working set
        var selectedEntry = getFileTreeContext();
        if (!selectedEntry) {
            selectedEntry = model.getSelected();
        }
        if (!selectedEntry) {
            selectedEntry = MainViewManager.getCurrentlyViewedFile();
        }
        return selectedEntry;
    }
Returns the File or Directory corresponding to the item selected in the sidebar panel, whether in
the file tree OR in the working set; or null if no item is selected anywhere in the sidebar.
May NOT be identical to the current Document - a folder may be selected in the sidebar, or the sidebar may not
have the current document visible in the tree & working set.
@return {?(File|Directory)}