Revision f6c0ab3d
Added by Katja Luther over 6 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/NameDetailsViewConfiguration.java | ||
---|---|---|
14 | 14 |
import org.eclipse.ui.IWorkbenchPreferencePage; |
15 | 15 |
|
16 | 16 |
import eu.etaxonomy.cdm.model.metadata.PreferencePredicate; |
17 |
import eu.etaxonomy.taxeditor.l10n.Messages; |
|
17 | 18 |
|
18 | 19 |
|
19 | 20 |
public class NameDetailsViewConfiguration extends PreferencePage implements IWorkbenchPreferencePage { |
... | ... | |
45 | 46 |
if (isAllowOverride){ |
46 | 47 |
|
47 | 48 |
final Button activateLocalButton = new Button(composite, SWT.CHECK); |
48 |
activateLocalButton.setText("Use local settings for display of name details"); |
|
49 |
activateLocalButton.setSelection( PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.OVERRIDE_NAME_DETAILS)); |
|
49 |
activateLocalButton.setText(Messages.NameDetailsViewConfiguration_useLocalSettings); |
|
50 |
isUseLocalSettings =PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.OVERRIDE_NAME_DETAILS); |
|
51 |
activateLocalButton.setSelection(isUseLocalSettings); |
|
50 | 52 |
activateLocalButton.addSelectionListener(new SelectionAdapter(){ |
51 | 53 |
@Override |
52 | 54 |
public void widgetSelected(SelectionEvent e) { |
... | ... | |
71 | 73 |
|
72 | 74 |
|
73 | 75 |
final Button activateCheckButton = new Button(child, SWT.CHECK); |
74 |
activateCheckButton.setText("Show only a simple name details view");
|
|
76 |
activateCheckButton.setText(Messages.NameDetailsViewConfiguration_activateSimpleDetailsView);
|
|
75 | 77 |
activateCheckButton.setSelection(isSimpleDetailsViewActivated); |
76 | 78 |
activateCheckButton.addSelectionListener(new SelectionAdapter(){ |
77 | 79 |
@Override |
... | ... | |
94 | 96 |
|
95 | 97 |
final Button showTaxon = new Button(localSettings, SWT.CHECK); |
96 | 98 |
boolean isShowTaxon = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_TAXON); |
97 |
showTaxon.setText("Show taxon of the name");
|
|
99 |
showTaxon.setText(Messages.NameDetailsViewComposite_Show_Taxon);
|
|
98 | 100 |
showTaxon.setSelection(isShowTaxon); |
99 | 101 |
showTaxon.addSelectionListener(new SelectionAdapter(){ |
100 | 102 |
@Override |
... | ... | |
106 | 108 |
|
107 | 109 |
final Button showLsid = new Button(localSettings, SWT.CHECK); |
108 | 110 |
boolean isShowLSID = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_LSID); |
109 |
showLsid.setText("Show Lsid of the name");
|
|
111 |
showLsid.setText(Messages.NameDetailsViewComposite_Show_LSID);
|
|
110 | 112 |
showLsid.setSelection(isShowLSID); |
111 | 113 |
showLsid.addSelectionListener(new SelectionAdapter(){ |
112 | 114 |
@Override |
... | ... | |
118 | 120 |
|
119 | 121 |
final Button showNomenclaturalCode = new Button(localSettings, SWT.CHECK); |
120 | 122 |
boolean isShowNomenclaturalCode = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_CODE); |
121 |
showNomenclaturalCode.setText("Show the nomenclatural code");
|
|
123 |
showNomenclaturalCode.setText(Messages.NameDetailsViewComposite_Show_NomenclaturalCode);
|
|
122 | 124 |
showNomenclaturalCode.setSelection(isShowNomenclaturalCode); |
123 | 125 |
showNomenclaturalCode.addSelectionListener(new SelectionAdapter(){ |
124 | 126 |
@Override |
... | ... | |
130 | 132 |
|
131 | 133 |
final Button showNameCache = new Button(localSettings, SWT.CHECK); |
132 | 134 |
boolean isShowNameCache = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NAMECACHE); |
133 |
showNameCache.setText("Show nameCache of the name (only the scientific name without the author and year)");
|
|
135 |
showNameCache.setText(Messages.NameDetailsViewComposite_Show_NameCache);
|
|
134 | 136 |
showNameCache.setSelection(isShowNomenclaturalCode); |
135 | 137 |
showNameCache.addSelectionListener(new SelectionAdapter(){ |
136 | 138 |
@Override |
... | ... | |
141 | 143 |
}); |
142 | 144 |
final Button showAppendedPhrase = new Button(localSettings, SWT.CHECK); |
143 | 145 |
boolean isShowAppendedPhrase = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_APPENDED_PHRASE); |
144 |
showAppendedPhrase.setText("Show appended phrase");
|
|
146 |
showAppendedPhrase.setText(Messages.NameDetailsViewComposite_Show_AppendedPhrase);
|
|
145 | 147 |
showAppendedPhrase.setSelection(isShowAppendedPhrase); |
146 | 148 |
showAppendedPhrase.addSelectionListener(new SelectionAdapter(){ |
147 | 149 |
@Override |
... | ... | |
153 | 155 |
|
154 | 156 |
final Button showRank = new Button(localSettings, SWT.CHECK); |
155 | 157 |
boolean isShowRank = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_RANK); |
156 |
showRank.setText("Show rank of the name");
|
|
158 |
showRank.setText(Messages.NameDetailsViewComposite_Show_Rank);
|
|
157 | 159 |
showRank.setSelection(isShowRank); |
158 | 160 |
showRank.addSelectionListener(new SelectionAdapter(){ |
159 | 161 |
@Override |
... | ... | |
164 | 166 |
}); |
165 | 167 |
final Button showEpithets = new Button(localSettings, SWT.CHECK); |
166 | 168 |
boolean isShowEpithets = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_ATOMISED_EPITHETS); |
167 |
showEpithets.setText("Show atomised epithets");
|
|
169 |
showEpithets.setText(Messages.NameDetailsViewComposite_Show_AtomisedEpithets);
|
|
168 | 170 |
showEpithets.setSelection(isShowEpithets); |
169 | 171 |
showEpithets.addSelectionListener(new SelectionAdapter(){ |
170 | 172 |
@Override |
... | ... | |
173 | 175 |
PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_ATOMISED_EPITHETS, isShowEpithets); |
174 | 176 |
} |
175 | 177 |
}); |
178 |
|
|
179 |
final Button showAuthorCache = new Button(localSettings, SWT.CHECK); |
|
180 |
boolean isShowAuthorCache = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_AUTHORSHIP_CACHE); |
|
181 |
showAuthorCache.setText(Messages.NameDetailsViewComposite_Show_AuthorCache); |
|
182 |
showAuthorCache.setSelection(isShowAuthorCache); |
|
183 |
showAuthorCache.addSelectionListener(new SelectionAdapter(){ |
|
184 |
@Override |
|
185 |
public void widgetSelected(SelectionEvent e) { |
|
186 |
boolean isShowAuthorCache = showAuthorCache.getSelection(); |
|
187 |
PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_AUTHORSHIP_CACHE, isShowAuthorCache); |
|
188 |
} |
|
189 |
}); |
|
190 |
|
|
176 | 191 |
final Button showAuthorship = new Button(localSettings, SWT.CHECK); |
177 | 192 |
boolean isShowAuthorship = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_AUTHORSHIP); |
178 |
showAuthorship.setText("Show authorship section");
|
|
193 |
showAuthorship.setText(Messages.NameDetailsViewComposite_Show_Author);
|
|
179 | 194 |
showAuthorship.setSelection(isShowAuthorship); |
180 | 195 |
showAuthorship.addSelectionListener(new SelectionAdapter(){ |
181 | 196 |
@Override |
... | ... | |
187 | 202 |
|
188 | 203 |
final Button showNomenclaturalRef = new Button(localSettings, SWT.CHECK); |
189 | 204 |
boolean isShowNomenclaturalRef = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_REFERENCE); |
190 |
showNomenclaturalRef.setText("Show nomenclatural reference section");
|
|
205 |
showNomenclaturalRef.setText(Messages.NameDetailsViewComposite_Show_NomenclaturalReference);
|
|
191 | 206 |
showNomenclaturalRef.setSelection(isShowNomenclaturalRef); |
192 | 207 |
showNomenclaturalRef.addSelectionListener(new SelectionAdapter(){ |
193 | 208 |
@Override |
... | ... | |
199 | 214 |
|
200 | 215 |
final Button showNomenclaturalStatus = new Button(localSettings, SWT.CHECK); |
201 | 216 |
boolean isShowNomenclaturalStatus = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_STATUS); |
202 |
showNomenclaturalStatus.setText("Show nomenclatural status section");
|
|
217 |
showNomenclaturalStatus.setText(Messages.NameDetailsViewComposite_Show_NomenclaturalStatus);
|
|
203 | 218 |
showNomenclaturalStatus.setSelection(isShowNomenclaturalStatus); |
204 | 219 |
showNomenclaturalStatus.addSelectionListener(new SelectionAdapter(){ |
205 | 220 |
@Override |
... | ... | |
211 | 226 |
|
212 | 227 |
final Button showProtologue = new Button(localSettings, SWT.CHECK); |
213 | 228 |
boolean isShowProtologue = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_PROTOLOGUE); |
214 |
showProtologue.setText("Show protologue section");
|
|
229 |
showProtologue.setText(Messages.NameDetailsViewComposite_Show_Protologue);
|
|
215 | 230 |
showProtologue.setSelection(isShowProtologue); |
216 | 231 |
showProtologue.addSelectionListener(new SelectionAdapter(){ |
217 | 232 |
@Override |
... | ... | |
223 | 238 |
|
224 | 239 |
final Button showTypeDesignation = new Button(localSettings, SWT.CHECK); |
225 | 240 |
boolean isShowTypeDesignation = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_TYPE_DESIGNATION); |
226 |
showTypeDesignation.setText("Show name type designation section");
|
|
241 |
showTypeDesignation.setText(Messages.NameDetailsViewComposite_Show_TypeDesignation);
|
|
227 | 242 |
showTypeDesignation.setSelection(isShowTypeDesignation); |
228 | 243 |
showTypeDesignation.addSelectionListener(new SelectionAdapter(){ |
229 | 244 |
@Override |
... | ... | |
236 | 251 |
|
237 | 252 |
final Button showNameRelationship = new Button(localSettings, SWT.CHECK); |
238 | 253 |
boolean isShowNameRelationship = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NAME_RELATIONSHIP); |
239 |
showNameRelationship.setText("Show name relationship section");
|
|
254 |
showNameRelationship.setText(Messages.NameDetailsViewComposite_Show_Namerelationships);
|
|
240 | 255 |
showNameRelationship.setSelection(isShowNameRelationship); |
241 | 256 |
showNameRelationship.addSelectionListener(new SelectionAdapter(){ |
242 | 257 |
@Override |
... | ... | |
248 | 263 |
|
249 | 264 |
final Button showHybrid = new Button(localSettings, SWT.CHECK); |
250 | 265 |
boolean isShowHybrid = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_HYBRID); |
251 |
showHybrid.setText("Show hybrid section");
|
|
266 |
showHybrid.setText(Messages.NameDetailsViewComposite_Show_Hybrid);
|
|
252 | 267 |
showHybrid.setSelection(isShowHybrid); |
253 | 268 |
showHybrid.addSelectionListener(new SelectionAdapter(){ |
254 | 269 |
@Override |
... | ... | |
259 | 274 |
}); |
260 | 275 |
final Button showNameApprobiation = new Button(localSettings, SWT.CHECK); |
261 | 276 |
boolean isShowNameApprobiation = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NAME_APPROBATION); |
262 |
showNameApprobiation.setText("Show name approbiation (for bacterial names)");
|
|
277 |
showNameApprobiation.setText(Messages.NameDetailsViewComposite_Show_NameApprobiation);
|
|
263 | 278 |
showNameApprobiation.setSelection(isShowNameApprobiation); |
264 | 279 |
showNameApprobiation.addSelectionListener(new SelectionAdapter(){ |
265 | 280 |
@Override |
Also available in: Unified diff
more changes for name details configuration with allow ovverride