Merge branch 'release/5.19.0'
[taxeditor.git] / eu.etaxonomy.taxeditor.bulkeditor / src / main / java / eu / etaxonomy / taxeditor / bulkeditor / preference / BulkEditorMarkerPreferencePage.java
1 /**
2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
5 *
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.
8 */
9 package eu.etaxonomy.taxeditor.bulkeditor.preference;
10
11 import org.eclipse.jface.preference.BooleanFieldEditor;
12
13 import eu.etaxonomy.cdm.model.common.MarkerType;
14 import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
15 import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
16 import eu.etaxonomy.taxeditor.preference.menu.FieldEditorPreferencePageE4;
17 import eu.etaxonomy.taxeditor.store.CdmStore;
18 import eu.etaxonomy.taxeditor.store.TermStore;
19
20 /**
21 * @author p.ciardelli
22 * @created 17.08.2009
23 */
24 public class BulkEditorMarkerPreferencePage extends FieldEditorPreferencePageE4 {
25
26 @Override
27 protected void createFieldEditors() {
28 if(CdmStore.isActive()){
29 for (final MarkerType markerType : TermStore.getTerms(MarkerType.class)) {
30 addField(new BooleanFieldEditor(PreferencesUtil.createPreferenceString(IPreferenceKeys.EDIT_MARKER_TYPE_PREFIX)
31 + markerType.getClass().getName() + markerType.getLabel(), String.format("Edit '%s' markers",
32 markerType.getLabel()), getFieldEditorParent()));
33 }
34 }
35
36 }
37 }