Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 493957

Summary: Cannot create file in root directory
Product: [ECD] Orion Reporter: Robert Spies <wilford>
Component: ClientAssignee: Casey Flynn <caseyflynn>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: caseyflynn, Michael_Rennie, remy.suen, Silenio_Quarti, steve_northover, wilford
Version: 12.0   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
See Also: https://git.eclipse.org/r/85542
https://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=cc36e31993b42f25c6bbd7630e142affe3f78a09
https://git.eclipse.org/r/85906
https://git.eclipse.org/r/89155
https://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=5372bf0a247e6a4e70bc9527f74ef26ffce17b1f
Whiteboard:

Description Robert Spies CLA 2016-05-18 18:26:00 EDT
You can only currently create a file in a folder, you cannot create a file in the root directory.  You can view existing files, but you cannot create more.

Steps to repro:

1. Open orion.
2. Try to create file in the root directory.  If no folders are selected, you only have the option to create a folder, not a file.
Comment 1 Silenio Quarti CLA 2016-06-23 13:02:26 EDT
This has been disabled by design (files need to be inside a project).

I have enable it on the electron app (bug#496430) since the notion of projects was removed and we are just editing the file system.
Comment 2 Remy Suen CLA 2016-11-08 03:06:13 EST
(In reply to Silenio Quarti from comment #1)
> This has been disabled by design (files need to be inside a project).

If this is by design, should this bug be closed as INVALID?
Comment 3 Eclipse Genie CLA 2016-11-22 18:12:57 EST
New Gerrit change created: https://git.eclipse.org/r/85542
Comment 5 Michael Rennie CLA 2016-11-24 10:49:19 EST
I merged in the POC support.

Here are the dark launch flags to use to enable its use:

"darklaunch.createFileAtRoot"
"darklaunch.createFolderAtRoot"
"darklaunch.enableNewProject"
"darklaunch.enableLinkProject"
Comment 6 Michael Rennie CLA 2016-11-25 10:50:17 EST
(In reply to Eclipse Genie from comment #4)
> Gerrit change https://git.eclipse.org/r/85542 was merged to [master].
> Commit:
> http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/
> ?id=cc36e31993b42f25c6bbd7630e142affe3f78a09

I had to revert the commit, because it caused file creation to fail:

Uncaught Error: No matching file service for location: /file
    at s._getServiceIndex (https://beta3.hub.jazz.net/code/edit/edit.js:20:3327)
    at s._getService (https://beta3.hub.jazz.net/code/edit/edit.js:20:3410)
    at s._createArtifact (https://beta3.hub.jazz.net/code/edit/edit.js:20:4658)
    at s.createFile (https://beta3.hub.jazz.net/code/edit/edit.js:20:5152)
    at r (https://beta3.hub.jazz.net/code/edit/edit.js:15:29697)
    at https://beta3.hub.jazz.net/code/edit/edit.js:15:30020
    at u (https://beta3.hub.jazz.net/code/edit/edit.js:15:22923)
    at HTMLInputElement.<anonymous> (https://beta3.hub.jazz.net/code/edit/edit.js:4:6146)
Comment 7 Eclipse Genie CLA 2016-11-28 21:05:43 EST
New Gerrit change created: https://git.eclipse.org/r/85906
Comment 8 Eclipse Genie CLA 2017-01-19 18:42:59 EST
New Gerrit change created: https://git.eclipse.org/r/89155
Comment 9 Steve Northover CLA 2017-01-25 14:31:14 EST
Where are we with this?  Is the latest code working?

ASIDE: SSQ, I see no problem with creating a file in the root in the file system.
Comment 10 Casey Flynn CLA 2017-01-25 14:41:49 EST
(In reply to Steve Northover from comment #9)

The code is working, I am waiting on a review.