mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 00:13:50 +00:00
Fix plugin start up to work with OverlayResourceProvider
Change-Id: I9444f6787b9a549f112b997a6173abf12e6b110a Reviewed-on: https://dart-review.googlesource.com/c/88860 Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
This commit is contained in:
parent
0b0704c7c4
commit
aeb7fccd5b
|
@ -49,6 +49,7 @@ import 'package:analyzer/dart/analysis/results.dart';
|
|||
import 'package:analyzer/dart/ast/ast.dart';
|
||||
import 'package:analyzer/exception/exception.dart';
|
||||
import 'package:analyzer/file_system/file_system.dart';
|
||||
import 'package:analyzer/file_system/overlay_file_system.dart';
|
||||
import 'package:analyzer/file_system/physical_file_system.dart';
|
||||
import 'package:analyzer/instrumentation/instrumentation.dart';
|
||||
import 'package:analyzer/src/context/builder.dart';
|
||||
|
@ -657,9 +658,12 @@ class AnalysisServer extends AbstractAnalysisServer {
|
|||
/// Return the path to the location of the byte store on disk, or `null` if
|
||||
/// there is no on-disk byte store.
|
||||
String _getByteStorePath() {
|
||||
if (resourceProvider is PhysicalResourceProvider) {
|
||||
Folder stateLocation =
|
||||
resourceProvider.getStateLocation('.analysis-driver');
|
||||
ResourceProvider provider = resourceProvider;
|
||||
if (provider is OverlayResourceProvider) {
|
||||
provider = (provider as OverlayResourceProvider).baseProvider;
|
||||
}
|
||||
if (provider is PhysicalResourceProvider) {
|
||||
Folder stateLocation = provider.getStateLocation('.analysis-driver');
|
||||
if (stateLocation != null) {
|
||||
return stateLocation.path;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue