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

Unified Diff: pkg/analysis_server/lib/src/status/get_handler2.dart

Issue 2844273003: Unify the server and plugin versions of the generators (Closed)
Patch Set: add missed files Created 3 years, 8 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/status/get_handler2.dart
diff --git a/pkg/analysis_server/lib/src/status/get_handler2.dart b/pkg/analysis_server/lib/src/status/get_handler2.dart
index 233323d6d5600a5149c03068f6c4d8bb359dd3e1..c1147b04d7c86a330d3312f62e7c1a41c2215923 100644
--- a/pkg/analysis_server/lib/src/status/get_handler2.dart
+++ b/pkg/analysis_server/lib/src/status/get_handler2.dart
@@ -6,7 +6,8 @@ import 'dart:convert';
import 'dart:io';
import 'dart:math';
-import 'package:analysis_server/plugin/protocol/protocol.dart' hide Element;
+import 'package:analysis_server/protocol/protocol.dart';
+import 'package:analysis_server/protocol/protocol_generated.dart' hide Element;
import 'package:analysis_server/src/analysis_server.dart';
import 'package:analysis_server/src/domain_completion.dart';
import 'package:analysis_server/src/domain_diagnostic.dart';
@@ -31,6 +32,18 @@ import 'package:analyzer/task/model.dart';
import 'package:path/path.dart' as path;
import 'package:plugin/plugin.dart';
+String _writeWithSeparators(int value) {
+ // TODO(devoncarew): Replace with the implementation from package:intl.
+ String str = value.toString();
+ int pos = 3;
+ while (str.length > pos) {
+ int len = str.length;
+ str = '${str.substring(0, len - pos)},${str.substring(len - pos)}';
+ pos += 4;
+ }
+ return str;
+}
+
/**
* A function that can be used to generate HTML output into the given [buffer].
* The HTML that is generated must be valid (special characters must already be
@@ -590,6 +603,11 @@ class GetHandler2 implements AbstractGetHandler {
});
}
+ void _returnRedirect(HttpRequest request, String pathFragment) {
+ HttpResponse response = request.response;
+ response.redirect(request.uri.resolve(pathFragment));
+ }
+
/**
* Return a response indicating the status of the analysis server.
*/
@@ -607,11 +625,6 @@ class GetHandler2 implements AbstractGetHandler {
});
}
- void _returnRedirect(HttpRequest request, String pathFragment) {
- HttpResponse response = request.response;
- response.redirect(request.uri.resolve(pathFragment));
- }
-
/**
* Return an error in response to an unrecognized request received by the HTTP
* server.
@@ -1244,15 +1257,3 @@ class GetHandler2 implements AbstractGetHandler {
return '<a href="$href" $classAttribute>$innerHtml</a>';
}
}
-
-String _writeWithSeparators(int value) {
- // TODO(devoncarew): Replace with the implementation from package:intl.
- String str = value.toString();
- int pos = 3;
- while (str.length > pos) {
- int len = str.length;
- str = '${str.substring(0, len - pos)},${str.substring(len - pos)}';
- pos += 4;
- }
- return str;
-}
« no previous file with comments | « pkg/analysis_server/lib/src/status/get_handler.dart ('k') | pkg/analysis_server/lib/src/utilities/change_builder_core.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698