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

Bug 414170

Summary: support just changing the selection from plugin implementing orion.edit.command
Product: [ECD] Orion Reporter: Manu Sridharan <m.sridharan>
Component: EditorAssignee: Mark Macdonald <mamacdon>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: mamacdon
Version: unspecified   
Target Milestone: 4.0 M1   
Hardware: PC   
OS: Mac OS X   
Whiteboard:

Description Manu Sridharan CLA 2013-07-31 17:21:43 EDT
I'd like to be able to just change the editor selection from a plugin implementing the orion.edit.command service.  Currently, you can change both the text of the buffer and the selection, but not just the selection.  This would be useful for implementing "Jump to Declaration"-style functionality.  

Ideally, changing the selection would also cause the editor buffer to scroll to the expose the new selection, if needed.  It might also be useful to be able to change the cursor position, but that seems less critical.
Comment 1 Mark Macdonald CLA 2013-07-31 17:59:52 EDT
This seems reasonable and was only a small code change.

We now allow the selection to be set independently of the text being set. Also, if a selection is set, it will be scrolled to.

http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=13ddc54


For building any serious language integration, we'll probably need to expose more powerful services than just orion.edit.command, however.