Project

General

Profile

Download (1.35 KB) Statistics
| Branch: | Tag: | Revision:
1
// $Id$
2
/**
3
* Copyright (C) 2016 EDIT
4
* European Distributed Institute of Taxonomy
5
* http://www.e-taxonomy.eu
6
*
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.
9
*/
10
package eu.etaxonomy.taxeditor.handler.defaultHandler;
11

    
12
import java.util.UUID;
13

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

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

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

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