Renaming 'indexer' to the more accurate 'ycm_core'
This commit is contained in:
parent
f3ddfd5458
commit
3c65c84c7b
2
.gitignore
vendored
2
.gitignore
vendored
@ -36,7 +36,7 @@ nosetests.xml
|
|||||||
.mr.developer.cfg
|
.mr.developer.cfg
|
||||||
|
|
||||||
# custom
|
# custom
|
||||||
indexer_tests
|
ycm_core_tests
|
||||||
|
|
||||||
# When we use the bcp tool to copy over the parts of boost we care about, it
|
# 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
|
# also copies some cruft files we don't need; this ignores them
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
cmake_minimum_required( VERSION 2.8 )
|
cmake_minimum_required( VERSION 2.8 )
|
||||||
|
|
||||||
project( indexer )
|
project( ycm_core )
|
||||||
|
|
||||||
find_package( PythonLibs REQUIRED )
|
find_package( PythonLibs REQUIRED )
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with YouCompleteMe. If not, see <http://www.gnu.org/licenses/>.
|
# along with YouCompleteMe. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
project( indexer_tests )
|
project( ycm_core_tests )
|
||||||
cmake_minimum_required( VERSION 2.8 )
|
cmake_minimum_required( VERSION 2.8 )
|
||||||
|
|
||||||
# The gtest library triggers these silly warnings, so we turn them off
|
# The gtest library triggers these silly warnings, so we turn them off
|
||||||
@ -27,7 +27,7 @@ endif()
|
|||||||
add_subdirectory( gmock )
|
add_subdirectory( gmock )
|
||||||
|
|
||||||
include_directories(
|
include_directories(
|
||||||
${indexer_SOURCE_DIR}
|
${ycm_core_SOURCE_DIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
include_directories(
|
include_directories(
|
||||||
@ -50,7 +50,7 @@ add_executable( ${PROJECT_NAME}
|
|||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries( ${PROJECT_NAME}
|
target_link_libraries( ${PROJECT_NAME}
|
||||||
indexer
|
ycm_core
|
||||||
gmock_main
|
gmock_main
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
#include <boost/utility.hpp>
|
#include <boost/utility.hpp>
|
||||||
#include <boost/python/suite/indexing/vector_indexing_suite.hpp>
|
#include <boost/python/suite/indexing/vector_indexing_suite.hpp>
|
||||||
|
|
||||||
BOOST_PYTHON_MODULE(indexer)
|
BOOST_PYTHON_MODULE(ycm_core)
|
||||||
{
|
{
|
||||||
using namespace boost::python;
|
using namespace boost::python;
|
||||||
using namespace YouCompleteMe;
|
using namespace YouCompleteMe;
|
@ -20,7 +20,7 @@
|
|||||||
from completer import Completer
|
from completer import Completer
|
||||||
import vim
|
import vim
|
||||||
import vimsupport
|
import vimsupport
|
||||||
import indexer
|
import ycm_core
|
||||||
import utils
|
import utils
|
||||||
|
|
||||||
MAX_IDENTIFIER_COMPLETIONS_RETURNED = 10
|
MAX_IDENTIFIER_COMPLETIONS_RETURNED = 10
|
||||||
@ -33,7 +33,7 @@ def GetCompleter():
|
|||||||
|
|
||||||
class IdentifierCompleter( Completer ):
|
class IdentifierCompleter( Completer ):
|
||||||
def __init__( self ):
|
def __init__( self ):
|
||||||
self.completer = indexer.IdentifierCompleter()
|
self.completer = ycm_core.IdentifierCompleter()
|
||||||
self.completer.EnableThreading()
|
self.completer.EnableThreading()
|
||||||
|
|
||||||
|
|
||||||
@ -61,7 +61,7 @@ class IdentifierCompleter( Completer ):
|
|||||||
if not filetype or not filepath or not identifier:
|
if not filetype or not filepath or not identifier:
|
||||||
return
|
return
|
||||||
|
|
||||||
vector = indexer.StringVec()
|
vector = ycm_core.StringVec()
|
||||||
vector.append( identifier )
|
vector.append( identifier )
|
||||||
self.completer.AddCandidatesToDatabase( vector,
|
self.completer.AddCandidatesToDatabase( vector,
|
||||||
filetype,
|
filetype,
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
from completer import Completer
|
from completer import Completer
|
||||||
import vim
|
import vim
|
||||||
import vimsupport
|
import vimsupport
|
||||||
import indexer
|
import ycm_core
|
||||||
import random
|
import random
|
||||||
import imp
|
import imp
|
||||||
import os
|
import os
|
||||||
@ -35,7 +35,7 @@ def GetCompleter():
|
|||||||
|
|
||||||
class ClangCompleter( Completer ):
|
class ClangCompleter( Completer ):
|
||||||
def __init__( self ):
|
def __init__( self ):
|
||||||
self.completer = indexer.ClangCompleter()
|
self.completer = ycm_core.ClangCompleter()
|
||||||
self.completer.EnableThreading()
|
self.completer.EnableThreading()
|
||||||
self.contents_holder = []
|
self.contents_holder = []
|
||||||
self.filename_holder = []
|
self.filename_holder = []
|
||||||
@ -49,7 +49,7 @@ class ClangCompleter( Completer ):
|
|||||||
|
|
||||||
|
|
||||||
def GetUnsavedFilesVector( self ):
|
def GetUnsavedFilesVector( self ):
|
||||||
files = indexer.UnsavedFileVec()
|
files = ycm_core.UnsavedFileVec()
|
||||||
self.contents_holder = []
|
self.contents_holder = []
|
||||||
self.filename_holder = []
|
self.filename_holder = []
|
||||||
for buffer in vimsupport.GetUnsavedBuffers():
|
for buffer in vimsupport.GetUnsavedBuffers():
|
||||||
@ -62,7 +62,7 @@ class ClangCompleter( Completer ):
|
|||||||
self.contents_holder.append( contents )
|
self.contents_holder.append( contents )
|
||||||
self.filename_holder.append( name )
|
self.filename_holder.append( name )
|
||||||
|
|
||||||
unsaved_file = indexer.UnsavedFile()
|
unsaved_file = ycm_core.UnsavedFile()
|
||||||
unsaved_file.contents_ = self.contents_holder[ -1 ]
|
unsaved_file.contents_ = self.contents_holder[ -1 ]
|
||||||
unsaved_file.length_ = len( self.contents_holder[ -1 ] )
|
unsaved_file.length_ = len( self.contents_holder[ -1 ] )
|
||||||
unsaved_file.filename_ = self.filename_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
|
# are still around when we call CandidatesForQueryAndLocationInFile. We do
|
||||||
# this to avoid an extra copy of the entire file contents.
|
# this to avoid an extra copy of the entire file contents.
|
||||||
|
|
||||||
files = indexer.UnsavedFileVec()
|
files = ycm_core.UnsavedFileVec()
|
||||||
if not query:
|
if not query:
|
||||||
files = self.GetUnsavedFilesVector()
|
files = self.GetUnsavedFilesVector()
|
||||||
|
|
||||||
@ -158,7 +158,7 @@ class Flags( object ):
|
|||||||
except KeyError:
|
except KeyError:
|
||||||
flags_module = self.FlagsModuleForFile( filename )
|
flags_module = self.FlagsModuleForFile( filename )
|
||||||
if not flags_module:
|
if not flags_module:
|
||||||
return indexer.StringVec()
|
return ycm_core.StringVec()
|
||||||
|
|
||||||
results = flags_module.FlagsForFile( filename )
|
results = flags_module.FlagsForFile( filename )
|
||||||
sanitized_flags = SanitizeFlags( results[ 'flags' ] )
|
sanitized_flags = SanitizeFlags( results[ 'flags' ] )
|
||||||
@ -224,7 +224,7 @@ def SanitizeFlags( flags ):
|
|||||||
|
|
||||||
sanitized_flags.append( flag )
|
sanitized_flags.append( flag )
|
||||||
|
|
||||||
vector = indexer.StringVec()
|
vector = ycm_core.StringVec()
|
||||||
for flag in sanitized_flags:
|
for flag in sanitized_flags:
|
||||||
vector.append( flag )
|
vector.append( flag )
|
||||||
return vector
|
return vector
|
||||||
|
Loading…
x
Reference in New Issue
Block a user