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

Side by Side Diff: pkg/analysis_server/lib/src/services/completion/invocation_computer.dart

Issue 558893002: add code completion declared and return types (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge and remove reference to analysis engine Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library services.completion.computer.dart.invocation; 5 library services.completion.computer.dart.invocation;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analysis_server/src/services/completion/dart_completion_manager. dart'; 9 import 'package:analysis_server/src/services/completion/dart_completion_manager. dart';
10 import 'package:analysis_server/src/services/completion/suggestion_builder.dart' ; 10 import 'package:analysis_server/src/services/completion/suggestion_builder.dart' ;
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 if (directive.prefix != null) { 95 if (directive.prefix != null) {
96 if (directive.prefix.name == element.name) { 96 if (directive.prefix.name == element.name) {
97 // Suggest elements from the imported library 97 // Suggest elements from the imported library
98 LibraryElement library = directive.uriElement; 98 LibraryElement library = directive.uriElement;
99 LibraryElementSuggestionBuilder.suggestionsFor(request, library); 99 LibraryElementSuggestionBuilder.suggestionsFor(request, library);
100 modified = true; 100 modified = true;
101 } 101 }
102 } 102 }
103 } 103 }
104 }); 104 });
105
106 element.importedLibraries.forEach((LibraryElement library) {
107 modified = true;
108 library.accept(new ClassElementSuggestionBuilder(request));
109 });
110 return new Future.value(modified); 105 return new Future.value(modified);
111 } 106 }
112 107
113 @override 108 @override
114 Future<bool> visitVariableElement(VariableElement element) { 109 Future<bool> visitVariableElement(VariableElement element) {
115 DartType type = element.type; 110 DartType type = element.type;
116 if (type != null) { 111 if (type != null) {
117 Element typeElement = type.element; 112 ClassElementSuggestionBuilder.suggestionsFor(request, type.element);
118 ClassElementSuggestionBuilder.suggestionsFor(request, typeElement);
119 } 113 }
120 return new Future.value(true); 114 return new Future.value(true);
121 } 115 }
122 } 116 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698