Explorar el Código

Put the references autocomplete feature behind a feature flag for now.

Shane Kilkelly hace 10 años
padre
commit
d5edea77db

+ 2 - 0
services/web/public/coffee/ide/editor/directives/aceEditor/auto-complete/AutoCompleteManager.coffee

@@ -45,6 +45,8 @@ define [
 			references = @$scope.$root._references
 			ReferencesCompleter =
 				getCompletions: (editor, session, pos, prefix, callback) ->
+					if window._ENABLE_REFERENCES_AUTOCOMPLETE != true
+						return callback(null, [])
 					if references.keys
 						range = new Range(pos.row, 0, pos.row, pos.column)
 						lineUpToCursor = editor.getSession().getTextRange(range)

+ 4 - 0
services/web/public/coffee/ide/references-search/ReferencesSearchManager.coffee

@@ -16,6 +16,8 @@ define [
 				@getReferenceKeys()
 
 		indexReferences: (doc_id) ->
+			if window._ENABLE_REFERENCES_AUTOCOMPLETE != true
+				return
 			$.post(
 				"/project/#{@$scope.project_id}/references",
 				{
@@ -31,6 +33,8 @@ define [
 			)
 
 		getReferenceKeys: () ->
+			if window._ENABLE_REFERENCES_AUTOCOMPLETE != true
+				return
 			$.get(
 				"/project/#{@$scope.project_id}/references/keys",
 				{