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
|
package eu.etaxonomy.taxeditor.bulkeditor.handler.defaultHandler;
|
10
|
|
11
|
import org.eclipse.e4.ui.workbench.modeling.EPartService;
|
12
|
import org.eclipse.swt.widgets.Shell;
|
13
|
|
14
|
import eu.etaxonomy.cdm.model.taxon.ITaxonTreeNode;
|
15
|
import eu.etaxonomy.cdm.persistence.dto.TaxonNodeDto;
|
16
|
import eu.etaxonomy.taxeditor.bulkeditor.BulkEditorUtil;
|
17
|
import eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput;
|
18
|
import eu.etaxonomy.taxeditor.bulkeditor.input.TaxonBulkEditorInput;
|
19
|
import eu.etaxonomy.taxeditor.handler.defaultHandler.e4.DefaultOpenHandlerBaseE4;
|
20
|
|
21
|
public class OpenBulkEditorForTaxonNodeHandler extends DefaultOpenHandlerBaseE4<ITaxonTreeNode, TaxonNodeDto> {
|
22
|
|
23
|
@Override
|
24
|
protected void open(TaxonNodeDto entity, Shell shell, EPartService partService) {
|
25
|
AbstractBulkEditorInput<?> input = TaxonBulkEditorInput.getInstance();
|
26
|
input.setEntityUuid(entity.getTaxonUuid());
|
27
|
BulkEditorUtil.openBulkEditor(input, modelService, partService, application);
|
28
|
}
|
29
|
|
30
|
@Override
|
31
|
protected boolean canExecute(TaxonNodeDto selection) {
|
32
|
return selection.getTaxonUuid()!=null;
|
33
|
}
|
34
|
|
35
|
@Override
|
36
|
protected boolean allowsMultiple() {
|
37
|
return true;
|
38
|
}
|
39
|
|
40
|
@Override
|
41
|
protected String getPartId() {
|
42
|
return eu.etaxonomy.taxeditor.bulkeditor.AppModelId.PARTDESCRIPTOR_BULKEDITOR_EDITOR;
|
43
|
}
|
44
|
}
|