@@ -114,12 +114,11 @@ class DartToolingDaemonService private constructor(val project: Project, cs: Cor
114114
115115 private fun setUpEditorService () {
116116 registerServiceMethod(" Editor" , " getActiveLocation" , JsonObject ()) {
117- val result = JsonObject ()
118- val activeLocation = ReadAction .nonBlocking<JsonObject > {
117+ val result = ReadAction .nonBlocking<JsonObject > {
119118 getActiveLocation(project, this )
120119 }.executeSynchronously()
121- result.add(" activeLocation" , activeLocation)
122- result.addProperty(" type" , " activeLocation " )
120+ // result.add("activeLocation", activeLocation)
121+ result.addProperty(" type" , " ActiveLocation " )
123122
124123 val params = JsonObject ()
125124 params.add(" result" , result)
@@ -381,7 +380,7 @@ class DartToolingDaemonService private constructor(val project: Project, cs: Cor
381380 eventDispatcher.multicaster.received(streamId, json)
382381 }
383382 else if (serviceConsumer != null ) {
384- val params = json[" params" ].asJsonObject
383+ val params = json[" params" ]? .asJsonObject ? : JsonObject ()
385384 val id = json[" id" ].asString
386385 ApplicationManager .getApplication().executeOnPooledThread {
387386 val response = serviceConsumer.handleRequest(params)
0 commit comments