3 * Copyright (C) 2007 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
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.
11 package eu
.etaxonomy
.taxeditor
.editor
.name
.handler
;
13 import org
.eclipse
.core
.commands
.ExecutionEvent
;
14 import org
.eclipse
.core
.commands
.ExecutionException
;
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
;
24 * @created Jan 28, 2011
27 public class DeleteAllEmptyNamesHandler
extends DeleteTaxonBaseHandler
{
30 * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
33 public Object
execute(ExecutionEvent event
) throws ExecutionException
{
34 TaxonNameEditor editor
= (TaxonNameEditor
) EditorUtil
.getActiveEditorPage(Page
.NAME
);
36 for(AbstractGroupedContainer
<TaxonBase
> containerWithEmptyName
: editor
.getEmptyContainers()){
37 doExecute(event
, editor
, containerWithEmptyName
.getData());