1
|
package eu.etaxonomy.taxeditor.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.jface.viewers.ISelection;
|
7
|
import org.eclipse.jface.viewers.IStructuredSelection;
|
8
|
import org.eclipse.ui.handlers.HandlerUtil;
|
9
|
|
10
|
public class CreateFieldUnitHandler extends AbstractHandler {
|
11
|
|
12
|
@Override
|
13
|
public Object execute(ExecutionEvent event) throws ExecutionException {
|
14
|
ISelection currentSelection = HandlerUtil.getCurrentSelection(event);
|
15
|
if(currentSelection instanceof IStructuredSelection){
|
16
|
System.out.println(currentSelection);
|
17
|
}
|
18
|
return null;
|
19
|
}
|
20
|
|
21
|
}
|