Skip to content

Commit 505e236

Browse files
bwilkersonCommit Queue
authored andcommitted
Migrate one file in plugin_server
There are two other files that need to be migrated, but the unmigrated portions are being used by other unmigrated files, so they can't be migrated yet. Change-Id: I1f0d029c16734b1599783149ade5a0d6ec29d349 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/390924 Reviewed-by: Samuel Rawlins <[email protected]> Commit-Queue: Brian Wilkerson <[email protected]>
1 parent 4232c45 commit 505e236

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

pkg/analysis_server_plugin/analyzer_use_new_elements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ lib/src/correction/dart_change_workspace.dart
99
lib/src/correction/fix_generators.dart
1010
lib/src/correction/fix_in_file_processor.dart
1111
lib/src/correction/fix_processor.dart
12+
lib/src/plugin_server.dart
1213
lib/src/registry.dart
1314
lib/src/utilities/selection.dart
1415
test/edit/correction_utils_test.dart

pkg/analysis_server_plugin/lib/src/plugin_server.dart

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,8 @@ class PluginServer {
220220
return [];
221221
}
222222
var listener = RecordingErrorListener();
223-
var errorReporter = ErrorReporter(listener, result.libraryElement.source);
223+
var errorReporter =
224+
ErrorReporter(listener, result.libraryElement2.firstFragment.source);
224225

225226
var currentUnit = LintRuleUnitContext(
226227
file: result.file,
@@ -244,8 +245,8 @@ class PluginServer {
244245
var context = LinterContextWithResolvedResults(
245246
allUnits,
246247
currentUnit,
247-
libraryResult.element.typeProvider,
248-
libraryResult.element.typeSystem as TypeSystemImpl,
248+
libraryResult.element2.typeProvider,
249+
libraryResult.element2.typeSystem as TypeSystemImpl,
249250
(analysisContext.currentSession as AnalysisSessionImpl)
250251
.inheritanceManager,
251252
// TODO(srawlins): Support 'package' parameter.

0 commit comments

Comments
 (0)