| Summary: | need a way to create file from a plugin | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Rafael Chaves <eclipse> |
| Component: | Client | Assignee: | Project Inbox <orion.client-inbox> |
| Status: | RESOLVED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | davidleonigit-eclipse, mamacdon |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
|
Description
Rafael Chaves
I wonder if you could take advantage of "import from URL" somehow as a workaround, or maybe as an actual solution. Instead of taking the user to the editor, you could take them to the navigator at the right location with import from URL prefilled in with the location for the file. I think the effort on our side would be to expose a URL binding for that command. So you could do something like: https://orion.eclipse.org/navigate/table.html#/file/I/org.eclipse.orion.client/?depth=1,importURL=http://myFile/is/here.txt Similar to what works today... https://orion.eclipse.org/navigate/table.html#/file/I/org.eclipse.orion.client/?depth=1,newFolder=foo The user would have to hit enter to confirm the import. Do you think that would be enough? Susan, for the single file case, that would probably be sufficient. For multiple files, either support for importing ZIP files or a multi-part response entity would work. (assuming you could import in the current directory, not only as a top level directory). I wrote a plugin for compiling Javascript es6 files and I had a similar problem. The plugin offers a command to save current .es6 to a compiled file with .js extension. I discovered it is actually possible to save files in Orion 1.0 provided the user clones the plugin repo and then installs the plugin from address SERVER_ADDRESS/file/USERNAME/CLONED_REPO_NAME/somePlugin.html For more details you can see the plugin install instructions https://github.com/DavidLeoni/galactic-harmony and the file backend.js for reading/saving to the server: https://github.com/DavidLeoni/galactic-harmony/blob/1.0/main/plugins/galactic-harmony/backend.js David, is there some mechanism in the server that automatically tells the UI to show the new added file, or does the user need to refresh the page to actually see it? 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 |