2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
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.
10 package eu
.etaxonomy
.taxeditor
.editor
.name
.handler
;
12 import org
.eclipse
.core
.commands
.ExecutionEvent
;
13 import org
.eclipse
.core
.commands
.ExecutionException
;
15 import eu
.etaxonomy
.cdm
.model
.taxon
.TaxonBase
;
16 import eu
.etaxonomy
.taxeditor
.editor
.EditorUtil
;
17 import eu
.etaxonomy
.taxeditor
.editor
.Page
;
18 import eu
.etaxonomy
.taxeditor
.editor
.name
.TaxonNameEditor
;
19 import eu
.etaxonomy
.taxeditor
.editor
.name
.container
.AbstractGroupedContainer
;
23 * @created Jan 28, 2011
26 public class DeleteAllEmptyNamesHandler
extends DeleteTaxonBaseHandler
{
29 * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
32 public Object
execute(ExecutionEvent event
) throws ExecutionException
{
33 TaxonNameEditor editor
= (TaxonNameEditor
) EditorUtil
.getActiveEditorPage(Page
.NAME
);
35 for(AbstractGroupedContainer
<TaxonBase
> containerWithEmptyName
: editor
.getEmptyContainers()){
36 doExecute(event
, editor
, containerWithEmptyName
.getData());