| 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.sort_members; | |
| 6 | |
| 7 import 'package:analysis_server/protocol/protocol_generated.dart' hide Element; | |
| 8 import 'package:analysis_server/src/services/correction/strings.dart'; | 5 import 'package:analysis_server/src/services/correction/strings.dart'; |
| 9 import 'package:analyzer/dart/ast/ast.dart'; | 6 import 'package:analyzer/dart/ast/ast.dart'; |
| 7 import 'package:analyzer_plugin/protocol/protocol_common.dart' hide Element; |
| 10 | 8 |
| 11 /** | 9 /** |
| 12 * Sorter for unit/class members. | 10 * Sorter for unit/class members. |
| 13 */ | 11 */ |
| 14 class MemberSorter { | 12 class MemberSorter { |
| 15 static List<_PriorityItem> _PRIORITY_ITEMS = [ | 13 static List<_PriorityItem> _PRIORITY_ITEMS = [ |
| 16 new _PriorityItem(false, _MemberKind.UNIT_FUNCTION_MAIN, false), | 14 new _PriorityItem(false, _MemberKind.UNIT_FUNCTION_MAIN, false), |
| 17 new _PriorityItem(false, _MemberKind.UNIT_VARIABLE_CONST, false), | 15 new _PriorityItem(false, _MemberKind.UNIT_VARIABLE_CONST, false), |
| 18 new _PriorityItem(false, _MemberKind.UNIT_VARIABLE_CONST, true), | 16 new _PriorityItem(false, _MemberKind.UNIT_VARIABLE_CONST, true), |
| 19 new _PriorityItem(false, _MemberKind.UNIT_VARIABLE, false), | 17 new _PriorityItem(false, _MemberKind.UNIT_VARIABLE, false), |
| (...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 497 return other.kind == kind && other.isStatic == isStatic; | 495 return other.kind == kind && other.isStatic == isStatic; |
| 498 } | 496 } |
| 499 return other.kind == kind && | 497 return other.kind == kind && |
| 500 other.isPrivate == isPrivate && | 498 other.isPrivate == isPrivate && |
| 501 other.isStatic == isStatic; | 499 other.isStatic == isStatic; |
| 502 } | 500 } |
| 503 | 501 |
| 504 @override | 502 @override |
| 505 String toString() => kind.toString(); | 503 String toString() => kind.toString(); |
| 506 } | 504 } |
| OLD | NEW |