|
From: Hirzel P. <ph...@us...> - 2006-06-29 22:50:08
|
Update of /cvsroot/tcotool/TCO-Tool/src/org/tcotool/tools In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv30229/src/org/tcotool/tools Modified Files: ModelUtility.java Calculator.java CourseUtils.java Log Message: Refactoring: Log-API adapted Index: ModelUtility.java =================================================================== RCS file: /cvsroot/tcotool/TCO-Tool/src/org/tcotool/tools/ModelUtility.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** ModelUtility.java 7 May 2006 14:57:27 -0000 1.9 --- ModelUtility.java 29 Jun 2006 22:50:05 -0000 1.10 *************** *** 432,436 **** if (parent == null) { // possible, for e.g. if drop to empty space in NavTree ! ch.softenvironment.util.Tracer.getInstance().developerWarning(this, "findParent(Object)", "parent not found!"); } //ch.softenvironment.util.Tracer.getInstance().debug("findParent(" + node + ") => " + parent); --- 432,436 ---- if (parent == null) { // possible, for e.g. if drop to empty space in NavTree ! ch.softenvironment.util.Tracer.getInstance().developerWarning("parent not found!"); } //ch.softenvironment.util.Tracer.getInstance().debug("findParent(" + node + ") => " + parent); *************** *** 569,573 **** CostCause code = (CostCause)itCauses.next(); if (iliCode.equals(code.getIliCode())) { ! Tracer.getInstance().debug(this, "fixModel()", "Morph enum: " + cost.getType().getNameString() + " => code: " + code.getNameString()); cost.setCause(code); cost.setType(null); --- 569,573 ---- CostCause code = (CostCause)itCauses.next(); if (iliCode.equals(code.getIliCode())) { ! Tracer.getInstance().debug("Morph enum: " + cost.getType().getNameString() + " => code: " + code.getNameString()); cost.setCause(code); cost.setType(null); *************** *** 685,689 **** return new ImageIcon(url); } catch (Exception e) { ! ch.softenvironment.util.Tracer.getInstance().developerError(this, "getIcon(..)", "image not found for =>" + type); } } --- 685,689 ---- return new ImageIcon(url); } catch (Exception e) { ! ch.softenvironment.util.Tracer.getInstance().developerError("image not found for =>" + type); } } *************** *** 713,717 **** } } catch(Exception e) { ! ch.softenvironment.util.Tracer.getInstance().developerError(this, "getImageURL(..)", "image not found for =>" + key); return null; } --- 713,717 ---- } } catch(Exception e) { ! ch.softenvironment.util.Tracer.getInstance().developerError("image not found for =>" + key); return null; } *************** *** 812,816 **** return ResourceManager.getResource(PersonalCostDetailView.class, "LblActivity_text", false); } ! Tracer.getInstance().developerWarning(ModelUtility.class, "getTypeString()", "String for type: " + type); return "NYI"; } --- 812,816 ---- return ResourceManager.getResource(PersonalCostDetailView.class, "LblActivity_text", false); } ! Tracer.getInstance().developerWarning("String for type: " + type); return "NYI"; } *************** *** 1092,1096 **** LauncherView.getInstance().getPnlNavigation().selectElement(object); } else { ! throw new UserException(ModelUtility.class, "relocateElement()", msg); } } --- 1092,1096 ---- LauncherView.getInstance().getPnlNavigation().selectElement(object); } else { ! throw new UserException(msg, "Move fault"); } } *************** *** 1300,1304 **** interest = getSystemParameter().getDepreciationInterestRate(); } catch(Throwable e) { ! Tracer.getInstance().runtimeError(ReportTool.class, "getInterestRate()", e.getLocalizedMessage()); interest = new Double(4.0); } --- 1300,1304 ---- interest = getSystemParameter().getDepreciationInterestRate(); } catch(Throwable e) { ! Tracer.getInstance().runtimeWarning("IGNORE: set default: " + e.getLocalizedMessage()); interest = new Double(4.0); } *************** *** 1316,1320 **** hours = getSystemParameter().getManYearHoursInternal(); } catch(Throwable e) { ! Tracer.getInstance().runtimeError(ReportTool.class, "getManYearHoursInternal()", e.getLocalizedMessage()); hours = new Long(1700); } --- 1316,1320 ---- hours = getSystemParameter().getManYearHoursInternal(); } catch(Throwable e) { ! Tracer.getInstance().runtimeWarning("IGNORE: set default: " + e.getLocalizedMessage()); hours = new Long(1700); } Index: CourseUtils.java =================================================================== RCS file: /cvsroot/tcotool/TCO-Tool/src/org/tcotool/tools/CourseUtils.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CourseUtils.java 7 May 2006 14:55:32 -0000 1.1 --- CourseUtils.java 29 Jun 2006 22:50:05 -0000 1.2 *************** *** 74,78 **** } ! throw new UserException(CourseUtils.class, "getCourse()", "No course defined for <" + source.getNameString() + "> to <" + target.getNameString() + ">"); } } --- 74,78 ---- } ! throw new UserException("No course defined for <" + source.getNameString() + "> to <" + target.getNameString() + ">", "Course missing"); } } Index: Calculator.java =================================================================== RCS file: /cvsroot/tcotool/TCO-Tool/src/org/tcotool/tools/Calculator.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Calculator.java 7 May 2006 14:41:16 -0000 1.4 --- Calculator.java 29 Jun 2006 22:50:05 -0000 1.5 *************** *** 352,356 **** calc((Service)object, multitude); } else { ! throw new DeveloperException(this, "walkPackage()", "TcoObject kind not implemented!"); } } --- 352,356 ---- calc((Service)object, multitude); } else { ! throw new DeveloperException("TcoObject kind not implemented!"); } } *************** *** 386,390 **** } else { if (cost.getAmount() == null) { ! Tracer.getInstance().developerWarning(this,"calc(Service)", "Autocorrection: cost#amount set to 0.0"); cost.setAmount(new Double(0.0)); } --- 386,390 ---- } else { if (cost.getAmount() == null) { ! Tracer.getInstance().developerWarning("Autocorrection: cost#amount set to 0.0"); cost.setAmount(new Double(0.0)); } *************** *** 528,532 **** } else { // should not happen ! Tracer.getInstance().developerWarning(this, "cummulateCodes()", "Occurance without Site[1] or Multitude[1]"); } } --- 528,532 ---- } else { // should not happen ! Tracer.getInstance().developerWarning("Occurance without Site[1] or Multitude[1]"); } } *************** *** 655,659 **** cummulateLists(results, getCosts(object, kind, COST_CAUSE_UNDEFINED)); } catch(Throwable e) { ! throw new UserException(this, "getTotal()", "Kostentyp-Code: " + e.getLocalizedMessage(), "Fehler bei der Berechnung", e); } return results; --- 655,659 ---- cummulateLists(results, getCosts(object, kind, COST_CAUSE_UNDEFINED)); } catch(Throwable e) { ! throw new UserException("Kostentyp-Code: " + e.getLocalizedMessage(), "Fehler bei der Berechnung", e); } return results; |