Cleaning up some items identified by Sonar (usability).
1.1 Binary file .DS_Store has changed
2.1 --- a/Version 2.0/net/sourceforge/fddtools/persistence/FDDCSVImportReader.java Sat Jul 18 22:36:39 2009 +0800
2.2 +++ b/Version 2.0/net/sourceforge/fddtools/persistence/FDDCSVImportReader.java Sun Jul 19 23:04:45 2009 +0800
2.3 @@ -96,7 +96,7 @@
2.4 private static int rootLevel = 0;
2.5 private static boolean rootFound = false;
2.6
2.7 - public FDDCSVImportReader()
2.8 + private FDDCSVImportReader()
2.9 {
2.10 //Insure class cannot be instantiated except through static method
2.11 }
3.1 --- a/Version 2.0/net/sourceforge/fddtools/persistence/FDDXMLImportReader.java Sat Jul 18 22:36:39 2009 +0800
3.2 +++ b/Version 2.0/net/sourceforge/fddtools/persistence/FDDXMLImportReader.java Sun Jul 19 23:04:45 2009 +0800
3.3 @@ -87,7 +87,7 @@
3.4
3.5 public class FDDXMLImportReader
3.6 {
3.7 - public FDDXMLImportReader(String fileName)
3.8 + private FDDXMLImportReader()
3.9 {
3.10 //Insure class cannot be instantiated except through static method
3.11 }
4.1 --- a/Version 2.0/net/sourceforge/fddtools/ui/WordsInLines.java Sat Jul 18 22:36:39 2009 +0800
4.2 +++ b/Version 2.0/net/sourceforge/fddtools/ui/WordsInLines.java Sun Jul 19 23:04:45 2009 +0800
4.3 @@ -36,14 +36,14 @@
4.4
4.5 package net.sourceforge.fddtools.ui;
4.6
4.7 +import java.util.ArrayList;
4.8 import java.util.Iterator;
4.9 import java.util.LinkedList;
4.10 import java.util.StringTokenizer;
4.11 -import java.util.Vector;
4.12
4.13 class WordsInLines
4.14 {
4.15 - private Vector<LinkedList<String>> lines = new Vector<LinkedList<String>>();
4.16 + private ArrayList<LinkedList<String>> lines = new ArrayList<LinkedList<String>>();
4.17
4.18 public WordsInLines(final String text)
4.19 {
4.20 @@ -57,7 +57,8 @@
4.21 while(splitter.hasMoreTokens())
4.22 {
4.23 lines.add(new LinkedList<String>());
4.24 - lines.lastElement().addLast(splitter.nextToken());
4.25 +// lines.lastElement().addLast(splitter.nextToken());
4.26 + lines.get(lines.size() - 1).addLast(splitter.nextToken());
4.27 }
4.28 }
4.29
4.30 @@ -87,7 +88,7 @@
4.31
4.32 public Iterator getAllText()
4.33 {
4.34 - Vector<String> text = new Vector<String>(getLinesCount());
4.35 + ArrayList<String> text = new ArrayList<String>(getLinesCount());
4.36
4.37 for(int i = 0; i < lines.size(); i++)
4.38 {
4.39 @@ -98,7 +99,7 @@
4.40
4.41 public String getLine(final int lineIndex)
4.42 {
4.43 - String oneLine = new String();
4.44 + String oneLine = "";
4.45 Iterator wordsInLine = lines.get(lineIndex).iterator();
4.46
4.47 while(wordsInLine.hasNext())
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
5.2 +++ b/nbproject/build-impl.xml.orig Sun Jul 19 23:04:45 2009 +0800
5.3 @@ -0,0 +1,731 @@
5.4 +<?xml version="1.0" encoding="UTF-8"?>
5.5 +<!--
5.6 +*** GENERATED FROM project.xml - DO NOT EDIT ***
5.7 +*** EDIT ../build.xml INSTEAD ***
5.8 +
5.9 +For the purpose of easier reading the script
5.10 +is divided into following sections:
5.11 +
5.12 + - initialization
5.13 + - compilation
5.14 + - jar
5.15 + - execution
5.16 + - debugging
5.17 + - javadoc
5.18 + - junit compilation
5.19 + - junit execution
5.20 + - junit debugging
5.21 + - applet
5.22 + - cleanup
5.23 +
5.24 + -->
5.25 +<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="FDDTools2.0-impl">
5.26 + <fail message="Please build using Ant 1.7.1 or higher.">
5.27 + <condition>
5.28 + <not>
5.29 + <antversion atleast="1.7.1"/>
5.30 + </not>
5.31 + </condition>
5.32 + </fail>
5.33 + <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
5.34 + <!--
5.35 + ======================
5.36 + INITIALIZATION SECTION
5.37 + ======================
5.38 + -->
5.39 + <target name="-pre-init">
5.40 + <!-- Empty placeholder for easier customization. -->
5.41 + <!-- You can override this target in the ../build.xml file. -->
5.42 + </target>
5.43 + <target depends="-pre-init" name="-init-private">
5.44 + <property file="nbproject/private/config.properties"/>
5.45 + <property file="nbproject/private/configs/${config}.properties"/>
5.46 + <property file="nbproject/private/private.properties"/>
5.47 + </target>
5.48 + <target depends="-pre-init,-init-private" name="-init-user">
5.49 + <property file="${user.properties.file}"/>
5.50 + <!-- The two properties below are usually overridden -->
5.51 + <!-- by the active platform. Just a fallback. -->
5.52 + <property name="default.javac.source" value="1.4"/>
5.53 + <property name="default.javac.target" value="1.4"/>
5.54 + </target>
5.55 + <target depends="-pre-init,-init-private,-init-user" name="-init-project">
5.56 + <property file="nbproject/configs/${config}.properties"/>
5.57 + <property file="nbproject/project.properties"/>
5.58 + </target>
5.59 + <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
5.60 + <j2seproject1:property name="platform.home" value="platforms.${platform.active}.home"/>
5.61 + <j2seproject1:property name="platform.bootcp" value="platforms.${platform.active}.bootclasspath"/>
5.62 + <j2seproject1:property name="platform.compiler" value="platforms.${platform.active}.compile"/>
5.63 + <j2seproject1:property name="platform.javac.tmp" value="platforms.${platform.active}.javac"/>
5.64 + <condition property="platform.javac" value="${platform.home}/bin/javac">
5.65 + <equals arg1="${platform.javac.tmp}" arg2="$${platforms.${platform.active}.javac}"/>
5.66 + </condition>
5.67 + <property name="platform.javac" value="${platform.javac.tmp}"/>
5.68 + <j2seproject1:property name="platform.java.tmp" value="platforms.${platform.active}.java"/>
5.69 + <condition property="platform.java" value="${platform.home}/bin/java">
5.70 + <equals arg1="${platform.java.tmp}" arg2="$${platforms.${platform.active}.java}"/>
5.71 + </condition>
5.72 + <property name="platform.java" value="${platform.java.tmp}"/>
5.73 + <j2seproject1:property name="platform.javadoc.tmp" value="platforms.${platform.active}.javadoc"/>
5.74 + <condition property="platform.javadoc" value="${platform.home}/bin/javadoc">
5.75 + <equals arg1="${platform.javadoc.tmp}" arg2="$${platforms.${platform.active}.javadoc}"/>
5.76 + </condition>
5.77 + <property name="platform.javadoc" value="${platform.javadoc.tmp}"/>
5.78 + <condition property="platform.invalid" value="true">
5.79 + <or>
5.80 + <contains string="${platform.javac}" substring="$${platforms."/>
5.81 + <contains string="${platform.java}" substring="$${platforms."/>
5.82 + <contains string="${platform.javadoc}" substring="$${platforms."/>
5.83 + </or>
5.84 + </condition>
5.85 + <fail unless="platform.home">Must set platform.home</fail>
5.86 + <fail unless="platform.bootcp">Must set platform.bootcp</fail>
5.87 + <fail unless="platform.java">Must set platform.java</fail>
5.88 + <fail unless="platform.javac">Must set platform.javac</fail>
5.89 + <fail if="platform.invalid">
5.90 + The J2SE Platform is not correctly set up.
5.91 + Your active platform is: ${platform.active}, but the corresponding property "platforms.${platform.active}.home" is not found in the project's properties files.
5.92 + Either open the project in the IDE and setup the Platform with the same name or add it manually.
5.93 + For example like this:
5.94 + ant -Duser.properties.file=<path_to_property_file> jar (where you put the property "platforms.${platform.active}.home" in a .properties file)
5.95 + or ant -Dplatforms.${platform.active}.home=<path_to_JDK_home> jar (where no properties file is used)
5.96 + </fail>
5.97 + <available file="${manifest.file}" property="manifest.available"/>
5.98 + <condition property="manifest.available+main.class">
5.99 + <and>
5.100 + <isset property="manifest.available"/>
5.101 + <isset property="main.class"/>
5.102 + <not>
5.103 + <equals arg1="${main.class}" arg2="" trim="true"/>
5.104 + </not>
5.105 + </and>
5.106 + </condition>
5.107 + <condition property="manifest.available+main.class+mkdist.available">
5.108 + <and>
5.109 + <istrue value="${manifest.available+main.class}"/>
5.110 + <isset property="libs.CopyLibs.classpath"/>
5.111 + </and>
5.112 + </condition>
5.113 + <condition property="have.tests">
5.114 + <or/>
5.115 + </condition>
5.116 + <condition property="have.sources">
5.117 + <or>
5.118 + <available file="${src.dir}"/>
5.119 + </or>
5.120 + </condition>
5.121 + <condition property="netbeans.home+have.tests">
5.122 + <and>
5.123 + <isset property="netbeans.home"/>
5.124 + <isset property="have.tests"/>
5.125 + </and>
5.126 + </condition>
5.127 + <condition property="no.javadoc.preview">
5.128 + <and>
5.129 + <isset property="javadoc.preview"/>
5.130 + <isfalse value="${javadoc.preview}"/>
5.131 + </and>
5.132 + </condition>
5.133 + <property name="run.jvmargs" value=""/>
5.134 + <property name="javac.compilerargs" value=""/>
5.135 + <property name="work.dir" value="${basedir}"/>
5.136 + <condition property="no.deps">
5.137 + <and>
5.138 + <istrue value="${no.dependencies}"/>
5.139 + </and>
5.140 + </condition>
5.141 + <property name="javac.debug" value="true"/>
5.142 + <property name="javadoc.preview" value="true"/>
5.143 + <property name="application.args" value=""/>
5.144 + <property name="source.encoding" value="${file.encoding}"/>
5.145 + <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
5.146 + <and>
5.147 + <isset property="javadoc.encoding"/>
5.148 + <not>
5.149 + <equals arg1="${javadoc.encoding}" arg2=""/>
5.150 + </not>
5.151 + </and>
5.152 + </condition>
5.153 + <property name="javadoc.encoding.used" value="${source.encoding}"/>
5.154 + <property name="includes" value="**"/>
5.155 + <property name="excludes" value=""/>
5.156 + <property name="do.depend" value="false"/>
5.157 + <condition property="do.depend.true">
5.158 + <istrue value="${do.depend}"/>
5.159 + </condition>
5.160 + <condition else="" property="javac.compilerargs.jaxws" value="-Djava.endorsed.dirs='${jaxws.endorsed.dir}'">
5.161 + <and>
5.162 + <isset property="jaxws.endorsed.dir"/>
5.163 + <available file="nbproject/jaxws-build.xml"/>
5.164 + </and>
5.165 + </condition>
5.166 + </target>
5.167 + <target name="-post-init">
5.168 + <!-- Empty placeholder for easier customization. -->
5.169 + <!-- You can override this target in the ../build.xml file. -->
5.170 + </target>
5.171 + <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
5.172 + <fail unless="src.dir">Must set src.dir</fail>
5.173 + <fail unless="build.dir">Must set build.dir</fail>
5.174 + <fail unless="dist.dir">Must set dist.dir</fail>
5.175 + <fail unless="build.classes.dir">Must set build.classes.dir</fail>
5.176 + <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
5.177 + <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
5.178 + <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
5.179 + <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
5.180 + <fail unless="dist.jar">Must set dist.jar</fail>
5.181 + </target>
5.182 + <target name="-init-macrodef-property">
5.183 + <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1">
5.184 + <attribute name="name"/>
5.185 + <attribute name="value"/>
5.186 + <sequential>
5.187 + <property name="@{name}" value="${@{value}}"/>
5.188 + </sequential>
5.189 + </macrodef>
5.190 + </target>
5.191 + <target name="-init-macrodef-javac">
5.192 + <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
5.193 + <attribute default="${src.dir}" name="srcdir"/>
5.194 + <attribute default="${build.classes.dir}" name="destdir"/>
5.195 + <attribute default="${javac.classpath}" name="classpath"/>
5.196 + <attribute default="${includes}" name="includes"/>
5.197 + <attribute default="${excludes}" name="excludes"/>
5.198 + <attribute default="${javac.debug}" name="debug"/>
5.199 + <attribute default="${empty.dir}" name="sourcepath"/>
5.200 + <attribute default="${empty.dir}" name="gensrcdir"/>
5.201 + <element name="customize" optional="true"/>
5.202 + <sequential>
5.203 + <property location="${build.dir}/empty" name="empty.dir"/>
5.204 + <mkdir dir="${empty.dir}"/>
5.205 + <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" executable="${platform.javac}" fork="yes" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}">
5.206 + <src>
5.207 + <dirset dir="@{gensrcdir}" erroronmissingdir="false">
5.208 + <include name="*"/>
5.209 + </dirset>
5.210 + </src>
5.211 + <classpath>
5.212 + <path path="@{classpath}"/>
5.213 + </classpath>
5.214 + <compilerarg line="${javac.compilerargs} ${javac.compilerargs.jaxws}"/>
5.215 + <customize/>
5.216 + </javac>
5.217 + </sequential>
5.218 + </macrodef>
5.219 + <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
5.220 + <attribute default="${src.dir}" name="srcdir"/>
5.221 + <attribute default="${build.classes.dir}" name="destdir"/>
5.222 + <attribute default="${javac.classpath}" name="classpath"/>
5.223 + <sequential>
5.224 + <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">
5.225 + <classpath>
5.226 + <path path="@{classpath}"/>
5.227 + </classpath>
5.228 + </depend>
5.229 + </sequential>
5.230 + </macrodef>
5.231 + <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3">
5.232 + <attribute default="${build.classes.dir}" name="destdir"/>
5.233 + <sequential>
5.234 + <fail unless="javac.includes">Must set javac.includes</fail>
5.235 + <pathconvert pathsep="," property="javac.includes.binary">
5.236 + <path>
5.237 + <filelist dir="@{destdir}" files="${javac.includes}"/>
5.238 + </path>
5.239 + <globmapper from="*.java" to="*.class"/>
5.240 + </pathconvert>
5.241 + <delete>
5.242 + <files includes="${javac.includes.binary}"/>
5.243 + </delete>
5.244 + </sequential>
5.245 + </macrodef>
5.246 + </target>
5.247 + <target name="-init-macrodef-junit">
5.248 + <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
5.249 + <attribute default="${includes}" name="includes"/>
5.250 + <attribute default="${excludes}" name="excludes"/>
5.251 + <attribute default="**" name="testincludes"/>
5.252 + <sequential>
5.253 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${platform.java}" showoutput="true">
5.254 + <batchtest todir="${build.test.results.dir}"/>
5.255 + <classpath>
5.256 + <path path="${run.test.classpath}"/>
5.257 + </classpath>
5.258 + <syspropertyset>
5.259 + <propertyref prefix="test-sys-prop."/>
5.260 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
5.261 + </syspropertyset>
5.262 + <formatter type="brief" usefile="false"/>
5.263 + <formatter type="xml"/>
5.264 + <jvmarg line="${run.jvmargs}"/>
5.265 + </junit>
5.266 + </sequential>
5.267 + </macrodef>
5.268 + </target>
5.269 + <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
5.270 + <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
5.271 + <attribute default="${main.class}" name="name"/>
5.272 + <attribute default="${debug.classpath}" name="classpath"/>
5.273 + <attribute default="" name="stopclassname"/>
5.274 + <sequential>
5.275 + <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
5.276 + <classpath>
5.277 + <path path="@{classpath}"/>
5.278 + </classpath>
5.279 + <bootclasspath>
5.280 + <path path="${platform.bootcp}"/>
5.281 + </bootclasspath>
5.282 + </nbjpdastart>
5.283 + </sequential>
5.284 + </macrodef>
5.285 + <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
5.286 + <attribute default="${build.classes.dir}" name="dir"/>
5.287 + <sequential>
5.288 + <nbjpdareload>
5.289 + <fileset dir="@{dir}" includes="${fix.classes}">
5.290 + <include name="${fix.includes}*.class"/>
5.291 + </fileset>
5.292 + </nbjpdareload>
5.293 + </sequential>
5.294 + </macrodef>
5.295 + </target>
5.296 + <target name="-init-debug-args">
5.297 + <exec executable="${platform.java}" outputproperty="version-output">
5.298 + <arg value="-version"/>
5.299 + </exec>
5.300 + <condition property="have-jdk-older-than-1.4">
5.301 + <or>
5.302 + <contains string="${version-output}" substring="java version "1.0"/>
5.303 + <contains string="${version-output}" substring="java version "1.1"/>
5.304 + <contains string="${version-output}" substring="java version "1.2"/>
5.305 + <contains string="${version-output}" substring="java version "1.3"/>
5.306 + </or>
5.307 + </condition>
5.308 + <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
5.309 + <istrue value="${have-jdk-older-than-1.4}"/>
5.310 + </condition>
5.311 + <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
5.312 + <os family="windows"/>
5.313 + </condition>
5.314 + <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
5.315 + <isset property="debug.transport"/>
5.316 + </condition>
5.317 + </target>
5.318 + <target depends="-init-debug-args" name="-init-macrodef-debug">
5.319 + <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
5.320 + <attribute default="${main.class}" name="classname"/>
5.321 + <attribute default="${debug.classpath}" name="classpath"/>
5.322 + <element name="customize" optional="true"/>
5.323 + <sequential>
5.324 + <java classname="@{classname}" dir="${work.dir}" fork="true" jvm="${platform.java}">
5.325 + <jvmarg line="${debug-args-line}"/>
5.326 + <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
5.327 + <jvmarg value="-Dfile.encoding=${source.encoding}"/>
5.328 + <redirector errorencoding="${source.encoding}" inputencoding="${source.encoding}" outputencoding="${source.encoding}"/>
5.329 + <jvmarg line="${run.jvmargs}"/>
5.330 + <classpath>
5.331 + <path path="@{classpath}"/>
5.332 + </classpath>
5.333 + <syspropertyset>
5.334 + <propertyref prefix="run-sys-prop."/>
5.335 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
5.336 + </syspropertyset>
5.337 + <customize/>
5.338 + </java>
5.339 + </sequential>
5.340 + </macrodef>
5.341 + </target>
5.342 + <target name="-init-macrodef-java">
5.343 + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
5.344 + <attribute default="${main.class}" name="classname"/>
5.345 + <attribute default="${run.classpath}" name="classpath"/>
5.346 + <element name="customize" optional="true"/>
5.347 + <sequential>
5.348 + <java classname="@{classname}" dir="${work.dir}" fork="true" jvm="${platform.java}">
5.349 + <jvmarg value="-Dfile.encoding=${source.encoding}"/>
5.350 + <redirector errorencoding="${source.encoding}" inputencoding="${source.encoding}" outputencoding="${source.encoding}"/>
5.351 + <jvmarg line="${run.jvmargs}"/>
5.352 + <classpath>
5.353 + <path path="@{classpath}"/>
5.354 + </classpath>
5.355 + <syspropertyset>
5.356 + <propertyref prefix="run-sys-prop."/>
5.357 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
5.358 + </syspropertyset>
5.359 + <customize/>
5.360 + </java>
5.361 + </sequential>
5.362 + </macrodef>
5.363 + </target>
5.364 + <target name="-init-presetdef-jar">
5.365 + <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
5.366 + <jar compress="${jar.compress}" jarfile="${dist.jar}">
5.367 + <j2seproject1:fileset dir="${build.classes.dir}"/>
5.368 + </jar>
5.369 + </presetdef>
5.370 + </target>
5.371 + <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar" name="init"/>
5.372 + <!--
5.373 + ===================
5.374 + COMPILATION SECTION
5.375 + ===================
5.376 + -->
5.377 + <target depends="init" name="deps-jar" unless="no.deps"/>
5.378 + <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
5.379 + <target depends="init" name="-check-automatic-build">
5.380 + <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
5.381 + </target>
5.382 + <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
5.383 + <antcall target="clean"/>
5.384 + </target>
5.385 + <target depends="init,deps-jar" name="-pre-pre-compile">
5.386 + <mkdir dir="${build.classes.dir}"/>
5.387 + </target>
5.388 + <target name="-pre-compile">
5.389 + <!-- Empty placeholder for easier customization. -->
5.390 + <!-- You can override this target in the ../build.xml file. -->
5.391 + </target>
5.392 + <target if="do.depend.true" name="-compile-depend">
5.393 + <pathconvert property="build.generated.subdirs">
5.394 + <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false">
5.395 + <include name="*"/>
5.396 + </dirset>
5.397 + </pathconvert>
5.398 + <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/>
5.399 + </target>
5.400 + <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-compile-depend" if="have.sources" name="-do-compile">
5.401 + <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
5.402 + <copy todir="${build.classes.dir}">
5.403 + <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
5.404 + </copy>
5.405 + </target>
5.406 + <target name="-post-compile">
5.407 + <!-- Empty placeholder for easier customization. -->
5.408 + <!-- You can override this target in the ../build.xml file. -->
5.409 + </target>
5.410 + <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
5.411 + <target name="-pre-compile-single">
5.412 + <!-- Empty placeholder for easier customization. -->
5.413 + <!-- You can override this target in the ../build.xml file. -->
5.414 + </target>
5.415 + <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
5.416 + <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
5.417 + <j2seproject3:force-recompile/>
5.418 + <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}"/>
5.419 + </target>
5.420 + <target name="-post-compile-single">
5.421 + <!-- Empty placeholder for easier customization. -->
5.422 + <!-- You can override this target in the ../build.xml file. -->
5.423 + </target>
5.424 + <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
5.425 + <!--
5.426 + ====================
5.427 + JAR BUILDING SECTION
5.428 + ====================
5.429 + -->
5.430 + <target depends="init" name="-pre-pre-jar">
5.431 + <dirname file="${dist.jar}" property="dist.jar.dir"/>
5.432 + <mkdir dir="${dist.jar.dir}"/>
5.433 + </target>
5.434 + <target name="-pre-jar">
5.435 + <!-- Empty placeholder for easier customization. -->
5.436 + <!-- You can override this target in the ../build.xml file. -->
5.437 + </target>
5.438 + <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available">
5.439 + <j2seproject1:jar/>
5.440 + </target>
5.441 + <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class">
5.442 + <j2seproject1:jar manifest="${manifest.file}"/>
5.443 + </target>
5.444 + <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class" name="-do-jar-with-mainclass" unless="manifest.available+main.class+mkdist.available">
5.445 + <j2seproject1:jar manifest="${manifest.file}">
5.446 + <j2seproject1:manifest>
5.447 + <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
5.448 + </j2seproject1:manifest>
5.449 + </j2seproject1:jar>
5.450 + <echo>To run this application from the command line without Ant, try:</echo>
5.451 + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
5.452 + <property location="${dist.jar}" name="dist.jar.resolved"/>
5.453 + <pathconvert property="run.classpath.with.dist.jar">
5.454 + <path path="${run.classpath}"/>
5.455 + <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
5.456 + </pathconvert>
5.457 + <echo>${platform.java} -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
5.458 + </target>
5.459 + <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries">
5.460 + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
5.461 + <pathconvert property="run.classpath.without.build.classes.dir">
5.462 + <path path="${run.classpath}"/>
5.463 + <map from="${build.classes.dir.resolved}" to=""/>
5.464 + </pathconvert>
5.465 + <pathconvert pathsep=" " property="jar.classpath">
5.466 + <path path="${run.classpath.without.build.classes.dir}"/>
5.467 + <chainedmapper>
5.468 + <flattenmapper/>
5.469 + <globmapper from="*" to="lib/*"/>
5.470 + </chainedmapper>
5.471 + </pathconvert>
5.472 + <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
5.473 + <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
5.474 + <fileset dir="${build.classes.dir}"/>
5.475 + <manifest>
5.476 + <attribute name="Main-Class" value="${main.class}"/>
5.477 + <attribute name="Class-Path" value="${jar.classpath}"/>
5.478 + </manifest>
5.479 + </copylibs>
5.480 + <echo>To run this application from the command line without Ant, try:</echo>
5.481 + <property location="${dist.jar}" name="dist.jar.resolved"/>
5.482 + <echo>${platform.java} -jar "${dist.jar.resolved}"</echo>
5.483 + </target>
5.484 + <target depends="init,compile,-pre-pre-jar,-pre-jar" if="libs.CopyLibs.classpath" name="-do-jar-with-libraries-without-manifest" unless="manifest.available+main.class">
5.485 + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
5.486 + <pathconvert property="run.classpath.without.build.classes.dir">
5.487 + <path path="${run.classpath}"/>
5.488 + <map from="${build.classes.dir.resolved}" to=""/>
5.489 + </pathconvert>
5.490 + <pathconvert pathsep=" " property="jar.classpath">
5.491 + <path path="${run.classpath.without.build.classes.dir}"/>
5.492 + <chainedmapper>
5.493 + <flattenmapper/>
5.494 + <globmapper from="*" to="lib/*"/>
5.495 + </chainedmapper>
5.496 + </pathconvert>
5.497 + <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
5.498 + <copylibs compress="${jar.compress}" jarfile="${dist.jar}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
5.499 + <fileset dir="${build.classes.dir}"/>
5.500 + </copylibs>
5.501 + </target>
5.502 + <target name="-post-jar">
5.503 + <!-- Empty placeholder for easier customization. -->
5.504 + <!-- You can override this target in the ../build.xml file. -->
5.505 + </target>
5.506 + <target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-do-jar-with-libraries-without-manifest,-post-jar" description="Build JAR." name="jar"/>
5.507 + <!--
5.508 + =================
5.509 + EXECUTION SECTION
5.510 + =================
5.511 + -->
5.512 + <target depends="init,compile" description="Run a main class." name="run">
5.513 + <j2seproject1:java>
5.514 + <customize>
5.515 + <arg line="${application.args}"/>
5.516 + </customize>
5.517 + </j2seproject1:java>
5.518 + </target>
5.519 + <target name="-do-not-recompile">
5.520 + <property name="javac.includes.binary" value=""/>
5.521 + </target>
5.522 + <target depends="init,-do-not-recompile,compile-single" name="run-single">
5.523 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
5.524 + <j2seproject1:java classname="${run.class}"/>
5.525 + </target>
5.526 + <target depends="init,-do-not-recompile,compile-test-single" name="run-test-with-main">
5.527 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
5.528 + <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
5.529 + </target>
5.530 + <!--
5.531 + =================
5.532 + DEBUGGING SECTION
5.533 + =================
5.534 + -->
5.535 + <target depends="init" if="netbeans.home" name="-debug-start-debugger">
5.536 + <j2seproject1:nbjpdastart name="${debug.class}"/>
5.537 + </target>
5.538 + <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
5.539 + <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
5.540 + </target>
5.541 + <target depends="init,compile" name="-debug-start-debuggee">
5.542 + <j2seproject3:debug>
5.543 + <customize>
5.544 + <arg line="${application.args}"/>
5.545 + </customize>
5.546 + </j2seproject3:debug>
5.547 + </target>
5.548 + <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
5.549 + <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto">
5.550 + <j2seproject1:nbjpdastart stopclassname="${main.class}"/>
5.551 + </target>
5.552 + <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/>
5.553 + <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
5.554 + <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
5.555 + <j2seproject3:debug classname="${debug.class}"/>
5.556 + </target>
5.557 + <target depends="init,-do-not-recompile,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
5.558 + <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
5.559 + <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
5.560 + <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
5.561 + </target>
5.562 + <target depends="init,-do-not-recompile,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
5.563 + <target depends="init" name="-pre-debug-fix">
5.564 + <fail unless="fix.includes">Must set fix.includes</fail>
5.565 + <property name="javac.includes" value="${fix.includes}.java"/>
5.566 + </target>
5.567 + <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
5.568 + <j2seproject1:nbjpdareload/>
5.569 + </target>
5.570 + <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
5.571 + <!--
5.572 + ===============
5.573 + JAVADOC SECTION
5.574 + ===============
5.575 + -->
5.576 + <target depends="init" name="-javadoc-build">
5.577 + <mkdir dir="${dist.javadoc.dir}"/>
5.578 + <javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" executable="${platform.javadoc}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}">
5.579 + <classpath>
5.580 + <path path="${javac.classpath}"/>
5.581 + </classpath>
5.582 + <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
5.583 + <filename name="**/*.java"/>
5.584 + </fileset>
5.585 + <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
5.586 + <include name="**/*.java"/>
5.587 + </fileset>
5.588 + </javadoc>
5.589 + </target>
5.590 + <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
5.591 + <nbbrowse file="${dist.javadoc.dir}/index.html"/>
5.592 + </target>
5.593 + <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
5.594 + <!--
5.595 + =========================
5.596 + JUNIT COMPILATION SECTION
5.597 + =========================
5.598 + -->
5.599 + <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
5.600 + <mkdir dir="${build.test.classes.dir}"/>
5.601 + </target>
5.602 + <target name="-pre-compile-test">
5.603 + <!-- Empty placeholder for easier customization. -->
5.604 + <!-- You can override this target in the ../build.xml file. -->
5.605 + </target>
5.606 + <target if="do.depend.true" name="-compile-test-depend">
5.607 + <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir=""/>
5.608 + </target>
5.609 + <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
5.610 + <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir=""/>
5.611 + <copy todir="${build.test.classes.dir}"/>
5.612 + </target>
5.613 + <target name="-post-compile-test">
5.614 + <!-- Empty placeholder for easier customization. -->
5.615 + <!-- You can override this target in the ../build.xml file. -->
5.616 + </target>
5.617 + <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
5.618 + <target name="-pre-compile-test-single">
5.619 + <!-- Empty placeholder for easier customization. -->
5.620 + <!-- You can override this target in the ../build.xml file. -->
5.621 + </target>
5.622 + <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
5.623 + <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
5.624 + <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
5.625 + <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" sourcepath="" srcdir=""/>
5.626 + <copy todir="${build.test.classes.dir}"/>
5.627 + </target>
5.628 + <target name="-post-compile-test-single">
5.629 + <!-- Empty placeholder for easier customization. -->
5.630 + <!-- You can override this target in the ../build.xml file. -->
5.631 + </target>
5.632 + <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
5.633 + <!--
5.634 + =======================
5.635 + JUNIT EXECUTION SECTION
5.636 + =======================
5.637 + -->
5.638 + <target depends="init" if="have.tests" name="-pre-test-run">
5.639 + <mkdir dir="${build.test.results.dir}"/>
5.640 + </target>
5.641 + <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
5.642 + <j2seproject3:junit testincludes="**/*Test.java"/>
5.643 + </target>
5.644 + <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
5.645 + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
5.646 + </target>
5.647 + <target depends="init" if="have.tests" name="test-report"/>
5.648 + <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
5.649 + <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
5.650 + <target depends="init" if="have.tests" name="-pre-test-run-single">
5.651 + <mkdir dir="${build.test.results.dir}"/>
5.652 + </target>
5.653 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
5.654 + <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
5.655 + <j2seproject3:junit excludes="" includes="${test.includes}"/>
5.656 + </target>
5.657 + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
5.658 + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
5.659 + </target>
5.660 + <target depends="init,-do-not-recompile,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
5.661 + <!--
5.662 + =======================
5.663 + JUNIT DEBUGGING SECTION
5.664 + =======================
5.665 + -->
5.666 + <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
5.667 + <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
5.668 + <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
5.669 + <delete file="${test.report.file}"/>
5.670 + <mkdir dir="${build.test.results.dir}"/>
5.671 + <j2seproject3:debug classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner" classpath="${ant.home}/lib/ant.jar:${ant.home}/lib/ant-junit.jar:${debug.test.classpath}">
5.672 + <customize>
5.673 + <syspropertyset>
5.674 + <propertyref prefix="test-sys-prop."/>
5.675 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
5.676 + </syspropertyset>
5.677 + <arg value="${test.class}"/>
5.678 + <arg value="showoutput=true"/>
5.679 + <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
5.680 + <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
5.681 + </customize>
5.682 + </j2seproject3:debug>
5.683 + </target>
5.684 + <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
5.685 + <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
5.686 + </target>
5.687 + <target depends="init,-do-not-recompile,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
5.688 + <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
5.689 + <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
5.690 + </target>
5.691 + <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
5.692 + <!--
5.693 + =========================
5.694 + APPLET EXECUTION SECTION
5.695 + =========================
5.696 + -->
5.697 + <target depends="init,compile-single" name="run-applet">
5.698 + <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
5.699 + <j2seproject1:java classname="sun.applet.AppletViewer">
5.700 + <customize>
5.701 + <arg value="${applet.url}"/>
5.702 + </customize>
5.703 + </j2seproject1:java>
5.704 + </target>
5.705 + <!--
5.706 + =========================
5.707 + APPLET DEBUGGING SECTION
5.708 + =========================
5.709 + -->
5.710 + <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
5.711 + <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
5.712 + <j2seproject3:debug classname="sun.applet.AppletViewer">
5.713 + <customize>
5.714 + <arg value="${applet.url}"/>
5.715 + </customize>
5.716 + </j2seproject3:debug>
5.717 + </target>
5.718 + <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
5.719 + <!--
5.720 + ===============
5.721 + CLEANUP SECTION
5.722 + ===============
5.723 + -->
5.724 + <target depends="init" name="deps-clean" unless="no.deps"/>
5.725 + <target depends="init" name="-do-clean">
5.726 + <delete dir="${build.dir}"/>
5.727 + <delete dir="${dist.dir}"/>
5.728 + </target>
5.729 + <target name="-post-clean">
5.730 + <!-- Empty placeholder for easier customization. -->
5.731 + <!-- You can override this target in the ../build.xml file. -->
5.732 + </target>
5.733 + <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
5.734 +</project>