#!/usr/bin/env python # # Copyright (C) 2013 Strahinja Val Markovic # # This file is part of YouCompleteMe. # # YouCompleteMe is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # YouCompleteMe is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with YouCompleteMe. If not, see . from ycm.client.completion_request import CompletionRequest class OmniCompletionRequest( CompletionRequest ): def __init__( self, omni_completer ): super( OmniCompletionRequest, self ).__init__() self._omni_completer = omni_completer def Start( self, query ): self.request_data[ 'query' ] = query self._results = self._omni_completer.ComputeCandidates( self.request_data ) def Done( self ): return True def Response( self ): return self._results