In my eclipse plugin, I have the following code:
public class MyHandler extends AbstractHandler { @Override public Object execute( ExecutionEvent event ) throws ExecutionException { ISelection sel = HandlerUtil .getActiveWorkbenchWindowChecked( event ) .getSelectionService() .getSelection(); if( sel instanceof TextSelection ) { IEditorPart activeEditor = PlatformUI .getWorkbench() .getActiveWorkbenchWindow() .getActivePage() .getActiveEditor(); IEditorInput editorInput = activeEditor.getEditorInput(); if( editorInput instanceof CompareEditorInput ) {
Here I am handling a text selection event emanating from CompareEditorInput , that is, the result of comparing two deleted file versions with a sub-loan.
Now I want to edit the text correctly. To do this, I need to know if he selects any text inside the editor of the left side or inside the editor of the right side.
How can I find out?
EDIT 2010-04-10:
A specific example of CompareEditorInput is org.tigris.subversion.subclipse.ui.compare.SVNCompareEditorInput .
source share