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

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

Issue 1060713005: rename completion computer to contributor (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge Created 5 years, 8 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.combinator; 5 library services.completion.contributor.dart.combinator;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analysis_server/src/protocol_server.dart' 9 import 'package:analysis_server/src/protocol_server.dart'
10 hide Element, ElementKind; 10 hide Element, ElementKind;
11 import 'package:analysis_server/src/services/completion/dart_completion_manager. dart'; 11 import 'package:analysis_server/src/services/completion/dart_completion_manager. dart';
12 import 'package:analysis_server/src/services/completion/suggestion_builder.dart' ; 12 import 'package:analysis_server/src/services/completion/suggestion_builder.dart' ;
13 import 'package:analyzer/src/generated/ast.dart'; 13 import 'package:analyzer/src/generated/ast.dart';
14 import 'package:analyzer/src/generated/element.dart'; 14 import 'package:analyzer/src/generated/element.dart';
15 15
16 /** 16 /**
17 * A computer for calculating `completion.getSuggestions` request results 17 * A contributor for calculating `completion.getSuggestions` request results
18 * for the import combinators show and hide. 18 * for the import combinators show and hide.
19 */ 19 */
20 class CombinatorComputer extends DartCompletionComputer { 20 class CombinatorContributor extends DartCompletionContributor {
21 _CombinatorSuggestionBuilder builder; 21 _CombinatorSuggestionBuilder builder;
22 22
23 @override 23 @override
24 bool computeFast(DartCompletionRequest request) { 24 bool computeFast(DartCompletionRequest request) {
25 builder = request.target.containingNode 25 builder = request.target.containingNode
26 .accept(new _CombinatorAstVisitor(request)); 26 .accept(new _CombinatorAstVisitor(request));
27 return builder == null; 27 return builder == null;
28 } 28 }
29 29
30 @override 30 @override
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 var directive = node.getAncestor((parent) => parent is NamespaceDirective); 73 var directive = node.getAncestor((parent) => parent is NamespaceDirective);
74 if (directive is NamespaceDirective) { 74 if (directive is NamespaceDirective) {
75 LibraryElement library = directive.uriElement; 75 LibraryElement library = directive.uriElement;
76 if (library != null) { 76 if (library != null) {
77 library.visitChildren(this); 77 library.visitChildren(this);
78 } 78 }
79 } 79 }
80 return new Future.value(false); 80 return new Future.value(false);
81 } 81 }
82 } 82 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698