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

Unified Diff: pkg/analysis_server/lib/src/domain_context.dart

Issue 288013003: allow client to specify any combination of add/modified/removed (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge and address comments Created 6 years, 7 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
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/protocol.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/domain_context.dart
diff --git a/pkg/analysis_server/lib/src/domain_context.dart b/pkg/analysis_server/lib/src/domain_context.dart
index 843045c12257534322205358a5c032aa1973251d..46ad6fa62c782fcd1858cc39e9242081b458fc0d 100644
--- a/pkg/analysis_server/lib/src/domain_context.dart
+++ b/pkg/analysis_server/lib/src/domain_context.dart
@@ -154,15 +154,21 @@ class ContextDomainHandler implements RequestHandler {
ChangeSet createChangeSet(Request request, SourceFactory sourceFactory,
RequestDatum jsonData) {
ChangeSet changeSet = new ChangeSet();
- convertSources(request, sourceFactory, jsonData[ADDED_PARAM], (Source source) {
- changeSet.addedSource(source);
- });
- convertSources(request, sourceFactory, jsonData[MODIFIED_PARAM], (Source source) {
- changeSet.changedSource(source);
- });
- convertSources(request, sourceFactory, jsonData[REMOVED_PARAM], (Source source) {
- changeSet.removedSource(source);
- });
+ if (jsonData.hasKey(ADDED_PARAM)) {
+ convertSources(request, sourceFactory, jsonData[ADDED_PARAM], (Source source) {
+ changeSet.addedSource(source);
+ });
+ }
+ if (jsonData.hasKey(MODIFIED_PARAM)) {
+ convertSources(request, sourceFactory, jsonData[MODIFIED_PARAM], (Source source) {
+ changeSet.changedSource(source);
+ });
+ }
+ if (jsonData.hasKey(REMOVED_PARAM)) {
+ convertSources(request, sourceFactory, jsonData[REMOVED_PARAM], (Source source) {
+ changeSet.removedSource(source);
+ });
+ }
return changeSet;
}
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/protocol.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698