1 |
c503141d
|
n.hoffmann
|
/**
|
2 |
eed65ec6
|
n.hoffmann
|
* Copyright (C) 2007 EDIT
|
3 |
87924e53
|
Patric Plitzner
|
* European Distributed Institute of Taxonomy
|
4 |
eed65ec6
|
n.hoffmann
|
* http://www.e-taxonomy.eu
|
5 |
87924e53
|
Patric Plitzner
|
*
|
6 |
eed65ec6
|
n.hoffmann
|
* 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 |
c503141d
|
n.hoffmann
|
|
10 |
|
|
package eu.etaxonomy.taxeditor.preference;
|
11 |
|
|
|
12 |
eed65ec6
|
n.hoffmann
|
import org.eclipse.jface.preference.BooleanFieldEditor;
|
13 |
|
|
import org.eclipse.jface.preference.StringFieldEditor;
|
14 |
505368e5
|
Katja Luther
|
import org.eclipse.swt.SWT;
|
15 |
|
|
import org.eclipse.swt.layout.GridData;
|
16 |
|
|
import org.eclipse.swt.layout.RowLayout;
|
17 |
|
|
import org.eclipse.swt.widgets.Composite;
|
18 |
672874ab
|
Patrick Plitzner
|
|
19 |
|
|
import eu.etaxonomy.taxeditor.preference.menu.FieldEditorPreferencePageE4;
|
20 |
c503141d
|
n.hoffmann
|
|
21 |
|
|
/**
|
22 |
eed65ec6
|
n.hoffmann
|
* <p>
|
23 |
|
|
* TaxonomicEditorGeneralPreferences class.
|
24 |
|
|
* </p>
|
25 |
87924e53
|
Patric Plitzner
|
*
|
26 |
c503141d
|
n.hoffmann
|
* @author n.hoffmann
|
27 |
|
|
* @created Sep 1, 2009
|
28 |
|
|
* @version 1.0
|
29 |
|
|
*/
|
30 |
eed65ec6
|
n.hoffmann
|
public class TaxonomicEditorGeneralPreferences extends
|
31 |
672874ab
|
Patrick Plitzner
|
FieldEditorPreferencePageE4 {
|
32 |
57e6fef9
|
n.hoffmann
|
|
33 |
c503141d
|
n.hoffmann
|
@Override
|
34 |
eed65ec6
|
n.hoffmann
|
protected void createFieldEditors() {
|
35 |
5f946b60
|
n.hoffmann
|
addField(new BooleanFieldEditor(IPreferenceKeys.SHOW_DEBUG_INFORMATION,
|
36 |
eed65ec6
|
n.hoffmann
|
"Show UUID and object ID in supplemental data view.",
|
37 |
|
|
getFieldEditorParent()));
|
38 |
22cb6038
|
Patric Plitzner
|
addField(new BooleanFieldEditor(IPreferenceKeys.SHOW_ID_IN_ENTITY_SELECTION_DIAOLOG,
|
39 |
|
|
"Show object id in entity selection dialogs.",
|
40 |
|
|
getFieldEditorParent()));
|
41 |
eed65ec6
|
n.hoffmann
|
addField(new BooleanFieldEditor(
|
42 |
|
|
IPreferenceKeys.SHOULD_EXPAND_SECTION_WHEN_DATA_AVAILABLE,
|
43 |
1c1197f5
|
n.hoffmann
|
"Should expand sections when data is available (Details View). This might make the Editor slow.",
|
44 |
eed65ec6
|
n.hoffmann
|
getFieldEditorParent()));
|
45 |
|
|
addField(new StringFieldEditor(
|
46 |
|
|
IPreferenceKeys.EDIT_MAP_SERVICE_ACCES_POINT,
|
47 |
|
|
"EDIT Map Service Access Point:", getFieldEditorParent()));
|
48 |
|
|
addField(new BooleanFieldEditor(
|
49 |
|
|
IPreferenceKeys.SHOULD_CONNECT_AT_STARTUP,
|
50 |
|
|
"Connect to last used datasource when launching",
|
51 |
|
|
getFieldEditorParent()));
|
52 |
|
|
addField(new BooleanFieldEditor(
|
53 |
|
|
IPreferenceKeys.SHOW_EXPERIMENTAL_FEATURES,
|
54 |
|
|
"Show experimental features", getFieldEditorParent()));
|
55 |
0c8d552e
|
n.hoffmann
|
addField(new BooleanFieldEditor(IPreferenceKeys.SEARCH_OPEN_RESULTS_IN_SEPARATE_WINDOWS,
|
56 |
2c2dcafa
|
Cherian Mathew
|
"Open search results in separate windows",
|
57 |
|
|
getFieldEditorParent()));
|
58 |
e07c5651
|
Katja Luther
|
addField(new BooleanFieldEditor(IPreferenceKeys.SORT_TAXA_BY_RANK_AND_NAME,
|
59 |
|
|
"In selection dialogs for taxa, sort by rank and name",
|
60 |
|
|
getFieldEditorParent()));
|
61 |
505368e5
|
Katja Luther
|
|
62 |
|
|
Composite composite = new Composite(getFieldEditorParent(), SWT.NULL);
|
63 |
|
|
composite.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false, 2, 1));
|
64 |
|
|
composite.setLayout(new RowLayout(1));
|
65 |
|
|
|
66 |
76b874f8
|
Katja Luther
|
// final Label label = new Label(composite, SWT.NONE);
|
67 |
|
|
// label.setText("Choose the prefered match mode for searches.");
|
68 |
|
|
//
|
69 |
|
|
// final Combo combo_MatchMode = new Combo(composite, SWT.NONE);
|
70 |
|
|
//
|
71 |
|
|
// MatchMode[] matchModes = MatchMode.values();
|
72 |
|
|
// int currentSelectionIndex = 0;
|
73 |
|
|
// for(int i = 0; i < matchModes.length; i++){
|
74 |
|
|
// MatchMode mode = matchModes[i];
|
75 |
|
|
// combo_MatchMode.add(mode.name(),i);
|
76 |
|
|
// //TODO:the correct preselection is needed here!!
|
77 |
|
|
// if (mode.equals(PreferencesUtil.getSearchConfigurator().getMatchMode())){
|
78 |
|
|
// currentSelectionIndex = i;
|
79 |
|
|
// }
|
80 |
|
|
// }
|
81 |
|
|
//
|
82 |
|
|
// combo_MatchMode.select(currentSelectionIndex);
|
83 |
|
|
//
|
84 |
|
|
// combo_MatchMode.addSelectionListener(new SelectionAdapter() {
|
85 |
|
|
// /* (non-Javadoc)
|
86 |
|
|
// * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
|
87 |
|
|
// */
|
88 |
|
|
// @Override
|
89 |
|
|
// public void widgetSelected(SelectionEvent e) {
|
90 |
|
|
// int selectionIndex = combo_MatchMode.getSelectionIndex();
|
91 |
|
|
// PreferencesUtil.getSearchConfigurator().setMatchMode(MatchMode.valueOf(combo_MatchMode.getItem(selectionIndex)));
|
92 |
|
|
// }
|
93 |
|
|
// });
|
94 |
505368e5
|
Katja Luther
|
|
95 |
|
|
|
96 |
da2bcb68
|
Katja Luther
|
|
97 |
9d0bce28
|
Katja Luther
|
|
98 |
eca18c8b
|
n.hoffmann
|
}
|
99 |
5d1f3b51
|
n.hoffmann
|
|
100 |
c503141d
|
n.hoffmann
|
}
|