| 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 services.src.refactoring.rename; | 5 library services.src.refactoring.rename; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 | 8 |
| 9 import 'package:analysis_server/src/protocol_server.dart' hide Element; | 9 import 'package:analysis_server/src/protocol_server.dart' hide Element; |
| 10 import 'package:analysis_server/src/services/correction/source_range.dart'; | 10 import 'package:analysis_server/src/services/correction/source_range.dart'; |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 bool requiresPreview() { | 178 bool requiresPreview() { |
| 179 return false; | 179 return false; |
| 180 } | 180 } |
| 181 | 181 |
| 182 static String _getDisplayName(Element element) { | 182 static String _getDisplayName(Element element) { |
| 183 if (element is ImportElement) { | 183 if (element is ImportElement) { |
| 184 PrefixElement prefix = element.prefix; | 184 PrefixElement prefix = element.prefix; |
| 185 if (prefix != null) { | 185 if (prefix != null) { |
| 186 return prefix.displayName; | 186 return prefix.displayName; |
| 187 } | 187 } |
| 188 return ''; |
| 188 } | 189 } |
| 189 return element.displayName; | 190 return element.displayName; |
| 190 } | 191 } |
| 191 } | 192 } |
| OLD | NEW |