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