merge-update from trunk
[taxeditor.git] / eu.etaxonomy.taxeditor.editor / src / main / java / eu / etaxonomy / taxeditor / editor / handler / LoadPherogramHandler.java
1 package eu.etaxonomy.taxeditor.editor.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.swt.widgets.FileDialog;
7 import org.eclipse.ui.IEditorPart;
8
9 import eu.etaxonomy.taxeditor.editor.molecular.AlignmentEditor;
10 import eu.etaxonomy.taxeditor.model.AbstractUtility;
11
12
13 public class LoadPherogramHandler extends AbstractHandler{
14
15 /* (non-Javadoc)
16 * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
17 */
18 @Override
19 public Object execute(ExecutionEvent event) throws ExecutionException {
20 IEditorPart activeEditor = AbstractUtility.getActiveEditor();
21 if(activeEditor instanceof AlignmentEditor){
22 AlignmentEditor alignmentEditor = (AlignmentEditor) activeEditor;
23 FileDialog fileDialog = new FileDialog(alignmentEditor.getSite().getShell());
24 String path = fileDialog.open();
25 System.out.println(path);
26 // alignmentEditor.getAlignmentArea().getSelection()
27 }
28 return null;
29 }
30
31
32 }