| Index: pkg/analyzer/lib/src/generated/index.dart
|
| diff --git a/pkg/analyzer/lib/src/generated/index.dart b/pkg/analyzer/lib/src/generated/index.dart
|
| index 9987a651d54e60f0789812e931059235d9710878..7d60cd87bab7bd7d2c6f680a2090d9e75b6f4175 100644
|
| --- a/pkg/analyzer/lib/src/generated/index.dart
|
| +++ b/pkg/analyzer/lib/src/generated/index.dart
|
| @@ -26,17 +26,17 @@ class RemoveSourceOperation implements IndexOperation {
|
| /**
|
| * The index store against which this operation is being run.
|
| */
|
| - final IndexStore _indexStore;
|
| + IndexStore _indexStore;
|
|
|
| /**
|
| * The context in which source being removed.
|
| */
|
| - final AnalysisContext _context;
|
| + AnalysisContext _context;
|
|
|
| /**
|
| * The source being removed.
|
| */
|
| - final Source source;
|
| + Source source;
|
|
|
| /**
|
| * Initialize a newly created operation that will remove the specified resource.
|
| @@ -45,7 +45,11 @@ class RemoveSourceOperation implements IndexOperation {
|
| * @param context the [AnalysisContext] to remove source in
|
| * @param source the [Source] to remove from index
|
| */
|
| - RemoveSourceOperation(this._indexStore, this._context, this.source);
|
| + RemoveSourceOperation(IndexStore indexStore, AnalysisContext context, Source source) {
|
| + this._indexStore = indexStore;
|
| + this._context = context;
|
| + this.source = source;
|
| + }
|
|
|
| @override
|
| bool get isQuery => false;
|
| @@ -532,11 +536,14 @@ class MemoryIndexStoreImpl implements MemoryIndexStore {
|
| }
|
|
|
| class MemoryIndexStoreImpl_ElementRelationKey {
|
| - final Element _element;
|
| + Element _element;
|
|
|
| - final Relationship _relationship;
|
| + Relationship _relationship;
|
|
|
| - MemoryIndexStoreImpl_ElementRelationKey(this._element, this._relationship);
|
| + MemoryIndexStoreImpl_ElementRelationKey(Element element, Relationship relationship) {
|
| + this._element = element;
|
| + this._relationship = relationship;
|
| + }
|
|
|
| @override
|
| bool operator ==(Object obj) {
|
| @@ -558,11 +565,14 @@ class MemoryIndexStoreImpl_ElementRelationKey {
|
| }
|
|
|
| class MemoryIndexStoreImpl_Source2 {
|
| - final Source _librarySource;
|
| + Source _librarySource;
|
|
|
| - final Source _unitSource;
|
| + Source _unitSource;
|
|
|
| - MemoryIndexStoreImpl_Source2(this._librarySource, this._unitSource);
|
| + MemoryIndexStoreImpl_Source2(Source librarySource, Source unitSource) {
|
| + this._librarySource = librarySource;
|
| + this._unitSource = unitSource;
|
| + }
|
|
|
| @override
|
| bool operator ==(Object obj) {
|
| @@ -591,17 +601,17 @@ class IndexUnitOperation implements IndexOperation {
|
| /**
|
| * The index store against which this operation is being run.
|
| */
|
| - final IndexStore _indexStore;
|
| + IndexStore _indexStore;
|
|
|
| /**
|
| * The context in which compilation unit was resolved.
|
| */
|
| - final AnalysisContext _context;
|
| + AnalysisContext _context;
|
|
|
| /**
|
| * The compilation unit being indexed.
|
| */
|
| - final CompilationUnit unit;
|
| + CompilationUnit unit;
|
|
|
| /**
|
| * The element of the compilation unit being indexed.
|
| @@ -620,7 +630,10 @@ class IndexUnitOperation implements IndexOperation {
|
| * @param context the context in which compilation unit was resolved
|
| * @param unit the fully resolved AST structure
|
| */
|
| - IndexUnitOperation(this._indexStore, this._context, this.unit) {
|
| + IndexUnitOperation(IndexStore indexStore, AnalysisContext context, CompilationUnit unit) {
|
| + this._indexStore = indexStore;
|
| + this._context = context;
|
| + this.unit = unit;
|
| this._unitElement = unit.element;
|
| this._source = _unitElement.source;
|
| }
|
| @@ -705,7 +718,7 @@ class Relationship {
|
| /**
|
| * The unique identifier for this relationship.
|
| */
|
| - final String _uniqueId;
|
| + String _uniqueId;
|
|
|
| /**
|
| * A table mapping relationship identifiers to relationships.
|
| @@ -737,7 +750,9 @@ class Relationship {
|
| *
|
| * @param uniqueId the unique identifier for this relationship
|
| */
|
| - Relationship(this._uniqueId);
|
| + Relationship(String uniqueId) {
|
| + this._uniqueId = uniqueId;
|
| + }
|
|
|
| /**
|
| * Return the unique identifier for this relationship.
|
| @@ -758,17 +773,17 @@ class RemoveSourcesOperation implements IndexOperation {
|
| /**
|
| * The index store against which this operation is being run.
|
| */
|
| - final IndexStore _indexStore;
|
| + IndexStore _indexStore;
|
|
|
| /**
|
| * The context to remove container.
|
| */
|
| - final AnalysisContext _context;
|
| + AnalysisContext _context;
|
|
|
| /**
|
| * The source container to remove.
|
| */
|
| - final SourceContainer container;
|
| + SourceContainer container;
|
|
|
| /**
|
| * Initialize a newly created operation that will remove the specified resource.
|
| @@ -777,7 +792,11 @@ class RemoveSourcesOperation implements IndexOperation {
|
| * @param context the [AnalysisContext] to remove container in
|
| * @param container the [SourceContainer] to remove from index
|
| */
|
| - RemoveSourcesOperation(this._indexStore, this._context, this.container);
|
| + RemoveSourcesOperation(IndexStore indexStore, AnalysisContext context, SourceContainer container) {
|
| + this._indexStore = indexStore;
|
| + this._context = context;
|
| + this.container = container;
|
| + }
|
|
|
| @override
|
| bool get isQuery => false;
|
| @@ -810,26 +829,26 @@ class ProcessorState extends Enum<ProcessorState> {
|
| /**
|
| * The processor is ready to be run (has not been run before).
|
| */
|
| - static const ProcessorState READY = const ProcessorState('READY', 0);
|
| + static final ProcessorState READY = new ProcessorState('READY', 0);
|
|
|
| /**
|
| * The processor is currently performing operations.
|
| */
|
| - static const ProcessorState RUNNING = const ProcessorState('RUNNING', 1);
|
| + static final ProcessorState RUNNING = new ProcessorState('RUNNING', 1);
|
|
|
| /**
|
| * The processor is currently performing operations but has been asked to stop.
|
| */
|
| - static const ProcessorState STOP_REQESTED = const ProcessorState('STOP_REQESTED', 2);
|
| + static final ProcessorState STOP_REQESTED = new ProcessorState('STOP_REQESTED', 2);
|
|
|
| /**
|
| * The processor has stopped performing operations and cannot be used again.
|
| */
|
| - static const ProcessorState STOPPED = const ProcessorState('STOPPED', 3);
|
| + static final ProcessorState STOPPED = new ProcessorState('STOPPED', 3);
|
|
|
| - static const List<ProcessorState> values = const [READY, RUNNING, STOP_REQESTED, STOPPED];
|
| + static final List<ProcessorState> values = [READY, RUNNING, STOP_REQESTED, STOPPED];
|
|
|
| - const ProcessorState(String name, int ordinal) : super(name, ordinal);
|
| + ProcessorState(String name, int ordinal) : super(name, ordinal);
|
| }
|
|
|
| /**
|
| @@ -984,7 +1003,7 @@ class AngularHtmlIndexContributor extends ExpressionVisitor {
|
| /**
|
| * The [IndexStore] to record relations into.
|
| */
|
| - final IndexStore _store;
|
| + IndexStore _store;
|
|
|
| /**
|
| * The index contributor used to index Dart [Expression]s.
|
| @@ -998,8 +1017,9 @@ class AngularHtmlIndexContributor extends ExpressionVisitor {
|
| *
|
| * @param store the [IndexStore] to record relations into.
|
| */
|
| - AngularHtmlIndexContributor(this._store) {
|
| - _indexContributor = new IndexContributor_AngularHtmlIndexContributor(_store, this);
|
| + AngularHtmlIndexContributor(IndexStore store) {
|
| + this._store = store;
|
| + _indexContributor = new IndexContributor_AngularHtmlIndexContributor(store, this);
|
| }
|
|
|
| @override
|
| @@ -1548,7 +1568,7 @@ class IndexContributor extends GeneralizingAstVisitor<Object> {
|
| return false;
|
| }
|
|
|
| - final IndexStore _store;
|
| + IndexStore _store;
|
|
|
| LibraryElement _libraryElement;
|
|
|
| @@ -1560,7 +1580,9 @@ class IndexContributor extends GeneralizingAstVisitor<Object> {
|
| */
|
| Queue<Element> _elementStack = new Queue();
|
|
|
| - IndexContributor(this._store);
|
| + IndexContributor(IndexStore store) {
|
| + this._store = store;
|
| + }
|
|
|
| /**
|
| * Enter a new scope represented by the given [Element].
|
| @@ -2172,9 +2194,11 @@ class NameElementImpl extends ElementImpl {
|
| * [IndexStore].
|
| */
|
| class AngularDartIndexContributor extends GeneralizingAstVisitor<Object> {
|
| - final IndexStore _store;
|
| + IndexStore _store;
|
|
|
| - AngularDartIndexContributor(this._store);
|
| + AngularDartIndexContributor(IndexStore store) {
|
| + this._store = store;
|
| + }
|
|
|
| @override
|
| Object visitClassDeclaration(ClassDeclaration node) {
|
| @@ -2246,12 +2270,12 @@ class RemoveContextOperation implements IndexOperation {
|
| /**
|
| * The index store against which this operation is being run.
|
| */
|
| - final IndexStore _indexStore;
|
| + IndexStore _indexStore;
|
|
|
| /**
|
| * The context being removed.
|
| */
|
| - final AnalysisContext context;
|
| + AnalysisContext context;
|
|
|
| /**
|
| * Initialize a newly created operation that will remove the specified resource.
|
| @@ -2259,7 +2283,10 @@ class RemoveContextOperation implements IndexOperation {
|
| * @param indexStore the index store against which this operation is being run
|
| * @param context the [AnalysisContext] to remove
|
| */
|
| - RemoveContextOperation(this._indexStore, this.context);
|
| + RemoveContextOperation(IndexStore indexStore, AnalysisContext context) {
|
| + this._indexStore = indexStore;
|
| + this.context = context;
|
| + }
|
|
|
| @override
|
| bool get isQuery => false;
|
| @@ -2284,17 +2311,17 @@ class IndexHtmlUnitOperation implements IndexOperation {
|
| /**
|
| * The index store against which this operation is being run.
|
| */
|
| - final IndexStore _indexStore;
|
| + IndexStore _indexStore;
|
|
|
| /**
|
| * The context in which [HtmlUnit] was resolved.
|
| */
|
| - final AnalysisContext _context;
|
| + AnalysisContext _context;
|
|
|
| /**
|
| * The [HtmlUnit] being indexed.
|
| */
|
| - final ht.HtmlUnit unit;
|
| + ht.HtmlUnit unit;
|
|
|
| /**
|
| * The element of the [HtmlUnit] being indexed.
|
| @@ -2313,7 +2340,10 @@ class IndexHtmlUnitOperation implements IndexOperation {
|
| * @param context the context in which [HtmlUnit] was resolved
|
| * @param unit the fully resolved [HtmlUnit]
|
| */
|
| - IndexHtmlUnitOperation(this._indexStore, this._context, this.unit) {
|
| + IndexHtmlUnitOperation(IndexStore indexStore, AnalysisContext context, ht.HtmlUnit unit) {
|
| + this._indexStore = indexStore;
|
| + this._context = context;
|
| + this.unit = unit;
|
| this._htmlElement = unit.element;
|
| this._source = _htmlElement.source;
|
| }
|
| @@ -2361,17 +2391,17 @@ class Location {
|
| /**
|
| * The element containing this location.
|
| */
|
| - final Element element;
|
| + Element element;
|
|
|
| /**
|
| * The offset of this location within the resource containing the element.
|
| */
|
| - final int offset;
|
| + int offset = 0;
|
|
|
| /**
|
| * The length of this location.
|
| */
|
| - final int length;
|
| + int length = 0;
|
|
|
| /**
|
| * Internal field used to hold a key that is referenced at this location.
|
| @@ -2386,10 +2416,13 @@ class Location {
|
| * @param offset the offset of this location within the resource containing the element
|
| * @param length the length of this location
|
| */
|
| - Location(this.element, this.offset, this.length) {
|
| + Location(Element element, int offset, int length) {
|
| if (element == null) {
|
| throw new IllegalArgumentException("element location cannot be null");
|
| }
|
| + this.element = element;
|
| + this.offset = offset;
|
| + this.length = length;
|
| }
|
|
|
| /**
|
| @@ -2413,19 +2446,24 @@ abstract class MemoryIndexStore implements IndexStore {
|
| * locations that have a specified relationship with a specified element.
|
| */
|
| class GetRelationshipsOperation implements IndexOperation {
|
| - final IndexStore _indexStore;
|
| + IndexStore _indexStore;
|
|
|
| - final Element element;
|
| + Element element;
|
|
|
| - final Relationship relationship;
|
| + Relationship relationship;
|
|
|
| - final RelationshipCallback callback;
|
| + RelationshipCallback callback;
|
|
|
| /**
|
| * Initialize a newly created operation that will access the locations that have a specified
|
| * relationship with a specified element.
|
| */
|
| - GetRelationshipsOperation(this._indexStore, this.element, this.relationship, this.callback);
|
| + GetRelationshipsOperation(IndexStore indexStore, Element element, Relationship relationship, RelationshipCallback callback) {
|
| + this._indexStore = indexStore;
|
| + this.element = element;
|
| + this.relationship = relationship;
|
| + this.callback = callback;
|
| + }
|
|
|
| @override
|
| bool get isQuery => true;
|
| @@ -2448,11 +2486,15 @@ class GetRelationshipsOperation implements IndexOperation {
|
| * [Location] with attached data.
|
| */
|
| class LocationWithData<D> extends Location {
|
| - final D data;
|
| + D data;
|
|
|
| - LocationWithData.con1(Location location, this.data) : super(location.element, location.offset, location.length);
|
| + LocationWithData.con1(Location location, D data) : super(location.element, location.offset, location.length) {
|
| + this.data = data;
|
| + }
|
|
|
| - LocationWithData.con2(Element element, int offset, int length, this.data) : super(element, offset, length);
|
| + LocationWithData.con2(Element element, int offset, int length, D data) : super(element, offset, length) {
|
| + this.data = data;
|
| + }
|
|
|
| @override
|
| Location newClone() => new LocationWithData<D>.con2(element, offset, length, data);
|
|
|