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

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

Issue 689433003: add class type alias suggestions (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge Created 6 years, 2 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 | « no previous file | pkg/analysis_server/test/services/completion/completion_test_util.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/services/completion/local_computer.dart
diff --git a/pkg/analysis_server/lib/src/services/completion/local_computer.dart b/pkg/analysis_server/lib/src/services/completion/local_computer.dart
index e2e81af105449c49212838b4ee068f87f490c310..8e0ba88f15180cba18976b9dafbb6cb74949ec25 100644
--- a/pkg/analysis_server/lib/src/services/completion/local_computer.dart
+++ b/pkg/analysis_server/lib/src/services/completion/local_computer.dart
@@ -133,11 +133,20 @@ class _LocalVisitor extends GeneralizingAstVisitor<dynamic> {
} else if (declaration is TopLevelVariableDeclaration) {
_addTopLevelVarSuggestions(declaration.variables);
} else if (declaration is ClassTypeAlias) {
- _addSuggestion(
+ CompletionSuggestion suggestion = _addSuggestion(
declaration.name,
CompletionSuggestionKind.CLASS_ALIAS,
null,
null);
+ if (suggestion != null) {
+ suggestion.element = _createElement(
+ protocol.ElementKind.CLASS_TYPE_ALIAS,
+ declaration.name,
+ null,
+ NO_RETURN_TYPE,
+ true,
+ _isDeprecated(declaration.metadata));
+ }
} else if (declaration is FunctionTypeAlias) {
CompletionSuggestion suggestion = _addSuggestion(
declaration.name,
« no previous file with comments | « no previous file | pkg/analysis_server/test/services/completion/completion_test_util.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698