taxeditor/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/key/polytomous/handler/RemotingEditPolytomousKeyNodesHandler.java @ 972ecc88
1 |
/**
|
---|---|
2 |
* Copyright (C) 2015 EDIT
|
3 |
* European Distributed Institute of Taxonomy
|
4 |
* http://www.e-taxonomy.eu
|
5 |
*
|
6 |
* The contents of this file are subject to the Mozilla Public License Version 1.1
|
7 |
* See LICENSE.TXT at the top of this package for the full license terms.
|
8 |
*/
|
9 |
package eu.etaxonomy.taxeditor.navigation.key.polytomous.handler; |
10 |
|
11 |
import org.eclipse.core.commands.AbstractHandler; |
12 |
import org.eclipse.core.commands.ExecutionEvent; |
13 |
import org.eclipse.core.commands.ExecutionException; |
14 |
|
15 |
/**
|
16 |
* @author cmathew
|
17 |
* @date 29 Jun 2015
|
18 |
*
|
19 |
*/
|
20 |
public class RemotingEditPolytomousKeyNodesHandler extends AbstractHandler { |
21 |
|
22 |
/* (non-Javadoc)
|
23 |
* @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
|
24 |
*/
|
25 |
@Override
|
26 |
public Object execute(final ExecutionEvent event) throws ExecutionException { |
27 |
// PolytomousKeyViewPart view = (PolytomousKeyViewPart) NavigationUtil.getView(PolytomousKeyViewPart.ID, false);
|
28 |
//
|
29 |
// ISelection selection = view.getSite().getSelectionProvider().getSelection();
|
30 |
// if(selection instanceof StructuredSelection){
|
31 |
//
|
32 |
// final StructuredSelection structuredSelection = (StructuredSelection) selection;
|
33 |
//
|
34 |
// Job job = new Job(RemotingEditPolytomousKeyNodesHandlerE4.OPENING_POLYTOMOUS_KEYS){
|
35 |
//
|
36 |
// @Override
|
37 |
// protected IStatus run(IProgressMonitor monitor) {
|
38 |
// monitor.beginTask(RemotingEditPolytomousKeyNodesHandlerE4.OPENING_POLYTOMOUS_KEYS, structuredSelection.size());
|
39 |
//
|
40 |
// for(final Object selectedObject : structuredSelection.toArray()){
|
41 |
// if(selectedObject instanceof PolytomousKey){
|
42 |
//
|
43 |
// Display.getDefault().asyncExec(new Runnable(){
|
44 |
//
|
45 |
// @Override
|
46 |
// public void run() {
|
47 |
// try {
|
48 |
// PolytomousKey key = (PolytomousKey) selectedObject;
|
49 |
// EditorUtil.openPolytomousKey(key.getUuid());
|
50 |
// } catch(Exception ex) {
|
51 |
// MessagingUtils.warningDialog(PolytomousKeyViewLabels.ERROR_OPENING_KEY_EDITOR_MESSAGE,
|
52 |
// event.getTrigger(),
|
53 |
// ex.getLocalizedMessage());
|
54 |
// ex.printStackTrace();
|
55 |
// }
|
56 |
// }
|
57 |
//
|
58 |
// });
|
59 |
// monitor.worked(1);
|
60 |
// }
|
61 |
// }
|
62 |
// monitor.done();
|
63 |
// return Status.OK_STATUS;
|
64 |
// }
|
65 |
//
|
66 |
// };
|
67 |
//
|
68 |
// job.setPriority(Job.SHORT);
|
69 |
// job.schedule();
|
70 |
//
|
71 |
// }
|
72 |
return null; |
73 |
}
|
74 |
|
75 |
}
|