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

Bug 443426

Summary: Provide orion.edit.rename service
Product: [ECD] Orion Reporter: Michael Rennie <Michael_Rennie>
Component: EditorAssignee: Project Inbox <orion.editor-inbox>
Status: RESOLVED WORKSFORME QA Contact:
Severity: enhancement    
Priority: P3 CC: Silenio_Quarti
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 411721    

Description Michael Rennie CLA 2014-09-05 12:52:14 EDT
While investigating rename support for bug 411721 I think it would be easiest to create a new orion.edit.rename service that contributors could use rather than each content type / language having its own 'rename' editor command. 

We should use the same keybindings that Eclipse does: Alt+Shift+R (win / *nix) Command + Shift + R (Mac).

I envision the contribution works like:

provider.registerService("orion.edit.rename", 
                         new JavaScriptRenamer(esprima),  
		        {
			    contentType: ["application/javascript"],
			    nls: 'javascript/nls/messages',
			    name: 'javascriptRename',
			    id: "orion.edit.rename.javascript"
                        });

with a callback:

rename(editorContext, params)

returning a 'rename' object:

{
value: string
positions: []  //to put the editor into linked mode if needed
}
Comment 1 Silenio Quarti CLA 2015-05-08 11:21:03 EDT
We have the rename command already.