-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change-Id: Id8505d5ad6f0f3d1c5289ab12d4932c6174f72e5 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153623 Reviewed-by: Brian Wilkerson <[email protected]> Commit-Queue: Phil Quitslund <[email protected]>
- Loading branch information
1 parent
7a1d6a9
commit 3d5df93
Showing
14 changed files
with
536 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file | ||
// for details. All rights reserved. Use of this source code is governed by a | ||
// BSD-style license that can be found in the LICENSE file. | ||
|
||
import 'package:analysis_server/protocol/protocol.dart'; | ||
import 'package:analysis_server/protocol/protocol_generated.dart'; | ||
import 'package:analysis_server/src/analysis_server.dart'; | ||
|
||
class EditBulkFixes { | ||
final AnalysisServer server; | ||
final Request request; | ||
|
||
EditBulkFixes(this.server, this.request); | ||
|
||
Future<Response> compute() async { | ||
// todo (pq): implemennt | ||
return EditBulkFixesResult([]).toResponse(request.id); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
pkg/analysis_server/test/integration/edit/bulk_fixes_test.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file | ||
// for details. All rights reserved. Use of this source code is governed by a | ||
// BSD-style license that can be found in the LICENSE file. | ||
|
||
import 'package:test/test.dart'; | ||
import 'package:test_reflective_loader/test_reflective_loader.dart'; | ||
|
||
import '../support/integration_tests.dart'; | ||
|
||
void main() { | ||
defineReflectiveSuite(() { | ||
defineReflectiveTests(BulkFixesTest); | ||
}); | ||
} | ||
|
||
@reflectiveTest | ||
class BulkFixesTest extends AbstractAnalysisServerIntegrationTest { | ||
void setupTarget() { | ||
writeFile(sourcePath('test.dart'), ''' | ||
class A { | ||
void f() {} | ||
} | ||
class B extends A { | ||
void f() { } | ||
} | ||
'''); | ||
standardAnalysisSetup(); | ||
} | ||
|
||
@failingTest | ||
Future<void> test_bulk_fix_override() async { | ||
setupTarget(); | ||
|
||
var result = await sendEditBulkFixes([sourceDirectory.path]); | ||
expect(result.edits.length, 1); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.