| Index: pkg/analyzer/lib/src/generated/source.dart
|
| diff --git a/pkg/analyzer/lib/src/generated/source.dart b/pkg/analyzer/lib/src/generated/source.dart
|
| index 65e8f953af24d826d5aa0e57d648f2480745a3b1..fefdc7fe62da8a23fb9dcf4d1c41927c202c090d 100644
|
| --- a/pkg/analyzer/lib/src/generated/source.dart
|
| +++ b/pkg/analyzer/lib/src/generated/source.dart
|
| @@ -14,7 +14,8 @@ import 'package:analyzer/src/generated/java_core.dart';
|
| import 'package:analyzer/src/generated/java_engine.dart';
|
| import 'package:analyzer/src/generated/java_io.dart' show JavaFile;
|
| import 'package:analyzer/src/generated/sdk.dart' show DartSdk;
|
| -import 'package:analyzer/src/generated/source_io.dart' show FileBasedSource;
|
| +import 'package:analyzer/src/generated/source_io.dart'
|
| + show FileBasedSource, FileUriResolver, PackageUriResolver;
|
| import 'package:analyzer/task/model.dart';
|
| import 'package:package_config/packages.dart';
|
| import 'package:path/path.dart' as pathos;
|
| @@ -895,6 +896,20 @@ class UriKind extends Enum<UriKind> {
|
| }
|
| return null;
|
| }
|
| +
|
| + /**
|
| + * Return the URI kind corresponding to the given scheme string.
|
| + */
|
| + static UriKind fromScheme(String scheme) {
|
| + if (scheme == PackageUriResolver.PACKAGE_SCHEME) {
|
| + return UriKind.PACKAGE_URI;
|
| + } else if (scheme == DartUriResolver.DART_SCHEME) {
|
| + return UriKind.DART_URI;
|
| + } else if (scheme == FileUriResolver.FILE_SCHEME) {
|
| + return UriKind.FILE_URI;
|
| + }
|
| + return UriKind.FILE_URI;
|
| + }
|
| }
|
|
|
| /**
|
|
|