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

Unified Diff: pkg/analysis_server/lib/src/services/completion/dart/arglist_contributor.dart

Issue 2795743002: Add context information to driver and add hooks for plugin management (Closed)
Patch Set: Created 3 years, 9 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/analysis_server/lib/src/services/completion/dart/arglist_contributor.dart
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/arglist_contributor.dart b/pkg/analysis_server/lib/src/services/completion/dart/arglist_contributor.dart
index 6eb3bbe89f40d7d7e1d1194844d34f7ff59969f9..579b7b8662c16a1b621dddba7de8b6008a459b3e 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/arglist_contributor.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/arglist_contributor.dart
@@ -286,19 +286,6 @@ class ArgListContributor extends DartCompletionContributor {
}
}
- String _getDefaultValue(ParameterElement param, IdeOptions options) {
- if (options?.generateFlutterWidgetChildrenBoilerPlate == true) {
- Element element = param.enclosingElement;
- if (element is ConstructorElement) {
- if (isFlutterWidget(element.enclosingElement) &&
- param.name == 'children') {
- return getDefaultStringParameterValue(param);
- }
- }
- }
- return null;
- }
-
void _addSuggestions(Iterable<ParameterElement> parameters) {
if (parameters == null || parameters.length == 0) {
return;
@@ -322,6 +309,19 @@ class ArgListContributor extends DartCompletionContributor {
}
}
+ String _getDefaultValue(ParameterElement param, IdeOptions options) {
+ if (options?.generateFlutterWidgetChildrenBoilerPlate == true) {
+ Element element = param.enclosingElement;
+ if (element is ConstructorElement) {
+ if (isFlutterWidget(element.enclosingElement) &&
+ param.name == 'children') {
+ return getDefaultStringParameterValue(param);
+ }
+ }
+ }
+ return null;
+ }
+
/**
* If the given [comment] is not `null`, fill the [suggestion] documentation
* fields.
« no previous file with comments | « pkg/analysis_server/lib/src/plugin/plugin_watcher.dart ('k') | pkg/analysis_server/test/abstract_context.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698