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
.actions
;
12 import org
.apache
.log4j
.Logger
;
13 import org
.eclipse
.ui
.IWorkbenchWindow
;
14 import org
.eclipse
.ui
.actions
.ActionFactory
;
15 import org
.eclipse
.ui
.actions
.NewWizardAction
;
16 import org
.eclipse
.ui
.actions
.ActionFactory
.IWorkbenchAction
;
18 import eu
.etaxonomy
.taxeditor
.actions
.ui
.OpenTaxonEditorAction
;
21 * This class is an extension to the standard ActionFactory. Any useful
22 * functionality already implemented in ActionFactory may be used or
23 * overwritten by more suitable implementations.
29 public abstract class TaxEditorActionFactory
extends ActionFactory
{
30 private static final Logger logger
= Logger
31 .getLogger(TaxEditorActionFactory
.class);
34 * Workbench action (id "new"): Opens the new wizard dialog. This action maintains
35 * its enablement state.
37 public static final ActionFactory NEW
= new ActionFactory("new") {//$NON-NLS-1$
40 * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow)
42 public IWorkbenchAction
create(IWorkbenchWindow window
) {
44 throw new IllegalArgumentException();
46 IWorkbenchAction action
= new OpenTaxonEditorAction();
47 action
.setId(getId());
53 * Creates a new workbench action factory with the given id.
56 * the id of actions created by this action factory
58 protected TaxEditorActionFactory(String actionId
) {