Project

General

Profile

« Previous | Next » 

Revision 76b874f8

Added by Katja Luther over 7 years ago

fix #6050: add the possibility to configure which fields should be displayed in name details view

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/detail/DetailsViewer.java
365 365
        ParsingMessagesSection parsingMessagesSection = formFactory.createParsingMessagesSection(getConversationHolder(), parent, this,
366 366
                ExpandableComposite.EXPANDED | ExpandableComposite.EXPANDED);
367 367
        if (!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION)){
368
            TaxonBaseDetailSection taxonBaseDetailSection = formFactory.createTaxonBaseDetailSection(getConversationHolder(), parent, this,
369
            		ExpandableComposite.TWISTIE	| ExpandableComposite.EXPANDED);
370
            formFactory.createHorizontalSeparator(parent, SWT.BORDER);
371

  
372
            addPart(taxonBaseDetailSection);
368
        	TaxonBaseDetailSection taxonBaseDetailSection = formFactory.createTaxonBaseDetailSection(getConversationHolder(), parent, this,
369
	        ExpandableComposite.TWISTIE	| ExpandableComposite.EXPANDED);
370
	        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
371
	        addPart(taxonBaseDetailSection);
372
        }else{
373
        	if (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_TAXON)){
374
	            TaxonBaseDetailSection taxonBaseDetailSection = formFactory.createTaxonBaseDetailSection(getConversationHolder(), parent, this,
375
	            		ExpandableComposite.TWISTIE	| ExpandableComposite.EXPANDED);
376
	            formFactory.createHorizontalSeparator(parent, SWT.BORDER);
377
	
378
	            addPart(taxonBaseDetailSection);
379
        	}
373 380
        }
374 381
        NonViralNameDetailSection nonViralNameSection = formFactory
375 382
                .createNonViralNameDetailSection(getConversationHolder(), parent, this, true,
376 383
                        ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
377 384
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
378
        if (!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION)){
385
        if (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_REFERENCE)){
379 386
            NomenclaturalReferenceDetailSection referenceDetailSection = formFactory.createNomenclaturalReferenceDetailSection(getConversationHolder(), parent, this,
380 387
            		ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
381 388
            formFactory.createHorizontalSeparator(parent, SWT.BORDER);
382

  
389
            addPart(referenceDetailSection);
390
        }
391
        if (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_STATUS)){
383 392
            NomenclaturalStatusSection nomenclaturalStatusSection = formFactory.createNomenclaturalStatusSection(getConversationHolder(), parent,
384 393
            		ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
385 394
            formFactory.createHorizontalSeparator(parent, SWT.BORDER);
386 395

  
387 396
            addPart(nomenclaturalStatusSection);
388
            addPart(referenceDetailSection);
397
            
389 398
        }
390 399
        //TODO RL
391
        if(!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.IS_RL)  && !PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION)){
392
	        ProtologueSection protologSection = formFactory.createProtologueSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
393
	        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
394

  
395
	        TypeDesignationSection typeDesignationSection = formFactory.createTypeDesignationSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
396
	        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
397

  
398
	        NameRelationshipDetailSection nameRelationshipSection = formFactory.createNameRelationshipDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
399
	        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
400

  
401
			addPart(protologSection);
402
			addPart(typeDesignationSection);
403
			addPart(nameRelationshipSection);
400
        if(!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.IS_RL)  ){
401
        	if (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_PROTOLOGUE)){
402
        		ProtologueSection protologSection = formFactory.createProtologueSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
403
        		formFactory.createHorizontalSeparator(parent, SWT.BORDER);
404
        		addPart(protologSection);
405
        	}
406
        	
407
        	if (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_TYPE_DESIGNATION)){
408
        		TypeDesignationSection typeDesignationSection = formFactory.createTypeDesignationSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
409
        		formFactory.createHorizontalSeparator(parent, SWT.BORDER);
410
        		addPart(typeDesignationSection);
411
        	}
412
        	
413
        	if (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NAME_RELATIONSHIP)){
414
        		NameRelationshipDetailSection nameRelationshipSection = formFactory.createNameRelationshipDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
415
        		formFactory.createHorizontalSeparator(parent, SWT.BORDER);
416
        		addPart(nameRelationshipSection);
417
        	}
404 418
        }
405 419

  
406 420
        addPart(parsingMessagesSection);

Also available in: Unified diff