Community
Participate
Working Groups
Currently we provide content assist and templates for JSDoc tags in the client-side of the JS bundle. It would be much nicer if we could move all the work into a Tern plug-in. Once in a plugin, we could also investigate pushing it back to Tern (since Tern already ships with a JSDoc-reading plugin)
We should use the tag list and conventions from: http://usejsdoc.org/ to include JSDoc 3 tags
This one should be pretty easy to do, we do not need to actually hook into any phases or provide our own request, we can simply add ourselves as a listener in the 'completion' event like: tern.registerPlugin("jsdoc_assist", function(server, options) { function docCompletions(file, query) { //TODO copy code out of ternAssist.js into here for doc completions //also update the args of the stock query to include the context } return { completion: docCompletions }; }
Provided the plugin skeleton and tag map: http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=2592d9fe4bad060a698e18ad79660af4590a4147 Will have to modify Tern a bit to make this activate as expected since Tern does not callback for the 'completion' hook, if it cannot find an expression (which is always the case for doc)
Created attachment 257978 [details] POC patch This patch moves all of our doc assist into the new plugin as a POC. There is a lot of work to do to make it all work perfectly again, and there are many failing tests. Remaining work to make it awesome: 1. hook up the eslint rule completion code again 2. hook up type completions in @link, {} cases 3. hook up type member completions
Pushed updated logic (moved code from client to plugin) + hooks in the new plugin for type and type member completions: http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=0400c67a3ad0aecdfd4ce36a1c713470ffff5129
Pushed the remainder of the changes in: http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=aa3e0486d270cdec24c7e173088a519be306ff24 All unit tests and smoke tests pass. If we find any weirdness we can fix that in their own bugs.