1 package eu
.etaxonomy
.taxeditor
.editor
.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
.swt
.widgets
.FileDialog
;
7 import org
.eclipse
.ui
.IEditorPart
;
9 import eu
.etaxonomy
.taxeditor
.editor
.molecular
.AlignmentEditor
;
10 import eu
.etaxonomy
.taxeditor
.model
.AbstractUtility
;
13 public class LoadPherogramHandler
extends AbstractHandler
{
16 * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
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()