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

Side by Side Diff: pkg/analysis_server/test/services/completion/completion_test_util.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, 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 test.services.completion.util; 5 library test.services.completion.util;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analysis_server/src/protocol.dart' as protocol 9 import 'package:analysis_server/src/protocol.dart' as protocol
10 show Element, ElementKind; 10 show Element, ElementKind;
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 513
514 // If the unit has been resolved, then finish the completion 514 // If the unit has been resolved, then finish the completion
515 List<Source> libSourceList = context.getLibrariesContaining(testSource); 515 List<Source> libSourceList = context.getLibrariesContaining(testSource);
516 if (libSourceList.length > 0) { 516 if (libSourceList.length > 0) {
517 LibraryElement library = context.getLibraryElement(libSourceList[0]); 517 LibraryElement library = context.getLibraryElement(libSourceList[0]);
518 if (library != null) { 518 if (library != null) {
519 CompilationUnit unit = 519 CompilationUnit unit =
520 context.getResolvedCompilationUnit(testSource, library); 520 context.getResolvedCompilationUnit(testSource, library);
521 if (unit != null) { 521 if (unit != null) {
522 request.unit = unit; 522 request.unit = unit;
523 request.node =
524 new NodeLocator.con1(completionOffset).searchWithin(unit);
525 request.target = 523 request.target =
526 new CompletionTarget.forOffset(unit, completionOffset); 524 new CompletionTarget.forOffset(unit, completionOffset);
527 resolved = true; 525 resolved = true;
528 if (!fullAnalysis) { 526 if (!fullAnalysis) {
529 break; 527 break;
530 } 528 }
531 } 529 }
532 } 530 }
533 } 531 }
534 532
(...skipping 3204 matching lines...) Expand 10 before | Expand all | Expand 10 after
3739 assertNotSuggested('bar2'); 3737 assertNotSuggested('bar2');
3740 assertNotSuggested('_B'); 3738 assertNotSuggested('_B');
3741 assertSuggestLocalClass('Y'); 3739 assertSuggestLocalClass('Y');
3742 assertSuggestLocalClass('C'); 3740 assertSuggestLocalClass('C');
3743 assertSuggestLocalVariable('f', null); 3741 assertSuggestLocalVariable('f', null);
3744 assertNotSuggested('x'); 3742 assertNotSuggested('x');
3745 assertNotSuggested('e'); 3743 assertNotSuggested('e');
3746 }); 3744 });
3747 } 3745 }
3748 } 3746 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/test/completion_test.dart ('k') | pkg/analysis_server/test/services/completion/keyword_computer_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698