diff --git a/.gitignore b/.gitignore index 21c93f4e..7f60d231 100644 --- a/.gitignore +++ b/.gitignore @@ -36,7 +36,7 @@ nosetests.xml .mr.developer.cfg # custom -indexer_tests +ycm_core_tests # When we use the bcp tool to copy over the parts of boost we care about, it # also copies some cruft files we don't need; this ignores them diff --git a/cpp/ycm/CMakeLists.txt b/cpp/ycm/CMakeLists.txt index bb265c5d..9ae957b9 100644 --- a/cpp/ycm/CMakeLists.txt +++ b/cpp/ycm/CMakeLists.txt @@ -17,7 +17,7 @@ cmake_minimum_required( VERSION 2.8 ) -project( indexer ) +project( ycm_core ) find_package( PythonLibs REQUIRED ) diff --git a/cpp/ycm/tests/CMakeLists.txt b/cpp/ycm/tests/CMakeLists.txt index 9b17c22d..95636f83 100644 --- a/cpp/ycm/tests/CMakeLists.txt +++ b/cpp/ycm/tests/CMakeLists.txt @@ -15,7 +15,7 @@ # You should have received a copy of the GNU General Public License # along with YouCompleteMe. If not, see . -project( indexer_tests ) +project( ycm_core_tests ) cmake_minimum_required( VERSION 2.8 ) # The gtest library triggers these silly warnings, so we turn them off @@ -27,7 +27,7 @@ endif() add_subdirectory( gmock ) include_directories( - ${indexer_SOURCE_DIR} + ${ycm_core_SOURCE_DIR} ) include_directories( @@ -50,7 +50,7 @@ add_executable( ${PROJECT_NAME} ) target_link_libraries( ${PROJECT_NAME} - indexer + ycm_core gmock_main ) diff --git a/cpp/ycm/indexer.cpp b/cpp/ycm/ycm_core.cpp similarity index 99% rename from cpp/ycm/indexer.cpp rename to cpp/ycm/ycm_core.cpp index 563f7bb9..a462ac3c 100644 --- a/cpp/ycm/indexer.cpp +++ b/cpp/ycm/ycm_core.cpp @@ -26,7 +26,7 @@ #include #include -BOOST_PYTHON_MODULE(indexer) +BOOST_PYTHON_MODULE(ycm_core) { using namespace boost::python; using namespace YouCompleteMe; diff --git a/python/completers/all.py b/python/completers/all.py index 546114b7..e57850fe 100644 --- a/python/completers/all.py +++ b/python/completers/all.py @@ -20,7 +20,7 @@ from completer import Completer import vim import vimsupport -import indexer +import ycm_core import utils MAX_IDENTIFIER_COMPLETIONS_RETURNED = 10 @@ -33,7 +33,7 @@ def GetCompleter(): class IdentifierCompleter( Completer ): def __init__( self ): - self.completer = indexer.IdentifierCompleter() + self.completer = ycm_core.IdentifierCompleter() self.completer.EnableThreading() @@ -61,7 +61,7 @@ class IdentifierCompleter( Completer ): if not filetype or not filepath or not identifier: return - vector = indexer.StringVec() + vector = ycm_core.StringVec() vector.append( identifier ) self.completer.AddCandidatesToDatabase( vector, filetype, diff --git a/python/completers/cpp.py b/python/completers/cpp.py index 96d800b7..09cd79df 100644 --- a/python/completers/cpp.py +++ b/python/completers/cpp.py @@ -20,7 +20,7 @@ from completer import Completer import vim import vimsupport -import indexer +import ycm_core import random import imp import os @@ -35,7 +35,7 @@ def GetCompleter(): class ClangCompleter( Completer ): def __init__( self ): - self.completer = indexer.ClangCompleter() + self.completer = ycm_core.ClangCompleter() self.completer.EnableThreading() self.contents_holder = [] self.filename_holder = [] @@ -49,7 +49,7 @@ class ClangCompleter( Completer ): def GetUnsavedFilesVector( self ): - files = indexer.UnsavedFileVec() + files = ycm_core.UnsavedFileVec() self.contents_holder = [] self.filename_holder = [] for buffer in vimsupport.GetUnsavedBuffers(): @@ -62,7 +62,7 @@ class ClangCompleter( Completer ): self.contents_holder.append( contents ) self.filename_holder.append( name ) - unsaved_file = indexer.UnsavedFile() + unsaved_file = ycm_core.UnsavedFile() unsaved_file.contents_ = self.contents_holder[ -1 ] unsaved_file.length_ = len( self.contents_holder[ -1 ] ) unsaved_file.filename_ = self.filename_holder[ -1 ] @@ -88,7 +88,7 @@ class ClangCompleter( Completer ): # are still around when we call CandidatesForQueryAndLocationInFile. We do # this to avoid an extra copy of the entire file contents. - files = indexer.UnsavedFileVec() + files = ycm_core.UnsavedFileVec() if not query: files = self.GetUnsavedFilesVector() @@ -158,7 +158,7 @@ class Flags( object ): except KeyError: flags_module = self.FlagsModuleForFile( filename ) if not flags_module: - return indexer.StringVec() + return ycm_core.StringVec() results = flags_module.FlagsForFile( filename ) sanitized_flags = SanitizeFlags( results[ 'flags' ] ) @@ -224,7 +224,7 @@ def SanitizeFlags( flags ): sanitized_flags.append( flag ) - vector = indexer.StringVec() + vector = ycm_core.StringVec() for flag in sanitized_flags: vector.append( flag ) return vector