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

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

Issue 2565633002: Reorganize InheritedRefenenceContributor to serve angular completion (Closed)
Patch Set: Fix bad merge. Tests passing. Created 4 years 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
« no previous file with comments | « pkg/analysis_server/lib/src/services/completion/dart/inherited_reference_contributor.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.dart.optype; 5 library services.completion.dart.optype;
6 6
7 import 'package:analysis_server/src/protocol_server.dart' hide Element; 7 import 'package:analysis_server/src/protocol_server.dart' hide Element;
8 import 'package:analysis_server/src/provisional/completion/dart/completion_dart. dart'; 8 import 'package:analysis_server/src/provisional/completion/dart/completion_dart. dart';
9 import 'package:analysis_server/src/provisional/completion/dart/completion_targe t.dart'; 9 import 'package:analysis_server/src/provisional/completion/dart/completion_targe t.dart';
10 import 'package:analyzer/dart/ast/ast.dart'; 10 import 'package:analyzer/dart/ast/ast.dart';
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 /** 128 /**
129 * Indicate whether only type names should be suggested 129 * Indicate whether only type names should be suggested
130 */ 130 */
131 bool get includeOnlyNamedArgumentSuggestions => 131 bool get includeOnlyNamedArgumentSuggestions =>
132 includeNamedArgumentSuggestions && 132 includeNamedArgumentSuggestions &&
133 !includeTypeNameSuggestions && 133 !includeTypeNameSuggestions &&
134 !includeReturnValueSuggestions && 134 !includeReturnValueSuggestions &&
135 !includeVoidReturnSuggestions; 135 !includeVoidReturnSuggestions;
136 136
137 /** 137 /**
138 * Return `true` if free standing identifiers should be suggested
139 */
140 bool get includeIdentifiers {
141 return !isPrefixed &&
142 (includeReturnValueSuggestions ||
143 includeTypeNameSuggestions ||
144 includeVoidReturnSuggestions ||
145 includeConstructorSuggestions);
146 }
147
148 /**
138 * Indicate whether only type names should be suggested 149 * Indicate whether only type names should be suggested
139 */ 150 */
140 bool get includeOnlyTypeNameSuggestions => 151 bool get includeOnlyTypeNameSuggestions =>
141 includeTypeNameSuggestions && 152 includeTypeNameSuggestions &&
142 !includeNamedArgumentSuggestions && 153 !includeNamedArgumentSuggestions &&
143 !includeReturnValueSuggestions && 154 !includeReturnValueSuggestions &&
144 !includeVoidReturnSuggestions; 155 !includeVoidReturnSuggestions;
145 } 156 }
146 157
147 class _OpTypeAstVisitor extends GeneralizingAstVisitor { 158 class _OpTypeAstVisitor extends GeneralizingAstVisitor {
(...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after
896 } 907 }
897 908
898 bool _isEntityPrevTokenSynthetic() { 909 bool _isEntityPrevTokenSynthetic() {
899 Object entity = this.entity; 910 Object entity = this.entity;
900 if (entity is AstNode && entity.beginToken.previous?.isSynthetic ?? false) { 911 if (entity is AstNode && entity.beginToken.previous?.isSynthetic ?? false) {
901 return true; 912 return true;
902 } 913 }
903 return false; 914 return false;
904 } 915 }
905 } 916 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/src/services/completion/dart/inherited_reference_contributor.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698