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

Bug 426407

Summary: New File/Folder commands should create a file/folder immediately and allow user to rename it
Product: [ECD] Orion Reporter: Elijah El-Haddad <elijahe>
Component: ClientAssignee: Elijah El-Haddad <elijahe>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: ken_walker, mamacdon
Version: 5.0Flags: elijahe: review? (mamacdon)
Target Milestone: 5.0 RC1   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Bug Depends on: 398685    
Bug Blocks:    

Description Elijah El-Haddad CLA 2014-01-22 16:31:37 EST
The current behavior of New File and New Folder is to pop-up a tooltip asking for a file/folder name before creating a file or folder with that name.

The behavior of most other software products, including the Windows OS, is to create the file/folder immediately with a name such as "New File" and to allow the user to rename the file right away.

Creating a new file/folder in the Orion Navigator should behave the same way since this is what most users would expect.
Comment 1 Elijah El-Haddad CLA 2014-01-22 16:44:45 EST
I'm currently working on this. If anyone with commiter rights sees this bug and it still isn't assigned to me I'd appreciate it if you could go ahead and assign it to me.
Comment 2 Elijah El-Haddad CLA 2014-01-23 14:41:01 EST
-Initial implementation for files and folders not added as top level items

https://github.com/elijahe/orion.client/commit/4481169706bb4239c5ebd10bbd1908a0d63c89d0
Comment 3 Elijah El-Haddad CLA 2014-01-27 11:53:24 EST
- Extended implementation to top level folders
- No longer immediately creating file/folder. Rather creating a place holder dom node and prompting for name of file/folder first. This greatly simplifies the implementation and allows the user to cancel the creation by pressing "ESC".
- Refactored uiutils.js->getUserText() to take an options object and modified callers. Also removed unused promptMessage parameter and added insertAsChild option.
https://github.com/elijahe/orion.client/commit/327c9baf7fa139e025586c8696e790c4f58428c1
Comment 5 Elijah El-Haddad CLA 2014-01-27 17:41:26 EST
- Modified the name of uiUtils.getUserText()'s option.shouldHideRefNode parameter to option.hideRefNode
- Added optimization in fileCommands.createUniqueNameArtifact() to get children[] from parent item if it is already loaded.
https://github.com/elijahe/orion.client/commit/48b7d4117111d70f64696be2639c713d21ab1d3f
Comment 6 Mark Macdonald CLA 2014-01-28 10:52:40 EST
(In reply to Elijah El-Haddad from comment #5)
> - Modified the name of uiUtils.getUserText()'s option.shouldHideRefNode
> parameter to option.hideRefNode
> - Added optimization in fileCommands.createUniqueNameArtifact() to get
> children[] from parent item if it is already loaded.

pushed to master
http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=0912dae
Comment 7 Elijah El-Haddad CLA 2014-01-30 10:17:47 EST
This work is complete, closing the bug.