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

Unified Diff: pkg/analyzer_plugin/lib/utilities/navigation/navigation.dart

Issue 2953093002: Update the plugin API (Closed)
Patch Set: Update FixesRequest Created 3 years, 6 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
Index: pkg/analyzer_plugin/lib/utilities/navigation/navigation.dart
diff --git a/pkg/analyzer_plugin/lib/utilities/navigation/navigation.dart b/pkg/analyzer_plugin/lib/utilities/navigation/navigation.dart
index f70fda8fd12d1d10f952e79845eb68a0d32a1cfc..7205cc6654acf24e48e8aa6b588dcc8e373c76fe 100644
--- a/pkg/analyzer_plugin/lib/utilities/navigation/navigation.dart
+++ b/pkg/analyzer_plugin/lib/utilities/navigation/navigation.dart
@@ -12,6 +12,20 @@ import 'package:analyzer_plugin/src/utilities/navigation/navigation.dart';
import 'package:analyzer_plugin/utilities/generator.dart';
/**
+ * The information about a requested set of navigation information when
+ * computing navigation information in a `.dart` file.
+ *
+ * Clients may not extend, implement or mix-in this class.
+ */
+abstract class DartNavigationRequest implements NavigationRequest {
+ /**
+ * The analysis result for the file in which the navigation regions are being
+ * requested.
+ */
+ ResolveResult get result;
+}
+
+/**
* An object that [NavigationContributor]s use to record navigation regions.
*
* Clients may not extend, implement or mix-in this class.
@@ -74,8 +88,8 @@ class NavigationGenerator {
}
}
collector.createRegions();
- notifications.add(new AnalysisNavigationParams(request.result.path,
- collector.regions, collector.targets, collector.files)
+ notifications.add(new AnalysisNavigationParams(
+ request.path, collector.regions, collector.targets, collector.files)
.toNotification());
return new GeneratorResult(null, notifications);
}
@@ -123,13 +137,12 @@ abstract class NavigationRequest {
int get offset;
/**
- * Return the resource provider associated with this request.
+ * Return the path of the file in which navigation regions are being requested.
*/
- ResourceProvider get resourceProvider;
+ String get path;
/**
- * The analysis result for the file in which the navigation regions are being
- * requested.
+ * Return the resource provider associated with this request.
*/
- ResolveResult get result;
+ ResourceProvider get resourceProvider;
}
« no previous file with comments | « pkg/analyzer_plugin/lib/utilities/fixes/fixes.dart ('k') | pkg/analyzer_plugin/test/plugin/assist_mixin_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698