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/parser/ParseHandler.java
16 16
import eu.etaxonomy.cdm.model.reference.Reference;
17 17
import eu.etaxonomy.cdm.strategy.match.MatchException;
18 18
import eu.etaxonomy.cdm.strategy.parser.NonViralNameParserImpl;
19
import eu.etaxonomy.taxeditor.model.MessagingUtils;
19 20
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
20 21
import eu.etaxonomy.taxeditor.store.CdmStore;
21
import eu.etaxonomy.taxeditor.store.StoreUtil;
22 22

  
23 23
/**
24 24
 * <p>ParseHandler class.</p>
......
222 222
		if(matchMatrix.duplicateInReferences.size() > 0){
223 223
			Reference inReference = (Reference) matchMatrix.duplicateInReferences.iterator().next();
224 224
			reference.setInReference(inReference);
225
			StoreUtil.warn(this.getClass(), reference.generateTitle());
225
			MessagingUtils.warn(this.getClass(), reference.generateTitle());
226 226
			// FIXME TODO resolve multiple duplications. We use first match for a start
227
			StoreUtil.warn(this.getClass(), reference.getTitleCache());
227
			MessagingUtils.warn(this.getClass(), reference.getTitleCache());
228 228
		}
229 229
	}
230 230
	
......
301 301
		try{
302 302
			return CdmStore.getService(ICommonService.class).findMatching(nomenclaturalReference, MatchStrategyConfigurator.ReferenceMatchStrategy());
303 303
		}catch (MatchException e) {
304
			StoreUtil.error(this.getClass(), "Error finding matching references", e);
304
			MessagingUtils.error(this.getClass(), "Error finding matching references", e);
305 305
		}
306 306
		return null;
307 307
	}
......
319 319
		try{
320 320
			return CdmStore.getService(ICommonService.class).findMatching(authorTeam, MatchStrategyConfigurator.TeamOrPersonMatchStrategy());
321 321
		}catch (MatchException e) {
322
			StoreUtil.error(this.getClass(), "Error finding matching authors", e);
322
			MessagingUtils.error(this.getClass(), "Error finding matching authors", e);
323 323
		}
324 324
		return null;
325 325
	}
......
334 334
			return CdmStore.getService(ICommonService.class).findMatching(taxonNameBase, MatchStrategyConfigurator.NonViralNameMatchStrategy());
335 335
			
336 336
		} catch (MatchException e) {
337
			StoreUtil.error(this.getClass(), "Error finding matching names", e);
337
			MessagingUtils.error(this.getClass(), "Error finding matching names", e);
338 338
		}
339 339
		return null;
340 340
	}

Also available in: Unified diff