Project

General

Profile

« Previous | Next » 

Revision 6fa5c755

Added by Katja Luther over 4 years ago

ref #7793: add possibility to disable sec and do not show sec details

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/databaseAdmin/preferencePage/NameDetailsViewConfiguration.java
31 31
    Composite dbSettings ;
32 32
    boolean isAllowOverride;
33 33
    boolean isShowTaxon;
34
    boolean isSecDetailsActivated;
35
    boolean isSecEnabled;
34 36
    boolean isShowLSID;
35 37
    boolean isShowNomenclaturalCode;
36 38
    boolean isShowNameCache;
......
114 116
              }
115 117
         });
116 118

  
119
        final Button showSecDetail = new Button(dbSettings, SWT.CHECK);
120
        showSecDetail.setText(Messages.NameDetailsViewComposite_Show_SecDetail);
121
        isSecDetailsActivated = nameDetailsConfig.isSecDetailsActivated();
122
        showSecDetail.setSelection(isSecDetailsActivated);
123
        showSecDetail.addSelectionListener(new SelectionAdapter(){
124
             @Override
125
             public void widgetSelected(SelectionEvent e) {
126
                 isSecDetailsActivated = showSecDetail.getSelection();
127

  
128
              }
129
         });
130

  
131
        final Button secEnabled = new Button(dbSettings, SWT.CHECK);
132
        secEnabled.setText(Messages.NameDetailsViewComposite_SecEnabled);
133
        isSecEnabled = nameDetailsConfig.isSecEnabled();
134
        secEnabled.setSelection(isSecEnabled);
135
        secEnabled.addSelectionListener(new SelectionAdapter(){
136
             @Override
137
             public void widgetSelected(SelectionEvent e) {
138
                 isSecEnabled = secEnabled.getSelection();
139

  
140
              }
141
         });
142

  
143

  
117 144
        final Button showLsid = new Button(dbSettings, SWT.CHECK);
118 145
        showLsid.setText(Messages.NameDetailsViewComposite_Show_LSID);
119 146
        isShowLSID = nameDetailsConfig.isLSIDActivated();
......
318 345
      config.setProtologueActivated(isShowProtologue);
319 346
      config.setRankActivated(isShowRank);
320 347
      config.setTaxonSectionActivated(isShowTaxon);
348
      config.setSecDetailsActivated(isSecDetailsActivated);
349
      config.setSecEnabled(isSecEnabled);
321 350
      config.setTypeDesignationSectionActivated(isShowTypeDesignation);
322 351
      config.setHybridActivated(isShowHybrid);
323 352

  
......
340 369
        String value = config.toString();
341 370
//        boolean allowOverride = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.ALLOW_OVERRIDE_NAME_DETAILS);
342 371

  
343
        CdmPreference pref = CdmPreference.NewDatabaseInstance( PreferencePredicate.NameDetailsView, value);
372
        CdmPreference pref = CdmPreference.NewTaxEditorInstance(PreferencePredicate.NameDetailsView, value);
344 373
        pref.setAllowOverride(isAllowOverride);
345 374
        service.set(pref);
346 375
        PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_TAXON, isShowTaxon);
376
        PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_SEC_DETAILS, isSecDetailsActivated);
377
        PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.DISABLE_SEC, isSecEnabled);
347 378
        PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_LSID, isShowLSID);
348 379
        PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_CODE, isShowNomenclaturalCode);
349 380
        PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NAMECACHE, isShowNameCache);
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/l10n/Messages.java
321 321
    public static String NameDetailsViewComposite_Show_Hybrid;
322 322
    public static String NameDetailsViewComposite_Show_NameApprobiation;
323 323
    public static String NameDetailsViewComposite_Show_Taxon;
324
    public static String NameDetailsViewComposite_Show_SecDetail;
325
    public static String NameDetailsViewComposite_SecEnabled;
324 326
    public static String NameDetailsViewComposite_Show_LSID;
325 327
    public static String NameDetailsViewComposite_Show_NomenclaturalCode;
326 328
    public static String NameDetailsViewComposite_Show_NameCache;
......
459 461
    public static String ChecklistEditorGeneralPreference_show_symbol2;
460 462
    public static String ChecklistEditorGeneralPreference_show_title;
461 463
    public static String ChecklistEditorGeneralPreference_Configure_display_of_Areas;
464

  
465

  
466

  
467

  
468

  
469

  
462 470
    static {
463 471
        // initialize resource bundle
464 472
        NLS.initializeMessages(BUNDLE_NAME, Messages.class);
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/l10n/messages.properties
234 234
NameDetailsViewComposite_Show_Hybrid=Hybrid section
235 235
NameDetailsViewComposite_Show_NameApprobiation=Name approbiation (for bacterial names)
236 236
NameDetailsViewComposite_Show_Taxon=Taxon of the name
237
NameDetailsViewComposite_Show_SecDetail=Secundum Reference Details
238
NameDetailsViewComposite_SecEnabled=Secundum enabled (editing in details view possible)
237 239
NameDetailsViewComposite_Show_LSID=Lsid of the name
238 240
NameDetailsViewComposite_Show_NomenclaturalCode=Nomenclatural code
239 241
NameDetailsViewComposite_Show_NameCache=NameCache of the name (only the scientific name without the author and year)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/l10n/messages_de.properties
234 234
NameDetailsViewComposite_Show_Hybrid=Hybride
235 235
NameDetailsViewComposite_Show_NameApprobiation=Namens Approbation (f?r Bakterien)
236 236
NameDetailsViewComposite_Show_Taxon=Taxon
237
NameDetailsViewComposite_Show_SecDetail=Secundum Referenz Details
238
NameDetailsViewComposite_SecEnabled=Secundum aktiviert (kann im Details View bearbeitet werden)
237 239
NameDetailsViewComposite_Show_LSID=Lsid
238 240
NameDetailsViewComposite_Show_NomenclaturalCode=Nomenclatorischer Code
239 241
NameDetailsViewComposite_Show_NameCache=Cache des Namens (nur der wissenschaftliche Name ohne Autor und Jahr)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/IPreferenceKeys.java
163 163
    public static final String COMMON_NAME_AREA_VOCABULARIES = "eu.etaxonomy.taxeditor.commonNames.areaVocabularies";
164 164
    public static final String COMMON_NAME_AREA_VOCABULARIES_ALLOW_OVERRIDE = "eu.etaxonomy.taxeditor.commonNames.areaVocabularies.allowOverride";
165 165
    public static final String COMMON_NAME_AREA_VOCABULARIES_OVERRIDE = "eu.etaxonomy.taxeditor.commonNames.areaVocabularies.override";
166
//Name details view
166
//Taxon Details View
167
    public static final String SHOW_SEC_DETAILS = "eu.etaxonomy.taxeditor.taxon.showSecDetails";
168
    public static final String DISABLE_SEC = "eu.etaxonomy.taxeditor.taxon.disableSec";
169
    //Name details view
167 170
    public static final String SHOW_SIMPLE_NAME_DETAILS_SECTION = "eu.etaxonomy.taxeditor.name.showSimpleName";
168 171
    public static final String SHOW_SIMPLE_NAME_DETAILS_TAXON = "eu.etaxonomy.taxeditor.name.showNameTaxon";
169 172
    public static final String SHOW_NAME_DETAILS_SECTION_LSID = "eu.etaxonomy.taxeditor.name.showNameLsid";
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/NameDetailsConfigurator.java
35 35
    private boolean isHybridActivated = true;
36 36

  
37 37
	private boolean isNameApprobiationActivated = true;
38
	private boolean isSecEnabled = true;
39
	private boolean isSecDetailsActivated = true;
38 40

  
39 41
    public NameDetailsConfigurator(boolean isSimpleDetailsViewActivated){
40 42
        this.isSimpleDetailsViewActivated = isSimpleDetailsViewActivated;
......
172 174
        result.append(":");
173 175
        result.append(this.isTaxonSectionActivated);
174 176
        result.append(";");
177
        result.append("taxon.SecEnabled");
178
        result.append(":");
179
        result.append(this.isSecEnabled);
180
        result.append(";");
181
        result.append("taxon.SecDetails");
182
        result.append(":");
183
        result.append(this.isSecDetailsActivated);
184
        result.append(";");
175 185

  
176 186
        result.append("lsid");
177 187
        result.append(":");
......
269 279
        this.isAllowOverride = isAllowOverride;
270 280
    }
271 281

  
282
    public boolean isSecEnabled() {
283
        return isSecEnabled;
284
    }
285

  
286
    public void setSecEnabled(boolean isSecEnabled) {
287
        this.isSecEnabled = isSecEnabled;
288
    }
289

  
290
    public boolean isSecDetailsActivated() {
291
        return isSecDetailsActivated;
292
    }
293

  
294
    public void setSecDetailsActivated(boolean isSecDetailsActivated) {
295
        this.isSecDetailsActivated = isSecDetailsActivated;
296
    }
297

  
272 298
}
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/NameDetailsViewConfiguration.java
23 23
    Composite child ;
24 24
    Composite localSettings ;
25 25

  
26

  
27
    boolean isShowTaxon;
28
    boolean isShowNameApprobiation ;
29
    boolean isShowHybrid;
30
    boolean isShowNameRelationship;
31
    boolean isShowTypeDesignation;
32
    boolean isShowProtologue;
33
    boolean isShowNomenclaturalStatus;
34
    boolean isShowNomenclaturalRef;
35
    boolean isShowAuthorship;
36
    boolean isShowAuthorCache;
37
    boolean isShowEpithets;
38
    boolean isShowRank;
39
    boolean isShowAppendedPhrase;
40
    boolean isShowNameCache;
41
    boolean isShowNomenclaturalCode;
42
    boolean isShowLSID;
43
    boolean isSecEnabled;
44
    boolean isSecDetailsActivated;
45

  
26 46
    @Override
27 47
    protected Control createContents(Composite parent) {
28 48

  
......
71 91
            @Override
72 92
            public void widgetSelected(SelectionEvent e) {
73 93
            	isSimpleDetailsViewActivated = activateCheckButton.getSelection();
74
                PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION, isSimpleDetailsViewActivated);
94

  
75 95
                if(isSimpleDetailsViewActivated && isUseLocalSettings){
76 96
                    localSettings.setVisible(true);
77 97
                    localSettings.setEnabled(true);
......
87 107

  
88 108

  
89 109
            final Button showTaxon = new Button(localSettings, SWT.CHECK);
90
            boolean isShowTaxon = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_TAXON);
110
            isShowTaxon = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_TAXON);
91 111
            showTaxon.setText(Messages.NameDetailsViewComposite_Show_Taxon);
92 112
            showTaxon.setSelection(isShowTaxon);
93 113
            showTaxon.addSelectionListener(new SelectionAdapter(){
94 114
                 @Override
95 115
                 public void widgetSelected(SelectionEvent e) {
96
                     boolean isShowTaxon = showTaxon.getSelection();
97
                     PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_TAXON, isShowTaxon);
116
                     isShowTaxon = showTaxon.getSelection();
117

  
118
                  }
119
             });
120

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

  
125
            showSecDetail.setSelection(isSecDetailsActivated);
126
            showSecDetail.addSelectionListener(new SelectionAdapter(){
127
                 @Override
128
                 public void widgetSelected(SelectionEvent e) {
129
                     isSecDetailsActivated = showSecDetail.getSelection();
130

  
131
                  }
132
             });
133

  
134
            final Button secEnabled = new Button(localSettings, SWT.CHECK);
135
            secEnabled.setText(Messages.NameDetailsViewComposite_SecEnabled);
136
            isSecEnabled = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.DISABLE_SEC);
137
            secEnabled.setSelection(isSecEnabled);
138
            secEnabled.addSelectionListener(new SelectionAdapter(){
139
                 @Override
140
                 public void widgetSelected(SelectionEvent e) {
141
                     isSecEnabled = secEnabled.getSelection();
142

  
98 143
                  }
99 144
             });
100 145

  
101 146
            final Button showLsid = new Button(localSettings, SWT.CHECK);
102
            boolean isShowLSID = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_LSID);
147
            isShowLSID = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_LSID);
103 148
            showLsid.setText(Messages.NameDetailsViewComposite_Show_LSID);
104 149
            showLsid.setSelection(isShowLSID);
105 150
            showLsid.addSelectionListener(new SelectionAdapter(){
106 151
                 @Override
107 152
                 public void widgetSelected(SelectionEvent e) {
108
                     boolean isShowLSID = showLsid.getSelection();
109
                     PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_LSID, isShowLSID);
153
                     isShowLSID = showLsid.getSelection();
154

  
110 155
                  }
111 156
             });
112 157

  
113 158
            final Button showNomenclaturalCode = new Button(localSettings, SWT.CHECK);
114
            boolean isShowNomenclaturalCode = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_CODE);
159
            isShowNomenclaturalCode = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_CODE);
115 160
            showNomenclaturalCode.setText(Messages.NameDetailsViewComposite_Show_NomenclaturalCode);
116 161
            showNomenclaturalCode.setSelection(isShowNomenclaturalCode);
117 162
            showNomenclaturalCode.addSelectionListener(new SelectionAdapter(){
118 163
                 @Override
119 164
                 public void widgetSelected(SelectionEvent e) {
120
                     boolean isShowNomenclaturalCode = showNomenclaturalCode.getSelection();
121
                     PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_CODE, isShowNomenclaturalCode);
165
                     isShowNomenclaturalCode = showNomenclaturalCode.getSelection();
166

  
122 167
                  }
123 168
             });
124 169

  
125 170
            final Button showNameCache = new Button(localSettings, SWT.CHECK);
126
            boolean isShowNameCache = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NAMECACHE);
171
            isShowNameCache = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NAMECACHE);
127 172
            showNameCache.setText(Messages.NameDetailsViewComposite_Show_NameCache);
128 173
            showNameCache.setSelection(isShowNomenclaturalCode);
129 174
            showNameCache.addSelectionListener(new SelectionAdapter(){
130 175
                 @Override
131 176
                 public void widgetSelected(SelectionEvent e) {
132
                     boolean isShowNameCache = showNameCache.getSelection();
133
                     PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NAMECACHE, isShowNameCache);
177
                     isShowNameCache = showNameCache.getSelection();
178

  
134 179
                  }
135 180
             });
136 181
            final Button showAppendedPhrase = new Button(localSettings, SWT.CHECK);
137
            boolean isShowAppendedPhrase = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_APPENDED_PHRASE);
182
            isShowAppendedPhrase = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_APPENDED_PHRASE);
138 183
            showAppendedPhrase.setText(Messages.NameDetailsViewComposite_Show_AppendedPhrase);
139 184
            showAppendedPhrase.setSelection(isShowAppendedPhrase);
140 185
            showAppendedPhrase.addSelectionListener(new SelectionAdapter(){
141 186
                 @Override
142 187
                 public void widgetSelected(SelectionEvent e) {
143
                     boolean isShowAppendedPhrase = showAppendedPhrase.getSelection();
144
                     PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_APPENDED_PHRASE, isShowAppendedPhrase);
188
                     isShowAppendedPhrase = showAppendedPhrase.getSelection();
189

  
145 190
                  }
146 191
             });
147 192

  
148 193
            final Button showRank = new Button(localSettings, SWT.CHECK);
149
            boolean isShowRank = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_RANK);
194
            isShowRank = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_RANK);
150 195
            showRank.setText(Messages.NameDetailsViewComposite_Show_Rank);
151 196
            showRank.setSelection(isShowRank);
152 197
            showRank.addSelectionListener(new SelectionAdapter(){
153 198
                 @Override
154 199
                 public void widgetSelected(SelectionEvent e) {
155
                     boolean isShowRank = showRank.getSelection();
156
                     PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_RANK, isShowRank);
200
                     isShowRank = showRank.getSelection();
201

  
157 202
                  }
158 203
             });
159 204
            final Button showEpithets = new Button(localSettings, SWT.CHECK);
160
            boolean isShowEpithets = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_ATOMISED_EPITHETS);
205
            isShowEpithets = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_ATOMISED_EPITHETS);
161 206
            showEpithets.setText(Messages.NameDetailsViewComposite_Show_AtomisedEpithets);
162 207
            showEpithets.setSelection(isShowEpithets);
163 208
            showEpithets.addSelectionListener(new SelectionAdapter(){
164 209
                 @Override
165 210
                 public void widgetSelected(SelectionEvent e) {
166
                     boolean isShowEpithets = showEpithets.getSelection();
167
                     PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_ATOMISED_EPITHETS, isShowEpithets);
211
                     isShowEpithets = showEpithets.getSelection();
212

  
168 213
                  }
169 214
             });
170 215

  
171 216
            final Button showAuthorCache = new Button(localSettings, SWT.CHECK);
172
            boolean isShowAuthorCache = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_AUTHORSHIP_CACHE);
217
            isShowAuthorCache = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_AUTHORSHIP_CACHE);
173 218
            showAuthorCache.setText(Messages.NameDetailsViewComposite_Show_AuthorCache);
174 219
            showAuthorCache.setSelection(isShowAuthorCache);
175 220
            showAuthorCache.addSelectionListener(new SelectionAdapter(){
176 221
                 @Override
177 222
                 public void widgetSelected(SelectionEvent e) {
178
                     boolean isShowAuthorCache = showAuthorCache.getSelection();
179
                     PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_AUTHORSHIP_CACHE, isShowAuthorCache);
223
                     isShowAuthorCache = showAuthorCache.getSelection();
224

  
180 225
                  }
181 226
             });
182 227

  
183 228
            final Button showAuthorship = new Button(localSettings, SWT.CHECK);
184
            boolean isShowAuthorship = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_AUTHORSHIP);
229
            isShowAuthorship = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_AUTHORSHIP);
185 230
            showAuthorship.setText(Messages.NameDetailsViewComposite_Show_Author);
186 231
            showAuthorship.setSelection(isShowAuthorship);
187 232
            showAuthorship.addSelectionListener(new SelectionAdapter(){
188 233
                 @Override
189 234
                 public void widgetSelected(SelectionEvent e) {
190
                     boolean isShowAuthorship = showAuthorship.getSelection();
191
                     PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_AUTHORSHIP, isShowAuthorship);
235
                     isShowAuthorship = showAuthorship.getSelection();
236

  
192 237
                  }
193 238
             });
194 239

  
195 240
            final Button showNomenclaturalRef = new Button(localSettings, SWT.CHECK);
196
            boolean isShowNomenclaturalRef = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_REFERENCE);
241
            isShowNomenclaturalRef = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_REFERENCE);
197 242
            showNomenclaturalRef.setText(Messages.NameDetailsViewComposite_Show_NomenclaturalReference);
198 243
            showNomenclaturalRef.setSelection(isShowNomenclaturalRef);
199 244
            showNomenclaturalRef.addSelectionListener(new SelectionAdapter(){
200 245
                 @Override
201 246
                 public void widgetSelected(SelectionEvent e) {
202
                     boolean isShowNomenclaturalRef = showNomenclaturalRef.getSelection();
203
                     PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_REFERENCE, isShowNomenclaturalRef);
247
                     isShowNomenclaturalRef = showNomenclaturalRef.getSelection();
248

  
204 249
                  }
205 250
             });
206 251

  
207 252
            final Button showNomenclaturalStatus = new Button(localSettings, SWT.CHECK);
208
            boolean isShowNomenclaturalStatus = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_STATUS);
253
            isShowNomenclaturalStatus = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_STATUS);
209 254
            showNomenclaturalStatus.setText(Messages.NameDetailsViewComposite_Show_NomenclaturalStatus);
210 255
            showNomenclaturalStatus.setSelection(isShowNomenclaturalStatus);
211 256
            showNomenclaturalStatus.addSelectionListener(new SelectionAdapter(){
212 257
                 @Override
213 258
                 public void widgetSelected(SelectionEvent e) {
214
                     boolean isShowNomenclaturalStatus = showNomenclaturalStatus.getSelection();
215
                     PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_STATUS, isShowNomenclaturalStatus);
259
                     isShowNomenclaturalStatus = showNomenclaturalStatus.getSelection();
260

  
216 261
                  }
217 262
             });
218 263

  
219 264
            final Button showProtologue = new Button(localSettings, SWT.CHECK);
220
            boolean isShowProtologue = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_PROTOLOGUE);
265
            isShowProtologue = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_PROTOLOGUE);
221 266
            showProtologue.setText(Messages.NameDetailsViewComposite_Show_Protologue);
222 267
            showProtologue.setSelection(isShowProtologue);
223 268
            showProtologue.addSelectionListener(new SelectionAdapter(){
224 269
                 @Override
225 270
                 public void widgetSelected(SelectionEvent e) {
226
                     boolean isShowProtologue = showProtologue.getSelection();
227
                     PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_PROTOLOGUE, isShowProtologue);
271
                     isShowProtologue = showProtologue.getSelection();
272

  
228 273
                  }
229 274
             });
230 275

  
231 276
            final Button showTypeDesignation = new Button(localSettings, SWT.CHECK);
232
            boolean isShowTypeDesignation = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_TYPE_DESIGNATION);
277
            isShowTypeDesignation = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_TYPE_DESIGNATION);
233 278
            showTypeDesignation.setText(Messages.NameDetailsViewComposite_Show_TypeDesignation);
234 279
            showTypeDesignation.setSelection(isShowTypeDesignation);
235 280
            showTypeDesignation.addSelectionListener(new SelectionAdapter(){
236 281
                 @Override
237 282
                 public void widgetSelected(SelectionEvent e) {
238
                     boolean isShowTypeDesignation = showTypeDesignation.getSelection();
239
                     PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_TYPE_DESIGNATION, isShowTypeDesignation);
283
                     isShowTypeDesignation = showTypeDesignation.getSelection();
284

  
240 285
                  }
241 286
             });
242 287

  
243 288

  
244 289
            final Button showNameRelationship = new Button(localSettings, SWT.CHECK);
245
            boolean isShowNameRelationship = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NAME_RELATIONSHIP);
290
            isShowNameRelationship = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NAME_RELATIONSHIP);
246 291
            showNameRelationship.setText(Messages.NameDetailsViewComposite_Show_Namerelationships);
247 292
            showNameRelationship.setSelection(isShowNameRelationship);
248 293
            showNameRelationship.addSelectionListener(new SelectionAdapter(){
249 294
                 @Override
250 295
                 public void widgetSelected(SelectionEvent e) {
251
                     boolean isShowNameRelationship = showNameRelationship.getSelection();
252
                     PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NAME_RELATIONSHIP, isShowNameRelationship);
296
                     isShowNameRelationship = showNameRelationship.getSelection();
297

  
253 298
                  }
254 299
             });
255 300

  
256 301
            final Button showHybrid = new Button(localSettings, SWT.CHECK);
257
            boolean isShowHybrid = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_HYBRID);
302
            isShowHybrid = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_HYBRID);
258 303
            showHybrid.setText(Messages.NameDetailsViewComposite_Show_Hybrid);
259 304
            showHybrid.setSelection(isShowHybrid);
260 305
            showHybrid.addSelectionListener(new SelectionAdapter(){
261 306
                 @Override
262 307
                 public void widgetSelected(SelectionEvent e) {
263
                     boolean isShowHybrid = showHybrid.getSelection();
264
                     PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_HYBRID, isShowHybrid);
308
                     isShowHybrid = showHybrid.getSelection();
309

  
265 310
                  }
266 311
             });
267 312
            final Button showNameApprobiation = new Button(localSettings, SWT.CHECK);
268
            boolean isShowNameApprobiation = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NAME_APPROBATION);
313
            isShowNameApprobiation = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NAME_APPROBATION);
269 314
            showNameApprobiation.setText(Messages.NameDetailsViewComposite_Show_NameApprobiation);
270 315
            showNameApprobiation.setSelection(isShowNameApprobiation);
271 316
            showNameApprobiation.addSelectionListener(new SelectionAdapter(){
272 317
                 @Override
273 318
                 public void widgetSelected(SelectionEvent e) {
274
                     boolean isShowNameApprobiation = showNameApprobiation.getSelection();
275
                     PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NAME_APPROBATION, isShowNameApprobiation);
319
                     isShowNameApprobiation= showNameApprobiation.getSelection();
320

  
276 321
                  }
277 322
             });
278 323

  
......
289 334
        return composite;
290 335
	}
291 336

  
337
    @Override
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);
358
        return true;
359

  
360
    }
361

  
292 362
}
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/PreferencesUtil.java
571 571
		getPreferenceStore().setDefault(OPENURL_IMAGE_MAX_WIDTH, "1000");
572 572
		getPreferenceStore().setDefault(OPENURL_IMAGE_MAX_HEIGHT, "1000");
573 573
		//Distribution Editor:
574
		getPreferenceStore().setDefault(DISTRIBUTION_AREA_PREFRENCES_ACTIVE, false);
574
		getPreferenceStore().setDefault(DISTRIBUTION_AREA_PREFRENCES_ACTIVE, true);
575 575
		getPreferenceStore().setDefault(CHECKLIST_AREA_DISPLAY, CHECKLIST_AREA_DISPLAY_TITLE);
576 576
		getPreferenceStore().setDefault(CHECKLIST_SYMBOL, false);
577 577

  
......
606 606
		getPreferenceStore().setDefault(SHOW_NAME_IN_SOURCE, true);
607 607
		getPreferenceStore().setDefault(SHOW_ID_IN_SOURCE, true);
608 608
		getPreferenceStore().setDefault(DISABLE_MULTI_CLASSIFICATION, false);
609

  
609
		getPreferenceStore().setDefault(DISABLE_SEC, false);
610
		getPreferenceStore().setDefault(SHOW_SEC_DETAILS, true);
610 611
	}
611 612

  
612 613
	/**
......
1135 1136
    //                (getValue(sectionMap, "taxon")));
1136 1137
            config.setTaxonSectionActivated(getValue(sectionMap, "taxon"));
1137 1138

  
1139
            config.setSecDetailsActivated(getValue(sectionMap, "taxon.SecEnabled"));
1140
            config.setSecEnabled(getValue(sectionMap, "taxon.SecDetails"));
1141

  
1138 1142
    //        getPreferenceStore().setValue(SHOW_NAME_DETAILS_SECTION_LSID,
1139 1143
    //                (getValue(sectionMap, "lsid")));
1140 1144
            config.setLSIDActivated(getValue(sectionMap, "lsid"));
......
1187 1191
        }else{
1188 1192
            config.setSimpleDetailsViewActivated(getPreferenceStore().getBoolean(SHOW_SIMPLE_NAME_DETAILS_SECTION));
1189 1193
            config.setTaxonSectionActivated(getPreferenceStore().getBoolean(SHOW_SIMPLE_NAME_DETAILS_TAXON));
1194
            config.setSecDetailsActivated(getPreferenceStore().getBoolean(SHOW_SEC_DETAILS));
1195
            config.setSecEnabled(getPreferenceStore().getBoolean(DISABLE_SEC));
1190 1196
            config.setLSIDActivated(getPreferenceStore().getBoolean(SHOW_NAME_DETAILS_SECTION_LSID));
1191 1197
            config.setNomenclaturalCodeActived(getPreferenceStore().getBoolean(SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_CODE));
1192 1198
            config.setAppendedPhraseActivated(getPreferenceStore().getBoolean(SHOW_NAME_DETAILS_SECTION_APPENDED_PHRASE));
......
1219 1225
        //also add to local preferences
1220 1226
        getPreferenceStore().setValue(SHOW_SIMPLE_NAME_DETAILS_SECTION, config.isSimpleDetailsViewActivated());
1221 1227
        getPreferenceStore().setValue(SHOW_SIMPLE_NAME_DETAILS_TAXON, config.isTaxonSectionActivated());
1228
        getPreferenceStore().setValue(SHOW_SEC_DETAILS, config.isSecDetailsActivated());
1229
        getPreferenceStore().setValue(DISABLE_SEC, config.isSecEnabled());
1222 1230
        getPreferenceStore().setValue(SHOW_NAME_DETAILS_SECTION_LSID, config.isLSIDActivated());
1223 1231
        getPreferenceStore().setValue(SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_CODE, config.isNomenclaturalCodeActived());
1224 1232
        getPreferenceStore().setValue(SHOW_NAME_DETAILS_SECTION_APPENDED_PHRASE, config.isAppendedPhraseActivated());
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/taxon/TaxonBaseDetailElement.java
20 20
import eu.etaxonomy.cdm.model.taxon.Taxon;
21 21
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
22 22
import eu.etaxonomy.cdm.persistence.hibernate.permission.Role;
23
import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
24
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
23 25
import eu.etaxonomy.taxeditor.store.CdmStore;
24 26
import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
25 27
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
......
76 78
				 formElement, "Secundum",
77 79
				entity.getSec(), EntitySelectionElement.ALL,
78 80
				style);
79

  
80
		text_secundum_microreference = formFactory.createTextWithLabelElement(
81
                formElement, "Detail",
82
               entity.getSecMicroReference(),null,
83
                SWT.WRAP);
84

  
81
		if (!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.DISABLE_SEC)){
82
		    selection_secundum.setEnabled(false);
83
		}
84
		if (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SEC_DETAILS)){
85
    		text_secundum_microreference = formFactory.createTextWithLabelElement(
86
                    formElement, "Detail",
87
                   entity.getSecMicroReference(),null,
88
                    SWT.WRAP);
89
		}
85 90

  
86 91
		checkbox_useNameCache = formFactory.createCheckbox(formElement,
87 92
					"Exclude Authorship", entity.isUseNameCache(), style);

Also available in: Unified diff