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
|
|
10
|
package eu.etaxonomy.taxeditor.bulkeditor.preference;
|
11
|
|
12
|
import org.eclipse.jface.preference.BooleanFieldEditor;
|
13
|
|
14
|
import eu.etaxonomy.cdm.model.common.MarkerType;
|
15
|
import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
|
16
|
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
|
17
|
import eu.etaxonomy.taxeditor.preference.menu.FieldEditorPreferencePageE4;
|
18
|
import eu.etaxonomy.taxeditor.store.CdmStore;
|
19
|
import eu.etaxonomy.taxeditor.store.TermStore;
|
20
|
|
21
|
/**
|
22
|
* @author p.ciardelli
|
23
|
* @created 17.08.2009
|
24
|
* @version 1.0
|
25
|
*/
|
26
|
public class BulkEditorMarkerPreferencePage extends FieldEditorPreferencePageE4 {
|
27
|
|
28
|
|
29
|
@Override
|
30
|
protected void createFieldEditors() {
|
31
|
if(CdmStore.isActive()){
|
32
|
for (final MarkerType markerType : TermStore.getTerms(MarkerType.class)) {
|
33
|
addField(new BooleanFieldEditor(PreferencesUtil.createPreferenceString(IPreferenceKeys.EDIT_MARKER_TYPE_PREFIX)
|
34
|
+ markerType.getClass().getName() + markerType.getLabel(), String.format("Edit '%s' markers",
|
35
|
markerType.getLabel()), getFieldEditorParent()));
|
36
|
}
|
37
|
}
|
38
|
|
39
|
}
|
40
|
}
|