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
.navigation
.handler
;
13 import org
.apache
.log4j
.Logger
;
14 import org
.eclipse
.core
.commands
.common
.NotDefinedException
;
15 import org
.eclipse
.core
.commands
.operations
.AbstractOperation
;
16 import org
.eclipse
.jface
.viewers
.IStructuredSelection
;
17 import org
.eclipse
.jface
.wizard
.Wizard
;
18 import org
.eclipse
.ui
.INewWizard
;
19 import org
.eclipse
.ui
.IWorkbench
;
21 import eu
.etaxonomy
.taxeditor
.editor
.EditorUtil
;
22 import eu
.etaxonomy
.taxeditor
.navigation
.NavigationUtil
;
23 import eu
.etaxonomy
.taxeditor
.operations
.CreateTaxonomicTreeOperation
;
30 public class NewTaxonomicTreeWizard
extends Wizard
implements INewWizard
{
31 private static final Logger logger
= Logger
32 .getLogger(NewTaxonomicTreeWizard
.class);
34 public static final String NEW_TAXONOMIC_TREE
= "NEW_TAXONOMIC_TREE";
36 private NewTaxonomicTreeWizadPage page
;
41 public NewTaxonomicTreeWizard() {
42 this.setWindowTitle("New Taxonomic Tree");
46 * @see org.eclipse.jface.wizard.Wizard#addPages()
49 public void addPages() {
52 page
= new NewTaxonomicTreeWizadPage(NEW_TAXONOMIC_TREE
);
58 * @see org.eclipse.jface.wizard.Wizard#performFinish()
61 public boolean performFinish() {
63 AbstractOperation operation
= new CreateTaxonomicTreeOperation("Create Taxonomic Tree",
64 NavigationUtil
.getUndoContext(), page
.getTreeLabel(), page
.getReference(), page
.getMicroReference());
65 NavigationUtil
.executeOperation(operation
);
67 NavigationUtil
.getNavigator().getCommonViewer().refresh();
73 * @see org.eclipse.ui.IWorkbenchWizard#init(org.eclipse.ui.IWorkbench, org.eclipse.jface.viewers.IStructuredSelection)
75 public void init(IWorkbench workbench
, IStructuredSelection selection
) {
76 // TODO Auto-generated method stub