| OLD | NEW |
| 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 import 'dart:async'; | 5 import 'dart:async'; |
| 6 | 6 |
| 7 import 'package:analysis_server/plugin/edit/assist/assist_core.dart'; | 7 import 'package:analysis_server/plugin/edit/assist/assist_core.dart'; |
| 8 import 'package:analysis_server/plugin/edit/assist/assist_dart.dart'; | 8 import 'package:analysis_server/plugin/edit/assist/assist_dart.dart'; |
| 9 import 'package:analysis_server/protocol/protocol_generated.dart'; | 9 import 'package:analysis_server/protocol/protocol_generated.dart'; |
| 10 import 'package:analysis_server/src/plugin/server_plugin.dart'; | 10 import 'package:analysis_server/src/plugin/server_plugin.dart'; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 class AssistProcessorTest extends AbstractSingleUnitTest { | 38 class AssistProcessorTest extends AbstractSingleUnitTest { |
| 39 int offset; | 39 int offset; |
| 40 int length; | 40 int length; |
| 41 | 41 |
| 42 ServerPlugin plugin; | 42 ServerPlugin plugin; |
| 43 Assist assist; | 43 Assist assist; |
| 44 SourceChange change; | 44 SourceChange change; |
| 45 String resultCode; | 45 String resultCode; |
| 46 LinkedEditGroup linkedPositionGroup; | 46 LinkedEditGroup linkedPositionGroup; |
| 47 | 47 |
| 48 @override | |
| 49 bool get enableNewAnalysisDriver => true; | |
| 50 | |
| 51 /** | 48 /** |
| 52 * Asserts that there is an [Assist] of the given [kind] at [offset] which | 49 * Asserts that there is an [Assist] of the given [kind] at [offset] which |
| 53 * produces the [expected] code when applied to [testCode]. | 50 * produces the [expected] code when applied to [testCode]. |
| 54 */ | 51 */ |
| 55 assertHasAssist(AssistKind kind, String expected) async { | 52 assertHasAssist(AssistKind kind, String expected) async { |
| 56 assist = await _assertHasAssist(kind); | 53 assist = await _assertHasAssist(kind); |
| 57 change = assist.change; | 54 change = assist.change; |
| 58 // apply to "file" | 55 // apply to "file" |
| 59 List<SourceFileEdit> fileEdits = change.edits; | 56 List<SourceFileEdit> fileEdits = change.edits; |
| 60 expect(fileEdits, hasLength(1)); | 57 expect(fileEdits, hasLength(1)); |
| (...skipping 4674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4735 | 4732 |
| 4736 @override | 4733 @override |
| 4737 final AstProvider astProvider; | 4734 final AstProvider astProvider; |
| 4738 | 4735 |
| 4739 @override | 4736 @override |
| 4740 final CompilationUnit unit; | 4737 final CompilationUnit unit; |
| 4741 | 4738 |
| 4742 _DartAssistContextForValues(this.source, this.selectionOffset, | 4739 _DartAssistContextForValues(this.source, this.selectionOffset, |
| 4743 this.selectionLength, this.analysisContext, this.astProvider, this.unit); | 4740 this.selectionLength, this.analysisContext, this.astProvider, this.unit); |
| 4744 } | 4741 } |
| OLD | NEW |