Ver código fonte

Remove unused instance tracker method.

Afshin Darian 8 anos atrás
pai
commit
0df30dff53
1 arquivos alterados com 0 adições e 26 exclusões
  1. 0 26
      src/common/instancetracker.ts

+ 0 - 26
src/common/instancetracker.ts

@@ -70,13 +70,6 @@ interface IInstanceTracker<T extends Widget> extends IDisposable {
    */
   readonly widgetAdded: ISignal<this, T>;
 
-  /**
-   * Get a widget with a specified ID that is held by the tracker.
-   *
-   * @param - id The ID string of the widget.
-   */
-  getWidgetById(id: string): T | null;
-
   /**
    * Iterate through each widget in the tracker.
    *
@@ -230,25 +223,6 @@ class InstanceTracker<T extends Widget> implements IInstanceTracker<T>, IDisposa
     tracker.dispose();
   }
 
-  /**
-   * Get a widget with a specified ID that is held by the tracker.
-   *
-   * @param - id The ID string of the widget.
-   */
-  getWidgetById(id: string): T | null {
-    let result: T = null;
-    each(this._tracker.widgets, widget => {
-      // If a result has already been found, short circuit.
-      if (result) {
-        return;
-      }
-      if (widget.id === id) {
-        result = widget;
-      }
-    });
-    return result;
-  }
-
   /**
    * Find the first widget in the tracker that satisfies a filter function.
    *