dedfdf5109e5b88802cfa24f59f486042d1801b1
[taxeditor.git] / eu.etaxonomy.taxeditor.editor / src / main / java / eu / etaxonomy / taxeditor / editor / view / uses / handler / CreateUseHandler.java
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 package eu.etaxonomy.taxeditor.editor.view.uses.handler;
10
11 import eu.etaxonomy.cdm.model.taxon.Taxon;
12 import eu.etaxonomy.taxeditor.editor.EditorUtil;
13 import eu.etaxonomy.taxeditor.editor.view.descriptive.handler.CreateDescriptionHandler;
14 import eu.etaxonomy.taxeditor.editor.view.uses.operation.CreateTaxonUseOperation;
15 import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
16 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
17
18 /**
19 * CreateUseHandler Class
20 * @author a.theys
21 * @created mar 13, 2012
22 * @version 1.0
23 */
24 public class CreateUseHandler extends CreateDescriptionHandler {
25 /* (non-Javadoc)
26 * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
27 */
28 /** {@inheritDoc} */
29 @Override
30 protected AbstractPostOperation createOperationInstance(String eventLabel, Taxon taxon, IPostOperationEnabled postOperationEnabled) {
31 return new CreateTaxonUseOperation(eventLabel, EditorUtil.getUndoContext(), taxon, postOperationEnabled);
32 }
33 }