renamed packages from "*prototype*" to "*designproposal*"
[taxeditor.git] / eclipseprojects / eu.etaxonomy.taxeditor.designproposal1 / src / eu / etaxonomy / taxeditor / prototype1 / controller / CreateNameAction.java
1 package eu.etaxonomy.taxeditor.prototype1.controller;
2
3 import org.eclipse.jface.action.Action;
4
5 import eu.etaxonomy.cdm.api.service.INameService;
6 import eu.etaxonomy.cdm.model.name.TaxonName;
7 import eu.etaxonomy.taxeditor.prototype1.Activator;
8
9 public class CreateNameAction extends Action {
10
11 private TaxonName tn;
12
13 public CreateNameAction(String genus, String spEpithet) {
14
15 INameService ns = Activator.getDefault().getApplicationController().getNameService();
16 this.tn = ns.getNewTaxonName(null);
17 tn.setGenus(genus);
18 tn.setSpecificEpithet(spEpithet);
19 }
20
21 /* (non-Javadoc)
22 * @see org.eclipse.jface.action.Action#run()
23 */
24 public void run() {
25 //Application.
26 Activator.getDefault().getApplicationController().getNameService().saveTaxonName(tn);
27 Activator.getDefault().getObjectList().add(tn);
28 }
29 }