| Summary: | Editor examples: require.js link dead. | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Thaddee Tyl <thaddee.tyl> |
| Component: | Client | Assignee: | John Arthorne <john.arthorne> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | simon_kaegi |
| Version: | unspecified | ||
| Target Milestone: | 0.5 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Thaddee Tyl
This is because at runtime there are two source trees mounted side-by-side in the server configuration. This runtime shape doesn't match the source tree shape, but there is nothing at build-time that inserts it. Since this is an example that we want people to consume, maybe we could just add a comment in the embeddededitor.html pointing to it? If it helps you in the short term, you can find the require.js script here: https://github.com/eclipse/orion.client/tree/master/bundles/org.eclipse.orion.client.core/web/requirejs I wouldn't recommend finding a random require.js copy on the internet because it is a fast evolving script and we may not work on older or newer versions. John Arthorne, obviously merely copying the requirejs directory to the correct place wasn't enough, because other js components that are vital to the editor fail to load. I find it unfortunate that developers that only want to use Orion's web-based editor have to jump through hoops. I wish each component of the system was cleanly separated and could be worked on independently of the rest. I'll try to see what I can do to make the experience smoother. (In reply to comment #2) > John Arthorne, obviously merely copying the requirejs directory > to the correct place wasn't enough, because other js components > that are vital to the editor fail to load. What error do you see, and in what example and what browser? I tried this yesterday and it worked for me (Chrome 19, Firefox 14, Windows 7). There was one bug in the textview demo that had a bad path to the js-tests component (bug 382253). But the minimal and embedded editor examples worked as standalone/offline pages once requirejs was in the right place. (In reply to comment #2) > I find it unfortunate that developers that only want to use > Orion's web-based editor have to jump through hoops. > I wish each component of the system was cleanly separated > and could be worked on independently of the rest. > I'll try to see what I can do to make the experience smoother. Any ideas here definitely welcome. I think one challenge is where to draw the line because there are many different editor embedding scenarios. Some people want a raw text editor, others want language tooling features, etc. The current examples are just three points on a large spectrum of possible configurations. (In reply to comment #3) > (In reply to comment #2) > > John Arthorne, obviously merely copying the requirejs directory > > to the correct place wasn't enough, because other js components > > that are vital to the editor fail to load. > > What error do you see, and in what example and what browser? I tried this > yesterday and it worked for me (Chrome 19, Firefox 14, Windows 7). There was > one bug in the textview demo that had a bad path to the js-tests component (bug > 382253). But the minimal and embedded editor examples worked as > standalone/offline pages once requirejs was in the right place. For some reason, it doesn't find i18n.js (which I believe means orion.client/bundles/org.eclipse.orion.client.editor/web/orion/textview/i18n.js). Also, it doesn't find the CSS files right off the bat, but that can at least be solved by copying the css directory from orion.client/bundles/org.eclipse.orion.client.core/web/css to orion.client/bundles/org.eclipse.orion.client.editor/web/css. I have added comments in the example source indicating that require.js needs to be reachable when running the example. I also wrote a post describing how to setup the examples, which should help people searching for information on it. |