| 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 protocol; | 5 library protocol; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 import 'dart:convert'; | 8 import 'dart:convert'; |
| 9 | 9 |
| 10 import 'package:analysis_server/src/computer/element.dart' show | 10 import 'package:analysis_server/src/computer/element.dart' show |
| (...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 461 String jsonPath, Object json, RefactoringKind kind) { | 461 String jsonPath, Object json, RefactoringKind kind) { |
| 462 if (kind == RefactoringKind.EXTRACT_LOCAL_VARIABLE) { | 462 if (kind == RefactoringKind.EXTRACT_LOCAL_VARIABLE) { |
| 463 return new ExtractLocalVariableOptions.fromJson(jsonDecoder, jsonPath, json)
; | 463 return new ExtractLocalVariableOptions.fromJson(jsonDecoder, jsonPath, json)
; |
| 464 } | 464 } |
| 465 if (kind == RefactoringKind.EXTRACT_METHOD) { | 465 if (kind == RefactoringKind.EXTRACT_METHOD) { |
| 466 return new ExtractMethodOptions.fromJson(jsonDecoder, jsonPath, json); | 466 return new ExtractMethodOptions.fromJson(jsonDecoder, jsonPath, json); |
| 467 } | 467 } |
| 468 if (kind == RefactoringKind.INLINE_METHOD) { | 468 if (kind == RefactoringKind.INLINE_METHOD) { |
| 469 return new InlineMethodOptions.fromJson(jsonDecoder, jsonPath, json); | 469 return new InlineMethodOptions.fromJson(jsonDecoder, jsonPath, json); |
| 470 } | 470 } |
| 471 if (kind == RefactoringKind.MOVE_FILE) { |
| 472 return new MoveFileOptions.fromJson(jsonDecoder, jsonPath, json); |
| 473 } |
| 471 if (kind == RefactoringKind.RENAME) { | 474 if (kind == RefactoringKind.RENAME) { |
| 472 return new RenameOptions.fromJson(jsonDecoder, jsonPath, json); | 475 return new RenameOptions.fromJson(jsonDecoder, jsonPath, json); |
| 473 } | 476 } |
| 474 return null; | 477 return null; |
| 475 } | 478 } |
| 476 | 479 |
| 477 | 480 |
| 478 /** | 481 /** |
| 479 * Create a SearchResultKind based on a value from the search engine. | 482 * Create a SearchResultKind based on a value from the search engine. |
| 480 */ | 483 */ |
| (...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1030 hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3)); | 1033 hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3)); |
| 1031 hash = hash ^ (hash >> 11); | 1034 hash = hash ^ (hash >> 11); |
| 1032 return 0x1fffffff & (hash + ((0x00003fff & hash) << 15)); | 1035 return 0x1fffffff & (hash + ((0x00003fff & hash) << 15)); |
| 1033 } | 1036 } |
| 1034 | 1037 |
| 1035 static int hash2(a, b) => finish(combine(combine(0, a), b)); | 1038 static int hash2(a, b) => finish(combine(combine(0, a), b)); |
| 1036 | 1039 |
| 1037 static int hash4(a, b, c, d) => | 1040 static int hash4(a, b, c, d) => |
| 1038 finish(combine(combine(combine(combine(0, a), b), c), d)); | 1041 finish(combine(combine(combine(combine(0, a), b), c), d)); |
| 1039 } | 1042 } |
| OLD | NEW |