3 * Copyright (C) 2015 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
7 * The contents of this file are subject to the Mozilla Public License Version 1.1
8 * See LICENSE.TXT at the top of this package for the full license terms.
10 package eu
.etaxonomy
.taxeditor
.editor
.key
.polytomous
.operation
;
12 import org
.eclipse
.core
.runtime
.IAdaptable
;
13 import org
.eclipse
.core
.runtime
.IProgressMonitor
;
15 import eu
.etaxonomy
.cdm
.api
.application
.CdmChangeEvent
.Action
;
16 import eu
.etaxonomy
.cdm
.model
.common
.CdmBase
;
17 import eu
.etaxonomy
.cdm
.model
.description
.PolytomousKeyNode
;
18 import eu
.etaxonomy
.taxeditor
.operation
.RemotingCdmDefaultOperation
;
25 public class RemotingCreatePolytomousKeyNodeOperation
extends RemotingCdmDefaultOperation
{
27 private final PolytomousKeyNode parentNode
;
29 private final static String LABEL
= "Create new polytomous key node";
31 public RemotingCreatePolytomousKeyNodeOperation(Object source
,
33 PolytomousKeyNode parentNode
){
34 super(LABEL
, Action
.Create
, source
, async
);
35 this.parentNode
= parentNode
;
39 * @see eu.etaxonomy.taxeditor.operation.RemotingCdmSimpleOperation#doSimpleExecute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
42 protected CdmBase
doSimpleExecute(IProgressMonitor monitor
, IAdaptable info
) throws Exception
{
43 PolytomousKeyNode childNode
= PolytomousKeyNode
.NewInstance();
44 parentNode
.addChild(childNode
);