| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 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. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library domain.context; | 5 library domain.context; |
| 6 | 6 |
| 7 import 'package:analysis_server/src/analysis_server.dart'; | 7 import 'package:analysis_server/src/analysis_server.dart'; |
| 8 import 'package:analysis_server/src/protocol.dart'; | 8 import 'package:analysis_server/src/protocol.dart'; |
| 9 import 'package:analyzer/src/generated/engine.dart'; | 9 import 'package:analyzer/src/generated/engine.dart'; |
| 10 import 'package:analyzer/src/generated/source.dart'; | 10 import 'package:analyzer/src/generated/source.dart'; |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 context.applyChanges(changeSet); | 119 context.applyChanges(changeSet); |
| 120 Response response = new Response(request.id); | 120 Response response = new Response(request.id); |
| 121 return response; | 121 return response; |
| 122 } | 122 } |
| 123 | 123 |
| 124 /** | 124 /** |
| 125 * Convert the given JSON object into a [ChangeSet]. | 125 * Convert the given JSON object into a [ChangeSet]. |
| 126 */ | 126 */ |
| 127 ChangeSet createChangeSet(Map<String, Object> jsonData) { | 127 ChangeSet createChangeSet(Map<String, Object> jsonData) { |
| 128 // TODO(brianwilkerson) Implement this. | 128 // TODO(brianwilkerson) Implement this. |
| 129 return null; | 129 return new ChangeSet(); |
| 130 } | 130 } |
| 131 | 131 |
| 132 /** | 132 /** |
| 133 * Set the options controlling analysis within a context to the given set of | 133 * Set the options controlling analysis within a context to the given set of |
| 134 * options. | 134 * options. |
| 135 */ | 135 */ |
| 136 Response setOptions(Request request) { | 136 Response setOptions(Request request) { |
| 137 AnalysisContext context = getAnalysisContext(request); | 137 AnalysisContext context = getAnalysisContext(request); |
| 138 | 138 |
| 139 context.analysisOptions = createAnalysisOptions(request); | 139 context.analysisOptions = createAnalysisOptions(request); |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 */ | 201 */ |
| 202 AnalysisContext getAnalysisContext(Request request) { | 202 AnalysisContext getAnalysisContext(Request request) { |
| 203 String contextId = request.getRequiredParameter(CONTEXT_ID_PARAM); | 203 String contextId = request.getRequiredParameter(CONTEXT_ID_PARAM); |
| 204 AnalysisContext context = server.contextMap[contextId]; | 204 AnalysisContext context = server.contextMap[contextId]; |
| 205 if (context == null) { | 205 if (context == null) { |
| 206 throw new RequestFailure(new Response.contextDoesNotExist(request)); | 206 throw new RequestFailure(new Response.contextDoesNotExist(request)); |
| 207 } | 207 } |
| 208 return context; | 208 return context; |
| 209 } | 209 } |
| 210 } | 210 } |
| OLD | NEW |