Browse Source

wip docmanager

Steven Silvester 9 years ago
parent
commit
da1a2ae2b3
2 changed files with 12 additions and 2 deletions
  1. 8 0
      src/docmanager/context.ts
  2. 4 2
      src/docmanager/index.ts

+ 8 - 0
src/docmanager/context.ts

@@ -350,3 +350,11 @@ class ContextManager {
   private _options: { [key: string]: IContentsOpts } = Object.create(null);
   private _paths: { [key: string]: string } = Object.create(null);
 }
+
+
+//
+// It looks like context is tied to modelName and path
+// If that is the case, what does it mean to save by path?
+// Do we base it on the most recently opened, the most recently
+// focused?
+// Maybe we cannot save by path but only save by widget.

+ 4 - 2
src/docmanager/index.ts

@@ -481,7 +481,7 @@ class DocumentManager {
       this._createWidget(path, opts, model, widgetName, widget, kernel);
     });
     installMessageFilter(widget, this);
-    Private.factoryProperty.set(widget, widgetName);
+    Private.widgetFactoryProperty.set(widget, widgetName);
     return widget;
   }
 
@@ -577,7 +577,9 @@ class DocumentManager {
    * @param newPath - The new path.
    */
   renameFile(oldPath: string, newPath: string): Promise<void> {
-    return this._contextManager.rename(oldPath, newPath);
+    // TODO: find the appropriate context.
+    //return this._contextManager.rename(id, newPath);
+    return void 0;
   }
 
   /**