Project

General

Profile

Download (1.3 KB) Statistics
| Branch: | Tag: | Revision:
1
// $Id$
2
/**
3
* Copyright (C) 2007 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

    
11
package eu.etaxonomy.taxeditor.editor.name.handler;
12

    
13
import org.eclipse.core.commands.ExecutionEvent;
14
import org.eclipse.core.commands.ExecutionException;
15

    
16
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
17
import eu.etaxonomy.taxeditor.editor.EditorUtil;
18
import eu.etaxonomy.taxeditor.editor.Page;
19
import eu.etaxonomy.taxeditor.editor.name.TaxonNameEditor;
20
import eu.etaxonomy.taxeditor.editor.name.container.AbstractGroupedContainer;
21

    
22
/**
23
 * @author n.hoffmann
24
 * @created Jan 28, 2011
25
 * @version 1.0
26
 */
27
public class DeleteAllEmptyNamesHandler extends DeleteTaxonBaseHandler {
28

    
29
	/* (non-Javadoc)
30
	 * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
31
	 */
32
	@Override
33
	public Object execute(ExecutionEvent event) throws ExecutionException {
34
		TaxonNameEditor editor = (TaxonNameEditor) EditorUtil.getActiveEditorPage(Page.NAME);
35

    
36
		for(AbstractGroupedContainer<TaxonBase> containerWithEmptyName : editor.getEmptyContainers()){
37
			doExecute(event, editor, containerWithEmptyName.getData());
38
		}
39
		
40
		return null;
41
	}
42

    
43
}
(9-9/15)