1 package eu
.etaxonomy
.taxeditor
.editor
.view
.derivate
.handler
;
3 import org
.eclipse
.core
.commands
.AbstractHandler
;
4 import org
.eclipse
.core
.commands
.ExecutionEvent
;
5 import org
.eclipse
.core
.commands
.ExecutionException
;
6 import org
.eclipse
.ui
.IWorkbenchPart
;
7 import org
.eclipse
.ui
.handlers
.HandlerUtil
;
9 import eu
.etaxonomy
.taxeditor
.editor
.view
.derivate
.DerivateView
;
11 public class ListenToSelectionChangeHandler
extends AbstractHandler
{
14 public Object
execute(ExecutionEvent event
) throws ExecutionException
{
15 IWorkbenchPart activePart
= HandlerUtil
.getActivePart(event
);
16 if(activePart
instanceof DerivateView
){
17 DerivateView derivativeEditor
= (DerivateView
)activePart
;
18 derivativeEditor
.toggleListenToSelectionChange();