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

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

Issue 1054363003: replace request.node with request.target (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge Created 5 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
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/services/completion/keyword_computer.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/dart_completion_manager.dart
diff --git a/pkg/analysis_server/lib/src/services/completion/dart_completion_manager.dart b/pkg/analysis_server/lib/src/services/completion/dart_completion_manager.dart
index d5babf87f56b11545731d501b8b2cf74ac3cdf22..5dc1b793703b77f69f014af2e27fc1c390b08ada 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart_completion_manager.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart_completion_manager.dart
@@ -122,11 +122,10 @@ class DartCompletionManager extends CompletionManager {
return request.performance.logElapseTime('computeFast', () {
CompilationUnit unit = context.parseCompilationUnit(source);
request.unit = unit;
- request.node = new NodeLocator.con1(request.offset).searchWithin(unit);
request.target = new CompletionTarget.forOffset(unit, request.offset);
request.replacementOffset = request.offset;
request.replacementLength = 0;
- if (request.node == null) {
+ if (request.offset < 0 || request.offset > unit.end) {
sendResults(request, true);
return [];
}
@@ -173,7 +172,6 @@ class DartCompletionManager extends CompletionManager {
}
request.performance.logElapseTime('computeFull', () {
request.unit = unit;
- request.node = new NodeLocator.con1(request.offset).searchWithin(unit);
// TODO(paulberry): Do we need to invoke _ReplacementOffsetBuilder
// again?
request.target = new CompletionTarget.forOffset(unit, request.offset);
@@ -279,18 +277,8 @@ class DartCompletionRequest extends CompletionRequest {
CompilationUnit unit;
/**
- * The node in which the completion occurred. This node
- * may or may not be resolved when [DartCompletionComputer.computeFast]
- * is called but is resolved when [DartCompletionComputer.computeFull].
- */
- AstNode node;
-
- /**
* The completion target. This determines what part of the parse tree
* will receive the newly inserted text.
- *
- * TODO(paulberry) gradually transition code over to using this rather than
- * [node].
*/
CompletionTarget target;
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/services/completion/keyword_computer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698