From e94863d0262b98e895a993d9cf3eab96918e409a Mon Sep 17 00:00:00 2001 From: Shane Kilkelly Date: Tue, 29 Dec 2015 13:30:57 +0000 Subject: [PATCH] Get reference keys when project loads. --- .../aceEditor/auto-complete/AutoCompleteManager.coffee | 2 +- .../ide/references-search/ReferencesSearchManager.coffee | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/services/web/public/coffee/ide/editor/directives/aceEditor/auto-complete/AutoCompleteManager.coffee b/services/web/public/coffee/ide/editor/directives/aceEditor/auto-complete/AutoCompleteManager.coffee index ce11b09903..23e653ae54 100644 --- a/services/web/public/coffee/ide/editor/directives/aceEditor/auto-complete/AutoCompleteManager.coffee +++ b/services/web/public/coffee/ide/editor/directives/aceEditor/auto-complete/AutoCompleteManager.coffee @@ -55,7 +55,7 @@ define [ console.log result callback null, result - @editor.completers = [ReferencesCompleter, @suggestionManager, SnippetCompleter] + @editor.completers = [@suggestionManager, SnippetCompleter, ReferencesCompleter] disable: () -> @editor.setOptions({ diff --git a/services/web/public/coffee/ide/references-search/ReferencesSearchManager.coffee b/services/web/public/coffee/ide/references-search/ReferencesSearchManager.coffee index f150c4adfb..2c60818507 100644 --- a/services/web/public/coffee/ide/references-search/ReferencesSearchManager.coffee +++ b/services/web/public/coffee/ide/references-search/ReferencesSearchManager.coffee @@ -12,6 +12,9 @@ define [ @$scope.$emit 'references:changed', entity @indexReferences doc.doc_id + @$scope.$on 'project:joined', (e) => + @getReferenceKeys() + indexReferences: (doc_id) -> $.post( "/project/#{@$scope.project_id}/references",