Project

General

Profile

Download (2.23 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
 * Copyright (C) 2007 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

    
10
package eu.etaxonomy.taxeditor.editor.view.derivate.operation;
11

    
12
import org.eclipse.core.commands.ExecutionException;
13
import org.eclipse.core.commands.operations.IUndoContext;
14
import org.eclipse.core.runtime.IAdaptable;
15
import org.eclipse.core.runtime.IProgressMonitor;
16
import org.eclipse.core.runtime.IStatus;
17

    
18
import eu.etaxonomy.cdm.model.common.CdmBase;
19
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
20
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
21

    
22
/**
23
 *
24
 * @author pplitzner
25
 * @date Oct 21, 2014
26
 *
27
 */
28
public class DeleteDerivateOperation extends AbstractPostOperation<CdmBase> {
29

    
30
    public DeleteDerivateOperation(String label, IUndoContext undoContext, CdmBase element,
31
            IPostOperationEnabled postOperationEnabled) {
32
        super(label, undoContext, element, postOperationEnabled);
33
    }
34

    
35
    /*
36
     * (non-Javadoc)
37
     *
38
     * @see
39
     * org.eclipse.core.commands.operations.AbstractOperation#execute(org.eclipse
40
     * .core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
41
     */
42
    /** {@inheritDoc} */
43
    @Override
44
    public IStatus execute(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
45
        return postExecute(null);
46
    }
47

    
48
    /*
49
     * (non-Javadoc)
50
     *
51
     * @see
52
     * org.eclipse.core.commands.operations.AbstractOperation#redo(org.eclipse
53
     * .core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
54
     */
55
    /** {@inheritDoc} */
56
    @Override
57
    public IStatus redo(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
58
        return execute(monitor, info);
59
    }
60

    
61
    /*
62
     * (non-Javadoc)
63
     *
64
     * @see
65
     * org.eclipse.core.commands.operations.AbstractOperation#undo(org.eclipse
66
     * .core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
67
     */
68
    /** {@inheritDoc} */
69
    @Override
70
    public IStatus undo(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
71
        return postExecute(element);
72
    }
73
}
    (1-1/1)