Просмотр исходного кода

Rename Snippets -> SnippetManager

Shane Kilkelly 10 лет назад
Родитель
Сommit
115734f82e

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

@@ -1,6 +1,6 @@
 define [
 	"ide/editor/directives/aceEditor/auto-complete/SuggestionManager"
-	"ide/editor/directives/aceEditor/auto-complete/Snippets"
+	"ide/editor/directives/aceEditor/auto-complete/SnippetManager"
 	"ace/ace"
 	"ace/ext-language_tools"
 ], (SuggestionManager, SnippetManager) ->

+ 4 - 3
services/web/public/coffee/ide/editor/directives/aceEditor/auto-complete/Snippets.coffee → services/web/public/coffee/ide/editor/directives/aceEditor/auto-complete/SnippetManager.coffee

@@ -9,7 +9,7 @@ define () ->
 		"verbatim"
 	]
 
-	snippets = for env in environments
+	staticSnippets = for env in environments
 		{
 			caption: "\\begin{#{env}}..."
 			snippet: """
@@ -20,7 +20,7 @@ define () ->
 			meta: "env"
 		}
 
-	snippets = snippets.concat [{
+	staticSnippets = staticSnippets.concat [{
 		caption: "\\begin{array}..."
 		snippet: """
 			\\begin{array}{${1:cc}}
@@ -96,9 +96,10 @@ define () ->
 		"""
 		meta: "env"
 	}]
+
 	class SnippetManager
 		getCompletions: (editor, session, pos, prefix, callback) ->
 			console.log ">> get snippet completions"
-			callback null, snippets
+			callback null, staticSnippets
 
 	return SnippetManager