Renamed ClangComplete to ClangCompleter
This commit is contained in:
parent
545792c055
commit
39ecf76798
@ -66,7 +66,7 @@ function! youcompleteme#Enable()
|
||||
exe 'python sys.path = sys.path + ["' . s:script_folder_path . '/../python"]'
|
||||
py import ycm
|
||||
py csystem = ycm.CompletionSystem()
|
||||
py clangcomp = ycm.ClangComplete()
|
||||
py clangcomp = ycm.ClangCompleter()
|
||||
endfunction
|
||||
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with YouCompleteMe. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include "ClangComplete.h"
|
||||
#include "ClangCompleter.h"
|
||||
#include "standard.h"
|
||||
#include <clang-c/Index.h>
|
||||
|
||||
@ -87,13 +87,13 @@ std::vector< std::string > ToStringVector( CXCodeCompleteResults *results )
|
||||
} // unnamed namespace
|
||||
|
||||
|
||||
ClangComplete::ClangComplete()
|
||||
ClangCompleter::ClangCompleter()
|
||||
{
|
||||
clang_index_ = clang_createIndex( 0, 0 );
|
||||
}
|
||||
|
||||
|
||||
ClangComplete::~ClangComplete()
|
||||
ClangCompleter::~ClangCompleter()
|
||||
{
|
||||
foreach ( const TranslationUnitForFilename::value_type &filename_unit,
|
||||
filename_to_translation_unit_ )
|
||||
@ -105,14 +105,14 @@ ClangComplete::~ClangComplete()
|
||||
}
|
||||
|
||||
|
||||
void ClangComplete::SetGlobalCompileFlags(
|
||||
void ClangCompleter::SetGlobalCompileFlags(
|
||||
const std::vector< std::string > &flags )
|
||||
{
|
||||
global_flags_ = flags;
|
||||
}
|
||||
|
||||
|
||||
void ClangComplete::SetFileCompileFlags(
|
||||
void ClangCompleter::SetFileCompileFlags(
|
||||
const std::string &filename,
|
||||
const std::vector< std::string > &flags )
|
||||
{
|
||||
@ -120,7 +120,7 @@ void ClangComplete::SetFileCompileFlags(
|
||||
}
|
||||
|
||||
|
||||
void ClangComplete::UpdateTranslationUnit(
|
||||
void ClangCompleter::UpdateTranslationUnit(
|
||||
const std::string &filename,
|
||||
const std::vector< UnsavedFile > &unsaved_files )
|
||||
{
|
||||
@ -147,7 +147,7 @@ void ClangComplete::UpdateTranslationUnit(
|
||||
}
|
||||
|
||||
|
||||
std::vector< std::string > ClangComplete::CandidatesForLocationInFile(
|
||||
std::vector< std::string > ClangCompleter::CandidatesForLocationInFile(
|
||||
const std::string &filename,
|
||||
int line,
|
||||
int column,
|
||||
@ -181,7 +181,7 @@ std::vector< std::string > ClangComplete::CandidatesForLocationInFile(
|
||||
}
|
||||
|
||||
|
||||
CXTranslationUnit ClangComplete::CreateTranslationUnit(
|
||||
CXTranslationUnit ClangCompleter::CreateTranslationUnit(
|
||||
const std::string &filename,
|
||||
const std::vector< UnsavedFile > &unsaved_files )
|
||||
{
|
||||
@ -200,7 +200,7 @@ CXTranslationUnit ClangComplete::CreateTranslationUnit(
|
||||
}
|
||||
|
||||
|
||||
std::vector< const char* > ClangComplete::ClangFlagsForFilename(
|
||||
std::vector< const char* > ClangCompleter::ClangFlagsForFilename(
|
||||
const std::string &filename )
|
||||
{
|
||||
std::vector< const char* > flags;
|
||||
@ -222,7 +222,7 @@ std::vector< const char* > ClangComplete::ClangFlagsForFilename(
|
||||
}
|
||||
|
||||
|
||||
CXTranslationUnit ClangComplete::GetTranslationUnitForFile(
|
||||
CXTranslationUnit ClangCompleter::GetTranslationUnitForFile(
|
||||
const std::string &filename,
|
||||
const std::vector< UnsavedFile > &unsaved_files )
|
||||
{
|
@ -54,11 +54,11 @@ typedef boost::unordered_map< std::string, CXTranslationUnit >
|
||||
TranslationUnitForFilename;
|
||||
|
||||
|
||||
class ClangComplete : boost::noncopyable
|
||||
class ClangCompleter : boost::noncopyable
|
||||
{
|
||||
public:
|
||||
ClangComplete();
|
||||
~ClangComplete();
|
||||
ClangCompleter();
|
||||
~ClangCompleter();
|
||||
|
||||
void SetGlobalCompileFlags( const std::vector< std::string > &flags );
|
||||
|
@ -16,7 +16,7 @@
|
||||
// along with YouCompleteMe. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include "IdentifierCompleter.h"
|
||||
#include "ClangComplete.h"
|
||||
#include "ClangCompleter.h"
|
||||
#include "Future.h"
|
||||
|
||||
#include <boost/python.hpp>
|
||||
@ -60,10 +60,10 @@ BOOST_PYTHON_MODULE(indexer)
|
||||
class_< std::vector< UnsavedFile > >( "UnsavedFileVec" )
|
||||
.def( vector_indexing_suite< std::vector< UnsavedFile > >() );
|
||||
|
||||
class_< ClangComplete, boost::noncopyable >( "ClangComplete" )
|
||||
.def( "SetGlobalCompileFlags", &ClangComplete::SetGlobalCompileFlags )
|
||||
.def( "SetFileCompileFlags", &ClangComplete::SetFileCompileFlags )
|
||||
.def( "UpdateTranslationUnit", &ClangComplete::UpdateTranslationUnit )
|
||||
class_< ClangCompleter, boost::noncopyable >( "ClangCompleter" )
|
||||
.def( "SetGlobalCompileFlags", &ClangCompleter::SetGlobalCompileFlags )
|
||||
.def( "SetFileCompileFlags", &ClangCompleter::SetFileCompileFlags )
|
||||
.def( "UpdateTranslationUnit", &ClangCompleter::UpdateTranslationUnit )
|
||||
.def( "CandidatesForLocationInFile",
|
||||
&ClangComplete::CandidatesForLocationInFile );
|
||||
&ClangCompleter::CandidatesForLocationInFile );
|
||||
}
|
||||
|
@ -88,9 +88,9 @@ class CompletionSystem( object ):
|
||||
filepath,
|
||||
True )
|
||||
|
||||
class ClangComplete( object ):
|
||||
class ClangCompleter( object ):
|
||||
def __init__( self ):
|
||||
self.completer = indexer.ClangComplete()
|
||||
self.completer = indexer.ClangCompleter()
|
||||
|
||||
def CandidatesForQuery( self, query ):
|
||||
files = indexer.UnsavedFileVec()
|
||||
|
Loading…
Reference in New Issue
Block a user