Project

General

Profile

Revision 9b5133b8

ID9b5133b804757d85566681962fd106936785c1a5
Parent d6e586ac
Child 09092e90

Added by Patrick Plitzner about 2 years ago

ref #8135 re-enable textual type designation

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/CdmFormFactory.java
104 104
import eu.etaxonomy.cdm.model.name.NameTypeDesignation;
105 105
import eu.etaxonomy.cdm.model.name.NomenclaturalStatus;
106 106
import eu.etaxonomy.cdm.model.name.SpecimenTypeDesignation;
107
import eu.etaxonomy.cdm.model.name.TextualTypeDesignation;
107 108
import eu.etaxonomy.cdm.model.occurrence.DerivedUnit;
108 109
import eu.etaxonomy.cdm.model.occurrence.DeterminationEvent;
109 110
import eu.etaxonomy.cdm.model.reference.Reference;
......
237 238
import eu.etaxonomy.taxeditor.ui.section.name.ProtologueElement;
238 239
import eu.etaxonomy.taxeditor.ui.section.name.ProtologueSection;
239 240
import eu.etaxonomy.taxeditor.ui.section.name.SpecimenTypeDesignationElement;
241
import eu.etaxonomy.taxeditor.ui.section.name.TextTypeDesignationElement;
240 242
import eu.etaxonomy.taxeditor.ui.section.name.TypeDesignationSection;
241 243
import eu.etaxonomy.taxeditor.ui.section.occurrence.CollectingAreaDetailElement;
242 244
import eu.etaxonomy.taxeditor.ui.section.occurrence.CollectingAreasDetailSection;
......
2798 2800
        } else if (entity instanceof NameTypeDesignation) {
2799 2801
            element = new NameTypeDesignationElement(this, parentElement, (NameTypeDesignation) entity, removeListener,
2800 2802
                    style);
2801
            // FIXME #8135 temporary disabled textual type designation
2802
//        } else if (entity instanceof TextualTypeDesignation) {
2803
//            element = new TextTypeDesignationElement(this, parentElement, (TextualTypeDesignation) entity, removeListener,
2804
//                    style);
2803
        } else if (entity instanceof TextualTypeDesignation) {
2804
            element = new TextTypeDesignationElement(this, parentElement, (TextualTypeDesignation) entity, removeListener,
2805
                    style);
2805 2806
        } else if (entity instanceof NameRelationship) {
2806 2807
            element = new NameRelationshipDetailElement(this, parentElement, (NameRelationship) entity, removeListener,
2807 2808
                    style);
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/TypeDesignationSection.java
31 31
import eu.etaxonomy.cdm.model.name.Rank;
32 32
import eu.etaxonomy.cdm.model.name.SpecimenTypeDesignation;
33 33
import eu.etaxonomy.cdm.model.name.TaxonName;
34
import eu.etaxonomy.cdm.model.name.TextualTypeDesignation;
34 35
import eu.etaxonomy.cdm.model.name.TypeDesignationBase;
35 36
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
36 37
import eu.etaxonomy.taxeditor.editor.ITaxonEditor;
......
68 69
	@Override
69 70
	protected void addAction(ToolBarManager toolBarManager) {
70 71

  
71
        // FIXME #8135 temporary disabled textual type designation
72
//	    if(PreferencesUtil.getBooleanValue(IPreferenceKeys.SHOW_EXPERIMENTAL_FEATURES)){
73
//	        // add textual type designation button
74
//	        Action addTextualTypeDesignationAction = new Action("Add", IAction.AS_PUSH_BUTTON){
75
//	            @Override
76
//	            public void run() {
77
//	                TextualTypeDesignation textualTypeDesignation = TextualTypeDesignation.NewInstance();
78
//	                addElement(textualTypeDesignation);
79
//	                if(! getSection().isExpanded()) {
80
//	                    getSection().setExpanded(true);
81
//	                }
82
//	                internalUpdateSection(true);
83
//	            }
84
//	        };
85
//	        addTextualTypeDesignationAction.setImageDescriptor(new ImageDescriptor() {
86
//
87
//	            @Override
88
//	            public ImageData getImageData() {
89
//	                return ImageResources.getImage(ImageResources.ADD_TEXT).getImageData();
90
//	            }
91
//	        });
92
//	        addTextualTypeDesignationAction.setToolTipText("Add textual type designation");
93
//	        toolBarManager.add(addTextualTypeDesignationAction);
94
//	    }
72
	    if(PreferencesUtil.getBooleanValue(IPreferenceKeys.SHOW_EXPERIMENTAL_FEATURES)){
73
	        // add textual type designation button
74
	        Action addTextualTypeDesignationAction = new Action("Add", IAction.AS_PUSH_BUTTON){
75
	            @Override
76
	            public void run() {
77
	                TextualTypeDesignation textualTypeDesignation = TextualTypeDesignation.NewInstance();
78
	                addElement(textualTypeDesignation);
79
	                if(! getSection().isExpanded()) {
80
	                    getSection().setExpanded(true);
81
	                }
82
	                internalUpdateSection(true);
83
	            }
84
	        };
85
	        addTextualTypeDesignationAction.setImageDescriptor(new ImageDescriptor() {
86

  
87
	            @Override
88
	            public ImageData getImageData() {
89
	                return ImageResources.getImage(ImageResources.ADD_TEXT).getImageData();
90
	            }
91
	        });
92
	        addTextualTypeDesignationAction.setToolTipText("Add textual type designation");
93
	        toolBarManager.add(addTextualTypeDesignationAction);
94
	    }
95 95

  
96 96
        // clone button
97 97
	    if(!isSpecimenType() ||

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)