deprecated run() methods in all actions
[taxeditor.git] / eclipseprojects / eu.etaxonomy.taxeditor / src / eu / etaxonomy / taxeditor / actions / cdm / CreateNameRelationAction.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
10 package eu.etaxonomy.taxeditor.actions.cdm;
11
12 import org.apache.log4j.Logger;
13 import org.eclipse.jface.action.Action;
14
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;
19
20 /**
21 * @author p.ciardelli
22 * @created 05.06.2008
23 * @version 1.0
24 */
25 public class CreateNameRelationAction extends Action {
26 private static final Logger logger = Logger
27 .getLogger(CreateNameRelationAction.class);
28
29 private TaxonNameBase fromName;
30 private NameRelationshipType type;
31 private TaxonNameBase toName;
32
33 public CreateNameRelationAction(TaxonNameBase fromName,
34 NameRelationshipType type, TaxonNameBase toName) {
35 this.fromName = fromName;
36 this.type = type;
37 this.toName = toName;
38 }
39
40 @Deprecated
41 public void run() {
42 toName.addRelationshipFromName(fromName, type, null);
43 logger.warn("firing property change");
44 firePropertyChange(ITaxEditorConstants.NAMERELATION, "old", "new");
45 }
46 }