| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 search.element_references; | 5 library search.element_references; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 | 8 |
| 9 import 'package:analysis_server/src/collections.dart'; | 9 import 'package:analysis_server/src/collections.dart'; |
| 10 import 'package:analysis_server/src/protocol_server.dart' | 10 import 'package:analysis_server/src/protocol_server.dart' |
| 11 show SearchResult, newSearchResult_fromMatch; | 11 show SearchResult, newSearchResult_fromMatch; |
| 12 import 'package:analysis_server/src/services/search/hierarchy.dart'; | 12 import 'package:analysis_server/src/services/search/hierarchy.dart'; |
| 13 import 'package:analysis_server/src/services/search/search_engine.dart'; | 13 import 'package:analysis_server/src/services/search/search_engine.dart'; |
| 14 import 'package:analyzer/src/generated/element.dart'; | 14 import 'package:analyzer/dart/element/element.dart'; |
| 15 import 'package:analyzer/src/generated/source.dart'; | 15 import 'package:analyzer/src/generated/source.dart'; |
| 16 | 16 |
| 17 /** | 17 /** |
| 18 * A computer for `search.findElementReferences` request results. | 18 * A computer for `search.findElementReferences` request results. |
| 19 */ | 19 */ |
| 20 class ElementReferencesComputer { | 20 class ElementReferencesComputer { |
| 21 final SearchEngine searchEngine; | 21 final SearchEngine searchEngine; |
| 22 | 22 |
| 23 ElementReferencesComputer(this.searchEngine); | 23 ElementReferencesComputer(this.searchEngine); |
| 24 | 24 |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 * Adds a [Future] or an [E] value to results. | 142 * Adds a [Future] or an [E] value to results. |
| 143 */ | 143 */ |
| 144 void add(value) { | 144 void add(value) { |
| 145 if (value is Future) { | 145 if (value is Future) { |
| 146 _futures.add(value); | 146 _futures.add(value); |
| 147 } else { | 147 } else { |
| 148 _futures.add(new Future.value(<E>[value])); | 148 _futures.add(new Future.value(<E>[value])); |
| 149 } | 149 } |
| 150 } | 150 } |
| 151 } | 151 } |
| OLD | NEW |