Project

General

Profile

« Previous | Next » 

Revision 69e82edd

Added by Katja Luther over 5 years ago

local preferences database specific

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/NameDetailsViewConfiguration.java
59 59

  
60 60
            final Button activateLocalButton = new Button(composite, SWT.CHECK);
61 61
            activateLocalButton.setText(Messages.NameDetailsViewConfiguration_useLocalSettings);
62
            isUseLocalSettings =PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.OVERRIDE_NAME_DETAILS);
62
            isUseLocalSettings =PreferencesUtil.getBooleanValue(IPreferenceKeys.OVERRIDE_NAME_DETAILS);
63 63
            activateLocalButton.setSelection(isUseLocalSettings);
64 64
            activateLocalButton.addSelectionListener(new SelectionAdapter(){
65 65
            @Override
66 66
            public void widgetSelected(SelectionEvent e) {
67 67
                isUseLocalSettings = activateLocalButton.getSelection();
68
                PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.OVERRIDE_NAME_DETAILS, isUseLocalSettings);
68
                PreferencesUtil.setBooleanValue(IPreferenceKeys.OVERRIDE_NAME_DETAILS, isUseLocalSettings);
69 69
                if(isUseLocalSettings ){
70 70
                    child.setVisible(true);
71 71
                    child.setEnabled(true);
......
80 80
            child.setLayout(new GridLayout());
81 81
            child.setVisible(isUseLocalSettings);
82 82

  
83
            isSimpleDetailsViewActivated = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION);
83
            isSimpleDetailsViewActivated = PreferencesUtil.getBooleanValue(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION);
84 84

  
85 85

  
86 86

  
......
107 107

  
108 108

  
109 109
            final Button showTaxon = new Button(localSettings, SWT.CHECK);
110
            isShowTaxon = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_TAXON);
110
            isShowTaxon = PreferencesUtil.getBooleanValue(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_TAXON);
111 111
            showTaxon.setText(Messages.NameDetailsViewComposite_Show_Taxon);
112 112
            showTaxon.setSelection(isShowTaxon);
113 113
            showTaxon.addSelectionListener(new SelectionAdapter(){
......
119 119
             });
120 120

  
121 121
            final Button showSecDetail = new Button(localSettings, SWT.CHECK);
122
            isSecDetailsActivated = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SEC_DETAILS);
122
            isSecDetailsActivated = PreferencesUtil.getBooleanValue(IPreferenceKeys.SHOW_SEC_DETAILS);
123 123
            showSecDetail.setText(Messages.NameDetailsViewComposite_Show_SecDetail);
124 124

  
125 125
            showSecDetail.setSelection(isSecDetailsActivated);
......
133 133

  
134 134
            final Button secEnabled = new Button(localSettings, SWT.CHECK);
135 135
            secEnabled.setText(Messages.NameDetailsViewComposite_SecEnabled);
136
            isSecEnabled = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.DISABLE_SEC);
136
            isSecEnabled = PreferencesUtil.getBooleanValue(IPreferenceKeys.DISABLE_SEC);
137 137
            secEnabled.setSelection(isSecEnabled);
138 138
            secEnabled.addSelectionListener(new SelectionAdapter(){
139 139
                 @Override
......
144 144
             });
145 145

  
146 146
            final Button showLsid = new Button(localSettings, SWT.CHECK);
147
            isShowLSID = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_LSID);
147
            isShowLSID = PreferencesUtil.getBooleanValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_LSID);
148 148
            showLsid.setText(Messages.NameDetailsViewComposite_Show_LSID);
149 149
            showLsid.setSelection(isShowLSID);
150 150
            showLsid.addSelectionListener(new SelectionAdapter(){
......
156 156
             });
157 157

  
158 158
            final Button showNomenclaturalCode = new Button(localSettings, SWT.CHECK);
159
            isShowNomenclaturalCode = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_CODE);
159
            isShowNomenclaturalCode = PreferencesUtil.getBooleanValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_CODE);
160 160
            showNomenclaturalCode.setText(Messages.NameDetailsViewComposite_Show_NomenclaturalCode);
161 161
            showNomenclaturalCode.setSelection(isShowNomenclaturalCode);
162 162
            showNomenclaturalCode.addSelectionListener(new SelectionAdapter(){
......
168 168
             });
169 169

  
170 170
            final Button showNameCache = new Button(localSettings, SWT.CHECK);
171
            isShowNameCache = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NAMECACHE);
171
            isShowNameCache = PreferencesUtil.getBooleanValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NAMECACHE);
172 172
            showNameCache.setText(Messages.NameDetailsViewComposite_Show_NameCache);
173 173
            showNameCache.setSelection(isShowNomenclaturalCode);
174 174
            showNameCache.addSelectionListener(new SelectionAdapter(){
......
179 179
                  }
180 180
             });
181 181
            final Button showAppendedPhrase = new Button(localSettings, SWT.CHECK);
182
            isShowAppendedPhrase = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_APPENDED_PHRASE);
182
            isShowAppendedPhrase = PreferencesUtil.getBooleanValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_APPENDED_PHRASE);
183 183
            showAppendedPhrase.setText(Messages.NameDetailsViewComposite_Show_AppendedPhrase);
184 184
            showAppendedPhrase.setSelection(isShowAppendedPhrase);
185 185
            showAppendedPhrase.addSelectionListener(new SelectionAdapter(){
......
191 191
             });
192 192

  
193 193
            final Button showRank = new Button(localSettings, SWT.CHECK);
194
            isShowRank = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_RANK);
194
            isShowRank = PreferencesUtil.getBooleanValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_RANK);
195 195
            showRank.setText(Messages.NameDetailsViewComposite_Show_Rank);
196 196
            showRank.setSelection(isShowRank);
197 197
            showRank.addSelectionListener(new SelectionAdapter(){
......
202 202
                  }
203 203
             });
204 204
            final Button showEpithets = new Button(localSettings, SWT.CHECK);
205
            isShowEpithets = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_ATOMISED_EPITHETS);
205
            isShowEpithets = PreferencesUtil.getBooleanValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_ATOMISED_EPITHETS);
206 206
            showEpithets.setText(Messages.NameDetailsViewComposite_Show_AtomisedEpithets);
207 207
            showEpithets.setSelection(isShowEpithets);
208 208
            showEpithets.addSelectionListener(new SelectionAdapter(){
......
214 214
             });
215 215

  
216 216
            final Button showAuthorCache = new Button(localSettings, SWT.CHECK);
217
            isShowAuthorCache = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_AUTHORSHIP_CACHE);
217
            isShowAuthorCache = PreferencesUtil.getBooleanValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_AUTHORSHIP_CACHE);
218 218
            showAuthorCache.setText(Messages.NameDetailsViewComposite_Show_AuthorCache);
219 219
            showAuthorCache.setSelection(isShowAuthorCache);
220 220
            showAuthorCache.addSelectionListener(new SelectionAdapter(){
......
226 226
             });
227 227

  
228 228
            final Button showAuthorship = new Button(localSettings, SWT.CHECK);
229
            isShowAuthorship = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_AUTHORSHIP);
229
            isShowAuthorship = PreferencesUtil.getBooleanValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_AUTHORSHIP);
230 230
            showAuthorship.setText(Messages.NameDetailsViewComposite_Show_Author);
231 231
            showAuthorship.setSelection(isShowAuthorship);
232 232
            showAuthorship.addSelectionListener(new SelectionAdapter(){
......
238 238
             });
239 239

  
240 240
            final Button showNomenclaturalRef = new Button(localSettings, SWT.CHECK);
241
            isShowNomenclaturalRef = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_REFERENCE);
241
            isShowNomenclaturalRef = PreferencesUtil.getBooleanValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_REFERENCE);
242 242
            showNomenclaturalRef.setText(Messages.NameDetailsViewComposite_Show_NomenclaturalReference);
243 243
            showNomenclaturalRef.setSelection(isShowNomenclaturalRef);
244 244
            showNomenclaturalRef.addSelectionListener(new SelectionAdapter(){
......
250 250
             });
251 251

  
252 252
            final Button showNomenclaturalStatus = new Button(localSettings, SWT.CHECK);
253
            isShowNomenclaturalStatus = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_STATUS);
253
            isShowNomenclaturalStatus = PreferencesUtil.getBooleanValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_STATUS);
254 254
            showNomenclaturalStatus.setText(Messages.NameDetailsViewComposite_Show_NomenclaturalStatus);
255 255
            showNomenclaturalStatus.setSelection(isShowNomenclaturalStatus);
256 256
            showNomenclaturalStatus.addSelectionListener(new SelectionAdapter(){
......
262 262
             });
263 263

  
264 264
            final Button showProtologue = new Button(localSettings, SWT.CHECK);
265
            isShowProtologue = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_PROTOLOGUE);
265
            isShowProtologue = PreferencesUtil.getBooleanValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_PROTOLOGUE);
266 266
            showProtologue.setText(Messages.NameDetailsViewComposite_Show_Protologue);
267 267
            showProtologue.setSelection(isShowProtologue);
268 268
            showProtologue.addSelectionListener(new SelectionAdapter(){
......
274 274
             });
275 275

  
276 276
            final Button showTypeDesignation = new Button(localSettings, SWT.CHECK);
277
            isShowTypeDesignation = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_TYPE_DESIGNATION);
277
            isShowTypeDesignation = PreferencesUtil.getBooleanValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_TYPE_DESIGNATION);
278 278
            showTypeDesignation.setText(Messages.NameDetailsViewComposite_Show_TypeDesignation);
279 279
            showTypeDesignation.setSelection(isShowTypeDesignation);
280 280
            showTypeDesignation.addSelectionListener(new SelectionAdapter(){
......
287 287

  
288 288

  
289 289
            final Button showNameRelationship = new Button(localSettings, SWT.CHECK);
290
            isShowNameRelationship = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NAME_RELATIONSHIP);
290
            isShowNameRelationship = PreferencesUtil.getBooleanValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NAME_RELATIONSHIP);
291 291
            showNameRelationship.setText(Messages.NameDetailsViewComposite_Show_Namerelationships);
292 292
            showNameRelationship.setSelection(isShowNameRelationship);
293 293
            showNameRelationship.addSelectionListener(new SelectionAdapter(){
......
299 299
             });
300 300

  
301 301
            final Button showHybrid = new Button(localSettings, SWT.CHECK);
302
            isShowHybrid = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_HYBRID);
302
            isShowHybrid = PreferencesUtil.getBooleanValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_HYBRID);
303 303
            showHybrid.setText(Messages.NameDetailsViewComposite_Show_Hybrid);
304 304
            showHybrid.setSelection(isShowHybrid);
305 305
            showHybrid.addSelectionListener(new SelectionAdapter(){
......
310 310
                  }
311 311
             });
312 312
            final Button showNameApprobiation = new Button(localSettings, SWT.CHECK);
313
            isShowNameApprobiation = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NAME_APPROBATION);
313
            isShowNameApprobiation = PreferencesUtil.getBooleanValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NAME_APPROBATION);
314 314
            showNameApprobiation.setText(Messages.NameDetailsViewComposite_Show_NameApprobiation);
315 315
            showNameApprobiation.setSelection(isShowNameApprobiation);
316 316
            showNameApprobiation.addSelectionListener(new SelectionAdapter(){
......
336 336

  
337 337
    @Override
338 338
    public boolean performOk() {
339
        PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_TAXON, isShowTaxon);
340
        PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_SEC_DETAILS, isSecDetailsActivated);
341
        PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.DISABLE_SEC, isSecEnabled);
342
        PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION, isSimpleDetailsViewActivated);
343
        PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NAME_APPROBATION, isShowNameApprobiation);
344
        PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_HYBRID, isShowHybrid);
345
        PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NAME_RELATIONSHIP, isShowNameRelationship);
346
        PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_TYPE_DESIGNATION, isShowTypeDesignation);
347
        PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_PROTOLOGUE, isShowProtologue);
348
        PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_STATUS, isShowNomenclaturalStatus);
349
        PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_REFERENCE, isShowNomenclaturalRef);
350
        PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_AUTHORSHIP, isShowAuthorship);
351
        PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_AUTHORSHIP_CACHE, isShowAuthorCache);
352
        PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_ATOMISED_EPITHETS, isShowEpithets);
353
        PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_RANK, isShowRank);
354
        PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_APPENDED_PHRASE, isShowAppendedPhrase);
355
        PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NAMECACHE, isShowNameCache);
356
        PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_CODE, isShowNomenclaturalCode);
357
        PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_LSID, isShowLSID);
339
        PreferencesUtil.setBooleanValue(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_TAXON, isShowTaxon);
340
        PreferencesUtil.setBooleanValue(IPreferenceKeys.SHOW_SEC_DETAILS, isSecDetailsActivated);
341
        PreferencesUtil.setBooleanValue(IPreferenceKeys.DISABLE_SEC, isSecEnabled);
342
        PreferencesUtil.setBooleanValue(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION, isSimpleDetailsViewActivated);
343
        PreferencesUtil.setBooleanValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NAME_APPROBATION, isShowNameApprobiation);
344
        PreferencesUtil.setBooleanValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_HYBRID, isShowHybrid);
345
        PreferencesUtil.setBooleanValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NAME_RELATIONSHIP, isShowNameRelationship);
346
        PreferencesUtil.setBooleanValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_TYPE_DESIGNATION, isShowTypeDesignation);
347
        PreferencesUtil.setBooleanValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_PROTOLOGUE, isShowProtologue);
348
        PreferencesUtil.setBooleanValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_STATUS, isShowNomenclaturalStatus);
349
        PreferencesUtil.setBooleanValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_REFERENCE, isShowNomenclaturalRef);
350
        PreferencesUtil.setBooleanValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_AUTHORSHIP, isShowAuthorship);
351
        PreferencesUtil.setBooleanValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_AUTHORSHIP_CACHE, isShowAuthorCache);
352
        PreferencesUtil.setBooleanValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_ATOMISED_EPITHETS, isShowEpithets);
353
        PreferencesUtil.setBooleanValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_RANK, isShowRank);
354
        PreferencesUtil.setBooleanValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_APPENDED_PHRASE, isShowAppendedPhrase);
355
        PreferencesUtil.setBooleanValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NAMECACHE, isShowNameCache);
356
        PreferencesUtil.setBooleanValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_CODE, isShowNomenclaturalCode);
357
        PreferencesUtil.setBooleanValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_LSID, isShowLSID);
358 358
        return true;
359 359

  
360 360
    }

Also available in: Unified diff