2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
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.
10 package eu
.etaxonomy
.taxeditor
.actions
.cdm
;
12 import org
.apache
.log4j
.Logger
;
13 import org
.eclipse
.jface
.action
.Action
;
15 import eu
.etaxonomy
.cdm
.model
.name
.NameRelationshipType
;
16 import eu
.etaxonomy
.cdm
.model
.name
.TaxonNameBase
;
17 import eu
.etaxonomy
.taxeditor
.ITaxEditorConstants
;
18 import eu
.etaxonomy
.taxeditor
.TaxEditorPlugin
;
25 public class CreateNameRelationAction
extends Action
{
26 private static final Logger logger
= Logger
27 .getLogger(CreateNameRelationAction
.class);
29 private TaxonNameBase fromName
;
30 private NameRelationshipType type
;
31 private TaxonNameBase toName
;
33 public CreateNameRelationAction(TaxonNameBase fromName
,
34 NameRelationshipType type
, TaxonNameBase toName
) {
35 this.fromName
= fromName
;
42 toName
.addRelationshipFromName(fromName
, type
, null);
43 logger
.warn("firing property change");
44 firePropertyChange(ITaxEditorConstants
.NAMERELATION
, "old", "new");