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
.preference
.menu
;
13 import org
.apache
.log4j
.Logger
;
14 import org
.eclipse
.jface
.wizard
.WizardDialog
;
15 import org
.eclipse
.swt
.events
.MouseEvent
;
16 import org
.eclipse
.swt
.events
.SelectionAdapter
;
17 import org
.eclipse
.swt
.events
.SelectionEvent
;
19 import eu
.etaxonomy
.cdm
.model
.common
.ExtensionType
;
20 import eu
.etaxonomy
.cdm
.model
.common
.VocabularyEnum
;
21 import eu
.etaxonomy
.taxeditor
.preference
.wizards
.VocabularyTermWizard
;
22 import eu
.etaxonomy
.taxeditor
.store
.StoreUtil
;
23 import eu
.etaxonomy
.taxeditor
.store
.VocabularyStore
;
27 * @created Aug 28, 2009
30 public class ExtensionTypeMenuPreferences
extends AbstractMenuPreferences
<ExtensionType
> {
31 private static final Logger logger
= Logger
32 .getLogger(ExtensionTypeMenuPreferences
.class);
37 public ExtensionTypeMenuPreferences() {
38 super(VocabularyStore
.getExtensionTypes(),
39 "Extension Type Preferences" ,
40 "Choose which extension types to display",
45 * @see eu.etaxonomy.taxeditor.preference.AbstractMenuPreferences#addEditButtonListeners()
47 * TODO refactor into superclass
50 protected void addNewButtonListeners() {
51 newButton
.addSelectionListener(new SelectionAdapter(){
53 * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
56 public void widgetSelected(SelectionEvent e
) {
57 super.widgetSelected(e
);
58 VocabularyTermWizard
<ExtensionType
> wizard
= new VocabularyTermWizard
<ExtensionType
>(VocabularyEnum
.ExtensionType
);
60 WizardDialog dialog
= new WizardDialog(StoreUtil
.getShell(), wizard
);
63 tableViewer
.setInput(VocabularyStore
.getExtensionTypes());