Revision 972ecc88
Added by Patrick Plitzner over 6 years ago
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/key/polytomous/handler/DeleteHandler.java | ||
---|---|---|
14 | 14 |
import org.eclipse.core.commands.AbstractHandler; |
15 | 15 |
import org.eclipse.core.commands.ExecutionEvent; |
16 | 16 |
import org.eclipse.core.commands.ExecutionException; |
17 |
import org.eclipse.core.commands.common.NotDefinedException; |
|
18 | 17 |
import org.eclipse.jface.viewers.IStructuredSelection; |
19 | 18 |
import org.eclipse.ui.handlers.HandlerUtil; |
20 | 19 |
|
21 | 20 |
import eu.etaxonomy.cdm.model.description.PolytomousKey; |
22 | 21 |
import eu.etaxonomy.taxeditor.model.MessagingUtils; |
23 |
import eu.etaxonomy.taxeditor.navigation.NavigationUtil; |
|
24 |
import eu.etaxonomy.taxeditor.navigation.key.polytomous.PolytomousKeyViewPart; |
|
25 | 22 |
import eu.etaxonomy.taxeditor.navigation.key.polytomous.e4.handler.RemotingDeletePolytomousKeyHandlerE4; |
26 |
import eu.etaxonomy.taxeditor.navigation.key.polytomous.operation.DeleteOperation; |
|
27 |
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation; |
|
28 | 23 |
|
29 | 24 |
/** |
30 | 25 |
* @author n.hoffmann |
... | ... | |
50 | 45 |
|
51 | 46 |
if(confirmation){ |
52 | 47 |
|
53 |
for(PolytomousKey key : keys){ |
|
54 |
try { |
|
55 |
PolytomousKeyViewPart pkvp = (PolytomousKeyViewPart) NavigationUtil.getView(PolytomousKeyViewPart.ID, false); |
|
56 |
AbstractPostOperation operation = new DeleteOperation( |
|
57 |
event.getCommand().getName(), |
|
58 |
NavigationUtil.getUndoContext(), key, |
|
59 |
pkvp, |
|
60 |
pkvp, |
|
61 |
pkvp); |
|
62 |
NavigationUtil.executeOperation(operation); |
|
63 |
} catch (NotDefinedException e) { |
|
64 |
MessagingUtils.error(getClass(), e); |
|
65 |
} |
|
66 |
} |
|
48 |
// for(PolytomousKey key : keys){
|
|
49 |
// try {
|
|
50 |
// PolytomousKeyViewPart pkvp = (PolytomousKeyViewPart) NavigationUtil.getView(PolytomousKeyViewPart.ID, false);
|
|
51 |
// AbstractPostOperation operation = new DeleteOperation(
|
|
52 |
// event.getCommand().getName(),
|
|
53 |
// NavigationUtil.getUndoContext(), key,
|
|
54 |
// pkvp,
|
|
55 |
// pkvp,
|
|
56 |
// pkvp);
|
|
57 |
// NavigationUtil.executeOperation(operation);
|
|
58 |
// } catch (NotDefinedException e) {
|
|
59 |
// MessagingUtils.error(getClass(), e);
|
|
60 |
// }
|
|
61 |
// }
|
|
67 | 62 |
} |
68 | 63 |
|
69 | 64 |
return null; |
Also available in: Unified diff
ref #6913 Remove org.eclipse.ui dependency from AbstractUtility