Merge branch 'develop' into taxonDescription
[taxeditor.git] / eu.etaxonomy.taxeditor.editor / src / main / java / eu / etaxonomy / taxeditor / editor / view / descriptive / operation / CreateTaxonDescriptionOperation.java
1 /**
2 * Copyright (C) 2013 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.editor.view.descriptive.operation;
10
11 import org.eclipse.core.commands.operations.IUndoContext;
12
13 import eu.etaxonomy.cdm.model.common.IdentifiableSource;
14 import eu.etaxonomy.cdm.model.description.TaxonDescription;
15 import eu.etaxonomy.cdm.model.taxon.Taxon;
16 import eu.etaxonomy.taxeditor.operation.AbstractDescriptionPostOperation;
17 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
18
19 /**
20 * @author pplitzner
21 * @date 04.12.2013
22 *
23 */
24 public class CreateTaxonDescriptionOperation extends AbstractDescriptionPostOperation<Taxon, TaxonDescription> {
25
26 public CreateTaxonDescriptionOperation(String label, IUndoContext undoContext, Taxon describable,
27 IdentifiableSource source, IPostOperationEnabled postOperationEnabled) {
28 super(label, undoContext, describable, source, postOperationEnabled, false);
29 }
30
31 public CreateTaxonDescriptionOperation(String label, IUndoContext undoContext, Taxon describable,
32 IdentifiableSource source, IPostOperationEnabled postOperationEnabled, boolean isImageGallery) {
33 super(label, undoContext, describable, source, postOperationEnabled, isImageGallery);
34 }
35
36 @Override
37 protected void initDescription(){
38 description = TaxonDescription.NewInstance(element);
39 }
40 }