Move tern server into a web-worker.

Had to add requirejs to the extension to make everything work in a web-worker.
Added tern-worker.js, and modified ScopeManager to post messages to the worker to find completions.
This commit is contained in:
Erik Tierney committed 2013-03-26 13:22:39 -04:00
1 parent 46365a6e2e
commit 412dedf919
4 files changed
+293 -48

No files matched your search

@@ -27,10 +27,13 @@
define(function (require, exports, module) {
"use strict";
var MODE_NAME = "javascript",
SCOPE_MSG_TYPE = "outerScope",
SINGLE_QUOTE = "\'",
DOUBLE_QUOTE = "\"";
var MODE_NAME = "javascript",
SCOPE_MSG_TYPE = "outerScope",
SINGLE_QUOTE = "\'",
DOUBLE_QUOTE = "\"",
TERN_INIT_MSG = "ternInit",
TERN_COMPLETIONS_MSG = "ternCompletions",
TERN_GET_FILE_MSG = "ternGetFile";
/**
* Create a hint token with name value that occurs at the given list of
@@ -384,4 +387,7 @@ define(function (require, exports, module) {
exports.SCOPE_MSG_TYPE = SCOPE_MSG_TYPE;
exports.SINGLE_QUOTE = SINGLE_QUOTE;
exports.DOUBLE_QUOTE = DOUBLE_QUOTE;
exports.TERN_COMPLETIONS_MSG = TERN_COMPLETIONS_MSG;
exports.TERN_INIT_MSG = TERN_INIT_MSG;
exports.TERN_GET_FILE_MSG = TERN_GET_FILE_MSG;
});