Use language id

This commit is contained in:
Bernhard Sirlinger committed 2013-03-27 23:48:52 +01:00
1 parent cb738dd992
commit 04d63b1fae
4 files changed
+39 -40

No files matched your search

@@ -400,7 +400,7 @@ define(function (require, exports, module) {
cachedHints = null;
cachedType = null;
if (editor && editor.getModeForDocument() === HintUtils.MODE_NAME) {
if (editor && editor.getLanguageForSelection().getId() === HintUtils.LANGUAGE_ID) {
initializeSession(editor);
$(editor)
.on(HintUtils.eventName("change"), function () {
@@ -447,7 +447,7 @@ define(function (require, exports, module) {
installEditorListeners(EditorManager.getActiveEditor());
var jsHints = new JSHints();
CodeHintManager.registerHintProvider(jsHints, [HintUtils.MODE_NAME], 0);
CodeHintManager.registerHintProvider(jsHints, [HintUtils.LANGUAGE_ID], 0);
// for unit testing
exports.jsHintProvider = jsHints;