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

Unified Diff: pkg/analysis_server/lib/src/plugin/request_converter.dart

Issue 2879273002: Make server use the common protocol classes (Closed)
Patch Set: Created 3 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
Index: pkg/analysis_server/lib/src/plugin/request_converter.dart
diff --git a/pkg/analysis_server/lib/src/plugin/request_converter.dart b/pkg/analysis_server/lib/src/plugin/request_converter.dart
index a254b0b99fa976488fd218358aebf14f572a869f..92cbc48642889a3139463d3fd8636431654899b9 100644
--- a/pkg/analysis_server/lib/src/plugin/request_converter.dart
+++ b/pkg/analysis_server/lib/src/plugin/request_converter.dart
@@ -4,7 +4,6 @@
import 'package:analysis_server/protocol/protocol_generated.dart' as server;
import 'package:analysis_server/src/protocol/protocol_internal.dart' as server;
-import 'package:analyzer_plugin/protocol/protocol_common.dart' as plugin;
import 'package:analyzer_plugin/protocol/protocol_generated.dart' as plugin;
/**
@@ -50,24 +49,8 @@ class RequestConverter {
Map<String, dynamic> serverOverlays = params.files;
Map<String, dynamic> pluginOverlays = <String, dynamic>{};
for (String file in serverOverlays.keys) {
- pluginOverlays[file] = convertFileOverlay(serverOverlays[file]);
+ pluginOverlays[file] = serverOverlays[file];
}
return new plugin.AnalysisUpdateContentParams(pluginOverlays);
}
-
- Object convertFileOverlay(Object overlay) {
- if (overlay is server.AddContentOverlay) {
- return new plugin.AddContentOverlay(overlay.content);
- } else if (overlay is server.ChangeContentOverlay) {
- return new plugin.ChangeContentOverlay(
- overlay.edits.map(convertSourceEdit).toList());
- } else if (overlay is server.RemoveContentOverlay) {
- return new plugin.RemoveContentOverlay();
- }
- return null;
- }
-
- plugin.SourceEdit convertSourceEdit(server.SourceEdit edit) {
- return new plugin.SourceEdit(edit.offset, edit.length, edit.replacement);
- }
}
« no previous file with comments | « pkg/analysis_server/lib/src/plugin/notification_manager.dart ('k') | pkg/analysis_server/lib/src/plugin/result_converter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698