| Summary: | Provide support for common libraries such as dojo in javascript editor | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Mike Fulton <fultonm> | ||||
| Component: | JS Tools | Assignee: | Project Inbox <orion.client-inbox> | ||||
| Status: | RESOLVED WONTFIX | QA Contact: | |||||
| Severity: | enhancement | ||||||
| Priority: | P3 | CC: | mamacdon, Michael_Rennie, simon_kaegi, wolfgang.glas | ||||
| Version: | 0.2 | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Mike Fulton
Created attachment 198264 [details]
editor view when looking at 'clean' code that uses dojo
Add these 2 lines at the top of your file, and most of the errors should go away: /*jslint browser:true*/ /*global dojo*/ Orion uses JSLint for JavaScript validation, and JSLint treats references to a global symbol as errors unless the symbol is declared explicitly. These 2 lines tell it to assume the "dojo" symbol along with common browser globals (document, Option, etc). Is there any progress on AMD-based toolkits like dojo? (In reply to Wolfgang Glas from comment #3) > Is there any progress on AMD-based toolkits like dojo? We have nothing specifically for AMD yet. But we have made progress on some prerequisites: a JS validator that is easier to extend, and support for index files in the Tern.js format. To deal with AMD, we'll likely also need a mechanism for users to provide their AMD loader config and their project->web path mapping. With those (and an index file providing the API type signatures), we should be able to extend the validator to statically check calls to library methods. This is unlikely to happen in the Orion 5.0 timeframe. Hi Mark,
Thanks for your reply. Support for AMD-modules was one of my big hopes with browser-based IDEs, but so far I have disappointed by all of them.
Hopefully, eclipse orion as one of the most fast-moving frameworks will finally get there ;-)
Best Regards,
Wolfgang
Closing as part of a mass clean up of inactive bugs. Please reopen if this problem still occurs or is relevant to you. For more details see: https://dev.eclipse.org/mhonarc/lists/orion-dev/msg03444.html |