Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Unified Diff: pkg/analysis_server/lib/src/computer/computer_highlights.dart

Issue 389413002: Use HasToJson when set Reponse/Notification parameters. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/analysis_server/lib/src/computer/computer_highlights.dart
diff --git a/pkg/analysis_server/lib/src/computer/computer_highlights.dart b/pkg/analysis_server/lib/src/computer/computer_highlights.dart
index 2c11d1dddca6f0d33571d7ef49ae97e40a814736..9a16c8078430bb0e4bcc30d30d99b3593578248a 100644
--- a/pkg/analysis_server/lib/src/computer/computer_highlights.dart
+++ b/pkg/analysis_server/lib/src/computer/computer_highlights.dart
@@ -4,6 +4,7 @@
library computer.highlights;
+import 'package:analysis_server/src/collections.dart';
import 'package:analysis_server/src/constants.dart';
import 'package:analyzer/src/generated/ast.dart';
import 'package:analyzer/src/generated/element.dart';
@@ -23,10 +24,10 @@ class DartUnitHighlightsComputer {
/**
* Returns the computed highlight regions, not `null`.
*/
- List<Map<String, Object>> compute() {
+ List<HighlightRegion> compute() {
_unit.accept(new _DartUnitHighlightsComputerVisitor(this));
_addCommentRanges();
- return _regions.map((region) => region.toJson()).toList();
+ return _regions;
}
void _addCommentRanges() {
@@ -324,7 +325,7 @@ class DartUnitHighlightsComputer {
}
-class HighlightRegion {
+class HighlightRegion implements HasToJson {
final int offset;
final int length;
final HighlightType type;
« no previous file with comments | « pkg/analysis_server/lib/src/collections.dart ('k') | pkg/analysis_server/lib/src/computer/computer_hover.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698