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

Side by Side Diff: pkg/analysis_server/lib/src/domain_experimental.dart

Issue 1412683002: Add an experimental domain (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Clean up registration Created 5 years, 2 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 unified diff | Download patch
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/plugin/server_plugin.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
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.
4
5 library src.domain_experimental;
6
7 import 'dart:core' hide Resource;
pquitslund 2015/10/16 19:34:22 Every time I see this I cry a little.
scheglov 2015/10/16 20:08:50 It'll go soon. /** * DEPRECATED. A resource that
8
9 import 'package:analysis_server/plugin/protocol/protocol.dart';
10 import 'package:analysis_server/src/analysis_server.dart';
11
12 /**
13 * Instances of the class [ExperimentalDomainHandler] implement a
14 * [RequestHandler] that handles requests in the `experimental` domain.
15 */
16 class ExperimentalDomainHandler implements RequestHandler {
17 /**
18 * The analysis server that is using this handler to process requests.
19 */
20 final AnalysisServer server;
21
22 /**
23 * The name of the request used to get diagnostic information.
24 */
25 static const String EXPERIMENTAL_DIAGNOSTICS = 'experimental.diagnostics';
26
27 /**
28 * Initialize a newly created handler to handle requests for the given [server ].
29 */
30 ExperimentalDomainHandler(this.server);
31
32 @override
33 Response handleRequest(Request request) {
34 try {
35 String requestName = request.method;
36 if (requestName == EXPERIMENTAL_DIAGNOSTICS) {
37 return computeDiagnostics(request);
38 }
39 } on RequestFailure catch (exception) {
40 return exception.response;
41 }
42 return null;
43 }
44
45 /**
46 * Implement the `experimental.diagnostics` request.
47 */
48 Response computeDiagnostics(Request request) {
49 return new Response.unknownRequest(request);
50 }
51 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/plugin/server_plugin.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698