Просмотр исходного кода

work in progress - modernizing file browser plugin

Afshin Darian 8 лет назад
Родитель
Сommit
b6731acf66
1 измененных файлов с 428 добавлено и 402 удалено
  1. 428 402
      src/filebrowser/plugin.ts

+ 428 - 402
src/filebrowser/plugin.ts

@@ -6,61 +6,68 @@ import {
 } from 'jupyter-js-services';
 
 import {
-  IWidgetOpener, FileBrowserWidget
-} from './browser';
+  defineSignal, ISignal
+} from 'phosphor/lib/core/signaling';
 
 import {
-  FileBrowserModel
-} from './model';
+  Token
+} from 'phosphor/lib/core/token';
 
-import {
-  DocumentManager
-} from '../docmanager';
+// import {
+//   Menu
+// } from 'phosphor/lib/ui/menu';
 
 import {
-  DocumentRegistry, IDocumentContext, IDocumentModel, selectKernelForContext
-} from '../docregistry';
-
-import {
-  Application
-} from 'phosphide/lib/core/application';
+  Widget
+} from 'phosphor/lib/ui/widget';
 
 import {
-  Menu, MenuItem
-} from 'phosphor-menus';
+  JupyterLab, JupyterLabPlugin
+} from '../application';
 
 import {
-  IChangedArgs
-} from 'phosphor-properties';
+  DocumentManager
+} from '../docmanager';
 
 import {
-  ISignal, Signal
-} from 'phosphor-signaling';
+  DocumentRegistry
+} from '../docregistry';
 
 import {
-  Widget
-} from 'phosphor-widget';
+  IMainMenu
+} from '../mainmenu/plugin';
 
 import {
   WidgetTracker
 } from '../widgettracker';
 
 import {
-  MainMenu
-} from '../mainmenu/plugin';
+  IWidgetOpener, FileBrowserWidget
+} from './browser';
 
+import {
+  FileBrowserModel
+} from './model';
 
+
+/* tslint:disable */
 /**
- * A class that tracks the current path of the file browser.
+ * The path tracker token.
  */
 export
-class PathTracker {
+const IPathTracker = new Token<IPathTracker>('jupyter.services.file-browser');
+/* tslint:enable */
+
+
+/**
+ * An interface a file browser path tracker.
+ */
+export
+interface IPathTracker {
   /**
    * A signal emitted when the current path changes.
    */
-  get pathChanged(): ISignal<PathTracker, IChangedArgs<string>> {
-    return Private.pathChangedSignal.bind(this);
-  }
+  pathChanged: ISignal<IPathTracker, IPathChangedArgs>;
 
   /**
    * The current path of the filebrowser.
@@ -68,32 +75,65 @@ class PathTracker {
    * #### Notes
    * This is a read-only property.
    */
-  get path(): string {
-    return Private.fbWidget ? Private.fbWidget.model.path : '';
-  }
+  path: string;
 }
 
 
 /**
- * The default file browser provider.
+ * An arguments object for the `pathChanged` signal.
  */
 export
-const fileBrowserProvider = {
-  id: 'jupyter.services.fileBrowser',
-  provides: PathTracker,
-  resolve: () => {
-    return Private.pathTracker;
+interface IPathChangedArgs {
+  /**
+   * The name of the attribute being changed.
+   */
+  name: string;
+
+  /**
+   * The old path value.
+   */
+  oldValue: string;
+
+  /**
+   * The new path value.
+   */
+  newValue: string;
+}
+
+
+/**
+ * A class that tracks the current path of the file browser.
+ */
+class PathTracker implements IPathTracker {
+  /**
+   * A signal emitted when the current path changes.
+   */
+  pathChanged: ISignal<IPathTracker, IPathChangedArgs>;
+
+  /**
+   * The current path of the filebrowser.
+   *
+   * #### Notes
+   * This is a read-only property.
+   */
+  get path(): string {
+    return Private.fbWidget ? Private.fbWidget.model.path : '';
   }
-};
+}
+
+
+// Define the signals for the `PathTracker` class.
+defineSignal(PathTracker.prototype, 'commandChanged');
 
 
 /**
- * The default file browser extension.
+ * The default file browser provider.
  */
 export
-const fileBrowserExtension = {
-  id: 'jupyter.extensions.fileBrowser',
-  requires: [ServiceManager, DocumentRegistry, MainMenu],
+const fileBrowserProvider: JupyterLabPlugin<IPathTracker> = {
+  id: 'jupyter.services.file-browser',
+  provides: IPathTracker,
+  requires: [ServiceManager, DocumentRegistry, IMainMenu],
   activate: activateFileBrowser
 };
 
@@ -101,35 +141,33 @@ const fileBrowserExtension = {
 /**
  * The class name for all main area portrait tab icons.
  */
-const PORTRAIT_ICON_CLASS = 'jp-MainAreaPortraitIcon';
+// const PORTRAIT_ICON_CLASS = 'jp-MainAreaPortraitIcon';
 
 /**
  * The class name for the notebook icon from the default theme.
  */
-const NOTEBOOK_ICON_CLASS = 'jp-ImageNotebook';
+// const NOTEBOOK_ICON_CLASS = 'jp-ImageNotebook';
 
 /**
  * The class name for the text editor icon from the default theme.
  */
-const TEXTEDITOR_ICON_CLASS = 'jp-ImageTextEditor';
+// const TEXTEDITOR_ICON_CLASS = 'jp-ImageTextEditor';
 
 
 /**
  * Activate the file browser.
  */
-function activateFileBrowser(app: Application, manager: ServiceManager, registry: DocumentRegistry, mainMenu: MainMenu): void {
+function activateFileBrowser(app: JupyterLab, manager: ServiceManager, registry: DocumentRegistry, mainMenu: IMainMenu): IPathTracker {
   let id = 0;
-
   let tracker = new WidgetTracker<Widget>();
   let activeWidget: Widget;
+
   tracker.activeWidgetChanged.connect((sender, widget) => {
     activeWidget = widget;
   });
 
-  let docManager: DocumentManager;
-
   let opener: IWidgetOpener = {
-    open: (widget) => {
+    open: widget => {
       if (!widget.id) {
         widget.id = `document-manager-${++id}`;
       }
@@ -139,12 +177,7 @@ function activateFileBrowser(app: Application, manager: ServiceManager, registry
       }
     }
   };
-
-  docManager = new DocumentManager({
-    registry,
-    manager,
-    opener
-  });
+  let docManager = new DocumentManager({ registry, manager, opener });
   let fbModel = new FileBrowserModel({ manager });
   let fbWidget = Private.fbWidget = new FileBrowserWidget({
     model: fbModel,
@@ -159,354 +192,353 @@ function activateFileBrowser(app: Application, manager: ServiceManager, registry
   // Add a context menu to the dir listing.
   let node = fbWidget.node.getElementsByClassName('jp-DirListing-content')[0];
   node.addEventListener('contextmenu', (event: MouseEvent) => {
-    event.preventDefault();
-    let x = event.clientX;
-    let y = event.clientY;
-    let path = fbWidget.pathForClick(event);
-    let ext = '.' + path.split('.').pop();
-    let widgetNames = registry.listWidgetFactories(ext);
-    let items: MenuItem[] = [];
-    if (widgetNames.length > 1) {
-      for (let widgetName of widgetNames) {
-        items.push(new MenuItem({
-          text: widgetName,
-          handler: () => {
-            fbWidget.openPath(path, widgetName);
-          }
-        }));
-      }
-    }
-    let menu = createMenu(fbWidget, items);
-    menu.popup(x, y);
+    // event.preventDefault();
+    // let x = event.clientX;
+    // let y = event.clientY;
+    // let path = fbWidget.pathForClick(event);
+    // let ext = '.' + path.split('.').pop();
+    // let widgetNames = registry.listWidgetFactories(ext);
+    // let items: MenuItem[] = [];
+    // if (widgetNames.length > 1) {
+    //   for (let widgetName of widgetNames) {
+    //     items.push(new MenuItem({
+    //       text: widgetName,
+    //       handler: () => {
+    //         fbWidget.openPath(path, widgetName);
+    //       }
+    //     }));
+    //   }
+    // }
+    // let menu = createMenu(fbWidget, items);
+    // menu.popup(x, y);
   });
 
-  // Add the command for a new items.
-  let newTextFileId = 'file-operations:new-text-file';
-
-  app.commands.add([
-    {
-      id: newTextFileId,
-      handler: () => {
-        let icon = `${PORTRAIT_ICON_CLASS} ${TEXTEDITOR_ICON_CLASS}`;
-        fbWidget.createNew({ type: 'file' }).then(widget => widget.title.icon = icon);
-      }
-    }
-  ]);
-
-  let newNotebookId = 'file-operations:new-notebook';
-
-  app.commands.add([
-    {
-      id: newNotebookId,
-      handler: () => {
-        let icon = `${PORTRAIT_ICON_CLASS} ${NOTEBOOK_ICON_CLASS}`;
-        fbWidget.createNew({ type: 'notebook' }).then(widget => {
-          widget.title.icon = icon;
-        });
-      }
-    }
-  ]);
-
-
-  // Add the command for saving a document.
-  let saveDocumentId = 'file-operations:save';
-
-  app.commands.add([
-    {
-      id: saveDocumentId,
-      handler: () => {
-        if (activeWidget) {
-          let context = docManager.contextForWidget(activeWidget);
-          context.save();
-        }
-      }
-    }
-  ]);
-  app.palette.add([
-    {
-      command: saveDocumentId,
-      category: 'File Operations',
-      text: 'Save Document',
-      caption: 'Save the current document'
-    }
-  ]);
-
-  // Add the command for reverting a document.
-  let revertDocumentId = 'file-operations:revert';
-
-  app.commands.add([
-    {
-      id: revertDocumentId,
-      handler: () => {
-        if (activeWidget) {
-          let context = docManager.contextForWidget(activeWidget);
-          context.revert();
-        }
-      }
-    }
-  ]);
-  app.palette.add([
-    {
-      command: revertDocumentId,
-      category: 'File Operations',
-      text: 'Revert Document',
-      caption: 'Revert the current document'
-    }
-  ]);
-
-
-// Add the command for saving a document with a new name.
-  let saveDocumentAsId = 'file-operations:saveas';
-
-  app.commands.add([
-    {
-      id: saveDocumentAsId,
-      handler: () => {
-        if (activeWidget) {
-          let context = docManager.contextForWidget(activeWidget);
-          context.saveAs().then(() => { fbModel.refresh(); });
-        }
-      }
-    }
-  ]);
-  app.palette.add([
-    {
-      command: saveDocumentAsId,
-      category: 'File Operations',
-      text: 'Save As...',
-      caption: 'Save the current document as...'
-    }
-  ]);
-
-  // Add the command for closing a document.
-  let closeDocumentId = 'file-operations:close';
-
-  app.commands.add([
-    {
-      id: closeDocumentId,
-      handler: () => {
-        if (activeWidget) {
-          activeWidget.close();
-        }
-      }
-    }
-  ]);
-  app.palette.add([
-    {
-      command: closeDocumentId,
-      category: 'File Operations',
-      text: 'Close Document',
-      caption: 'Close the current document'
-    }
-  ]);
-
-  // Add the command for closing all documents.
-  let closeAllId = 'file-operations:close-all';
-
-  app.commands.add([
-    {
-      id: closeAllId,
-      handler: () => {
-        docManager.closeAll();
-      }
-    }
-  ]);
-  app.palette.add([
-    {
-      command: closeAllId,
-      category: 'File Operations',
-      text: 'Close All',
-      caption: 'Close all open documents'
-    }
-  ]);
-
-  app.palette.add([
-    {
-      command: newTextFileId,
-      category: 'File Operations',
-      text: 'New Text File',
-      caption: 'Create a new text file'
-    },
-    {
-      command: newNotebookId,
-      category: 'File Operations',
-      text: 'New Notebook',
-      caption: 'Create a new notebook'
-    }
-  ]);
-
-  app.commands.add([
-    {
-      id: 'file-browser:activate',
-      handler: showBrowser
-    },
-    {
-      id: 'file-browser:hide',
-      handler: hideBrowser
-    },
-    {
-      id: 'file-browser:toggle',
-      handler: toggleBrowser
-    }
-  ]);
-
-  fbWidget.title.text = 'Files';
-  fbWidget.id = 'file-browser';
-  app.shell.addToLeftArea(fbWidget, { rank: 40 });
-  showBrowser();
-
-
-
-  // Adding Top Menu
-  let newSubMenu = new Menu ([
-    new MenuItem({
-      text: 'Notebook',
-      handler: () => {
-        app.commands.execute(newNotebookId);
-      }
-    }),
-    new MenuItem({
-      text: 'Text File',
-      handler: () => {
-        app.commands.execute(newTextFileId);
-      }
-    })
-
-  ]);
-
-  let menu = new Menu ([
-    new MenuItem({
-      text: 'New',
-      submenu: newSubMenu
-
-    }),
-    new MenuItem({
-      text: 'Save Document',
-      handler: () => {
-        app.commands.execute(saveDocumentId);
-      }
-    }),
-    new MenuItem({
-      text: 'Save Document As...',
-      handler: () => {
-        app.commands.execute(saveDocumentAsId);
-      }
-    }),
-    new MenuItem({
-      text: 'Revert Document',
-      handler: () => {
-        app.commands.execute(revertDocumentId);
-      }
-    }),
-    new MenuItem({
-      text: 'Close Current',
-      handler: () => {
-        app.commands.execute(closeDocumentId);
-      }
-    }),
-    new MenuItem({
-      text: 'Close All',
-      handler: () => {
-        app.commands.execute(closeAllId);
-      }
-    }),
-
-  ]);
-
-  let fileMenu = new MenuItem({
-    text: 'File',
-    submenu: menu
-  });
-  mainMenu.addItem(fileMenu, {rank: 1});
-
-  function showBrowser(): void {
-    app.shell.activateLeft(fbWidget.id);
-  }
-
-  function hideBrowser(): void {
-    if (!fbWidget.isHidden) {
-      app.shell.collapseLeft();
-    }
-  }
-
-  function toggleBrowser(): void {
-    if (fbWidget.isHidden) {
-      showBrowser();
-    } else {
-      hideBrowser();
-    }
-  }
-
+//   // Add the command for a new items.
+//   let newTextFileId = 'file-operations:new-text-file';
+
+//   app.commands.add([
+//     {
+//       id: newTextFileId,
+//       handler: () => {
+//         let icon = `${PORTRAIT_ICON_CLASS} ${TEXTEDITOR_ICON_CLASS}`;
+//         fbWidget.createNew({ type: 'file' }).then(widget => widget.title.icon = icon);
+//       }
+//     }
+//   ]);
+
+//   let newNotebookId = 'file-operations:new-notebook';
+
+//   app.commands.add([
+//     {
+//       id: newNotebookId,
+//       handler: () => {
+//         let icon = `${PORTRAIT_ICON_CLASS} ${NOTEBOOK_ICON_CLASS}`;
+//         fbWidget.createNew({ type: 'notebook' }).then(widget => {
+//           widget.title.icon = icon;
+//         });
+//       }
+//     }
+//   ]);
+
+
+//   // Add the command for saving a document.
+//   let saveDocumentId = 'file-operations:save';
+
+//   app.commands.add([
+//     {
+//       id: saveDocumentId,
+//       handler: () => {
+//         if (activeWidget) {
+//           let context = docManager.contextForWidget(activeWidget);
+//           context.save();
+//         }
+//       }
+//     }
+//   ]);
+//   app.palette.add([
+//     {
+//       command: saveDocumentId,
+//       category: 'File Operations',
+//       text: 'Save Document',
+//       caption: 'Save the current document'
+//     }
+//   ]);
+
+//   // Add the command for reverting a document.
+//   let revertDocumentId = 'file-operations:revert';
+
+//   app.commands.add([
+//     {
+//       id: revertDocumentId,
+//       handler: () => {
+//         if (activeWidget) {
+//           let context = docManager.contextForWidget(activeWidget);
+//           context.revert();
+//         }
+//       }
+//     }
+//   ]);
+//   app.palette.add([
+//     {
+//       command: revertDocumentId,
+//       category: 'File Operations',
+//       text: 'Revert Document',
+//       caption: 'Revert the current document'
+//     }
+//   ]);
+
+
+// // Add the command for saving a document with a new name.
+//   let saveDocumentAsId = 'file-operations:saveas';
+
+//   app.commands.add([
+//     {
+//       id: saveDocumentAsId,
+//       handler: () => {
+//         if (activeWidget) {
+//           let context = docManager.contextForWidget(activeWidget);
+//           context.saveAs().then(() => { fbModel.refresh(); });
+//         }
+//       }
+//     }
+//   ]);
+//   app.palette.add([
+//     {
+//       command: saveDocumentAsId,
+//       category: 'File Operations',
+//       text: 'Save As...',
+//       caption: 'Save the current document as...'
+//     }
+//   ]);
+
+//   // Add the command for closing a document.
+//   let closeDocumentId = 'file-operations:close';
+
+//   app.commands.add([
+//     {
+//       id: closeDocumentId,
+//       handler: () => {
+//         if (activeWidget) {
+//           activeWidget.close();
+//         }
+//       }
+//     }
+//   ]);
+//   app.palette.add([
+//     {
+//       command: closeDocumentId,
+//       category: 'File Operations',
+//       text: 'Close Document',
+//       caption: 'Close the current document'
+//     }
+//   ]);
+
+//   // Add the command for closing all documents.
+//   let closeAllId = 'file-operations:close-all';
+
+//   app.commands.add([
+//     {
+//       id: closeAllId,
+//       handler: () => {
+//         docManager.closeAll();
+//       }
+//     }
+//   ]);
+//   app.palette.add([
+//     {
+//       command: closeAllId,
+//       category: 'File Operations',
+//       text: 'Close All',
+//       caption: 'Close all open documents'
+//     }
+//   ]);
+
+//   app.palette.add([
+//     {
+//       command: newTextFileId,
+//       category: 'File Operations',
+//       text: 'New Text File',
+//       caption: 'Create a new text file'
+//     },
+//     {
+//       command: newNotebookId,
+//       category: 'File Operations',
+//       text: 'New Notebook',
+//       caption: 'Create a new notebook'
+//     }
+//   ]);
+
+//   app.commands.add([
+//     {
+//       id: 'file-browser:activate',
+//       handler: showBrowser
+//     },
+//     {
+//       id: 'file-browser:hide',
+//       handler: hideBrowser
+//     },
+//     {
+//       id: 'file-browser:toggle',
+//       handler: toggleBrowser
+//     }
+//   ]);
+
+//   fbWidget.title.text = 'Files';
+//   fbWidget.id = 'file-browser';
+//   app.shell.addToLeftArea(fbWidget, { rank: 40 });
+//   showBrowser();
+
+//   // Add top menu.
+//   let newSubMenu = new Menu ([
+//     new MenuItem({
+//       text: 'Notebook',
+//       handler: () => {
+//         app.commands.execute(newNotebookId);
+//       }
+//     }),
+//     new MenuItem({
+//       text: 'Text File',
+//       handler: () => {
+//         app.commands.execute(newTextFileId);
+//       }
+//     })
+
+//   ]);
+
+//   let menu = new Menu ([
+//     new MenuItem({
+//       text: 'New',
+//       submenu: newSubMenu
+
+//     }),
+//     new MenuItem({
+//       text: 'Save Document',
+//       handler: () => {
+//         app.commands.execute(saveDocumentId);
+//       }
+//     }),
+//     new MenuItem({
+//       text: 'Save Document As...',
+//       handler: () => {
+//         app.commands.execute(saveDocumentAsId);
+//       }
+//     }),
+//     new MenuItem({
+//       text: 'Revert Document',
+//       handler: () => {
+//         app.commands.execute(revertDocumentId);
+//       }
+//     }),
+//     new MenuItem({
+//       text: 'Close Current',
+//       handler: () => {
+//         app.commands.execute(closeDocumentId);
+//       }
+//     }),
+//     new MenuItem({
+//       text: 'Close All',
+//       handler: () => {
+//         app.commands.execute(closeAllId);
+//       }
+//     }),
+
+//   ]);
+
+//   let fileMenu = new MenuItem({
+//     text: 'File',
+//     submenu: menu
+//   });
+//   mainMenu.addItem(fileMenu, {rank: 1});
+
+//   function showBrowser(): void {
+//     app.shell.activateLeft(fbWidget.id);
+//   }
+
+//   function hideBrowser(): void {
+//     if (!fbWidget.isHidden) {
+//       app.shell.collapseLeft();
+//     }
+//   }
+
+//   function toggleBrowser(): void {
+//     if (fbWidget.isHidden) {
+//       showBrowser();
+//     } else {
+//       hideBrowser();
+//     }
+//   }
+
+  return Private.pathTracker;
 }
 
 
 /**
  * Create a context menu for the file browser listing.
  */
-function createMenu(fbWidget: FileBrowserWidget, openWith: MenuItem[]):  Menu {
-  let items = [
-    new MenuItem({
-      text: '&Open',
-      icon: 'fa fa-folder-open-o',
-      shortcut: 'Ctrl+O',
-      handler: () => { fbWidget.open(); }
-    })
-  ];
-  if (openWith.length) {
-    items.push(new MenuItem({
-      text: 'Open With...',
-      submenu: new Menu(openWith)
-    }));
-  }
-  items.push(
-    new MenuItem({
-      text: '&Rename',
-      icon: 'fa fa-edit',
-      shortcut: 'Ctrl+R',
-      handler: () => { fbWidget.rename(); }
-    }),
-    new MenuItem({
-      text: '&Delete',
-      icon: 'fa fa-remove',
-      shortcut: 'Ctrl+D',
-      handler: () => { fbWidget.delete(); }
-    }),
-    new MenuItem({
-      text: 'Duplicate',
-      icon: 'fa fa-copy',
-      handler: () => { fbWidget.duplicate(); }
-    }),
-    new MenuItem({
-      text: 'Cut',
-      icon: 'fa fa-cut',
-      shortcut: 'Ctrl+X',
-      handler: () => { fbWidget.cut(); }
-    }),
-    new MenuItem({
-      text: '&Copy',
-      icon: 'fa fa-copy',
-      shortcut: 'Ctrl+C',
-      handler: () => { fbWidget.copy(); }
-    }),
-    new MenuItem({
-      text: '&Paste',
-      icon: 'fa fa-paste',
-      shortcut: 'Ctrl+V',
-      handler: () => { fbWidget.paste(); }
-    }),
-    new MenuItem({
-      text: 'Download',
-      icon: 'fa fa-download',
-      handler: () => { fbWidget.download(); }
-    }),
-    new MenuItem({
-      text: 'Shutdown Kernel',
-      icon: 'fa fa-stop-circle-o',
-      handler: () => { fbWidget.shutdownKernels(); }
-    })
-  );
-  return new Menu(items);
-}
+// function createMenu(fbWidget: FileBrowserWidget, openWith: MenuItem[]):  Menu {
+//   let items = [
+//     new MenuItem({
+//       text: '&Open',
+//       icon: 'fa fa-folder-open-o',
+//       shortcut: 'Ctrl+O',
+//       handler: () => { fbWidget.open(); }
+//     })
+//   ];
+//   if (openWith.length) {
+//     items.push(new MenuItem({
+//       text: 'Open With...',
+//       submenu: new Menu(openWith)
+//     }));
+//   }
+//   items.push(
+//     new MenuItem({
+//       text: '&Rename',
+//       icon: 'fa fa-edit',
+//       shortcut: 'Ctrl+R',
+//       handler: () => { fbWidget.rename(); }
+//     }),
+//     new MenuItem({
+//       text: '&Delete',
+//       icon: 'fa fa-remove',
+//       shortcut: 'Ctrl+D',
+//       handler: () => { fbWidget.delete(); }
+//     }),
+//     new MenuItem({
+//       text: 'Duplicate',
+//       icon: 'fa fa-copy',
+//       handler: () => { fbWidget.duplicate(); }
+//     }),
+//     new MenuItem({
+//       text: 'Cut',
+//       icon: 'fa fa-cut',
+//       shortcut: 'Ctrl+X',
+//       handler: () => { fbWidget.cut(); }
+//     }),
+//     new MenuItem({
+//       text: '&Copy',
+//       icon: 'fa fa-copy',
+//       shortcut: 'Ctrl+C',
+//       handler: () => { fbWidget.copy(); }
+//     }),
+//     new MenuItem({
+//       text: '&Paste',
+//       icon: 'fa fa-paste',
+//       shortcut: 'Ctrl+V',
+//       handler: () => { fbWidget.paste(); }
+//     }),
+//     new MenuItem({
+//       text: 'Download',
+//       icon: 'fa fa-download',
+//       handler: () => { fbWidget.download(); }
+//     }),
+//     new MenuItem({
+//       text: 'Shutdown Kernel',
+//       icon: 'fa fa-stop-circle-o',
+//       handler: () => { fbWidget.shutdownKernels(); }
+//     })
+//   );
+//   return new Menu(items);
+// }
 
 
 /**
@@ -518,10 +550,4 @@ namespace Private {
 
   export
   const pathTracker = new PathTracker();
-
-  /**
-   * A signal emitted when the current working directory changes.
-   */
-  export
-  const pathChangedSignal = new Signal<PathTracker, IChangedArgs<string>>();
 }