Sfoglia il codice sorgente

Rename editorFinder to debuggerSources

Jeremy Tuloup 4 anni fa
parent
commit
60afa39887
3 ha cambiato i file con 17 aggiunte e 17 eliminazioni
  1. 6 6
      src/handlers/tracker.ts
  2. 5 5
      src/index.ts
  3. 6 6
      src/service.ts

+ 6 - 6
src/handlers/tracker.ts

@@ -38,7 +38,7 @@ export class TrackerHandler implements IDisposable {
       editorServices: options.editorServices
     });
 
-    this._editorFinder = options.editorFinder;
+    this._debuggerSources = options.debuggerSources;
 
     const { model } = this._debuggerService;
 
@@ -89,7 +89,7 @@ export class TrackerHandler implements IDisposable {
     frame: CallstackModel.IFrame
   ): void {
     each(
-      this._editorFinder.find({
+      this._debuggerSources.find({
         focus: true,
         kernel: this._debuggerService.session.connection.kernel.name,
         path: this._debuggerService.session?.connection?.path,
@@ -117,7 +117,7 @@ export class TrackerHandler implements IDisposable {
       return;
     }
     const { content, mimeType, path } = source;
-    const results = this._editorFinder.find({
+    const results = this._debuggerSources.find({
       focus: true,
       kernel: this._debuggerService.session.connection.kernel.name,
       path: this._debuggerService.session.connection.path,
@@ -139,7 +139,7 @@ export class TrackerHandler implements IDisposable {
     });
     editorWrapper.disposed.connect(() => editorHandler.dispose());
 
-    this._editorFinder.open({
+    this._debuggerSources.open({
       label: PathExt.basename(path),
       caption: path,
       editorWrapper
@@ -152,7 +152,7 @@ export class TrackerHandler implements IDisposable {
   }
 
   private _debuggerService: IDebugger;
-  private _editorFinder: IDebugger.ISources | null;
+  private _debuggerSources: IDebugger.ISources | null;
   private _readOnlyEditorFactory: ReadOnlyEditorFactory;
 }
 
@@ -172,7 +172,7 @@ export namespace TrackerHandler {
     /**
      * The editor finder.
      */
-    editorFinder: IDebugger.ISources;
+    debuggerSources: IDebugger.ISources;
 
     /**
      * The editor services.

+ 5 - 5
src/index.ts

@@ -76,7 +76,7 @@ const consoles: JupyterFrontEndPlugin<void> = {
   activate: (
     app: JupyterFrontEnd,
     debug: IDebugger,
-    editorFinder: IDebugger.ISources,
+    debuggerSources: IDebugger.ISources,
     consoleTracker: IConsoleTracker,
     labShell: ILabShell
   ) => {
@@ -239,12 +239,12 @@ const tracker: JupyterFrontEndPlugin<void> = {
     _,
     debug: IDebugger,
     editorServices: IEditorServices,
-    editorFinder: IDebugger.ISources
+    debuggerSources: IDebugger.ISources
   ) => {
     new TrackerHandler({
       editorServices,
       debuggerService: debug,
-      editorFinder
+      debuggerSources
     });
   }
 };
@@ -260,11 +260,11 @@ const service: JupyterFrontEndPlugin<IDebugger> = {
   activate: (
     app: JupyterFrontEnd,
     config: IDebugger.IConfig,
-    editorFinder: IDebugger.ISources
+    debuggerSources: IDebugger.ISources
   ) =>
     new Debugger.Service({
       config,
-      editorFinder,
+      debuggerSources,
       specsManager: app.serviceManager.kernelspecs
     })
 };

+ 6 - 6
src/service.ts

@@ -38,7 +38,7 @@ export class DebuggerService implements IDebugger, IDisposable {
     this._session = null;
     this._specsManager = options.specsManager;
     this._model = new Debugger.Model();
-    this._editorFinder = options.editorFinder;
+    this._debuggerSources = options.debuggerSources;
   }
 
   /**
@@ -228,7 +228,7 @@ export class DebuggerService implements IDebugger, IDisposable {
       this._model.title = this.isStarted ? this.session?.connection?.name : '-';
     }
 
-    if (this._editorFinder) {
+    if (this._debuggerSources) {
       const filtered = this._filterBreakpoints(breakpoints);
       this._model.breakpoints.restoreBreakpoints(filtered);
     } else {
@@ -321,7 +321,7 @@ export class DebuggerService implements IDebugger, IDisposable {
     const remoteBreakpoints = this._mapBreakpoints(state.body.breakpoints);
 
     // Set the local copy of breakpoints to reflect only editors that exist.
-    if (this._editorFinder) {
+    if (this._debuggerSources) {
       const filtered = this._filterBreakpoints(remoteBreakpoints);
       this._model.breakpoints.restoreBreakpoints(filtered);
     } else {
@@ -408,7 +408,7 @@ export class DebuggerService implements IDebugger, IDisposable {
       const [id, list] = collection;
       list.forEach(() => {
         each(
-          this._editorFinder.find({
+          this._debuggerSources.find({
             focus: false,
             kernel: this.session.connection.kernel.name,
             path: this._session.connection.path,
@@ -639,7 +639,7 @@ export class DebuggerService implements IDebugger, IDisposable {
   }
 
   private _config: IDebugger.IConfig;
-  private _editorFinder: IDebugger.ISources | null;
+  private _debuggerSources: IDebugger.ISources | null;
   private _eventMessage = new Signal<IDebugger, IDebugger.ISession.Event>(this);
   private _isDisposed = false;
   private _model: IDebugger.IModel;
@@ -664,7 +664,7 @@ export namespace DebuggerService {
     /**
      * The editor finder instance.
      */
-    editorFinder?: IDebugger.ISources;
+    debuggerSources?: IDebugger.ISources;
 
     /**
      * The kernel specs manager.