Remove ContextManagerImpl.createSourceInContext()

Change-Id: I58bfa95d0cbddb96f79043b854f398602420268d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/186801
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
diff --git a/pkg/analysis_server/lib/src/context_manager.dart b/pkg/analysis_server/lib/src/context_manager.dart
index 0de59b9..0013292 100644
--- a/pkg/analysis_server/lib/src/context_manager.dart
+++ b/pkg/analysis_server/lib/src/context_manager.dart
@@ -658,19 +658,6 @@
       bazelSubscriptions[folder] = _BazelWorkspaceSubscription(subscription);
     }
   }
-
-  /// Create and return a source representing the given [file] within the given
-  /// [driver].
-  static Source createSourceInContext(AnalysisDriver driver, File file) {
-    // TODO(brianwilkerson) Optimize this, by allowing support for source
-    // factories to restore URI's from a file path rather than a source.
-    var source = file.createSource();
-    if (driver == null) {
-      return source;
-    }
-    var uri = driver.sourceFactory.restoreUri(source);
-    return file.createSource(uri);
-  }
 }
 
 /// A watcher with subscription used to detect changes to some file.