| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library analysis_server.analysis.index.index_core; | 5 library analysis_server.analysis.index.index_core; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:collection'; | 8 import 'dart:collection'; |
| 9 | 9 |
| 10 import 'package:analysis_server/src/services/index/index.dart'; | 10 import 'package:analysis_server/src/services/index/index.dart'; |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 } | 108 } |
| 109 } | 109 } |
| 110 | 110 |
| 111 /** | 111 /** |
| 112 * An object used to add relationships to the index. | 112 * An object used to add relationships to the index. |
| 113 * | 113 * |
| 114 * Clients are expected to subtype this class when implementing plugins. | 114 * Clients are expected to subtype this class when implementing plugins. |
| 115 */ | 115 */ |
| 116 abstract class IndexContributor { | 116 abstract class IndexContributor { |
| 117 /** | 117 /** |
| 118 * Contribute relationships to the given index [store] as a result of | 118 * Contribute relationships existing in the given [object] to the given |
| 119 * analyzing the given [source] in the given [context]. | 119 * index [store] in the given [context]. |
| 120 */ | 120 */ |
| 121 void contributeTo(IndexStore store, AnalysisContext context, Source source); | 121 void contributeTo(IndexStore store, AnalysisContext context, Object object); |
| 122 } | 122 } |
| 123 | 123 |
| 124 // A sketch of what the driver routine might look like: | 124 // A sketch of what the driver routine might look like: |
| 125 // | 125 // |
| 126 //void buildIndexForSource(AnalysisContext context, Source source) { | 126 //void buildIndexForSource(AnalysisContext context, Source source) { |
| 127 // IndexStoreImpl store; | 127 // IndexStoreImpl store; |
| 128 // store.aboutToIndex(context, source); | 128 // store.aboutToIndex(context, source); |
| 129 // try { | 129 // try { |
| 130 // for (IndexContributor contributor in contributors) { | 130 // for (IndexContributor contributor in contributors) { |
| 131 // contributor.contributeTo(store, context, source); | 131 // contributor.contributeTo(store, context, source); |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 */ | 265 */ |
| 266 abstract class Relationship { | 266 abstract class Relationship { |
| 267 /** | 267 /** |
| 268 * Return a relationship that has the given [identifier]. If the relationship | 268 * Return a relationship that has the given [identifier]. If the relationship |
| 269 * has already been created, then it will be returned, otherwise a new | 269 * has already been created, then it will be returned, otherwise a new |
| 270 * relationship will be created | 270 * relationship will be created |
| 271 */ | 271 */ |
| 272 factory Relationship(String identifier) => | 272 factory Relationship(String identifier) => |
| 273 RelationshipImpl.getRelationship(identifier); | 273 RelationshipImpl.getRelationship(identifier); |
| 274 } | 274 } |
| OLD | NEW |