3 * Copyright (C) 2014 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.
10 package eu
.etaxonomy
.taxeditor
.preference
;
12 import org
.eclipse
.jface
.dialogs
.MessageDialogWithToggle
;
13 import org
.eclipse
.jface
.preference
.BooleanFieldEditor
;
14 import org
.eclipse
.jface
.preference
.ComboFieldEditor
;
15 import org
.eclipse
.jface
.preference
.FieldEditorPreferencePage
;
16 import org
.eclipse
.ui
.IWorkbench
;
17 import org
.eclipse
.ui
.IWorkbenchPreferencePage
;
24 public class SpecimenOrObservationPreferences
extends FieldEditorPreferencePage
implements IWorkbenchPreferencePage
{
27 public void init(IWorkbench workbench
) {
28 setPreferenceStore(PreferencesUtil
.getPreferenceStore());
32 protected void createFieldEditors() {
33 addField(new BooleanFieldEditor(IPreferenceKeys
.DETERMINATION_ONLY_FOR_FIELD_UNITS
,
34 "Taxon determination only on FieldUnit level",
35 getFieldEditorParent()));
36 addField(new BooleanFieldEditor(IPreferenceKeys
.SHOW_COLLECTING_AREAS_IN_GENERAL_SECTION
,
37 "Show \"Collecting Areas\" in \"General\" section of details view",
38 getFieldEditorParent()));
39 addField(new BooleanFieldEditor(IPreferenceKeys
.SHOW_TAXON_ASSOCIATIONS
,
40 "Show taxon associations of a specimen in the details view",
41 getFieldEditorParent()));
42 addField(new ComboFieldEditor(IPreferenceKeys
.ALWAYS_OPEN_SPECIMEN_IN_EDITOR
,
43 "Open newly created specimens in specimen editor", new String
[][] {
44 { "always", MessageDialogWithToggle
.ALWAYS
}, { "never", MessageDialogWithToggle
.NEVER
} },
45 getFieldEditorParent()));