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