Project

General

Profile

« Previous | Next » 

Revision 41e2f693

Added by Cherian Mathew over 9 years ago

Moved all logging and dialog functionality to the new class MessagingUtils.
Refactoring code to adapt to above change.
Added new custom error dialog - CdmErrorDialog
Added runtime exception handling to the ApplicationWorkbenchAdvisor by adding a custom status handler

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/DerivedUnitBaseDetailElement.java
18 18
import eu.etaxonomy.cdm.model.common.TermType;
19 19
import eu.etaxonomy.cdm.model.name.TaxonNameBase;
20 20
import eu.etaxonomy.cdm.model.occurrence.PreservationMethod;
21
import eu.etaxonomy.taxeditor.model.AbstractUtility;
21
import eu.etaxonomy.taxeditor.model.MessagingUtils;
22 22
import eu.etaxonomy.taxeditor.store.CdmStore;
23 23
import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
24 24
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
......
96 96
            combo_preservationMethod = formFactory.createDefinedTermComboElement(TermType.MaterialOrMethod, formElement, "Preservation Method", preservationMethod==null?null:preservationMethod.getDefinedMaterialOrMethod(), style);
97 97
		} catch (MethodNotSupportedByDerivedUnitTypeException e) {
98 98
			// we ignore this
99
            AbstractUtility.info(e.getMessage());
99
            MessagingUtils.info(e.getMessage());
100 100
		}
101 101
        selection_storedUnder = formFactory.createSelectionElement(TaxonNameBase.class, getConversationHolder(), formElement, "Stored Under", entity.getStoredUnder(), EntitySelectionElement.ALL, style);
102 102

  
......
104 104
            text_exsicatum = formFactory.createTextWithLabelElement(formElement, "Exsiccatum", entity.getExsiccatum(), style);
105 105
		} catch (MethodNotSupportedByDerivedUnitTypeException e) {
106 106
			// we ignore this
107
            AbstractUtility.info(e.getMessage());
107
            MessagingUtils.info(e.getMessage());
108 108
		}
109 109

  
110 110
//		section_duplicates = (SpecimenCollectionDetailSection) formFactory
......
136 136
                    preservationMethod.setDefinedMaterialOrMethod(combo_preservationMethod.getSelection());
137 137
                }
138 138
            } catch (MethodNotSupportedByDerivedUnitTypeException e) {
139
                AbstractUtility
140
                        .errorDialog(
139
                MessagingUtils
140
                        .messageDialog(
141 141
                                "MethodNotSupportedByDerivedUnitTypeException",
142 142
                                this,
143 143
                                "MethodNotSupportedByDerivedUnitTypeException when trying to set preservation method for derive unit",
......
149 149
            try {
150 150
                getEntity().setExsiccatum(text_exsicatum.getText());
151 151
            } catch (Exception e) {
152
                AbstractUtility.error(this.getClass(), e);
152
                MessagingUtils.error(this.getClass(), e);
153 153
            }
154 154
        }
155 155
    }

Also available in: Unified diff