| Index: pkg/analyzer/lib/src/dart/analysis/search.dart
|
| diff --git a/pkg/analyzer/lib/src/dart/analysis/search.dart b/pkg/analyzer/lib/src/dart/analysis/search.dart
|
| index 21b662d217bedd80717137b556e08daf82f11869..907ad15af4a8a73d30f532529998476e4f727659 100644
|
| --- a/pkg/analyzer/lib/src/dart/analysis/search.dart
|
| +++ b/pkg/analyzer/lib/src/dart/analysis/search.dart
|
| @@ -74,6 +74,22 @@ class Search {
|
| return const <SearchResult>[];
|
| }
|
|
|
| + /**
|
| + * Returns subtypes of the given [type].
|
| + */
|
| + Future<List<SearchResult>> subTypes(ClassElement type) async {
|
| + if (type == null) {
|
| + return const <SearchResult>[];
|
| + }
|
| + List<SearchResult> results = <SearchResult>[];
|
| + await _addResults(results, type, {
|
| + IndexRelationKind.IS_EXTENDED_BY: SearchResultKind.REFERENCE,
|
| + IndexRelationKind.IS_MIXED_IN_BY: SearchResultKind.REFERENCE,
|
| + IndexRelationKind.IS_IMPLEMENTED_BY: SearchResultKind.REFERENCE
|
| + });
|
| + return results;
|
| + }
|
| +
|
| Future<Null> _addResults(List<SearchResult> results, Element element,
|
| Map<IndexRelationKind, SearchResultKind> relationToResultKind) async {
|
| String path = element.source.fullName;
|
|
|