| Summary: | [tern] Templates supplied in Tern plugins along with indexes (express, angular), do not show up in content assst | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Curtis Windatt <curtis.windatt.public> |
| Component: | JS Tools | Assignee: | Curtis Windatt <curtis.windatt.public> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | major | ||
| Priority: | P3 | CC: | Michael_Rennie |
| Version: | 12.0 | ||
| Target Milestone: | 12.0 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
|
Description
Curtis Windatt
Looks like this code mysteriously vanished from tern.js:
if (srv.passes[hookname])
srv.passes[hookname].forEach(function(hook) {hook(file, wordStart, wordEnd, gather);});
http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=7bcf8ebe1df75d93f7c5581b18232218e87294cd Fixed in master I have also created a new test suite for content assist supplied by Tern index plugins. I had to modify express.js to get the templates working correctly so it seems likely the other index plugins will need work. The main problem is the removal of srv.passes[hookname]. You can see the old version of it here: http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/tree/bundles/org.eclipse.orion.client.javascript/web/tern/lib/tern.js?h=stable_20150707 The API was modified to use wordStart/wordEnd/gather to match what newer versions of Tern are doing. Next time we update Tern we might be able to hook into the signal api rather than add our own passes call. https://github.com/ternjs/tern/blob/master/lib/tern.js#L769 |