def quickInfo(self, path, location=Location(1, 1), onCompleted=None): req = servicedefs.QuickInfoRequest(self.incrSeq(), servicedefs.FileLocationRequestArgs(path, location.line, location.col)) jsonStr = jsonhelpers.encode(req) def onCompletedJson(json): obj = jsonhelpers.fromDict(servicedefs.QuickInfoResponse, json) if onCompleted: onCompleted(obj) self.__comm.sendCmd(onCompletedJson, jsonStr, req.seq)
def type(self, path, location=Location(1, 1)): req = servicedefs.TypeRequest(self.incrSeq(), servicedefs.FileLocationRequestArgs(path, location.line, location.col)) jsonStr = jsonhelpers.encode(req) responseDict = self.__comm.sendCmdSync(jsonStr, req.seq) return jsonhelpers.fromDict(servicedefs.TypeResponse, responseDict)