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
.bulkeditor
.preference
;
12 import org
.eclipse
.jface
.preference
.BooleanFieldEditor
;
13 import org
.eclipse
.jface
.preference
.FieldEditorPreferencePage
;
14 import org
.eclipse
.ui
.IWorkbench
;
15 import org
.eclipse
.ui
.IWorkbenchPreferencePage
;
17 import eu
.etaxonomy
.cdm
.model
.common
.MarkerType
;
18 import eu
.etaxonomy
.taxeditor
.model
.MessagingUtils
;
19 import eu
.etaxonomy
.taxeditor
.preference
.IPreferenceKeys
;
20 import eu
.etaxonomy
.taxeditor
.preference
.PreferencesUtil
;
21 import eu
.etaxonomy
.taxeditor
.store
.CdmStore
;
22 import eu
.etaxonomy
.taxeditor
.store
.TermStore
;
29 public class BulkEditorMarkerPreferencePage
extends FieldEditorPreferencePage
implements IWorkbenchPreferencePage
{
33 public void init(IWorkbench workbench
) {
34 setPreferenceStore(PreferencesUtil
.getPreferenceStore());
35 if(!CdmStore
.isActive()) {
36 MessagingUtils
.noDataSourceWarningDialog(null);
41 protected void createFieldEditors() {
42 if(CdmStore
.isActive()){
43 for (final MarkerType markerType
: TermStore
.getTerms(MarkerType
.class)) {
44 addField(new BooleanFieldEditor(IPreferenceKeys
.EDIT_MARKER_TYPE_PREFIX
45 + markerType
.getClass().getName() + markerType
.getLabel(), String
.format("Edit '%s' markers",
46 markerType
.getLabel()), getFieldEditorParent()));