| 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 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 414 RefactoringKind kind = REQUEST_ID_REFACTORING_KINDS.remove(requestId); | 414 RefactoringKind kind = REQUEST_ID_REFACTORING_KINDS.remove(requestId); |
| 415 if (kind == RefactoringKind.EXTRACT_LOCAL_VARIABLE) { | 415 if (kind == RefactoringKind.EXTRACT_LOCAL_VARIABLE) { |
| 416 return new ExtractLocalVariableFeedback.fromJson(jsonDecoder, jsonPath, json
); | 416 return new ExtractLocalVariableFeedback.fromJson(jsonDecoder, jsonPath, json
); |
| 417 } | 417 } |
| 418 if (kind == RefactoringKind.EXTRACT_METHOD) { | 418 if (kind == RefactoringKind.EXTRACT_METHOD) { |
| 419 return new ExtractMethodFeedback.fromJson(jsonDecoder, jsonPath, json); | 419 return new ExtractMethodFeedback.fromJson(jsonDecoder, jsonPath, json); |
| 420 } | 420 } |
| 421 if (kind == RefactoringKind.INLINE_LOCAL_VARIABLE) { | 421 if (kind == RefactoringKind.INLINE_LOCAL_VARIABLE) { |
| 422 return new InlineLocalVariableFeedback.fromJson(jsonDecoder, jsonPath, json)
; | 422 return new InlineLocalVariableFeedback.fromJson(jsonDecoder, jsonPath, json)
; |
| 423 } | 423 } |
| 424 if (kind == RefactoringKind.INLINE_METHOD) { |
| 425 return new InlineMethodFeedback.fromJson(jsonDecoder, jsonPath, json); |
| 426 } |
| 424 if (kind == RefactoringKind.RENAME) { | 427 if (kind == RefactoringKind.RENAME) { |
| 425 return new RenameFeedback.fromJson(jsonDecoder, jsonPath, json); | 428 return new RenameFeedback.fromJson(jsonDecoder, jsonPath, json); |
| 426 } | 429 } |
| 427 return null; | 430 return null; |
| 428 } | 431 } |
| 429 | 432 |
| 430 | 433 |
| 431 /** | 434 /** |
| 432 * Create a [RefactoringOptions] corresponding the given [kind]. | 435 * Create a [RefactoringOptions] corresponding the given [kind]. |
| 433 */ | 436 */ |
| (...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1004 hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3)); | 1007 hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3)); |
| 1005 hash = hash ^ (hash >> 11); | 1008 hash = hash ^ (hash >> 11); |
| 1006 return 0x1fffffff & (hash + ((0x00003fff & hash) << 15)); | 1009 return 0x1fffffff & (hash + ((0x00003fff & hash) << 15)); |
| 1007 } | 1010 } |
| 1008 | 1011 |
| 1009 static int hash2(a, b) => finish(combine(combine(0, a), b)); | 1012 static int hash2(a, b) => finish(combine(combine(0, a), b)); |
| 1010 | 1013 |
| 1011 static int hash4(a, b, c, d) => | 1014 static int hash4(a, b, c, d) => |
| 1012 finish(combine(combine(combine(combine(0, a), b), c), d)); | 1015 finish(combine(combine(combine(combine(0, a), b), c), d)); |
| 1013 } | 1016 } |
| OLD | NEW |