Revision 360b73f0
Added by Patrick Plitzner over 6 years ago
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/key/polytomous/e4/handler/RemotingUpdatePolytomousKeyAllNodesHandlerE4.java | ||
---|---|---|
8 | 8 |
*/ |
9 | 9 |
package eu.etaxonomy.taxeditor.navigation.key.polytomous.e4.handler; |
10 | 10 |
|
11 |
import org.eclipse.core.commands.ExecutionEvent; |
|
12 | 11 |
import org.eclipse.core.commands.operations.AbstractOperation; |
13 | 12 |
import org.eclipse.core.runtime.IStatus; |
14 | 13 |
import org.eclipse.core.runtime.Status; |
14 |
import org.eclipse.e4.ui.model.application.ui.basic.MPart; |
|
15 |
import org.eclipse.e4.ui.model.application.ui.menu.MHandledMenuItem; |
|
16 |
import org.eclipse.jface.viewers.IStructuredSelection; |
|
17 |
import org.eclipse.swt.widgets.Shell; |
|
15 | 18 |
|
16 | 19 |
import eu.etaxonomy.taxeditor.navigation.key.polytomous.PolytomousKeyViewLabels; |
17 | 20 |
import eu.etaxonomy.taxeditor.navigation.key.polytomous.operation.RemotingUpdatePolytomousKeyAllNodesOperation; |
18 |
import eu.etaxonomy.taxeditor.operation.RemotingCdmHandler;
|
|
21 |
import eu.etaxonomy.taxeditor.operation.e4.RemotingCdmHandlerE4;
|
|
19 | 22 |
|
20 | 23 |
/** |
21 | 24 |
* @author cmathew |
22 | 25 |
* @date 29 Jun 2015 |
23 | 26 |
* |
24 | 27 |
*/ |
25 |
public class RemotingUpdatePolytomousKeyAllNodesHandlerE4 extends RemotingCdmHandler { |
|
28 |
public class RemotingUpdatePolytomousKeyAllNodesHandlerE4 extends RemotingCdmHandlerE4 {
|
|
26 | 29 |
|
27 |
/** |
|
28 |
* @param label |
|
29 |
*/ |
|
30 | 30 |
public RemotingUpdatePolytomousKeyAllNodesHandlerE4() { |
31 | 31 |
super(PolytomousKeyViewLabels.UPDATE_ALL_POLYTOMOUS_KEY_NODES_LABEL); |
32 | 32 |
} |
33 | 33 |
|
34 |
/* (non-Javadoc) |
|
35 |
* @see eu.etaxonomy.taxeditor.operation.RemotingCdmHandler#allowOperations(org.eclipse.core.commands.ExecutionEvent) |
|
36 |
*/ |
|
37 | 34 |
@Override |
38 |
public IStatus allowOperations(ExecutionEvent event) { |
|
35 |
public IStatus allowOperations(IStructuredSelection selection, Shell shell, MPart activePart, |
|
36 |
MHandledMenuItem menuItem) { |
|
39 | 37 |
return Status.OK_STATUS; |
40 | 38 |
} |
41 | 39 |
|
42 |
/* (non-Javadoc) |
|
43 |
* @see eu.etaxonomy.taxeditor.operation.RemotingCdmHandler#prepareOperation(org.eclipse.core.commands.ExecutionEvent) |
|
44 |
*/ |
|
45 | 40 |
@Override |
46 |
public AbstractOperation prepareOperation(ExecutionEvent event) { |
|
47 |
return new RemotingUpdatePolytomousKeyAllNodesOperation(event.getTrigger(), false); |
|
41 |
public AbstractOperation prepareOperation(IStructuredSelection selection, Shell shell, MPart activePart, |
|
42 |
MHandledMenuItem menuItem) { |
|
43 |
return new RemotingUpdatePolytomousKeyAllNodesOperation(getTrigger(), false); |
|
48 | 44 |
} |
49 | 45 |
|
50 |
/* (non-Javadoc) |
|
51 |
* @see eu.etaxonomy.taxeditor.operation.RemotingCdmHandler#onComplete() |
|
52 |
*/ |
|
53 | 46 |
@Override |
54 | 47 |
public void onComplete() { |
55 |
// TODO Auto-generated method stub
|
|
48 |
}
|
|
56 | 49 |
|
50 |
/** |
|
51 |
* {@inheritDoc} |
|
52 |
*/ |
|
53 |
@Override |
|
54 |
protected Object getTrigger() { |
|
55 |
return this; |
|
57 | 56 |
} |
58 | 57 |
|
59 | 58 |
} |
Also available in: Unified diff
ref #6908 Migrate polytomous key list editor handlers