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

Unified Diff: pkg/analysis_server/lib/src/domain_diagnostic.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/domain_diagnostic.dart
diff --git a/pkg/analysis_server/lib/src/domain_diagnostic.dart b/pkg/analysis_server/lib/src/domain_diagnostic.dart
index 738f12982115d6c8e6a7bdd0a205fded6569d917..a7b06c3d7d04d362328c257a4e01976e76767c32 100644
--- a/pkg/analysis_server/lib/src/domain_diagnostic.dart
+++ b/pkg/analysis_server/lib/src/domain_diagnostic.dart
@@ -8,7 +8,8 @@ import 'dart:async';
import 'dart:collection';
import 'dart:core';
-import 'package:analysis_server/plugin/protocol/protocol.dart';
+import 'package:analysis_server/protocol/protocol.dart';
+import 'package:analysis_server/protocol/protocol_generated.dart';
import 'package:analysis_server/src/analysis_server.dart';
import 'package:analysis_server/src/constants.dart';
import 'package:analyzer/src/context/cache.dart';
@@ -96,6 +97,19 @@ class DiagnosticDomainHandler implements RequestHandler {
knownFileCount - explicitFileCount, driver.numberOfFilesToAnalyze, []);
}
+ /// Answer the `diagnostic.getServerPort` request.
+ Future handleGetServerPort(Request request) async {
+ try {
+ // Open a port (or return the existing one).
+ int port = await server.diagnosticServer.getServerPort();
+ server.sendResponse(
+ new DiagnosticGetServerPortResult(port).toResponse(request.id));
+ } catch (error) {
+ server
+ .sendResponse(new Response.debugPortCouldNotBeOpened(request, error));
+ }
+ }
+
@override
Response handleRequest(Request request) {
try {
@@ -111,17 +125,4 @@ class DiagnosticDomainHandler implements RequestHandler {
}
return null;
}
-
- /// Answer the `diagnostic.getServerPort` request.
- Future handleGetServerPort(Request request) async {
- try {
- // Open a port (or return the existing one).
- int port = await server.diagnosticServer.getServerPort();
- server.sendResponse(
- new DiagnosticGetServerPortResult(port).toResponse(request.id));
- } catch (error) {
- server
- .sendResponse(new Response.debugPortCouldNotBeOpened(request, error));
- }
- }
}
« no previous file with comments | « pkg/analysis_server/lib/src/domain_completion.dart ('k') | pkg/analysis_server/lib/src/domain_execution.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698