| 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.dart' show SearchResult; | 10 import 'package:analysis_server/src/protocol.dart' show SearchResult; |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 static bool _isDeclarationInteresting(Element element) { | 115 static bool _isDeclarationInteresting(Element element) { |
| 116 if (element is LabelElement) { | 116 if (element is LabelElement) { |
| 117 return true; | 117 return true; |
| 118 } | 118 } |
| 119 if (element is LocalVariableElement) { | 119 if (element is LocalVariableElement) { |
| 120 return true; | 120 return true; |
| 121 } | 121 } |
| 122 if (element is ParameterElement) { | 122 if (element is ParameterElement) { |
| 123 return true; | 123 return true; |
| 124 } | 124 } |
| 125 if (element is PrefixElement) { |
| 126 return true; |
| 127 } |
| 125 if (element is PropertyInducingElement) { | 128 if (element is PropertyInducingElement) { |
| 126 return !element.isSynthetic; | 129 return !element.isSynthetic; |
| 127 } | 130 } |
| 128 return false; | 131 return false; |
| 129 } | 132 } |
| 130 } | 133 } |
| 131 | 134 |
| 132 | 135 |
| 133 /** | 136 /** |
| 134 * A collection of [Future]s that concats [List] results of added [Future]s into | 137 * A collection of [Future]s that concats [List] results of added [Future]s into |
| (...skipping 10 matching lines...) Expand all Loading... |
| 145 * Adds a [Future] or an [E] value to results. | 148 * Adds a [Future] or an [E] value to results. |
| 146 */ | 149 */ |
| 147 void add(value) { | 150 void add(value) { |
| 148 if (value is Future) { | 151 if (value is Future) { |
| 149 _futures.add(value); | 152 _futures.add(value); |
| 150 } else { | 153 } else { |
| 151 _futures.add(new Future.value(<E>[value])); | 154 _futures.add(new Future.value(<E>[value])); |
| 152 } | 155 } |
| 153 } | 156 } |
| 154 } | 157 } |
| OLD | NEW |