浏览代码

Add a temporary `cwd` attribute to the document manager.

Afshin Darian 8 年之前
父节点
当前提交
721ecd4f9d
共有 1 个文件被更改,包括 17 次插入0 次删除
  1. 17 0
      packages/docmanager/src/manager.ts

+ 17 - 0
packages/docmanager/src/manager.ts

@@ -111,6 +111,22 @@ class DocumentManager implements IDisposable {
     return this._activateRequested;
   }
 
+  /**
+   * The current working directory of the document manager.
+   *
+   * #### Notes
+   * This attribute is DEPRECATED. It is intended for use as a stopgap measure
+   * to create some notion of an application-level working directory for
+   * launching activities that need a sensible starting directory. It will be
+   * replaced with another concept in later releases.
+   */
+  get cwd(): string {
+    return this._cwd;
+  }
+  set cwd(cwd: string) {
+    this._cwd = cwd;
+  }
+
   /**
    * Get whether the document manager has been disposed.
    */
@@ -491,6 +507,7 @@ class DocumentManager implements IDisposable {
 
   private _activateRequested = new Signal<this, string>(this);
   private _contexts: Private.IContext[] = [];
+  private _cwd: string = '';
   private _modelDBFactory: ModelDB.IFactory = null;
   private _opener: DocumentManager.IWidgetOpener = null;
   private _widgetManager: DocumentWidgetManager = null;