| Summary: | rename is broken (again) | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Boris Kozorovitzky <majorzbzzn> |
| Component: | Node | Assignee: | Mark Macdonald <mamacdon> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | elijahe, ken_walker, mamacdon |
| Version: | 5.0 | ||
| Target Milestone: | 6.0 M1 | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
|
Description
Boris Kozorovitzky
Indeed, when I tried to use the context menu to rename a file it offered to rename the parent folder So far I haven't been able to reproduce this on orion.eclipse.org using either Chrome, Firefox or IE. I tried renaming files and folders with the context menu and the dropdown menus and it always worked. Can you please tell me which browser you were using and any more specific information about the steps to reproduce this issue? I am using the node version (latest on NPM) With Chrome (latest) I can attach an animated gif if needed but since Ken is able to reproduce it too I think it would be best to talk directly with him. The problem only happens the Node server. The Node backend is ultimately at fault, but there's problems in the UI as well. I have a fix. There was a chain of cascading exceptions here that ends with Rename being broken. (You can see the original exception by opening the JS console while browsing directories on an Orion Node server). i) The Node server sometimes returns a bogus file object like this for regular files: > "Directory": false, > "ChildrenLocation": null // wrong: this property should not be here at all ii) In the UI, extensionCommands does not check for null fields, so it throws when the "Open Related > Shell" command tries to perform a string replacement on the null ChildrenLocation. iii) commandRegistry._render() does not perform any exception handling, so the exception thrown by extensionCommands terminates rendering prematurely. I didn't debug fully, but this somehow causes the Rename command to target the wrong item -- maybe because _render() blows up before it can create a CommandInvocation targeting the file you actually selected. I fixed these in here http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=bd943f4 Thanks Mark. Please feel free to re-assign this defect to yourself (since I can't do that yet). (In reply to Elijah El-Haddad from comment #6) > Thanks Mark. Please feel free to re-assign this defect to yourself (since I > can't do that yet). Someone needs to start the committer elections already. I published v0.0.27 of orion to npm, which includes this fix (and is a smaller download as well, since I removed some files that shouldn't have been published). https://npmjs.org/package/orion |