| Summary: | Code Edit widget: Latest build(I20151216-2218) is broken on javascript plugin. | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | libing wang <libingw> | ||||
| Component: | Client | Assignee: | Curtis Windatt <curtis.windatt.public> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | critical | ||||||
| Priority: | P2 | CC: | curtis.windatt.public, Michael_Rennie, pwebster, steve_northover | ||||
| Version: | 11.0 | ||||||
| Target Milestone: | 11.0 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows 7 | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
My gut feeling is that the recent js tooling improvements introduced this. It is also reproducible in the non build version of the widget demo page: http://yourseldHostName..orion.eclipse.org:9000/embeddedEditor/demo/demoCodeEdit.html Created attachment 258765 [details]
Workaround fix for JS plugin
http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=493a137b12949418a7939b1f7a35e7cdf839ebf9 Pushed my change There are two operations happening at startup 1) TernProjectManager listens for an inputChangedEvent 2) The JS web worker finishes starting and starts the Tern server In Orion, (1) happens first which sets pending options for the server (2) In CodeEdit (1) never happens, when (2) happens, there are no pending options and the postMessage chokes. This fix works by posting default options for the server (2) if no custom options (1) has been run. If for whatever reason the timings are reversed (2) happens before (1), the server will start up with default options, then restart with the custom options. This is what we were doing by default last month and is a relatively minor performance hit. Pulled the latest code and tested the non build version of the demo page, the issue has been fixed. Waiting for the build and will test the built version of the demo. Verified with the latest build(I20151217-1108). The issue is fixed. |
I've run my demo page with the latest widget build and got the following error during the page startup. Uncaught TypeError: Cannot read property 'request' of undefined In javascriptplugin.js: P.prototype.postMessage = function(e, t) { var n = "start_server" === e.request;