Project

General

Profile

Download (1.28 KB) Statistics
| Branch: | Tag: | Revision:
1

    
2
package eu.etaxonomy.taxeditor.editor.descriptiveDataSet.handler;
3

    
4
import org.eclipse.e4.ui.workbench.modeling.EPartService;
5
import org.eclipse.jface.viewers.IStructuredSelection;
6
import org.eclipse.swt.widgets.Shell;
7

    
8
import eu.etaxonomy.cdm.model.description.DescriptiveDataSet;
9
import eu.etaxonomy.taxeditor.editor.AppModelId;
10
import eu.etaxonomy.taxeditor.editor.EditorUtil;
11
import eu.etaxonomy.taxeditor.handler.defaultHandler.e4.DefaultOpenHandlerBaseE4;
12

    
13
public class OpenDescriptiveDataSetEditorHandler extends DefaultOpenHandlerBaseE4<DescriptiveDataSet>{
14

    
15
    /**
16
     * {@inheritDoc}
17
     */
18
//    @Override
19
//    protected DescriptiveDataSet getEntity(UUID uuid) {
20
//        return CdmStore.getService(IDescriptiveDataSetService.class).load(uuid);
21
//    }
22

    
23
    @Override
24
    protected void open(DescriptiveDataSet entity, Shell shell, EPartService partService) {
25
        EditorUtil.openDescriptiveDataSetEditor(entity.getUuid(), modelService, partService, application);
26
    }
27

    
28
    /**
29
     * {@inheritDoc}
30
     */
31
    @Override
32
    protected boolean canExecute(IStructuredSelection entity) {
33
        return true;
34
    }
35

    
36
    @Override
37
    protected String getPartId() {
38
        return AppModelId.PARTDESCRIPTOR_EU_ETAXONOMY_TAXEDITOR_EDITOR_VIEW_DESCRIPTIVEDATASET_DESCRIPTIVEDATASETEDITOR;
39
    }
40

    
41

    
42
}
(5-5/6)