Add guesses to code hints

This commit is contained in:
dloverin authored and Erik Tierney committed 2013-04-05 13:00:25 -04:00
1 parent c887e8760f
commit dac2002e04
5 files changed
+253 -232

No files matched your search

@@ -151,15 +151,15 @@ importScripts("thirdparty/requirejs/require.js");
for (var i = 0; i < data.completions.length; ++i) {
var property = data.completions[i];//, className = typeToIcon(completion.type);
//if (data.guess) className += " Tern-completion-guess";
properties.push({value: completion.name, type: completion.type, guess: true /*, className: className*/});
properties.push({value: property, guess: true});
}
// Post a message back to the main thread with the completions
// Post a message back to the main thread with the completions
self.postMessage({type: HintUtils.TERN_GET_PROPERTIES_MSG,
dir: dir,
file: file,
completions: properties
});
dir: dir,
file: file,
properties: properties
});
});
}
@@ -220,7 +220,8 @@ importScripts("thirdparty/requirejs/require.js");
} else if ( type === HintUtils.TERN_GET_PROPERTIES_MSG) {
var file = request.file,
dir = request.dir;
handleGetProperties(file, dir);
text = request.text;
handleGetProperties(dir, file, text);
} else if ( type === HintUtils.TERN_GET_FILE_MSG ) {
file = request.file,
text = request.text;