def ShowDetailedDiagnostic(self): detailed_diagnostic = BaseRequest.PostDataToHandler( BuildRequestData(), 'detailed_diagnostic') if 'message' in detailed_diagnostic: vimsupport.PostVimMessage(detailed_diagnostic['message'], warning=False)
def GetDefinedSubcommands(self): if self.IsServerAlive(): try: return BaseRequest.PostDataToHandler(BuildRequestData(), 'defined_subcommands') except ServerError: return [] else: return []
def ShowDetailedDiagnostic(self): if not self.IsServerAlive(): return try: debug_info = BaseRequest.PostDataToHandler(BuildRequestData(), 'detailed_diagnostic') if 'message' in debug_info: vimsupport.EchoText(debug_info['message']) except ServerError as e: vimsupport.PostVimMessage(str(e))
def ShowDetailedDiagnostic(self): if not self.IsServerAlive(): return with HandleServerException(): detailed_diagnostic = BaseRequest.PostDataToHandler( BuildRequestData(), 'detailed_diagnostic') if 'message' in detailed_diagnostic: vimsupport.PostVimMessage(detailed_diagnostic['message'], warning=False)
def FilterAndSortCandidatesInner(self, candidates, sort_property, query): request_data = { 'candidates': candidates, 'sort_property': sort_property, 'query': query } response = BaseRequest.PostDataToHandler(request_data, 'filter_and_sort_candidates') return response if response is not None else candidates
def FilterAndSortCandidatesInner(self, candidates, sort_property, query): request_data = { 'candidates': candidates, 'sort_property': sort_property, 'query': query } with HandleServerException(): return BaseRequest.PostDataToHandler(request_data, 'filter_and_sort_candidates') return candidates
def DebugInfo(self): if self.IsServerAlive(): debug_info = BaseRequest.PostDataToHandler(BuildRequestData(), 'debug_info') else: debug_info = 'Server crashed, no debug info from server' debug_info += '\nServer running at: {0}'.format( BaseRequest.server_location) debug_info += '\nServer process ID: {0}'.format(self._server_popen.pid) if self._server_stderr or self._server_stdout: debug_info += '\nServer logfiles:\n {0}\n {1}'.format( self._server_stdout, self._server_stderr) return debug_info
def GetDefinedSubcommands(self): with HandleServerException(): return BaseRequest.PostDataToHandler(BuildRequestData(), 'defined_subcommands') return []
def _IgnoreExtraConfFile(filepath): BaseRequest.PostDataToHandler({'filepath': filepath}, 'ignore_extra_conf_file')
def _LoadExtraConfFile(filepath): BaseRequest.PostDataToHandler({'filepath': filepath}, 'load_extra_conf_file')
def GetDefinedSubcommands(self): if self._IsServerAlive(): return BaseRequest.PostDataToHandler(BuildRequestData(), 'defined_subcommands') else: return []
def GetDefinedSubcommands( self ): request = BaseRequest() subcommands = request.PostDataToHandler( BuildRequestData(), 'defined_subcommands' ) return subcommands if subcommands else []