You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(20) |
Oct
(2) |
Nov
(22) |
Dec
(38) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(12) |
Feb
|
Mar
(7) |
Apr
|
May
(18) |
Jun
(7) |
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
(34) |
Jul
(1) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2008 |
Jan
|
Feb
|
Mar
(2) |
Apr
|
May
(24) |
Jun
(45) |
Jul
(4) |
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
From: Hirzel P. <ph...@us...> - 2008-08-07 05:33:47
|
Update of /cvsroot/tcotool/TCO-Tool/src/org/tcotool/standard/report In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv26621/src/org/tcotool/standard/report Modified Files: ReportInvestment.java Log Message: Bug fix Index: ReportInvestment.java =================================================================== RCS file: /cvsroot/tcotool/TCO-Tool/src/org/tcotool/standard/report/ReportInvestment.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ReportInvestment.java 15 Jun 2008 18:41:09 -0000 1.7 --- ReportInvestment.java 7 Aug 2008 05:33:56 -0000 1.8 *************** *** 52,56 **** } /** ! * Summarize CostTypes over all services below root. */ private void totalInvestment(TcoObject root) throws java.lang.Throwable { --- 52,56 ---- } /** ! * Summarize CostCause over all services below root. */ private void totalInvestment(TcoObject root) throws java.lang.Throwable { |
From: Hirzel P. <ph...@us...> - 2008-08-07 05:33:28
|
Update of /cvsroot/tcotool/TCO-Tool/src/org/tcotool/application In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv26603/src/org/tcotool/application Modified Files: LauncherView.java Log Message: Patch version Index: LauncherView.java =================================================================== RCS file: /cvsroot/tcotool/TCO-Tool/src/org/tcotool/application/LauncherView.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** LauncherView.java 18 Jun 2008 15:29:39 -0000 1.13 --- LauncherView.java 7 Aug 2008 05:33:36 -0000 1.14 *************** *** 2146,2150 **** */ public static String getVersion() { ! return "V1.4.5"; } /** --- 2146,2150 ---- */ public static String getVersion() { ! return "V1.4.5.1"; } /** |
From: Hirzel P. <ph...@us...> - 2008-07-17 21:05:42
|
Update of /cvsroot/tcotool/TCO-Tool/src/org/tcotool/tools In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv25485/src/org/tcotool/tools Modified Files: ModelUtility.java Log Message: Bug fix: remove dependency Index: ModelUtility.java =================================================================== RCS file: /cvsroot/tcotool/TCO-Tool/src/org/tcotool/tools/ModelUtility.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** ModelUtility.java 15 Jun 2008 18:40:21 -0000 1.14 --- ModelUtility.java 17 Jul 2008 21:05:51 -0000 1.15 *************** *** 1146,1156 **** TcoObject supplier = findSupplier(dependency); ! // unlink supplier ! dependency.setSupplierId(null); supplier.getClientId().remove(dependency); ! // unlink client ! dependency.setClientId(null); ! // client.getSupplierId().remove(dependency); => MUST BE DONE BY CALLER! } /** --- 1146,1156 ---- TcoObject supplier = findSupplier(dependency); ! // unlink dependency supplier.getClientId().remove(dependency); + client.getSupplierId().remove(dependency); //=> MUST BE DONE BY CALLER! ! // unlink client/supplier ! // dependency.setSupplierId(null); => (DbState=DELETED already!!!) ! // dependency.setClientId(null); } /** |
From: Hirzel P. <ph...@us...> - 2008-07-17 21:04:41
|
Update of /cvsroot/tcotool/TCO-Tool/src/org/tcotool/application In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv25048/src/org/tcotool/application Modified Files: ServiceDetailView.java Log Message: Bug fix: remove dependency Index: ServiceDetailView.java =================================================================== RCS file: /cvsroot/tcotool/TCO-Tool/src/org/tcotool/application/ServiceDetailView.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ServiceDetailView.java 15 Jun 2008 22:01:41 -0000 1.7 --- ServiceDetailView.java 17 Jul 2008 21:04:45 -0000 1.8 *************** *** 2601,2607 **** java.util.Iterator iterator = removedItems.iterator(); while (iterator.hasNext()) { ! Dependency dependency = (Dependency)iterator.next(); ! LauncherView.getInstance().getUtility().removeDependencyByClient(getObject(), dependency); ! getObject().getSupplierId().remove(dependency); } --- 2601,2605 ---- java.util.Iterator iterator = removedItems.iterator(); while (iterator.hasNext()) { ! LauncherView.getInstance().getUtility().removeDependencyByClient(getObject(), (Dependency)iterator.next()); } |
From: Hirzel P. <ph...@us...> - 2008-07-17 21:04:08
|
Update of /cvsroot/tcotool/TCO-Tool/src/org/tcotool/tools In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv25033/src/org/tcotool/tools Modified Files: Calculator.java Log Message: better key-id Index: Calculator.java =================================================================== RCS file: /cvsroot/tcotool/TCO-Tool/src/org/tcotool/tools/Calculator.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Calculator.java 15 Jun 2008 18:39:14 -0000 1.9 --- Calculator.java 17 Jul 2008 21:04:13 -0000 1.10 *************** *** 28,31 **** --- 28,32 ---- import ch.softenvironment.util.AmountFormat; import ch.softenvironment.util.DeveloperException; + import ch.softenvironment.util.StringUtils; import ch.softenvironment.util.Tracer; import ch.softenvironment.util.UserException; *************** *** 326,330 **** throw new IllegalArgumentException("no key exists for code==null"); } else if (code instanceof DbObject) { ! return kind + ((DbObject)code).getId().toString(); } else { // <undefined> code --- 327,331 ---- throw new IllegalArgumentException("no key exists for code==null"); } else if (code instanceof DbObject) { ! return kind + StringUtils.getPureClassName(code.getClass()) + ((DbObject)code).getId().toString(); } else { // <undefined> code *************** *** 484,488 **** * @param amount costs to charge for given year */ ! protected void accumulateCodes(Service service, CostDriver driver, Cost cost, int year, double amount) { String kind = (cost instanceof PersonalCost ? KIND_PC : KIND_FC); Map serviceMap = getServiceMap(service); --- 485,489 ---- * @param amount costs to charge for given year */ ! protected final void accumulateCodes(Service service, CostDriver driver, Cost cost, int year, double amount) { String kind = (cost instanceof PersonalCost ? KIND_PC : KIND_FC); Map serviceMap = getServiceMap(service); *************** *** 532,537 **** key = COST_CAUSE_UNDEFINED; if (cost.getCause() != null) { ! key = cost.getCause(); } storeIntoCodeList(serviceMap, kind, key, year, amount); // pseudo-code "ESTIMATED/KNOWN" --- 533,539 ---- key = COST_CAUSE_UNDEFINED; if (cost.getCause() != null) { ! key = cost.getCause(); } + storeIntoCodeList(serviceMap, kind, key, year, amount); // pseudo-code "ESTIMATED/KNOWN" *************** *** 605,609 **** * @param amount */ ! protected void storeIntoCodeList(Map serviceMap, final String kind, Object code, int year, double amount) { if (year < INDEX_TOTAL) { Tracer.getInstance().runtimeWarning("some Cost#baseOffset must be unexpectedly negative!"); --- 607,611 ---- * @param amount */ ! protected final void storeIntoCodeList(Map serviceMap, final String kind, Object code, int year, double amount) { if (year < INDEX_TOTAL) { Tracer.getInstance().runtimeWarning("some Cost#baseOffset must be unexpectedly negative!"); |
From: Hirzel P. <ph...@us...> - 2008-07-17 21:01:33
|
Update of /cvsroot/tcotool/TCO-Tool/src/org/tcotool/application In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv23765/src/org/tcotool/application Modified Files: FindDialog.java Log Message: Cosmetics: 1'000 separator Index: FindDialog.java =================================================================== RCS file: /cvsroot/tcotool/TCO-Tool/src/org/tcotool/application/FindDialog.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** FindDialog.java 15 Jun 2008 22:01:41 -0000 1.8 --- FindDialog.java 17 Jul 2008 21:01:36 -0000 1.9 *************** *** 47,50 **** --- 47,51 ---- import ch.softenvironment.client.ResourceManager; import ch.softenvironment.jomm.mvc.model.DbCodeType; + import ch.softenvironment.util.AmountFormat; import ch.softenvironment.util.StringUtils; import ch.softenvironment.view.TriStatePanel; *************** *** 229,233 **** buffer.append(" " + Calculator.calculateHours(((PersonalCost)object)) * LauncherView.getInstance().getUtility().getMultitudeFactor((PersonalCost)object, true) + " / " + Calculator.calculateAvailableHours((Role)code) + " [h]"); } else if ((code instanceof CostCause) && (object instanceof Cost)) { ! buffer.append(" " + Calculator.calculate((Cost)object) + " " + ((Cost)object).getCurrency().getNameString()); } } --- 230,234 ---- buffer.append(" " + Calculator.calculateHours(((PersonalCost)object)) * LauncherView.getInstance().getUtility().getMultitudeFactor((PersonalCost)object, true) + " / " + Calculator.calculateAvailableHours((Role)code) + " [h]"); } else if ((code instanceof CostCause) && (object instanceof Cost)) { ! buffer.append(" " + AmountFormat.toString(Calculator.calculate((Cost)object)) + " " + ((Cost)object).getCurrency().getNameString()); } } |
From: Hirzel P. <ph...@us...> - 2008-06-22 08:39:07
|
Update of /cvsroot/tcotool/TCO-Tool/other In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv14005/other Added Files: README.txt Removed Files: README Log Message: replaced --- README DELETED --- --- NEW FILE: README.txt --- TCO-Tool (Developer Info) ------------------------- This is an Open Source Application to calculate "Total Cost of Ownership" for the IT-Infrastructure (or any other business cases) of an enterprise: Features: - XML-Repository - GUI-Instrument - @see http://www.tcotool.org Sources used in this project are to be found: - ehibasics *) -> @see http://sourceforge.net/projects/umleditor/ (i18n etc) - sebase *) -> @see http://sourceforge.net/projects/umleditor/ (Swing based Application Framework) - JOMM *) -> @see http://sourceforge.net/projects/jomm (Persistency mapping Framework SQL & XML) - jta.jar -> @see http://java.sun.com/products/jta/ (Java Transaction API) - xerces.jar V2.9.0 -> @see http://xml.apache.org/ (XML Framework) - JFreeChart -> @see http://www.jfree.org/jfreechart/ (Chart drawing) - JHotDraw V60b1 -> @see http://www.jhotdraw.org/ (Dependency Graph) - JPF -> @see http://jpf.sourceforge.net/ (Plugin Support) - TCO-Tool -> @see http://sourceforge.net/projects/tcotool/ (source-archive) *) IMPORTANT: use latest CVS source checkout instead of binary packages! This project was developed by softEnvironment, for further informations/questions, please contact: in...@so... or http://www.softenvironment.ch |
From: Hirzel P. <ph...@us...> - 2008-06-18 16:02:01
|
Update of /cvsroot/tcotool/TCO-Tool In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv29496 Added Files: build.xml Log Message: new --- NEW FILE: build.xml --- <?xml version="1.0" encoding="UTF-8"?> <project basedir="." default="jar" name="TCO_Tool"> <description> Build the Ant-Targets for TCO-Tool by http://www.softenvironment.ch @see http://www.tcotool.org </description> <!-- set global properties for this build --> <property name="src" value="${basedir}/src"/> <property name="build" value="${basedir}/build"/> <property name="dist" value="${build}/dist"/> <property name="buildnr" value="1.4.4"/> <target name="init"> <!-- Create the time stamp --> <tstamp/> <property name="projectjar" value="${build}/jar/${ant.project.name}.jar"/> <!-- Create the build directory structure used by compile --> <mkdir dir="${build}"/> <mkdir dir="${build}/jar"/> </target> <target depends="init" name="run"> <java jar="${projectjar}" fork="true"> <arg value="-debug"/> </java> </target> <target depends="init" name="compile"> <!-- build dependendent libs --> <!-- for target: VBS & DEMO only --> <ant inheritAll="false" antfile="../seMisc/build.xml" target="jar"/> <ant inheritAll="false" antfile="../JOMM/build.xml" target="jar"/> <!-- Compile the java code from ${src} into ${build}/classes --> <mkdir dir="${build}/classes"/> <javac destdir="${build}/classes" includes="**/*.java" excludes="**/test/*.java"> <classpath> <!--pathelement location="../ehibasics/build/jar/ehibasics.jar"/> <pathelement location="../sebase/build/jar/sebase.jar"/> <pathelement location="../jomm/lib/jta.jar"/> <pathelement location="../jdo/src/jdo.jar"/> <pathelement location="../xerces-1_4_4/xerces.jar"/--> <pathelement location="../xerces-2_9_0/xercesImpl.jar"/> <pathelement location="../xerces-2_9_0/xml-apis.jar"/> <pathelement location="../jomm/build/jar/jomm.jar"/> <!-- for target: VBS & DEMO only --> <pathelement location="../seMisc/build/jar/seMisc.jar"/> <pathelement location="../jhotdraw60b1/jhotdraw.jar"/> <pathelement location="../jfreechart-1.0.9/lib/jcommon-1.0.12.jar"/> <pathelement location="../jfreechart-1.0.9/lib/jfreechart-1.0.9.jar"/> <pathelement location="../JPF/jpf.jar"/> <pathelement location="../JPF/lib/commons-logging.jar"/> </classpath> <src path="${src}" /> </javac> </target> <!-- tcotool.jar without plugins --> <target depends="compile" name="jar"> <delete file="${projectjar}" quiet="true"/> <jar jarfile="${projectjar}" manifest="meta-inf/MANIFEST.MF"> <fileset dir="${build}/classes" excludes="**/*.java, **/test/*.*" includes="**/*.class"/> <fileset dir="${src}" includes="**/*" excludes="**/CVS/*, **/*.java"/> <fileset dir="${basedir}" includes="other/*" excludes="**/CVS/*"/> <!--zipfileset src="../xerces-1_4_4/xerces.jar"/--> <zipfileset src="../xerces-2_9_0/xercesImpl.jar"/> <zipfileset src="../xerces-2_9_0/xml-apis.jar"/> <zipfileset src="../JOMM/build/jar/jomm.jar"/> <!-- for target: VBS & DEMO only --> <zipfileset src="../seMisc/build/jar/seMisc.jar"/> <zipfileset src="../jhotdraw60b1/jhotdraw.jar"/> <zipfileset src="../jfreechart-1.0.9/lib/jcommon-1.0.12.jar"/> <zipfileset src="../jfreechart-1.0.9/lib/jfreechart-1.0.9.jar"/> <zipfileset src="../JPF/jpf.jar"/> <zipfileset src="../JPF/lib/commons-logging.jar"/> </jar> </target> <target depends="jar" name="corePlugin"> <mkdir dir="${build}/jar/plugins"/> <mkdir dir="${build}/jar/plugins/org.tcotool.core.runtime/classes"/> <javac destdir="${build}/jar/plugins/org.tcotool.core.runtime/classes" includes="**/*.java" excludes="**/test/*.*"> <classpath> <pathelement location="${projectjar}"/> </classpath> <src path="${basedir}/plugins/org.tcotool.core.runtime/source"/> </javac> <copy todir="${build}/jar/plugins/org.tcotool.core.runtime"> <fileset dir="${basedir}/plugins/org.tcotool.core.runtime" includes="plugin.xml" excludes="**/Thumbs.db"/> </copy> </target> <target depends="corePlugin" name="seFinance"> <mkdir dir="${build}/jar/plugins/ch.softenvironment.tcotool.finance/classes"/> <javac destdir="${build}/jar/plugins/ch.softenvironment.tcotool.finance/classes" includes="**/*.java" excludes="**/test/*.*"> <classpath> <pathelement location="${projectjar}"/> </classpath> <src path="${basedir}/plugins/ch.softenvironment.tcotool.finance/source"/> </javac> <copy todir="${build}/jar/plugins/ch.softenvironment.tcotool.finance"> <fileset dir="${basedir}/plugins/ch.softenvironment.tcotool.finance" includes="plugin.xml, resources/**/*.*" excludes="**/Thumbs.db"/> </copy> </target> <target depends="corePlugin" name="seTco"> <mkdir dir="${build}/jar/plugins/ch.softenvironment.tcotool.tco/classes"/> <javac destdir="${build}/jar/plugins/ch.softenvironment.tcotool.tco/classes" includes="**/*.java" excludes="**/test/*.*"> <classpath> <pathelement location="${projectjar}"/> </classpath> <src path="${basedir}/plugins/ch.softenvironment.tcotool.tco/source"/> </javac> <copy todir="${build}/jar/plugins/ch.softenvironment.tcotool.tco"> <fileset dir="${basedir}/plugins/ch.softenvironment.tcotool.tco" includes="plugin.xml, resources/**/*.*" excludes="**/Thumbs.db"/> </copy> </target> <target depends="corePlugin" name="seBench"> <mkdir dir="${build}/jar/plugins/ch.softenvironment.tcotool.benchmark/classes"/> <javac destdir="${build}/jar/plugins/ch.softenvironment.tcotool.benchmark/classes" includes="**/*.java" excludes="**/test/*.*"> <classpath> <pathelement location="${projectjar}"/> </classpath> <src path="${basedir}/plugins/ch.softenvironment.tcotool.benchmark/source"/> </javac> <copy todir="${build}/jar/plugins/ch.softenvironment.tcotool.benchmark"> <fileset dir="${basedir}/plugins/ch.softenvironment.tcotool.benchmark" includes="plugin.xml, resources/**/*.*" excludes="**/Thumbs.db"/> </copy> </target> <target depends="seBench, seFinance, seTco" name="vbs"> <mkdir dir="${build}/jar/plugins/ch.softenvironment.tcotool.vbs/classes"/> <javac destdir="${build}/jar/plugins/ch.softenvironment.tcotool.vbs/classes" includes="**/*.java" excludes="**/test/*.*"> <classpath> <pathelement location="${projectjar}"/> <pathelement location="../seMisc/build/jar/seMisc.jar"/> <pathelement location="${build}/jar/plugins/org.tcotool.core.runtime/classes"/> </classpath> <src path="${basedir}/plugins/ch.softenvironment.tcotool.vbs/source" /> <src path="src"/> </javac> <copy todir="${build}/jar/plugins/ch.softenvironment.tcotool.vbs"> <fileset dir="${basedir}/plugins/ch.softenvironment.tcotool.vbs" includes="plugin.xml, resources/**/*.*" excludes="**/Thumbs.db"/> </copy> </target> <target depends="vbs" name="demo"> <copy todir="${build}/jar/plugins/ch.softenvironment.tcotool.vbs"> <fileset dir="${basedir}/plugins/ch.softenvironment.tcotool.vbs" includes="plugin.xml, resources/**/*.*" excludes="**/Thumbs.db"/> </copy> <copy todir="${build}/jar/plugins/ch.softenvironment.tcotool.benchmark"> <fileset dir="${basedir}/plugins/ch.softenvironment.tcotool.benchmark" includes="plugin.xml, resources/**/*.*" excludes="**/Thumbs.db"/> </copy> </target> <target depends="seFinance, seTco" name="cab"> <!-- Buruli Plugin --> <mkdir dir="${build}/jar/plugins/ch.softenvironment.tcotool.cab/classes"/> <javac destdir="${build}/jar/plugins/ch.softenvironment.tcotool.cab/classes" includes="**/*.java" excludes="**/test/*.*"> <classpath> <pathelement location="${projectjar}"/> <pathelement location="${build}/jar/plugins/org.tcotool.core.runtime/classes"/> </classpath> <src path="${basedir}/plugins/ch.softenvironment.tcotool.cab/source" /> </javac> <copy todir="${build}/jar/plugins/ch.softenvironment.tcotool.cab"> <fileset dir="${basedir}/plugins/ch.softenvironment.tcotool.cab" includes="plugin.xml, resources/**/*.*" excludes="**/Thumbs.db"/> </copy> </target> <target depends="init" name="srcdist"> <mkdir dir="${dist}"/> <!--property file="${src}/ch/ehi/umleditor/application/Version.properties" prefix="buildnr."/--> <!--property name="buildnr" value="${buildnr.versionMajor}.${buildnr.versionMinor}.${buildnr.versionMicro}"/--> <delete file="${dist}/${ant.project.name}-${buildnr}.src.zip" quiet="true"/> <zip zipfile="${dist}/${ant.project.name}-${buildnr}.src.zip"> <zipfileset dir="." prefix="${ant.project.name}-${buildnr}"> <patternset includes="build.xml"/> <patternset includes=".project"/> <patternset includes=".classpath"/> <patternset includes="lib/**"/> <patternset includes="meta-inf/MANIFEST.MF"/> <patternset includes="model/**" excludes="**/CVS/*"/> <patternset includes="other/**" excludes="**/CVS/*"/> <patternset includes="src/**" excludes="**/CVS/*"/> <patternset includes="plugins/org.tcotool.core.runtime/**" excludes="**/CVS/*"/> <patternset includes="XSLT/**" excludes="**/CVS/*"/> <!--patternset includes="resources/de/**/*.properties"/> <patternset includes="resources/fr/**/*.properties"/--> <!--patternset includes="docs/bindist/*.txt"/--> <!-- <patternset includes="doc/**"/> <patternset includes="other/**"/> <patternset includes="test/**"/> <patternset includes="tools/**"/> --> </zipfileset> </zip> </target> <!-- NOT YET TESTED --> <target depends="init" name="javadocs"> <mkdir dir="${build}/javadoc/api"/> <javadoc Public="true" Windowtitle="TCO-Tool API" destdir="${build}/javadoc/api" packagenames="org.tcotool.*, ch.softenvironment.*"> <sourcepath path="${src}"/> </javadoc> </target> <target depends="init" name="bindist"> <property file="${src}/org/tcotool/application/Version.properties" prefix="buildnr."/> <property name="buildnr" value="${buildnr.versionMajor}.${buildnr.versionMinor}.${buildnr.versionMicro}"/> <delete file="${dist}/${ant.project.name}-${buildnr}.zip" quiet="true"/> <zip zipfile="${dist}/${ant.project.name}-${buildnr}.zip"> <zipfileset dir="." includes="build/jar/tcotool.jar" fullpath="${ant.project.name}-${buildnr}/${ant.project.name}.jar"/> <!--zipfileset dir="." includes="docs/bindist/CHANGELOG.txt" fullpath="${ant.project.name}-${buildnr}/CHANGELOG.txt"/> <zipfileset dir="." includes="docs/bindist/README.txt" fullpath="${ant.project.name}-${buildnr}/README.txt"/> <zipfileset dir="." includes="docs/bindist/README_de.txt" fullpath="${ant.project.name}-${buildnr}/README_de.txt"/> <zipfileset dir="." includes="lib/jh.jar" fullpath="${ant.project.name}-${buildnr}/jh.jar"/> <zipfileset dir="." includes="lib/ili2c.jar" fullpath="${ant.project.name}-${buildnr}/ili2c.jar"/> <zipfileset dir="." includes="other/LICENSE.lgpl" fullpath="${ant.project.name}-${buildnr}/LICENSE.lgpl"/> <zipfileset dir="." includes="other/LICENSE.apache" fullpath="${ant.project.name}-${buildnr}/LICENSE.apache"/--> </zip> </target> <!-- <target depends="srcdist,bindist" name="dist"/> <target depends="init" name="bindist"> <delete file="${dist}/${ant.project.name}-${DSTAMP}.zip" quiet="true"/> <zip zipfile="${dist}/${ant.project.name}-${DSTAMP}.zip"> <zipfileset dir="." includes="build/jar/ili2c.jar" fullpath="${ant.project.name}-${DSTAMP}/${ant.project.name}.jar"/> <zipfileset dir="." includes="doc/bindist/CHANGELOG.txt" fullpath="${ant.project.name}-${DSTAMP}/CHANGELOG.txt"/> <zipfileset dir="." includes="doc/bindist/README.txt" fullpath="${ant.project.name}-${DSTAMP}/README.txt"/> </zip> </target> --> <target name="clean"> <!-- Delete the ${build} and ${dist} directory trees --> <delete dir="${build}"/> <delete dir="${dist}"/> <delete> <fileset dir="${basedir}" defaultexcludes="no"> <include name="**/*.bak"/> <include name="**/bak~/*"/> <include name="**/*~"/> </fileset> </delete> </target> </project> |
From: Hirzel P. <ph...@us...> - 2008-06-18 16:01:15
|
Update of /cvsroot/tcotool/TCO-Tool/plugins/ch.softenvironment.tcotool.tco In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv29107/plugins/ch.softenvironment.tcotool.tco Added Files: plugin.xml Log Message: new --- NEW FILE: plugin.xml --- <?xml version="1.0" ?> <!DOCTYPE plugin PUBLIC "-//JPF//Java Plug-in Manifest 0.4" "http://jpf.sourceforge.net/plugin_0_4.dtd"> <plugin id="ch.softenvironment.tcotool.tco" version="0.0.1" class="ch.softenvironment.tcotool.tco.SEPlugin"> <requires> <import plugin-id="org.tcotool.core.runtime"/> </requires> <runtime> <library id="seTco" path="classes/" type="code"> <export prefix="*"/> </library> <!--library type="resources" path="resources/" id="propertiesAndIcons"/--> <library type="resources" path="resources/" id="rsc"/> </runtime> <extension plugin-id="org.tcotool.core.runtime" point-id="ReportTco" id="tcoDirect"> <parameter id="class" value="ch.softenvironment.tcotool.tco.SEPlugin"/> <parameter id="textKey" value="MniReportTcoDirectIndirect_text"/> <parameter id="icon" value="MenuIcon.png"/> <parameter id="hasLeadingSeparator" value="false"/> <!--parameter id="isGroupSpecific" value="true"/--> </extension> <extension plugin-id="org.tcotool.core.runtime" point-id="ReportTco" id="tcoEstimated"> <parameter id="class" value="ch.softenvironment.tcotool.tco.SEPlugin"/> <parameter id="textKey" value="MniReportTcoEstimated_text"/> <parameter id="icon" value="MenuIcon.png"/> <parameter id="hasLeadingSeparator" value="false"/> <!--parameter id="isGroupSpecific" value="true"/--> </extension> </plugin> |
From: Hirzel P. <ph...@us...> - 2008-06-18 16:01:15
|
Update of /cvsroot/tcotool/TCO-Tool/plugins/ch.softenvironment.tcotool.tco/resources In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv29107/plugins/ch.softenvironment.tcotool.tco/resources Added Files: MenuIcon.png ReportHeader.png Log Message: new --- NEW FILE: MenuIcon.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ReportHeader.png --- (This appears to be a binary file; contents omitted.) |
From: Hirzel P. <ph...@us...> - 2008-06-18 16:01:15
|
Update of /cvsroot/tcotool/TCO-Tool/plugins/ch.softenvironment.tcotool.tco/resources/ch/softenvironment/tcotool/tco/resources In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv29107/plugins/ch.softenvironment.tcotool.tco/resources/ch/softenvironment/tcotool/tco/resources Added Files: SEPlugin_de.properties SEPlugin.properties Log Message: new --- NEW FILE: SEPlugin_de.properties --- (This appears to be a binary file; contents omitted.) --- NEW FILE: SEPlugin.properties --- MniReportTcoDirectIndirect_text = Direct/Indirect costs MniReportTcoEstimated_text = Estimated costs |
From: Hirzel P. <ph...@us...> - 2008-06-18 16:01:15
|
Update of /cvsroot/tcotool/TCO-Tool/plugins/ch.softenvironment.tcotool.tco/classes In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv29107/plugins/ch.softenvironment.tcotool.tco/classes Added Files: README.txt Log Message: new --- NEW FILE: README.txt --- This folder is specified in JPF manifest "plugin.xml" (see library tag) and therefore expected during application runtime. |
From: Hirzel P. <ph...@us...> - 2008-06-18 16:01:05
|
Update of /cvsroot/tcotool/TCO-Tool/plugins/ch.softenvironment.tcotool.tco/resources/ch/softenvironment/tcotool/tco/resources In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv29037/plugins/ch.softenvironment.tcotool.tco/resources/ch/softenvironment/tcotool/tco/resources Log Message: Directory /cvsroot/tcotool/TCO-Tool/plugins/ch.softenvironment.tcotool.tco/resources/ch/softenvironment/tcotool/tco/resources added to the repository |
From: Hirzel P. <ph...@us...> - 2008-06-18 16:01:05
|
Update of /cvsroot/tcotool/TCO-Tool/plugins/ch.softenvironment.tcotool.tco/resources/ch In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv29037/plugins/ch.softenvironment.tcotool.tco/resources/ch Log Message: Directory /cvsroot/tcotool/TCO-Tool/plugins/ch.softenvironment.tcotool.tco/resources/ch added to the repository |
From: Hirzel P. <ph...@us...> - 2008-06-18 16:01:04
|
Update of /cvsroot/tcotool/TCO-Tool/plugins/ch.softenvironment.tcotool.tco/resources/ch/softenvironment In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv29037/plugins/ch.softenvironment.tcotool.tco/resources/ch/softenvironment Log Message: Directory /cvsroot/tcotool/TCO-Tool/plugins/ch.softenvironment.tcotool.tco/resources/ch/softenvironment added to the repository |
From: Hirzel P. <ph...@us...> - 2008-06-18 16:01:04
|
Update of /cvsroot/tcotool/TCO-Tool/plugins/ch.softenvironment.tcotool.tco/resources/ch/softenvironment/tcotool/tco In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv29037/plugins/ch.softenvironment.tcotool.tco/resources/ch/softenvironment/tcotool/tco Log Message: Directory /cvsroot/tcotool/TCO-Tool/plugins/ch.softenvironment.tcotool.tco/resources/ch/softenvironment/tcotool/tco added to the repository |
From: Hirzel P. <ph...@us...> - 2008-06-18 16:01:04
|
Update of /cvsroot/tcotool/TCO-Tool/plugins/ch.softenvironment.tcotool.tco/resources/ch/softenvironment/tcotool In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv29037/plugins/ch.softenvironment.tcotool.tco/resources/ch/softenvironment/tcotool Log Message: Directory /cvsroot/tcotool/TCO-Tool/plugins/ch.softenvironment.tcotool.tco/resources/ch/softenvironment/tcotool added to the repository |
From: Hirzel P. <ph...@us...> - 2008-06-18 16:01:03
|
Update of /cvsroot/tcotool/TCO-Tool/plugins/ch.softenvironment.tcotool.tco/resources In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv29037/plugins/ch.softenvironment.tcotool.tco/resources Log Message: Directory /cvsroot/tcotool/TCO-Tool/plugins/ch.softenvironment.tcotool.tco/resources added to the repository |
From: Hirzel P. <ph...@us...> - 2008-06-18 16:01:03
|
Update of /cvsroot/tcotool/TCO-Tool/plugins/ch.softenvironment.tcotool.tco/classes In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv29037/plugins/ch.softenvironment.tcotool.tco/classes Log Message: Directory /cvsroot/tcotool/TCO-Tool/plugins/ch.softenvironment.tcotool.tco/classes added to the repository |
From: Hirzel P. <ph...@us...> - 2008-06-18 16:00:16
|
Update of /cvsroot/tcotool/TCO-Tool/plugins/ch.softenvironment.tcotool.finance In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv28531/plugins/ch.softenvironment.tcotool.finance Modified Files: plugin.xml Log Message: Index: plugin.xml =================================================================== RCS file: /cvsroot/tcotool/TCO-Tool/plugins/ch.softenvironment.tcotool.finance/plugin.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** plugin.xml 13 Jun 2007 20:30:35 -0000 1.1 --- plugin.xml 18 Jun 2008 16:00:21 -0000 1.2 *************** *** 1,5 **** <?xml version="1.0" ?> <!DOCTYPE plugin PUBLIC "-//JPF//Java Plug-in Manifest 0.4" "http://jpf.sourceforge.net/plugin_0_4.dtd"> ! <plugin id="ch.softenvironment.tcotool.finance" version="0.0.1" class="ch.softenvironment.tcotool.finance.ReportPlugin"> <requires> <import plugin-id="org.tcotool.core.runtime"/> --- 1,5 ---- <?xml version="1.0" ?> <!DOCTYPE plugin PUBLIC "-//JPF//Java Plug-in Manifest 0.4" "http://jpf.sourceforge.net/plugin_0_4.dtd"> ! <plugin id="ch.softenvironment.tcotool.finance" version="0.0.1" class="ch.softenvironment.tcotool.finance.SEPlugin"> <requires> <import plugin-id="org.tcotool.core.runtime"/> *************** *** 14,18 **** <extension plugin-id="org.tcotool.core.runtime" point-id="ReportFinance" id="depreciation"> ! <parameter id="class" value="ch.softenvironment.tcotool.finance.ReportPlugin"/> <parameter id="textKey" value="MniReportFinancialTotal_text"/> <parameter id="icon" value="MenuIcon.png"/> --- 14,18 ---- <extension plugin-id="org.tcotool.core.runtime" point-id="ReportFinance" id="depreciation"> ! <parameter id="class" value="ch.softenvironment.tcotool.finance.SEPlugin"/> <parameter id="textKey" value="MniReportFinancialTotal_text"/> <parameter id="icon" value="MenuIcon.png"/> |
From: Hirzel P. <ph...@us...> - 2008-06-18 15:53:10
|
Update of /cvsroot/tcotool/TCO-Tool/plugins/ch.softenvironment.tcotool.finance/resources/ch/softenvironment/tcotool/finance/resources In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv25651/plugins/ch.softenvironment.tcotool.finance/resources/ch/softenvironment/tcotool/finance/resources Added Files: SEPlugin.properties SEPlugin_de.properties Removed Files: ReportPlugin_de.properties ReportPlugin.properties Log Message: Image change --- NEW FILE: SEPlugin_de.properties --- (This appears to be a binary file; contents omitted.) --- NEW FILE: SEPlugin.properties --- MniReportFinancialTotal_text = Depreciation report CTLinearDepreciation = Linear depreciation (NO compound interest) CTLinearDepreciationCompoundInterest = Lineare (INCLUDING compound interest) CTDegressiveDepreciation = Geometric degressive depreciation CQFactCostIncluded = (for Factcosts with depreciation-duration > 12 months) --- ReportPlugin_de.properties DELETED --- --- ReportPlugin.properties DELETED --- |
From: Hirzel P. <ph...@us...> - 2008-06-18 15:53:10
|
Update of /cvsroot/tcotool/TCO-Tool/plugins/ch.softenvironment.tcotool.finance/resources In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv25651/plugins/ch.softenvironment.tcotool.finance/resources Modified Files: MenuIcon.png Log Message: Image change Index: MenuIcon.png =================================================================== RCS file: /cvsroot/tcotool/TCO-Tool/plugins/ch.softenvironment.tcotool.finance/resources/MenuIcon.png,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvscUZVa4 and /tmp/cvsCz05jx differ |
From: Hirzel P. <ph...@us...> - 2008-06-18 15:29:36
|
Update of /cvsroot/tcotool/TCO-Tool/src/org/tcotool/application In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv17279/src/org/tcotool/application Modified Files: LauncherView.java Log Message: new official release Index: LauncherView.java =================================================================== RCS file: /cvsroot/tcotool/TCO-Tool/src/org/tcotool/application/LauncherView.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** LauncherView.java 19 Jun 2007 08:21:59 -0000 1.12 --- LauncherView.java 18 Jun 2008 15:29:39 -0000 1.13 *************** *** 1,3 **** --- 1,4 ---- package org.tcotool.application; + /* * This library is free software; you can redistribute it and/or *************** *** 29,32 **** --- 30,35 ---- import java.awt.event.ActionEvent; import java.awt.event.KeyEvent; + import java.io.BufferedInputStream; + import java.io.FileInputStream; import java.io.FileNotFoundException; import java.util.Iterator; *************** *** 44,48 **** --- 47,53 ---- import ch.softenvironment.jomm.*; import ch.softenvironment.jomm.mvc.model.DbChangeableBean; + import ch.softenvironment.jomm.mvc.model.DbCode; import ch.softenvironment.jomm.mvc.model.DbCodeType; + import ch.softenvironment.jomm.serialize.CsvSerializer; import ch.softenvironment.jomm.target.xml.*; *************** *** 116,119 **** --- 121,125 ---- private JMenu ivjMnuReportGeneral = null; private JMenu ivjMnuReportTco = null; + private JRadioButtonMenuItem ivjRbtChinese = null; class IvjEventHandler implements ch.softenvironment.view.SimpleEditorPanelListener, ch.softenvironment.view.ToolBarListener, java.awt.event.ActionListener, java.awt.event.ItemListener { *************** *** 151,154 **** --- 157,164 ---- if (e.getSource() == LauncherView.this.getRbtFontBig()) connEtoC30(e); + if (e.getSource() == LauncherView.this.getMniFileImportCostCentre()) + connEtoC16(e); + if (e.getSource() == LauncherView.this.getMniFileImportCostCause()) + connEtoC17(e); }; public void itemStateChanged(java.awt.event.ItemEvent e) { *************** *** 161,175 **** if (e.getSource() == LauncherView.this.getRbtLanguageEnglish()) connEtoC22(e); }; public void tbbCopyAction_actionPerformed(java.util.EventObject newEvent) {}; public void tbbCutAction_actionPerformed(java.util.EventObject newEvent) {}; public void tbbDeleteAction_actionPerformed(java.util.EventObject newEvent) {}; ! public void tbbFindAction_actionPerformed(java.util.EventObject newEvent) { ! try { ! mniFind(); ! } catch (java.lang.Throwable ivjExc) { ! handleException(ivjExc); ! } ! }; public void tbbNewAction_actionPerformed(java.util.EventObject newEvent) { if (newEvent.getSource() == LauncherView.this.getTlbStandard()) --- 171,181 ---- if (e.getSource() == LauncherView.this.getRbtLanguageEnglish()) connEtoC22(e); + if (e.getSource() == LauncherView.this.getRbtChinese()) + connEtoC13(e); }; public void tbbCopyAction_actionPerformed(java.util.EventObject newEvent) {}; public void tbbCutAction_actionPerformed(java.util.EventObject newEvent) {}; public void tbbDeleteAction_actionPerformed(java.util.EventObject newEvent) {}; ! public void tbbFindAction_actionPerformed(java.util.EventObject newEvent) {}; public void tbbNewAction_actionPerformed(java.util.EventObject newEvent) { if (newEvent.getSource() == LauncherView.this.getTlbStandard()) *************** *** 193,197 **** }; }; ! /** * Constructor --- 199,205 ---- }; }; ! private JMenuItem ivjMniFileImportCostCause = null; ! private JMenuItem ivjMniFileImportCostCentre = null; ! private JMenu ivjMnuFileImport = null; /** * Constructor *************** *** 276,283 **** item.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { showBusy(new Runnable() { public void run() { try { ! Iterator it = ((TcoModel)getUtility().getRoot()).getObjectServer().retrieveCodes(dbCodeTypePrimary).iterator(); //TODO if (!it.hasNext()) { showNoDataFor(dbCodeType) } while (it.hasNext()) { --- 284,296 ---- item.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { + final java.util.List primaryCodes = ((TcoModel)getUtility().getRoot()).getObjectServer().retrieveCodes(dbCodeTypePrimary); + if ((primaryCodes == null) || (primaryCodes.size() == 0)) { + BaseDialog.showWarning(getInstance(), ResourceManager.getResource(ChartTool.class, "CWNoCode_title") + " " + ModelUtility.getTypeString(dbCodeTypePrimary), ResourceManager.getResource(ChartTool.class, "CWNoCode_text")); + return; + } showBusy(new Runnable() { public void run() { try { ! Iterator it = primaryCodes.iterator(); //TODO if (!it.hasNext()) { showNoDataFor(dbCodeType) } while (it.hasNext()) { *************** *** 301,308 **** item.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { showBusy(new Runnable() { public void run() { try { ! Iterator it = ((TcoModel)getUtility().getRoot()).getObjectServer().retrieveCodes(dbCodeTypePrimary).iterator(); while (it.hasNext()) { DbCodeType maskCode = (DbCodeType)it.next(); --- 314,326 ---- item.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { + final java.util.List primaryCodes = ((TcoModel)getUtility().getRoot()).getObjectServer().retrieveCodes(dbCodeTypePrimary); + if ((primaryCodes == null) || (primaryCodes.size() == 0)) { + BaseDialog.showWarning(getInstance(), ResourceManager.getResource(ChartTool.class, "CWNoCode_title") + " " + ModelUtility.getTypeString(dbCodeTypePrimary), ResourceManager.getResource(ChartTool.class, "CWNoCode_text")); + return; + } showBusy(new Runnable() { public void run() { try { ! Iterator it = primaryCodes.iterator(); while (it.hasNext()) { DbCodeType maskCode = (DbCodeType)it.next(); *************** *** 441,444 **** --- 459,480 ---- } /** + * connEtoC13: (RbtChinese.item.itemStateChanged(java.awt.event.ItemEvent) --> LauncherView.setLanguage()V) + * @param arg1 java.awt.event.ItemEvent + */ + /* WARNING: THIS METHOD WILL BE REGENERATED. */ + private void connEtoC13(java.awt.event.ItemEvent arg1) { + try { + // user code begin {1} + // user code end + this.setLanguage(); + // user code begin {2} + // user code end + } catch (java.lang.Throwable ivjExc) { + // user code begin {3} + // user code end + handleException(ivjExc); + } + } + /** * connEtoC14: (JMenuItem41.action.actionPerformed(java.awt.event.ActionEvent) --> LauncherView.mniSystem()V) * @param arg1 java.awt.event.ActionEvent *************** *** 477,480 **** --- 513,552 ---- } /** + * connEtoC16: (MniFileImportCostCentre.action.actionPerformed(java.awt.event.ActionEvent) --> LauncherView.mniFileImportCostCentre()V) + * @param arg1 java.awt.event.ActionEvent + */ + /* WARNING: THIS METHOD WILL BE REGENERATED. */ + private void connEtoC16(java.awt.event.ActionEvent arg1) { + try { + // user code begin {1} + // user code end + this.mniFileImportCostCentre(); + // user code begin {2} + // user code end + } catch (java.lang.Throwable ivjExc) { + // user code begin {3} + // user code end + handleException(ivjExc); + } + } + /** + * connEtoC17: (MniFileImportCostCause.action.actionPerformed(java.awt.event.ActionEvent) --> LauncherView.mniFileImportCostCause()V) + * @param arg1 java.awt.event.ActionEvent + */ + /* WARNING: THIS METHOD WILL BE REGENERATED. */ + private void connEtoC17(java.awt.event.ActionEvent arg1) { + try { + // user code begin {1} + // user code end + this.mniFileImportCostCause(); + // user code begin {2} + // user code end + } catch (java.lang.Throwable ivjExc) { + // user code begin {3} + // user code end + handleException(ivjExc); + } + } + /** * connEtoC18: (MniHelp.action.actionPerformed(java.awt.event.ActionEvent) --> LauncherView.mniHelp()V) * @param arg1 java.awt.event.ActionEvent *************** *** 1049,1052 **** --- 1121,1168 ---- } /** + * Return the MniFileImportCostCause property value. + * @return javax.swing.JMenuItem + */ + /* WARNING: THIS METHOD WILL BE REGENERATED. */ + private javax.swing.JMenuItem getMniFileImportCostCause() { + if (ivjMniFileImportCostCause == null) { + try { + ivjMniFileImportCostCause = new javax.swing.JMenuItem(); + ivjMniFileImportCostCause.setName("MniFileImportCostCause"); + ivjMniFileImportCostCause.setText("Cost type..."); + // user code begin {1} + ivjMniFileImportCostCause.setText(ModelUtility.getTypeString(CostCause.class) + "..."); + // user code end + } catch (java.lang.Throwable ivjExc) { + // user code begin {2} + // user code end + handleException(ivjExc); + } + } + return ivjMniFileImportCostCause; + } + /** + * Return the MniFileImportCostCentre property value. + * @return javax.swing.JMenuItem + */ + /* WARNING: THIS METHOD WILL BE REGENERATED. */ + private javax.swing.JMenuItem getMniFileImportCostCentre() { + if (ivjMniFileImportCostCentre == null) { + try { + ivjMniFileImportCostCentre = new javax.swing.JMenuItem(); + ivjMniFileImportCostCentre.setName("MniFileImportCostCentre"); + ivjMniFileImportCostCentre.setText("Cost centre..."); + // user code begin {1} + ivjMniFileImportCostCentre.setText(ModelUtility.getTypeString(CostCentre.class) + "..."); + // user code end + } catch (java.lang.Throwable ivjExc) { + // user code begin {2} + // user code end + handleException(ivjExc); + } + } + return ivjMniFileImportCostCentre; + } + /** * Return the MnuNew property value. * @return javax.swing.JMenu *************** *** 1179,1193 **** return mniFind; } - private void mniFind() { - try { - if (!getViewOptions().getViewManager().activateView(FindDialog.class)) { - javax.swing.JDialog dialog = new FindDialog(getInstance(), getViewOptions(), false); - getViewOptions().getViewManager().checkIn(null, dialog); - dialog.setVisible(true); - } - } catch(Throwable ex) { - handleException(ex); - } - } /** * Return the MniHelp property value. --- 1295,1298 ---- *************** *** 1397,1400 **** --- 1502,1506 ---- ivjMnuFile.add(getMniFileNew()); ivjMnuFile.add(getMniFileOpenWindow()); + ivjMnuFile.add(getMnuFileImport()); ivjMnuFile.add(getMniFileSave()); ivjMnuFile.add(getMniFileSaveAs()); *************** *** 1413,1416 **** --- 1519,1545 ---- } /** + * Return the MnuFileImport property value. + * @return javax.swing.JMenu + */ + /* WARNING: THIS METHOD WILL BE REGENERATED. */ + private javax.swing.JMenu getMnuFileImport() { + if (ivjMnuFileImport == null) { + try { + ivjMnuFileImport = new javax.swing.JMenu(); + ivjMnuFileImport.setName("MnuFileImport"); + ivjMnuFileImport.setText("Import"); + ivjMnuFileImport.add(getMniFileImportCostCentre()); + ivjMnuFileImport.add(getMniFileImportCostCause()); + // user code begin {1} + // user code end + } catch (java.lang.Throwable ivjExc) { + // user code begin {2} + // user code end + handleException(ivjExc); + } + } + return ivjMnuFileImport; + } + /** * Return the MnuFont property value. * @return javax.swing.JMenu *************** *** 1486,1489 **** --- 1615,1619 ---- ivjMnuLanguage.add(getRbtLanguageFrench()); ivjMnuLanguage.add(getRbtLanguageItalian()); + ivjMnuLanguage.add(getRbtChinese()); // user code begin {1} ivjMnuLanguage.setText(CommonUserAccess.getMnuLanguageText()); *************** *** 1764,1767 **** --- 1894,1919 ---- } /** + * Return the RbtChinese property value. + * @return javax.swing.JRadioButtonMenuItem + */ + /* WARNING: THIS METHOD WILL BE REGENERATED. */ + private javax.swing.JRadioButtonMenuItem getRbtChinese() { + if (ivjRbtChinese == null) { + try { + ivjRbtChinese = new javax.swing.JRadioButtonMenuItem(); + ivjRbtChinese.setName("RbtChinese"); + ivjRbtChinese.setText("Chinese"); + // user code begin {1} + ivjRbtChinese.setText("Chinese (zhong wen"); + // user code end + } catch (java.lang.Throwable ivjExc) { + // user code begin {2} + // user code end + handleException(ivjExc); + } + } + return ivjRbtChinese; + } + /** * Return the RbtFontBig property value. * @return javax.swing.JRadioButtonMenuItem *************** *** 1994,1998 **** */ public static String getVersion() { ! return "V1.4.4"; } /** --- 2146,2150 ---- */ public static String getVersion() { ! return "V1.4.5"; } /** *************** *** 2033,2036 **** --- 2185,2191 ---- getRbtFontDefault().addActionListener(ivjEventHandler); getRbtFontBig().addActionListener(ivjEventHandler); + getRbtChinese().addItemListener(ivjEventHandler); + getMniFileImportCostCentre().addActionListener(ivjEventHandler); + getMniFileImportCostCause().addActionListener(ivjEventHandler); } /** *************** *** 2073,2076 **** --- 2228,2232 ---- group.add(getRbtLanguageFrench()); group.add(getRbtLanguageItalian()); + group.add(getRbtChinese()); if (java.util.Locale.getDefault().getLanguage().equals(java.util.Locale.GERMAN.getLanguage())) { getRbtLanguageGerman().setSelected(true); *************** *** 2079,2082 **** --- 2235,2240 ---- } else if (java.util.Locale.getDefault().getLanguage().equals(java.util.Locale.ITALIAN.getLanguage())) { getRbtLanguageItalian().setSelected(true); + } else if (java.util.Locale.getDefault().getLanguage().equals(java.util.Locale.CHINESE.getLanguage())) { + getRbtChinese().setSelected(true); } else { // default *************** *** 2162,2166 **** ApplicationOptions options = new ApplicationOptions(System.getProperty("user.home") + java.io.File.separator + ".TCO_Tool"); ! NlsUtils.changeLocale(new Locale(options.getLanguage())); setSystemLookAndFeel(); --- 2320,2328 ---- ApplicationOptions options = new ApplicationOptions(System.getProperty("user.home") + java.io.File.separator + ".TCO_Tool"); ! NlsUtils.changeLocale(new Locale(options.getLanguage())); ! if (Locale.getDefault().getLanguage().equals("zh")) { ! // @see #setLanguage() ! ResourceManager.setCharacterSet(StringUtils.CHARSET_UTF8); ! } setSystemLookAndFeel(); *************** *** 2193,2197 **** private void mniAbout() { try { ! new AboutDialog(this, getResourceString("FrmWindow_text"), getVersion(), "softEnvironment by Peter Hirzel 2004-2007"); } catch(Throwable e) { handleException(e); --- 2355,2359 ---- private void mniAbout() { try { ! new AboutDialog(this, getResourceString("FrmWindow_text"), getVersion(), "softEnvironment by Peter Hirzel 2004-2008"); } catch(Throwable e) { handleException(e); *************** *** 2217,2226 **** public void run() { try { ! showProgress(10, getResourceString("CIDependencyInit")); java.util.Set dependencies = getUtility().findDependencies((TcoObject)getUtility().getRoot()); if (dependencies.size() == 0) { BaseDialog.showWarning(view, getResourceString("MniDependencyGraph_text"), getResourceString("CEDependenciesMissing")); } else { ! showProgress(30, getResourceString("CIInitGraph")); boolean doLayout = false; if (getUtility().getDependencyDiagram() == null) { --- 2379,2388 ---- public void run() { try { ! WaitDialog.updateProgress(10, getResourceString("CIDependencyInit")); java.util.Set dependencies = getUtility().findDependencies((TcoObject)getUtility().getRoot()); if (dependencies.size() == 0) { BaseDialog.showWarning(view, getResourceString("MniDependencyGraph_text"), getResourceString("CEDependenciesMissing")); } else { ! WaitDialog.updateProgress(30, getResourceString("CIInitGraph")); boolean doLayout = false; if (getUtility().getDependencyDiagram() == null) { *************** *** 2230,2235 **** } org.tcotool.standard.drawing.DependencyView depView = new org.tcotool.standard.drawing.DependencyView(getUtility().getDependencyDiagram(), dependencies, getDtpRoot().getWidth(), getDtpRoot().getHeight()); ! showProgress(50, getResourceString("CIReportInit")); ! showProgress(65, getResourceString("CIAutoLayout")); depView.setSize(getDtpRoot().getWidth()-70, getDtpRoot().getHeight()-60); if (doLayout) { --- 2392,2397 ---- } org.tcotool.standard.drawing.DependencyView depView = new org.tcotool.standard.drawing.DependencyView(getUtility().getDependencyDiagram(), dependencies, getDtpRoot().getWidth(), getDtpRoot().getHeight()); ! WaitDialog.updateProgress(50, getResourceString("CIReportInit")); ! WaitDialog.updateProgress(65, getResourceString("CIAutoLayout")); depView.setSize(getDtpRoot().getWidth()-70, getDtpRoot().getHeight()-60); if (doLayout) { *************** *** 2247,2250 **** --- 2409,2513 ---- } /** + * Comment + */ + private void mniFileImportCostCause() { + importCode(CostCause.class, "Nr(UNIQUE!);Name;Direct(Yes/No);"); + } + /** + * Import code "CostCentre" from CSV-file. + * Replace text if CostCentre#iliCode matches. + */ + private void mniFileImportCostCentre() { + importCode(CostCentre.class, "Nr(UNIQUE!);Name;"); + } + /** + * Import given DbCode type into as BusinessObjects. + * @param type + * @param csvFormat + */ + private void importCode(Class type, final String csvFormat) { + try { + //TODO NLS + if (BaseDialog.showConfirm((java.awt.Component)this, "Import Code", ModelUtility.getTypeString(type) + "\n\nFormat: \"" + csvFormat + "\"\n\n[wobei die Kopfzeile ignoriert wird und eindeutige Nummern überschrieben werden!]")) { + FileChooser openDialog = new FileChooser(LauncherView.getInstance().getSettings().getWorkingDirectory()); + openDialog.setDialogTitle(CommonUserAccess.getTitleFileOpen()); + openDialog.addChoosableFileFilter(GenericFileFilter.createCsvFilter()); + if (openDialog.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) { + java.util.Locale locale = ModelUtility.getCodeTypeLocale(); + XmlObjectServer server = (XmlObjectServer)utility.getServer(); + BufferedInputStream bis = new BufferedInputStream (new FileInputStream(openDialog.getSelectedFile())); + Iterator it = ParserCSV.readFile(bis, CsvSerializer.CELL_SEPARATOR).iterator(); + bis.close(); + if (it.hasNext()) { + // skip header + it.next(); + } + while (it.hasNext()) { + String line = (String)it.next(); + ParserCSV parser = new ParserCSV(line, CsvSerializer.CELL_SEPARATOR); + String iliCode = parser.getNextString(); + String name = parser.getNextString(); + Boolean direct = Boolean.TRUE; + if (type == CostCause.class) { + Boolean tmp = parser.getNextBoolean(); + if (tmp != null) { + direct = tmp; + } + } + /* + String note = ""; + String tmp = null; + while (!StringUtils.isNullOrEmpty(tmp = parser.getNextString())) { + if (note.length() > 0) { + note = note + "; "; + } + note = note + tmp; + } + */ + if (!StringUtils.isNullOrEmpty(name)) { + Iterator codes = utility.getServer().retrieveCodes(type).iterator(); + boolean found = false; + while (codes.hasNext()) { + DbCode code = (DbCode)codes.next(); + if ((code.getIliCode() != null) && code.getIliCode().equals(iliCode)) { + // update text + code.getName().setValue(name, locale); + if (type == CostCause.class) { + ((CostCause)code).setDirect(direct); + } + found = true; + break; + } + } + if (!found) { + // add new code + if (type == CostCause.class) { + ModelUtility.createCostCause(server, locale, iliCode, name, direct); + } else { + ModelUtility.createCostCenter(server, locale, iliCode, name); + } + } + } + } + closeSubWindows(); + LauncherView.getInstance().setModelChanged(true); + } + } + } catch(Throwable e) { + handleException(e); + } + } + private void mniFind() { + try { + if (!getViewOptions().getViewManager().activateView(FindDialog.class)) { + javax.swing.JDialog dialog = new FindDialog(getInstance(), getViewOptions(), false); + getViewOptions().getViewManager().checkIn(null, dialog); + dialog.setVisible(true); + } + } catch(Throwable ex) { + handleException(ex); + } + } + /** * Show Help. */ *************** *** 2350,2358 **** protected boolean mniSaveFile() { try { ! if (getUtility().getFile() == null) { return mniSaveAs(); } else { try { ! saveFile(getUtility().getFile()); } catch(java.io.IOException e) { handleException(e); --- 2613,2621 ---- protected boolean mniSaveFile() { try { ! if (getUtility().getFilename() == null) { return mniSaveAs(); } else { try { ! saveFile(getUtility().getFilename()); } catch(java.io.IOException e) { handleException(e); *************** *** 2549,2559 **** * Save Model into file. */ ! private void saveFile(String filename) throws Throwable { ! ((TcoModel)getUtility().getRoot()).setName(StringUtils.getPureFileName(filename)); ch.softenvironment.jomm.target.xml.XmlUserObject userObject = new ch.softenvironment.jomm.target.xml.XmlUserObject(filename); ! userObject.setSender("www.tcotool.org (" + getVersion() + ")"); //TODO NYI: XSD ! userObject.setXsd("http://www.interlis.ch/INTERLIS2.2 TcoTool.xsd"); // userObject.setXsl("http://www.tcotool.org/XSLT/TCOModel_Tree.xsl"); final DbObjectServer server = getUtility().getServer(); --- 2812,2822 ---- * Save Model into file. */ ! private void saveFile(final String filename) throws Throwable { ! // ((TcoModel)getUtility().getRoot()).setName(StringUtils.getPureFileName(filename)); ch.softenvironment.jomm.target.xml.XmlUserObject userObject = new ch.softenvironment.jomm.target.xml.XmlUserObject(filename); ! userObject.setSender(ModelUtility.getIliSender()); //TODO NYI: XSD ! userObject.setXsd(ModelUtility.XSD); // userObject.setXsl("http://www.tcotool.org/XSLT/TCOModel_Tree.xsl"); final DbObjectServer server = getUtility().getServer(); *************** *** 2583,2587 **** mnuFileHistory.addRecent(filename); ! getUtility().setFile(filename); ch.softenvironment.jomm.mvc.controller.ConsistencyController.cascadedSaved(); --- 2846,2850 ---- mnuFileHistory.addRecent(filename); ! getUtility().setFilename(filename); ch.softenvironment.jomm.mvc.controller.ConsistencyController.cascadedSaved(); *************** *** 2607,2610 **** --- 2870,2880 ---- } /** + * Set the image to be displayed in the Report-Desktop-Pane. + * @param image + */ + public void setBackgroundImage(Image image) { + this.image = image; + } + /** * Register currently selected treeNode in NavigationTree * for listening to PropertyChanges to update DocumentationPanel. *************** *** 2649,2660 **** // change Locale-Default; boolean changed = false; ! if (getRbtLanguageEnglish().isSelected()) { ! changed = NlsUtils.changeLocale(Locale.ENGLISH); } else if (getRbtLanguageFrench().isSelected()) { changed = NlsUtils.changeLocale(Locale.FRENCH); } else if (getRbtLanguageItalian().isSelected()) { changed = NlsUtils.changeLocale(Locale.ITALIAN); } else { ! changed = NlsUtils.changeLocale(Locale.GERMAN); } --- 2919,2934 ---- // change Locale-Default; boolean changed = false; ! ResourceManager.setCharacterSet(null); ! if (getRbtLanguageGerman().isSelected()) { ! changed = NlsUtils.changeLocale(Locale.GERMAN); } else if (getRbtLanguageFrench().isSelected()) { changed = NlsUtils.changeLocale(Locale.FRENCH); } else if (getRbtLanguageItalian().isSelected()) { changed = NlsUtils.changeLocale(Locale.ITALIAN); + } else if (getRbtChinese().isSelected()) { + ResourceManager.setCharacterSet(StringUtils.CHARSET_UTF8); // *_zh.properties are in UTF8 + changed = NlsUtils.changeLocale(Locale.CHINESE); } else { ! changed = NlsUtils.changeLocale(Locale.ENGLISH); } *************** *** 2663,2668 **** getSettings().setLanguage(Locale.getDefault().getLanguage()); saveSettings(); ! super.dispose(); ! showInstance(getViewOptions(), getUtility(), getSettings()); // updateStringComponent(this); // manual reset --- 2937,2941 ---- getSettings().setLanguage(Locale.getDefault().getLanguage()); saveSettings(); ! closeSubWindows(); // updateStringComponent(this); // manual reset *************** *** 2673,2676 **** --- 2946,2957 ---- } /** + * If language or codes changes force refresh in sub GUI's. + * @throws Throwable + */ + private void closeSubWindows() throws Throwable { + super.dispose(); + showInstance(getViewOptions(), getUtility(), getSettings()); + } + /** * Keep changes of Model in mind. */ *************** *** 2696,2704 **** getDtpRoot().repaint(); getViewOptions().getViewManager().closeAll(); ! ! if (utility.getFile() != null) { ! ((TcoPackage)this.utility.getRoot()).setName(StringUtils.getPureFileName(utility.getFile())); } ! getPnlNavigation().setUtility(getUtility()); --- 2977,2985 ---- getDtpRoot().repaint(); getViewOptions().getViewManager().closeAll(); ! /* ! if (utility.getFilename() != null) { ! ((TcoModel)this.utility.getRoot()).setName(new java.io.File(utility.getFilename()).getName()); } ! */ getPnlNavigation().setUtility(getUtility()); *************** *** 2728,2738 **** getStbStatus().setStatus(status); } - /** - * Set the image to be displayed in the Report-Desktop-Pane. - * @param image - */ - public void setBackgroundImage(Image image) { - this.image = image; - } - } --- 3009,3011 ---- |
Update of /cvsroot/tcotool/TCO-Tool/plugins/ch.softenvironment.tcotool.finance/source/ch/softenvironment/tcotool/finance In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv16793/plugins/ch.softenvironment.tcotool.finance/source/ch/softenvironment/tcotool/finance Modified Files: ReportDepreciation.java Added Files: SEPlugin.java Removed Files: ReportPlugin.java FinancialCalculator.java Log Message: Calculation enhanced --- FinancialCalculator.java DELETED --- --- ReportPlugin.java DELETED --- --- NEW FILE: SEPlugin.java --- package ch.softenvironment.tcotool.finance; /* * Copyright (C) 2006 Peter Hirzel softEnvironment (http://www.softenvironment.ch). * All rights reserved. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ import javax.swing.JComponent; import javax.swing.JMenuItem; import org.java.plugin.Plugin; import org.tcotool.application.LauncherView; import org.tcotool.core.runtime.ApplicationPlugin; import org.tcotool.model.TcoObject; import org.tcotool.pluginsupport.PluginUtility; import org.tcotool.standard.report.ReportTool; import org.tcotool.tools.ModelUtility; /** * Free <i>soft</i>Environment Plugins (might serve as sample). * PLUGIN_ID = "ch.softenvironment.tcotool.finance"; * @author Peter Hirzel <i>soft</i>Environment * @version $Revision: 1.1 $ $Date: 2008/06/18 15:28:16 $ */ public final class SEPlugin extends Plugin implements org.tcotool.pluginsupport.Menu { protected static final String REPORT_HEADER = "ReportHeader.png"; /** * Constructor. */ public SEPlugin() { super(); } /** * @see org.java.plugin.Plugin#doStart() */ protected void doStart() throws Exception { } /** * @see org.java.plugin.Plugin#doStop() */ protected void doStop() throws Exception { } /** * Menu was clicked -> generate the report. * @see org.tcotool.pluginsupport.Menu#init(javax.swing.JComponent) */ public void actionPerform(final JComponent item, final Object object) { ApplicationPlugin.showBusy(new Runnable() { public void run() { try { String actionCommand = ((JMenuItem)item).getActionCommand(); if (actionCommand.equals("depreciation" /*@see plugin.xml=>id*/)) { reportFinancialTotal(ModelUtility.getTcoPackageOrRoot(object)); } } catch(Throwable e) { LauncherView.getInstance().handleException(e); } } }); } /** * Depreciation-Report. */ private void reportFinancialTotal(TcoObject root) throws Throwable { LauncherView.getInstance().addReport(ReportDepreciation.createBlockDepreciation(root, ReportTool.getDepreciationDuration(), PluginUtility.getClassLoader(this))); } } Index: ReportDepreciation.java =================================================================== RCS file: /cvsroot/tcotool/TCO-Tool/plugins/ch.softenvironment.tcotool.finance/source/ch/softenvironment/tcotool/finance/ReportDepreciation.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ReportDepreciation.java 13 Jun 2007 20:21:38 -0000 1.1 --- ReportDepreciation.java 18 Jun 2008 15:28:16 -0000 1.2 *************** *** 23,26 **** --- 23,29 ---- import org.tcotool.standard.report.ReportTool; import org.tcotool.tools.Calculator; + import org.tcotool.tools.CalculatorDegressiveDepreciation; + import org.tcotool.tools.CalculatorLinearDepreciation; + import org.tcotool.tools.CalculatorLinearDepreciationCompountInterest; import org.tcotool.application.*; *************** *** 28,31 **** --- 31,35 ---- import ch.softenvironment.jomm.DbObjectServer; import ch.softenvironment.jomm.serialize.AttributeList; + import ch.softenvironment.view.BaseDialog; /** *************** *** 39,42 **** --- 43,47 ---- class ReportDepreciation extends ReportTool { private ClassLoader loader = null; + private long maxDepreciation = 0; protected ReportDepreciation(String title) { *************** *** 44,53 **** } /** ! * Summarize all Depreciation-Costs within given object and subpackages. */ public static ReportTool createBlockDepreciation(TcoObject root, long maxDepreciation, ClassLoader loader) throws java.lang.Throwable { ! ReportDepreciation tool = new ReportDepreciation(ResourceManager.getResource(ReportPlugin.class, "MniReportFinancialTotal_text", loader)); tool.loader = loader; ! tool.calculator = new FinancialCalculator(LauncherView.getInstance().getUtility(), root, maxDepreciation); tool.totalCost(root); return tool; --- 49,59 ---- } /** ! * Summarize all Depreciation-Costs within given object and sub-packages. */ public static ReportTool createBlockDepreciation(TcoObject root, long maxDepreciation, ClassLoader loader) throws java.lang.Throwable { ! ReportDepreciation tool = new ReportDepreciation(ResourceManager.getResource(SEPlugin.class, "MniReportFinancialTotal_text", loader)); tool.loader = loader; ! tool.maxDepreciation = maxDepreciation; ! //tool.calculator = new CalculatorLinearDepreciation(LauncherView.getInstance().getUtility(), root, maxDepreciation); tool.totalCost(root); return tool; *************** *** 58,62 **** public void startBody(AttributeList list) throws IOException { super.startBody(list); ! java.net.URL url = loader.getResource(ReportPlugin.REPORT_HEADER); image(url, "", 0); } --- 64,68 ---- public void startBody(AttributeList list) throws IOException { super.startBody(list); ! java.net.URL url = loader.getResource(SEPlugin.REPORT_HEADER); image(url, "", 0); } *************** *** 65,76 **** */ protected void encodeCodes(DbObjectServer server, TcoObject root) throws Throwable { ! encodeDepreciation(root, ResourceManager.getResource(ReportPlugin.class, "CTLinearDepreciation", loader), FinancialCalculator.DEPRECIATION_LINEAR); ! encodeDepreciation(root, ResourceManager.getResource(ReportPlugin.class, "CTDegressiveDepreciation", loader), FinancialCalculator.DEPRECIATION_GEOMETRIC_DEGRESSIVE); } ! private void encodeDepreciation(TcoObject root, String title, final String type) throws IOException { startParagraph(); ! List totalCosts = ((FinancialCalculator)calculator).getDepreciationCostBlock(root, type); bold(title); ! simpleContent(" " + ResourceManager.getResource(ReportPlugin.class, "CQFactCostIncluded", loader) + ":" /*getRsc("CIFactCostOverAll")*/); breakLine(); --- 71,90 ---- */ protected void encodeCodes(DbObjectServer server, TcoObject root) throws Throwable { ! calculator = new CalculatorLinearDepreciation(LauncherView.getInstance().getUtility(), root, maxDepreciation); ! encodeDepreciation(root, ResourceManager.getResource(SEPlugin.class, "CTLinearDepreciation", loader)); ! calculator = new CalculatorLinearDepreciationCompountInterest(LauncherView.getInstance().getUtility(), root, maxDepreciation); ! if (calculator.isBaseOffsetInvolved()) { ! //TODO NLS ! BaseDialog.showWarning(LauncherView.getInstance(), "Calculation without warranty", "The Base-Offset (de: Basis-Offset) is not yet considered in this report, sorry."); ! } ! encodeDepreciation(root, ResourceManager.getResource(SEPlugin.class, "CTLinearDepreciationCompoundInterest", loader)); ! calculator = new CalculatorDegressiveDepreciation(LauncherView.getInstance().getUtility(), root, maxDepreciation); ! encodeDepreciation(root, ResourceManager.getResource(SEPlugin.class, "CTDegressiveDepreciation", loader)); } ! private void encodeDepreciation(TcoObject root, String title/*, final String type*/) throws IOException { startParagraph(); ! List totalCosts = calculator.getTotalCosts(root, Calculator.KIND_FC); //getDepreciationCostBlock(root, type); bold(title); ! simpleContent(" " + ResourceManager.getResource(SEPlugin.class, "CQFactCostIncluded", loader) + ":" /*getRsc("CIFactCostOverAll")*/); breakLine(); *************** *** 92,96 **** startTableRow(); ! for (int i=0; i<totalCosts.size(); i++) { double amount = Calculator.getValue(totalCosts, i); tableDataAmount(amount, true); --- 106,110 ---- startTableRow(); ! for (int i=0; i<calculator.getDurationYears()+1; i++) { double amount = Calculator.getValue(totalCosts, i); tableDataAmount(amount, true); *************** *** 100,106 **** String tmp = ""; ! if (type.equals(FinancialCalculator.DEPRECIATION_GEOMETRIC_DEGRESSIVE)) { tmp = "; " + ResourceManager.getResourceAsNonLabeled(SystemParameterDetailView.class, "LblDepreciationInterestRate_text") + " = " + LauncherView.getInstance().getUtility().getInterestRate() + "%"; ! } encodeCostUnit(tmp); --- 114,120 ---- String tmp = ""; ! //if (type.equals(Calculator.DEPRECIATION_GEOMETRIC_DEGRESSIVE)) { tmp = "; " + ResourceManager.getResourceAsNonLabeled(SystemParameterDetailView.class, "LblDepreciationInterestRate_text") + " = " + LauncherView.getInstance().getUtility().getInterestRate() + "%"; ! //} encodeCostUnit(tmp); |
From: Hirzel P. <ph...@us...> - 2008-06-18 15:27:38
|
Update of /cvsroot/tcotool/TCO-Tool/plugins/ch.softenvironment.tcotool.tco/source/ch/softenvironment/tcotool/tco In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv16375/plugins/ch.softenvironment.tcotool.tco/source/ch/softenvironment/tcotool/tco Added Files: ReportTcoDirect.java SEPlugin.java ReportTcoEstimated.java Log Message: New reports --- NEW FILE: ReportTcoEstimated.java --- package ch.softenvironment.tcotool.tco; /* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ import java.io.IOException; import java.util.*; import org.tcotool.model.*; import org.tcotool.standard.report.ReportTco; import org.tcotool.standard.report.ReportTool; import org.tcotool.tools.Calculator; import org.tcotool.tools.CalculatorTco; import org.tcotool.tools.ModelUtility; import org.tcotool.application.*; import ch.softenvironment.client.ResourceManager; import ch.softenvironment.jomm.DbObjectServer; import ch.softenvironment.jomm.serialize.AttributeList; import ch.softenvironment.util.NlsUtils; /** * Utility to report estimated TCO costs * based Cost#estimated * . * Calculations as Plugin for TCO-Tool. * Design Pattern: Visitor * * @author Peter Hirzel <i>soft</i>Environment * @version $Revision: 1.1 $ $Date: 2008/06/18 15:27:44 $ */ class ReportTcoEstimated extends ReportTco { private ClassLoader loader = null; private String labelEstimated = ResourceManager.getResourceAsNonLabeled(FactCostDetailView.class, "ChxEstimated_text"); private String labelKnown = ResourceManager.getResourceAsNonLabeled(FactCostDetailView.class, "ChxKnown_text"); protected ReportTcoEstimated(String title) { super(title); } /** * Summarize all other TCO-Costs within given object and sub-packages. */ public static ReportTool createBlock(TcoObject root, long maxUsage, ClassLoader loader) throws java.lang.Throwable { ReportTcoEstimated tool = new ReportTcoEstimated(ResourceManager.getResource(SEPlugin.class, "MniReportTcoEstimated_text", loader)); tool.loader = loader; tool.calculator = new CalculatorTco(LauncherView.getInstance().getUtility(), root, maxUsage); tool.totalCost(root); return tool; } /** * Overwrites. */ public void startBody(AttributeList list) throws IOException { super.startBody(list); java.net.URL url = loader.getResource(SEPlugin.REPORT_HEADER); image(url, "", 0); } /** * Overwrites. */ protected void encodeCodes(DbObjectServer server, TcoObject root) throws Throwable { //List codes = server.retrieveCodes(CostCause.class); // Cost->CostCause (contains DIRECT/INDIRECT info) //if (codes.size() > 0) { startParagraph(); encodeCostBlock(root, null, null, ModelUtility.getTypeString(Cost.class)); endParagraph(); //} } /** * Estimated or known costs are defined on Cost#estimated only. * Overwrites. */ protected void encodeCostBlock(TcoObject root, List codes, final String codeUndefined, String title) throws IOException { bold(getRsc("CIBy") + " <" + title + ">:"); String tmp = getRsc("CIEstimatedRatio") + " = "; double knownValue = Calculator.getValue(calculator.getCodeTotal(root, Calculator.KNOWN), Calculator.INDEX_TOTAL); double estimatedValue = Calculator.getValue(calculator.getCodeTotal(root, Calculator.ESTIMATED), Calculator.INDEX_TOTAL); paragraph(tmp + amount(estimatedValue) + " : " + amount(knownValue)); /* getCsvWriter().cell(tmp); getCsvWriter().cell(new Double(estimatedValue)); getCsvWriter().cell(" : "); getCsvWriter().cell(new Double(knownValue)); getCsvWriter().newline(); */ startTable(1); startTableRow(); // print header tableHeader(""); //evtl. colspan with next column tableHeader(title); for (int year=0; year<calculator.getDurationYears(); year++) { String partialYear = ""; if ((calculator.getMaxDurationMonths() - year * 12) < 12) { partialYear = NlsUtils.formatMessage("<br>" + getRsc("CIPartialYear"), (int)calculator.getMaxDurationMonths() % 12); } String header = getRsc("CITCO") + partialYear; tmp = (year + 1) + ". " + getRsc("CIYear"); nativeContent("<th>" + header + "<br>" + tmp + "</th>"); getCsvWriter().cell(header + tmp); } tableHeader(getRsc("CITCOOverAll")); endTableRow(); List estimated = encodeCostBlockColumns(root, PersonalCost.class, labelEstimated, Calculator./*PERSONAL_*/ESTIMATED); List known = encodeCostBlockColumns(root, PersonalCost.class, labelKnown, Calculator./*PERSONAL_*/KNOWN); Calculator.accumulateLists(estimated, encodeCostBlockColumns(root, FactCost.class, labelEstimated, Calculator./*FACT_*/ESTIMATED)); Calculator.accumulateLists(known, encodeCostBlockColumns(root, FactCost.class, labelKnown, Calculator./*FACT_*/KNOWN)); // print total bottom line List totalCosts = calculator.getCostBlock(root); startTableRow(); tableData("*"); tableDataBold(ResourceManager.getResource(ServiceDetailView.class, "TbcTotal_text")); double sumTcoOverUsage = 0.0; for (int i=2; i<totalCosts.size(); i++) { double amount = Calculator.getValue(totalCosts, i); tableDataAmount(amount, true); if (i>=2) { sumTcoOverUsage += amount; } } tableDataAmount(sumTcoOverUsage, true); endTableRow(); startTableRow(); // sum up direct & indirect nativeContent("<td colspan='6'>" + SPACE + "</td>"); getCsvWriter().newline(); endTableRow(); startTableRow(); tableData("*"); tableDataBold(ResourceManager.getResource(ServiceDetailView.class, "TbcTotal_text") + " " + labelEstimated); for (int i=0; i < estimated.size(); i++) { tableDataAmount(((Double)estimated.get(i)).doubleValue(), true); } endTableRow(); startTableRow(); tableData("*"); tableDataBold(ResourceManager.getResource(ServiceDetailView.class, "TbcTotal_text") + " " + labelKnown); for (int i=0; i < known.size(); i++) { tableDataAmount(((Double)known.get(i)).doubleValue(), true); } endTableRow(); endTable(); encodeCostUnit(""); } /** * Print Columns for TCO in HTML: * [Personal/Fact Direct/Indirect] [TCO_Y1] [TCO_Y2]... [TCO_Total] * @param root print to data of given service (null for all services) */ protected List encodeCostBlockColumns(TcoObject root, Class cost, final String rowTitle, String code) throws IOException { String kind = cost == FactCost.class ? Calculator.KIND_FC : Calculator.KIND_PC; List figures = new ArrayList(); startTableRow(); nativeContent("<td>" + getTcoObjectImage(cost) + "</td>"); getCsvWriter().cell(cost == PersonalCost.class ? ResourceManager.getResource(PersonalCostDetailView.class, "FrmWindow_text") : ResourceManager.getResource(FactCostDetailView.class, "FrmWindow_text")); if (rowTitle == null) { tableDataCode(Calculator.COST_CAUSE_UNDEFINED); } else { tableData(rowTitle); } int year = 0; double sumTcoOverUsage = 0.0; for (; year < calculator.getMaxDurationMonths()/12; year++) { double amount = Calculator.getValue(calculator.getCodeTotal(root, code, kind), year + Calculator.INDEX_TOTAL + 1); figures.add(new Double(amount)); tableDataAmount(amount, false); sumTcoOverUsage += amount; } if (calculator.getMaxDurationMonths() % 12 > 0) { // partial year double amount = Calculator.getValue(calculator.getCodeTotal(root, code, kind), year + Calculator.INDEX_TOTAL + 1); figures.add(new Double(amount)); tableDataAmount(amount, false); sumTcoOverUsage += amount; } figures.add(new Double(sumTcoOverUsage)); tableDataAmount(sumTcoOverUsage, true); endTableRow(); return figures; } } --- NEW FILE: SEPlugin.java --- package ch.softenvironment.tcotool.tco; /* * Copyright (C) 2006 Peter Hirzel softEnvironment (http://www.softenvironment.ch). * All rights reserved. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ import javax.swing.JComponent; import javax.swing.JMenuItem; import org.java.plugin.Plugin; import org.tcotool.application.LauncherView; import org.tcotool.core.runtime.ApplicationPlugin; import org.tcotool.model.TcoObject; import org.tcotool.model.TcoPackage; import org.tcotool.pluginsupport.PluginUtility; import org.tcotool.standard.report.ReportTool; import org.tcotool.tools.ModelUtility; /** * Free <i>soft</i>Environment Plugins (might serve as sample). * PLUGIN_ID = "ch.softenvironment.tcotool.finance"; * @author Peter Hirzel <i>soft</i>Environment * @version $Revision: 1.1 $ $Date: 2008/06/18 15:27:44 $ */ public final class SEPlugin extends Plugin implements org.tcotool.pluginsupport.Menu { protected static final String REPORT_HEADER = "ReportHeader.png"; /** * Constructor. */ public SEPlugin() { super(); } /** * @see org.java.plugin.Plugin#doStart() */ protected void doStart() throws Exception { } /** * @see org.java.plugin.Plugin#doStop() */ protected void doStop() throws Exception { } /** * Menu was clicked -> generate the report. * @see org.tcotool.pluginsupport.Menu#init(javax.swing.JComponent) */ public void actionPerform(final JComponent item, final Object object) { ApplicationPlugin.showBusy(new Runnable() { public void run() { try { String actionCommand = ((JMenuItem)item).getActionCommand(); if (actionCommand.equals("tcoDirect" /*@see plugin.xml=>extension-id*/)) { reportTcoDirect(ModelUtility.getTcoPackageOrRoot(object)); } else if (actionCommand.equals("tcoEstimated" /*@see plugin.xml=>extension-id*/)) { reportTcoEstimated(ModelUtility.getTcoPackageOrRoot(object)); } } catch(Throwable e) { LauncherView.getInstance().handleException(e); } } }); } /** * Menu callback. */ private void reportTcoDirect(TcoObject root) throws Throwable { LauncherView.getInstance().addReport(ReportTcoDirect.createBlock(root, ReportTool.getUsageDuration(), PluginUtility.getClassLoader(this))); } /** * Menu callback. */ private void reportTcoEstimated(TcoObject root) throws Throwable { LauncherView.getInstance().addReport(ReportTcoEstimated.createBlock(root, ReportTool.getUsageDuration(), PluginUtility.getClassLoader(this))); } } --- NEW FILE: ReportTcoDirect.java --- package ch.softenvironment.tcotool.tco; /* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ import java.io.IOException; import java.util.*; import org.tcotool.model.*; import org.tcotool.standard.report.ReportTco; import org.tcotool.standard.report.ReportTool; import org.tcotool.tools.Calculator; import org.tcotool.tools.CalculatorTco; import org.tcotool.tools.ModelUtility; import org.tcotool.application.*; import ch.softenvironment.client.ResourceManager; import ch.softenvironment.jomm.DbObjectServer; import ch.softenvironment.jomm.serialize.AttributeList; import ch.softenvironment.util.NlsUtils; /** * Utility to report direct/indirect TCO costs * based on CostCause#direct assignment to Personal/Fact-Cost. * * Calculations as Plugin for TCO-Tool. * Design Pattern: Visitor * * @author Peter Hirzel <i>soft</i>Environment * @version $Revision: 1.1 $ $Date: 2008/06/18 15:27:44 $ */ class ReportTcoDirect extends ReportTco { private ClassLoader loader = null; private String labelDirect = ResourceManager.getResourceAsNonLabeled(CostCauseDetailView.class, "LblDirect_text"); private String labelIndirect = ResourceManager.getResourceAsNonLabeled(CostCauseDetailView.class, "LblIndirect_text"); protected ReportTcoDirect(String title) { super(title); } /** * Summarize all other TCO-Costs within given object and sub-packages. */ public static ReportTool createBlock(TcoObject root, long maxUsage, ClassLoader loader) throws java.lang.Throwable { ReportTcoDirect tool = new ReportTcoDirect(ResourceManager.getResource(SEPlugin.class, "MniReportTcoDirectIndirect_text", loader)); tool.loader = loader; tool.calculator = new CalculatorTco(LauncherView.getInstance().getUtility(), root, maxUsage); tool.totalCost(root); return tool; } /** * Overwrites. */ public void startBody(AttributeList list) throws IOException { super.startBody(list); java.net.URL url = loader.getResource(SEPlugin.REPORT_HEADER); image(url, "", 0); } /** * Overwrites. */ protected void encodeCodes(DbObjectServer server, TcoObject root) throws Throwable { //List codes = server.retrieveCodes(CostCause.class); // Cost->CostCause (contains DIRECT/INDIRECT info) //if (codes.size() > 0) { startParagraph(); encodeCostBlock(root, null /*codes*/, null /*Calculator.COST_CAUSE_UNDEFINED*/, ModelUtility.getTypeString(CostCause.class)); endParagraph(); //} } /** * Direct or Indirect costs are defined on Cost#CostCause only. * Overwrites. */ protected void encodeCostBlock(TcoObject root, List codes, final String codeUndefined, String title) throws IOException { bold(getRsc("CIBy") + " <" + title + " *>:"); startTable(1); startTableRow(); // print header tableHeader(""); //evtl. colspan with next column tableHeader(title); for (int year=0; year<calculator.getDurationYears(); year++) { String partialYear = ""; if ((calculator.getMaxDurationMonths() - year * 12) < 12) { partialYear = NlsUtils.formatMessage("<br>" + getRsc("CIPartialYear"), (int)calculator.getMaxDurationMonths() % 12); } String header = getRsc("CITCO") + partialYear; String tmp = (year + 1) + ". " + getRsc("CIYear"); nativeContent("<th>" + header + "<br>" + tmp + "</th>"); getCsvWriter().cell(header + tmp); } tableHeader(getRsc("CITCOOverAll")); endTableRow(); List direct = encodeCostBlockColumns(root, PersonalCost.class, labelDirect, Calculator./*PERSONAL_*/DIRECT); List indirect = encodeCostBlockColumns(root, PersonalCost.class, labelIndirect, Calculator./*PERSONAL_*/INDIRECT); //TODO only show undefined PC if link is pressed List undefined = encodeCostBlockColumns(root, PersonalCost.class, null /*Undefined*/, Calculator./*PERSONAL_*/DIRECT_UNDEFINED); Calculator.accumulateLists(direct, encodeCostBlockColumns(root, FactCost.class, labelDirect, Calculator./*FACT_*/DIRECT)); Calculator.accumulateLists(indirect, encodeCostBlockColumns(root, FactCost.class, labelIndirect, Calculator./*FACT_*/INDIRECT)); //TODO only show undefined FC if link is pressed Calculator.accumulateLists(undefined, encodeCostBlockColumns(root, FactCost.class, null /*Undefined*/, Calculator./*FACT_*/DIRECT_UNDEFINED)); // print total bottom line List totalCosts = calculator.getCostBlock(root); startTableRow(); tableData("*"); tableDataBold(ResourceManager.getResource(ServiceDetailView.class, "TbcTotal_text")); double sumTcoOverUsage = 0.0; for (int i=2; i<totalCosts.size(); i++) { double amount = Calculator.getValue(totalCosts, i); tableDataAmount(amount, true); if (i>=2) { sumTcoOverUsage += amount; } } tableDataAmount(sumTcoOverUsage, true); endTableRow(); startTableRow(); // sum up direct & indirect nativeContent("<td colspan='6'>" + SPACE + "</td>"); getCsvWriter().newline(); endTableRow(); startTableRow(); tableData("*"); tableDataBold(ResourceManager.getResource(ServiceDetailView.class, "TbcTotal_text") + " " + labelDirect); for (int i=0; i < direct.size(); i++) { tableDataAmount(((Double)direct.get(i)).doubleValue(), true); } endTableRow(); startTableRow(); tableData("*"); tableDataBold(ResourceManager.getResource(ServiceDetailView.class, "TbcTotal_text") + " " + labelIndirect); for (int i=0; i < indirect.size(); i++) { tableDataAmount(((Double)indirect.get(i)).doubleValue(), true); } endTableRow(); startTableRow(); tableData("*"); tableDataBold(ResourceManager.getResource(ServiceDetailView.class, "TbcTotal_text") + " " + getCodeName(Calculator.COST_CAUSE_UNDEFINED)); for (int i=0; i < undefined.size(); i++) { tableDataAmount(((Double)undefined.get(i)).doubleValue(), true); } endTableRow(); endTable(); encodeCostUnit(""); } /** * Print Columns for TCO in HTML: * [Personal/Fact Direct/Indirect] [TCO_Y1] [TCO_Y2]... [TCO_Total] * @param root print to data of given service (null for all services) */ protected List encodeCostBlockColumns(TcoObject root, Class cost, final String rowTitle, final String code) throws IOException { String kind = cost == FactCost.class ? Calculator.KIND_FC : Calculator.KIND_PC; List figures = new ArrayList(); startTableRow(); nativeContent("<td>" + getTcoObjectImage(cost) + "</td>"); getCsvWriter().cell(cost == PersonalCost.class ? ResourceManager.getResource(PersonalCostDetailView.class, "FrmWindow_text") : ResourceManager.getResource(FactCostDetailView.class, "FrmWindow_text")); if (rowTitle == null) { tableDataCode(Calculator.COST_CAUSE_UNDEFINED); } else { tableData(rowTitle); } int year = 0; double sumTcoOverUsage = 0.0; for (; year < calculator.getMaxDurationMonths()/12; year++) { double amount = Calculator.getValue(calculator.getCodeTotal(root, code, kind), year + Calculator.INDEX_TOTAL + 1); figures.add(new Double(amount)); tableDataAmount(amount, false); sumTcoOverUsage += amount; } if (calculator.getMaxDurationMonths() % 12 > 0) { // partial year double amount = Calculator.getValue(calculator.getCodeTotal(root, code, kind), year + Calculator.INDEX_TOTAL + 1); figures.add(new Double(amount)); tableDataAmount(amount, false); sumTcoOverUsage += amount; } figures.add(new Double(sumTcoOverUsage)); tableDataAmount(sumTcoOverUsage, true); endTableRow(); return figures; } } |