OLD | NEW |
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, 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 import 'package:analyzer_plugin/protocol/protocol_generated.dart'; | 5 import 'package:analyzer_plugin/protocol/protocol_generated.dart'; |
6 import 'package:analyzer_plugin/src/protocol/protocol_internal.dart'; | 6 import 'package:analyzer_plugin/src/protocol/protocol_internal.dart'; |
7 | 7 |
8 /** | 8 /** |
9 * An interface for enumerated types in the protocol. | 9 * An interface for enumerated types in the protocol. |
10 * | 10 * |
(...skipping 26 matching lines...) Expand all Loading... |
37 | 37 |
38 /** | 38 /** |
39 * The name of the event that triggered the notification. | 39 * The name of the event that triggered the notification. |
40 */ | 40 */ |
41 final String event; | 41 final String event; |
42 | 42 |
43 /** | 43 /** |
44 * A table mapping the names of notification parameters to their values, or | 44 * A table mapping the names of notification parameters to their values, or |
45 * `null` if there are no notification parameters. | 45 * `null` if there are no notification parameters. |
46 */ | 46 */ |
47 Map<String, Object> params; | 47 final Map<String, Object> params; |
48 | 48 |
49 /** | 49 /** |
50 * Initialize a newly created [Notification] to have the given [event] name. | 50 * Initialize a newly created [Notification] to have the given [event] name. |
51 * If [params] is provided, it will be used as the params; otherwise no | 51 * If [params] is provided, it will be used as the params; otherwise no |
52 * params will be used. | 52 * params will be used. |
53 */ | 53 */ |
54 Notification(this.event, [this.params]); | 54 Notification(this.event, [this.params]); |
55 | 55 |
56 /** | 56 /** |
57 * Initialize a newly created instance based on the given JSON data. | 57 * Initialize a newly created instance based on the given JSON data. |
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
572 jsonObject[ID] = id; | 572 jsonObject[ID] = id; |
573 if (error != null) { | 573 if (error != null) { |
574 jsonObject[ERROR] = error.toJson(); | 574 jsonObject[ERROR] = error.toJson(); |
575 } | 575 } |
576 if (result != null) { | 576 if (result != null) { |
577 jsonObject[RESULT] = result; | 577 jsonObject[RESULT] = result; |
578 } | 578 } |
579 return jsonObject; | 579 return jsonObject; |
580 } | 580 } |
581 } | 581 } |
OLD | NEW |