| Index: pkg/analyzer/lib/src/index/index_contributor.dart
|
| diff --git a/pkg/analyzer/lib/src/index/index.dart b/pkg/analyzer/lib/src/index/index_contributor.dart
|
| similarity index 99%
|
| rename from pkg/analyzer/lib/src/index/index.dart
|
| rename to pkg/analyzer/lib/src/index/index_contributor.dart
|
| index db0e350b52bf7cbf94bc70ecd3dc267247434dd1..4020293ce09a654e97c4aaab4746bc35013910ca 100644
|
| --- a/pkg/analyzer/lib/src/index/index.dart
|
| +++ b/pkg/analyzer/lib/src/index/index_contributor.dart
|
| @@ -5,7 +5,7 @@
|
| // This code was auto-generated, is not intended to be edited, and is subject to
|
| // significant change. Please see the README file for more information.
|
|
|
| -library engine.src.index;
|
| +library engine.src.index_contributor;
|
|
|
| import 'dart:collection' show Queue;
|
|
|
| @@ -27,11 +27,21 @@ import 'package:analyzer/src/generated/source.dart';
|
| */
|
| void indexDartUnit(IndexStore store, AnalysisContext context,
|
| CompilationUnit unit) {
|
| + // check unit
|
| + if (unit == null) {
|
| + return;
|
| + }
|
| + // prepare unit element
|
| CompilationUnitElement unitElement = unit.element;
|
| + if (unitElement == null) {
|
| + return;
|
| + }
|
| + // about to index
|
| bool mayIndex = store.aboutToIndexDart(context, unitElement);
|
| if (!mayIndex) {
|
| return;
|
| }
|
| + // do index
|
| unit.accept(new _IndexContributor(store));
|
| unit.accept(new _AngularDartIndexContributor(store));
|
| store.doneIndex();
|
| @@ -43,11 +53,21 @@ void indexDartUnit(IndexStore store, AnalysisContext context,
|
| */
|
| void indexHtmlUnit(IndexStore store, AnalysisContext context, ht.HtmlUnit unit)
|
| {
|
| + // check unit
|
| + if (unit == null) {
|
| + return;
|
| + }
|
| + // prepare unit element
|
| HtmlElement unitElement = unit.element;
|
| + if (unitElement == null) {
|
| + return;
|
| + }
|
| + // about to index
|
| bool mayIndex = store.aboutToIndexHtml(context, unitElement);
|
| if (!mayIndex) {
|
| return;
|
| }
|
| + // do index
|
| unit.accept(new _AngularHtmlIndexContributor(store));
|
| store.doneIndex();
|
| }
|
|
|