Project

General

Profile

Download (1.54 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2011 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.editor.view.uses.handler;
10

    
11

    
12
import org.eclipse.core.commands.ExecutionEvent;
13

    
14
import eu.etaxonomy.cdm.model.description.DescriptionBase;
15
import eu.etaxonomy.cdm.model.description.Feature;
16
import eu.etaxonomy.taxeditor.editor.EditorUtil;
17
import eu.etaxonomy.taxeditor.editor.view.descriptive.handler.CreateDescriptionElementHandler;
18
import eu.etaxonomy.taxeditor.editor.view.uses.operation.CreateUseSummaryOperation;
19
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
20
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
21
import eu.etaxonomy.taxeditor.store.UseObjectStore;
22

    
23
/**
24
 * CreateUseSummaryHandler Class
25
 * @author a.theys
26
 * @created mar 13, 2012
27
 * @version 1.0
28
 */
29
public class CreateUseSummaryHandler extends CreateDescriptionElementHandler {
30
	/** {@inheritDoc} */
31
	@Override
32
	protected AbstractPostOperation operationCreationInstance(String label, ExecutionEvent event, DescriptionBase<?> description, IPostOperationEnabled postOperationEnabled) {
33
		//Use Record Feature retrieval below
34
		Feature feature = UseObjectStore.getUseSummaryFeature();
35
		
36
		feature.setSupportsTextData(true);
37
		return new CreateUseSummaryOperation(label,	EditorUtil.getUndoContext(), description, feature, postOperationEnabled);
38
	}
39

    
40
}
(3-3/3)