Project

General

Profile

Download (814 Bytes) Statistics
| Branch: | Tag: | Revision:
1
package eu.etaxonomy.taxeditor.editor.view.derivate.handler;
2

    
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;
8

    
9
import eu.etaxonomy.taxeditor.editor.view.derivate.DerivateView;
10

    
11
public class ListenToSelectionChangeHandler extends AbstractHandler {
12

    
13
    @Override
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();
19
        }
20
        return null;
21
    }
22

    
23
}
(11-11/18)