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)); |
- } |
- } |
} |