(self, request)
Accept serialized request from VSCode and write response.
Accept serialized request from VSCode and write response.
Accept serialized request from VSCode and write response .
def _process_request(self, request):
        """Accept serialized request from VSCode and write response.
        """
        request = self._deserialize(request)
        lookup = request.get('lookup', '')

        if lookup == '':
            pass
        elif lookup == 'rename':
            changes = self._rename(request['file'], int(
                request['start']), request['name'], int(request['indent_size']))
            return self._write_response(self._serialize(request['id'], changes))
        elif lookup == 'extract_variable':
            changes = self._extractVariable(request['file'], int(
                request['start']), int(request['end']), request['name'], int(request['indent_size']))
            return self._write_response(self._serialize(request['id'], changes))
        elif lookup == 'extract_method':
            changes = self._extractMethod(request['file'], int(
                request['start']), int(request['end']), request['name'], int(request['indent_size']))
            return self._write_response(self._serialize(request['id'], changes))
def _process_request ( self , request ) : request = self . _deserialize ( request ) lookup = request . get ( 'lookup' , '' ) if lookup == '' : pass elif lookup == 'rename' : changes = self . _rename ( request [ 'file' ] , int ( request [ 'start' ] ) , request [ 'name' ] , int ( request [ 'indent_size' ] ) ) return self . _write_response ( self . _serialize ( request [ 'id' ] , changes ) ) elif lookup == 'extract_variable' : changes = self . _extractVariable ( request [ 'file' ] , int ( request [ 'start' ] ) , int ( request [ 'end' ] ) , request [ 'name' ] , int ( request [ 'indent_size' ] ) ) return self . _write_response ( self . _serialize ( request [ 'id' ] , changes ) ) elif lookup == 'extract_method' : changes = self . _extractMethod ( request [ 'file' ] , int ( request [ 'start' ] ) , int ( request [ 'end' ] ) , request [ 'name' ] , int ( request [ 'indent_size' ] ) ) return self . _write_response ( self . _serialize ( request [ 'id' ] , changes ) )