Project

General

Profile

Download (1.35 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2016 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.handler.defaultHandler;
10

    
11
import java.util.UUID;
12

    
13
import org.eclipse.core.commands.ExecutionEvent;
14
import org.eclipse.jface.wizard.WizardDialog;
15
import org.eclipse.ui.PlatformUI;
16

    
17
import eu.etaxonomy.cdm.api.service.ITaxonNodeService;
18
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
19
import eu.etaxonomy.taxeditor.store.CdmStore;
20
import eu.etaxonomy.taxeditor.ui.section.classification.EditTaxonNodeWizard;
21

    
22
/**
23
 * @author k.luther
24
 * @date 22.03.2016
25
 *
26
 */
27
public class DefaultOpenTaxonNodeWizardHandler extends DefaultOpenHandlerBase<TaxonNode> {
28
    @Override
29
    protected TaxonNode getEntity(UUID uuid) {
30
        return CdmStore.getService(ITaxonNodeService.class).load(uuid);
31
    }
32

    
33
    @Override
34
    protected void open(ExecutionEvent event, TaxonNode entity) {
35
        EditTaxonNodeWizard taxonNodeWizard = new EditTaxonNodeWizard();
36
        taxonNodeWizard.init(null, null);
37
        taxonNodeWizard.setEntity(entity);
38
        WizardDialog dialog = new WizardDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), taxonNodeWizard);
39
        dialog.open();
40
    }
41
}
(3-3/4)