Integrating Geertjan's changes to 1/2 of the theory chapter
authorJaroslav Tulach <jtulach@netbeans.org>
Sat, 14 Jun 2008 09:51:30 +0200
changeset 36850133dd7e4d
parent 35 ecab95a52f10
child 37 1b1a4a203bf2
Integrating Geertjan's changes to 1/2 of the theory chapter
samples/friendpackage/nbproject/build-impl.xml
samples/friendpackage/src/apipkg/AccessorImpl.java
samples/friendpackage/src/apipkg/Item.java
samples/friendpackage/src/implpkg/Accessor.java
samples/friendpackage/test/implpkg/AccessorTest.java
     1.1 --- a/samples/friendpackage/nbproject/build-impl.xml	Sat Jun 14 09:51:30 2008 +0200
     1.2 +++ b/samples/friendpackage/nbproject/build-impl.xml	Sat Jun 14 09:51:30 2008 +0200
     1.3 @@ -80,10 +80,7 @@
     1.4              </and>
     1.5          </condition>
     1.6          <condition property="no.javadoc.preview">
     1.7 -            <and>
     1.8 -                <isset property="javadoc.preview"/>
     1.9 -                <isfalse value="${javadoc.preview}"/>
    1.10 -            </and>
    1.11 +            <isfalse value="${javadoc.preview}"/>
    1.12          </condition>
    1.13          <property name="run.jvmargs" value=""/>
    1.14          <property name="javac.compilerargs" value=""/>
    1.15 @@ -97,15 +94,6 @@
    1.16          <property name="javadoc.preview" value="true"/>
    1.17          <property name="application.args" value=""/>
    1.18          <property name="source.encoding" value="${file.encoding}"/>
    1.19 -        <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
    1.20 -            <and>
    1.21 -                <isset property="javadoc.encoding"/>
    1.22 -                <not>
    1.23 -                    <equals arg1="${javadoc.encoding}" arg2=""/>
    1.24 -                </not>
    1.25 -            </and>
    1.26 -        </condition>
    1.27 -        <property name="javadoc.encoding.used" value="${source.encoding}"/>
    1.28          <property name="includes" value="**"/>
    1.29          <property name="excludes" value=""/>
    1.30      </target>
    1.31 @@ -142,15 +130,15 @@
    1.32              <attribute default="${includes}" name="includes"/>
    1.33              <attribute default="${excludes}" name="excludes"/>
    1.34              <attribute default="${javac.debug}" name="debug"/>
    1.35 -            <attribute default="" name="javac.compilerargs.jaxws"/>
    1.36 -            <attribute default="" name="sourcepath"/>
    1.37 +            <attribute default="${jaxws.endorsed.dir}" name="jaxwsendorsed"/>
    1.38              <element name="customize" optional="true"/>
    1.39              <sequential>
    1.40 -                <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}">
    1.41 +                <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="" srcdir="@{srcdir}" target="${javac.target}">
    1.42                      <classpath>
    1.43                          <path path="@{classpath}"/>
    1.44                      </classpath>
    1.45 -                    <compilerarg line="${javac.compilerargs} @{javac.compilerargs.jaxws}"/>
    1.46 +                    <compilerarg line="-Djava.endorsed.dirs='@{jaxwsendorsed}'"/>
    1.47 +                    <compilerarg line="${javac.compilerargs}"/>
    1.48                      <customize/>
    1.49                  </javac>
    1.50              </sequential>
    1.51 @@ -188,7 +176,7 @@
    1.52              <attribute default="${includes}" name="includes"/>
    1.53              <attribute default="${excludes}" name="excludes"/>
    1.54              <sequential>
    1.55 -                <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true">
    1.56 +                <junit dir="${basedir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true">
    1.57                      <batchtest todir="${build.test.results.dir}">
    1.58                          <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
    1.59                              <filename name="**/*Test.java"/>
    1.60 @@ -325,7 +313,7 @@
    1.61      <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
    1.62          <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
    1.63          <j2seproject3:force-recompile/>
    1.64 -        <j2seproject3:javac excludes="" includes="${javac.includes}" sourcepath="${src.dir}"/>
    1.65 +        <j2seproject3:javac excludes="" includes="${javac.includes}"/>
    1.66      </target>
    1.67      <target name="-post-compile-single">
    1.68          <!-- Empty placeholder for easier customization. -->
    1.69 @@ -408,10 +396,7 @@
    1.70              </customize>
    1.71          </j2seproject1:java>
    1.72      </target>
    1.73 -    <target name="-do-not-recompile">
    1.74 -        <property name="javac.includes.binary" value=""/>
    1.75 -    </target>
    1.76 -    <target depends="init,-do-not-recompile,compile-single" name="run-single">
    1.77 +    <target depends="init,compile" name="run-single">
    1.78          <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
    1.79          <j2seproject1:java classname="${run.class}"/>
    1.80      </target>
    1.81 @@ -439,7 +424,7 @@
    1.82          <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
    1.83          <j2seproject3:debug classname="${debug.class}"/>
    1.84      </target>
    1.85 -    <target depends="init,-do-not-recompile,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
    1.86 +    <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
    1.87      <target depends="init" name="-pre-debug-fix">
    1.88          <fail unless="fix.includes">Must set fix.includes</fail>
    1.89          <property name="javac.includes" value="${fix.includes}.java"/>
    1.90 @@ -455,10 +440,11 @@
    1.91              -->
    1.92      <target depends="init" name="-javadoc-build">
    1.93          <mkdir dir="${dist.javadoc.dir}"/>
    1.94 -        <javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" destdir="${dist.javadoc.dir}" encoding="${javadoc.encoding.used}" 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}">
    1.95 +        <javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" destdir="${dist.javadoc.dir}" 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}">
    1.96              <classpath>
    1.97                  <path path="${javac.classpath}"/>
    1.98              </classpath>
    1.99 +            <packageset dir="${src.dir}" excludes="${excludes}" includes="${includes}"/>
   1.100              <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
   1.101                  <filename name="**/*.java"/>
   1.102              </fileset>
   1.103 @@ -499,7 +485,7 @@
   1.104      <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
   1.105          <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
   1.106          <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
   1.107 -        <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/>
   1.108 +        <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" srcdir="${test.src.dir}"/>
   1.109          <copy todir="${build.test.classes.dir}">
   1.110              <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
   1.111          </copy>
   1.112 @@ -536,7 +522,7 @@
   1.113      <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
   1.114          <fail if="tests.failed">Some tests failed; see details above.</fail>
   1.115      </target>
   1.116 -    <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"/>
   1.117 +    <target depends="init,compile-test,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
   1.118      <!--
   1.119                  =======================
   1.120                  JUNIT DEBUGGING SECTION
   1.121 @@ -544,26 +530,20 @@
   1.122              -->
   1.123      <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
   1.124          <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
   1.125 -        <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
   1.126 -        <delete file="${test.report.file}"/>
   1.127 -        <mkdir dir="${build.test.results.dir}"/>
   1.128 -        <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}">
   1.129 +        <j2seproject3:debug classname="junit.textui.TestRunner" classpath="${debug.test.classpath}">
   1.130              <customize>
   1.131                  <syspropertyset>
   1.132                      <propertyref prefix="test-sys-prop."/>
   1.133                      <mapper from="test-sys-prop.*" to="*" type="glob"/>
   1.134                  </syspropertyset>
   1.135 -                <arg value="${test.class}"/>
   1.136 -                <arg value="showoutput=true"/>
   1.137 -                <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
   1.138 -                <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
   1.139 +                <arg line="${test.class}"/>
   1.140              </customize>
   1.141          </j2seproject3:debug>
   1.142      </target>
   1.143      <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
   1.144          <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
   1.145      </target>
   1.146 -    <target depends="init,-do-not-recompile,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
   1.147 +    <target depends="init,compile-test,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
   1.148      <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
   1.149          <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
   1.150      </target>
     2.1 --- a/samples/friendpackage/src/apipkg/AccessorImpl.java	Sat Jun 14 09:51:30 2008 +0200
     2.2 +++ b/samples/friendpackage/src/apipkg/AccessorImpl.java	Sat Jun 14 09:51:30 2008 +0200
     2.3 @@ -7,14 +7,13 @@
     2.4   * http://www.sun.com/
     2.5   * 
     2.6   * The Original Code is NetBeans. The Initial Developer of the Original
     2.7 - * Code is Sun Microsystems, Inc. Portions Copyright 1999-2006 Sun
     2.8 - * Microsystems, Inc. All Rights Reserved.
     2.9 + * Code is Jaroslav Tulach. Portions Copyright 2007 Jaroslav Tulach. 
    2.10 + * All Rights Reserved.
    2.11   */
    2.12  
    2.13  package apipkg;
    2.14  
    2.15  import implpkg.Accessor;
    2.16 -import javax.swing.event.ChangeEvent;
    2.17  import javax.swing.event.ChangeListener;
    2.18  
    2.19  /** The bridge between api and impl package.
     3.1 --- a/samples/friendpackage/src/apipkg/Item.java	Sat Jun 14 09:51:30 2008 +0200
     3.2 +++ b/samples/friendpackage/src/apipkg/Item.java	Sat Jun 14 09:51:30 2008 +0200
     3.3 @@ -7,8 +7,8 @@
     3.4   * http://www.sun.com/
     3.5   * 
     3.6   * The Original Code is NetBeans. The Initial Developer of the Original
     3.7 - * Code is Sun Microsystems, Inc. Portions Copyright 1999-2006 Sun
     3.8 - * Microsystems, Inc. All Rights Reserved.
     3.9 + * Code is Jaroslav Tulach. Portions Copyright 2007 Jaroslav Tulach. 
    3.10 + * All Rights Reserved.
    3.11   */
    3.12  
    3.13  package apipkg;
     4.1 --- a/samples/friendpackage/src/implpkg/Accessor.java	Sat Jun 14 09:51:30 2008 +0200
     4.2 +++ b/samples/friendpackage/src/implpkg/Accessor.java	Sat Jun 14 09:51:30 2008 +0200
     4.3 @@ -7,8 +7,8 @@
     4.4   * http://www.sun.com/
     4.5   * 
     4.6   * The Original Code is NetBeans. The Initial Developer of the Original
     4.7 - * Code is Sun Microsystems, Inc. Portions Copyright 1999-2006 Sun
     4.8 - * Microsystems, Inc. All Rights Reserved.
     4.9 + * Code is Jaroslav Tulach. Portions Copyright 2007 Jaroslav Tulach. 
    4.10 + * All Rights Reserved.
    4.11   */
    4.12  
    4.13  package implpkg;
     5.1 --- a/samples/friendpackage/test/implpkg/AccessorTest.java	Sat Jun 14 09:51:30 2008 +0200
     5.2 +++ b/samples/friendpackage/test/implpkg/AccessorTest.java	Sat Jun 14 09:51:30 2008 +0200
     5.3 @@ -7,8 +7,8 @@
     5.4   * http://www.sun.com/
     5.5   * 
     5.6   * The Original Code is NetBeans. The Initial Developer of the Original
     5.7 - * Code is Sun Microsystems, Inc. Portions Copyright 1999-2006 Sun
     5.8 - * Microsystems, Inc. All Rights Reserved.
     5.9 + * Code is Jaroslav Tulach. Portions Copyright 2007 Jaroslav Tulach. 
    5.10 + * All Rights Reserved.
    5.11   */
    5.12  
    5.13  package implpkg;