Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(155)

Unified Diff: pkg/analysis_server/lib/src/context_manager.dart

Issue 2382053002: Remove unused option in server API (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analysis_server/lib/src/analysis_server.dart ('k') | pkg/analysis_server/lib/src/socket_server.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/context_manager.dart
diff --git a/pkg/analysis_server/lib/src/context_manager.dart b/pkg/analysis_server/lib/src/context_manager.dart
index 66977c472fc347921240701911ff6560bff928c5..c1739b80b0e683464b4fc80c334665e432cae314 100644
--- a/pkg/analysis_server/lib/src/context_manager.dart
+++ b/pkg/analysis_server/lib/src/context_manager.dart
@@ -9,7 +9,6 @@ import 'dart:collection';
import 'dart:convert';
import 'dart:core';
-import 'package:analysis_server/src/analysis_server.dart';
import 'package:analyzer/exception/exception.dart';
import 'package:analyzer/file_system/file_system.dart';
import 'package:analyzer/instrumentation/instrumentation.dart';
@@ -17,10 +16,8 @@ import 'package:analyzer/plugin/options.dart';
import 'package:analyzer/plugin/resolver_provider.dart';
import 'package:analyzer/source/analysis_options_provider.dart';
import 'package:analyzer/source/config.dart';
-import 'package:analyzer/source/package_map_provider.dart';
import 'package:analyzer/source/package_map_resolver.dart';
import 'package:analyzer/source/path_filter.dart';
-import 'package:analyzer/source/pub_package_map_provider.dart';
import 'package:analyzer/source/sdk_ext.dart';
import 'package:analyzer/src/context/builder.dart';
import 'package:analyzer/src/context/context.dart' as context;
@@ -334,12 +331,6 @@ abstract class ContextManagerCallbacks {
void applyChangesToContext(Folder contextFolder, ChangeSet changeSet);
/**
- * Signals that the context manager has started to compute a package map (if
- * [computing] is `true`) or has finished (if [computing] is `false`).
- */
- void computingPackageMap(bool computing);
-
- /**
* Create and return a context builder that can be used to create a context
* for the files in the given [folder] when analyzed using the given [options].
*/
@@ -455,12 +446,8 @@ class ContextManagerImpl implements ContextManager {
final ResolverProvider packageResolverProvider;
/**
- * Provider which is used to determine the mapping from package name to
- * package folder.
+ * Provider of analysis options.
*/
- final PubPackageMapProvider _packageMapProvider;
-
- /// Provider of analysis options.
AnalysisOptionsProvider analysisOptionsProvider =
new AnalysisOptionsProvider();
@@ -506,7 +493,6 @@ class ContextManagerImpl implements ContextManager {
this.resourceProvider,
this.sdkManager,
this.packageResolverProvider,
- this._packageMapProvider,
this.analyzedFilesGlobs,
this._instrumentationService,
this.defaultContextOptions) {
@@ -983,35 +969,19 @@ class ContextManagerImpl implements ContextManager {
// resolve packages.
return new NoPackageFolderDisposition(packageRoot: packageRoot);
} else {
- PackageMapInfo packageMapInfo;
- callbacks.computingPackageMap(true);
- try {
- // Try .packages first.
- if (absolutePathContext.basename(packagespecFile.path) ==
- PACKAGE_SPEC_NAME) {
- Packages packages = _readPackagespec(packagespecFile);
- return new PackagesFileDisposition(packages);
- }
- if (packageResolverProvider != null) {
- UriResolver resolver = packageResolverProvider(folder);
- if (resolver != null) {
- return new CustomPackageResolverDisposition(resolver);
- }
- }
-
- ServerPerformanceStatistics.pub.makeCurrentWhile(() {
- packageMapInfo = _packageMapProvider.computePackageMap(folder);
- });
- } finally {
- callbacks.computingPackageMap(false);
- }
- for (String dependencyPath in packageMapInfo.dependencies) {
- addDependency(dependencyPath);
+ // Try .packages first.
+ if (absolutePathContext.basename(packagespecFile.path) ==
+ PACKAGE_SPEC_NAME) {
+ Packages packages = _readPackagespec(packagespecFile);
+ return new PackagesFileDisposition(packages);
}
- if (packageMapInfo.packageMap == null) {
- return new NoPackageFolderDisposition();
+ if (packageResolverProvider != null) {
+ UriResolver resolver = packageResolverProvider(folder);
+ if (resolver != null) {
+ return new CustomPackageResolverDisposition(resolver);
+ }
}
- return new PackageMapDisposition(packageMapInfo.packageMap);
+ return new NoPackageFolderDisposition();
}
}
« no previous file with comments | « pkg/analysis_server/lib/src/analysis_server.dart ('k') | pkg/analysis_server/lib/src/socket_server.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698