Skip to content

Commit

Permalink
Add FixItQuick for larger projects
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Jackon authored and puremourning committed Aug 5, 2015
1 parent 8e81d0c commit 36be0bb
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions ycmd/completers/cpp/clang_completer.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ def DefinedSubcommands( self ):
'GetType',
'GetTypeQuick',
'GetParent',
'FixIt']
'FixIt',
'FixItQuick']


def OnUserCommand( self, arguments, request_data ):
Expand Down Expand Up @@ -166,7 +167,12 @@ def OnUserCommand( self, arguments, request_data ):
'FixIt' : {
'method' : self._FixIt,
'args' : { 'request_data' : request_data }
}
},
'FixItQuick' : {
'method' : self._FixIt,
'args' : { 'request_data' : request_data,
'reparse' : False }
},
}

try:
Expand Down Expand Up @@ -261,7 +267,7 @@ def _GetSemanticInfo( self, request_data, func, reparse = True ):
def _ClearCompilationFlagCache( self ):
self._flags.Clear()

def _FixIt( self, request_data ):
def _FixIt( self, request_data, reparse = True ):
filename = request_data[ 'filepath' ]
if not filename:
raise ValueError( INVALID_FILE_MESSAGE )
Expand All @@ -280,7 +286,7 @@ def _FixIt( self, request_data ):
column,
files,
flags,
True )
reparse )

# don't raise an error if not fixits: - leave that to the client to respond
# in a nice way
Expand Down

0 comments on commit 36be0bb

Please sign in to comment.