diff options
author | David Schweinsberg <[email protected]> | 2007-01-25 08:49:45 +0000 |
---|---|---|
committer | David Schweinsberg <[email protected]> | 2007-01-25 08:49:45 +0000 |
commit | 29ef829cc59a86c713a8e1568883a70aaed8d7ee (patch) | |
tree | 80315a558dc6acaae39b8e9da2cc1d135e42a92e | |
parent | 03b634dde428f3925b82670720dcd23402d6ec72 (diff) |
Apple HI Guideline conformance update.
-rw-r--r-- | nbproject/build-impl.xml | 156 | ||||
-rw-r--r-- | nbproject/genfiles.properties | 6 | ||||
-rw-r--r-- | nbproject/project.properties | 15 | ||||
-rw-r--r-- | nbproject/project.xml | 10 |
4 files changed, 129 insertions, 58 deletions
diff --git a/nbproject/build-impl.xml b/nbproject/build-impl.xml index da135e5..318b453 100644 --- a/nbproject/build-impl.xml +++ b/nbproject/build-impl.xml @@ -19,7 +19,7 @@ is divided into following sections: - cleanup --> -<project name="typecast-impl" default="build" basedir=".."> +<project name="typecast-impl" default="default" basedir=".." xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:j2seproject2="http://www.netbeans.org/ns/j2se-project/2" xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:jaxws="http://www.netbeans.org/ns/jax-ws/1"> <target name="default" depends="test,jar,javadoc" description="Build and test whole project."/> <!-- ====================== @@ -54,7 +54,22 @@ is divided into following sections: </not> </and> </condition> - <available property="have.tests" file="${test.src.dir}"/> + <condition property="manifest.available+main.class+mkdist.available"> + <and> + <istrue value="${manifest.available+main.class}"/> + <isset property="libs.CopyLibs.classpath"/> + </and> + </condition> + <condition property="have.tests"> + <or> + <available file="${test.src.dir}"/> + </or> + </condition> + <condition property="have.sources"> + <or> + <available file="${src.dir}"/> + </or> + </condition> <condition property="netbeans.home+have.tests"> <and> <isset property="netbeans.home"/> @@ -72,6 +87,8 @@ is divided into following sections: <istrue value="${no.dependencies}"/> </and> </condition> + <property name="javac.debug" value="true"/> + <property name="javadoc.preview" value="true"/> </target> <target name="-post-init"> <!-- Empty placeholder for easier customization. --> @@ -99,7 +116,7 @@ is divided into following sections: </macrodef> </target> <target name="-init-macrodef-javac"> - <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/1"> + <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3"> <attribute name="srcdir" default="${src.dir}"/> <attribute name="destdir" default="${build.classes.dir}"/> <attribute name="classpath" default="${javac.classpath}"/> @@ -117,7 +134,7 @@ is divided into following sections: </macrodef> </target> <target name="-init-macrodef-junit"> - <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/1"> + <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3"> <attribute name="includes" default="**/*Test.java"/> <sequential> <junit showoutput="true" fork="true" dir="${basedir}" failureproperty="tests.failed" errorproperty="tests.failed"> @@ -132,6 +149,8 @@ is divided into following sections: <mapper type="glob" from="test-sys-prop.*" to="*"/> </syspropertyset> <formatter type="brief" usefile="false"/> + <formatter type="xml"/> + <jvmarg line="${run.jvmargs}"/> </junit> </sequential> </macrodef> @@ -159,10 +178,10 @@ is divided into following sections: </macrodef> </target> <target name="-init-macrodef-debug"> - <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/1"> + <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3"> <attribute name="classname" default="${main.class}"/> <attribute name="classpath" default="${debug.classpath}"/> - <attribute name="args" default="${application.args}"/> + <element name="customize" optional="true"/> <sequential> <java fork="true" classname="@{classname}" dir="${work.dir}"> <jvmarg value="-Xdebug"/> @@ -177,7 +196,7 @@ is divided into following sections: <propertyref prefix="run-sys-prop."/> <mapper type="glob" from="run-sys-prop.*" to="*"/> </syspropertyset> - <arg line="@{args}"/> + <customize/> </java> </sequential> </macrodef> @@ -204,7 +223,7 @@ is divided into following sections: <target name="-init-presetdef-jar"> <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1"> <jar jarfile="${dist.jar}" compress="${jar.compress}"> - <fileset dir="${build.classes.dir}" xmlns="http://www.netbeans.org/ns/j2se-project/1"/> + <j2seproject1:fileset dir="${build.classes.dir}"/> </jar> </presetdef> </target> @@ -222,8 +241,8 @@ is divided into following sections: <!-- Empty placeholder for easier customization. --> <!-- You can override this target in the ../build.xml file. --> </target> - <target name="-do-compile" depends="init,deps-jar,-pre-pre-compile,-pre-compile"> - <j2seproject:javac xmlns:j2seproject="http://www.netbeans.org/ns/j2se-project/1"/> + <target name="-do-compile" depends="init,deps-jar,-pre-pre-compile,-pre-compile" if="have.sources"> + <j2seproject3:javac/> <copy todir="${build.classes.dir}"> <fileset dir="${src.dir}" excludes="${build.classes.excludes}"/> </copy> @@ -239,11 +258,11 @@ is divided into following sections: </target> <target name="-do-compile-single" depends="init,deps-jar,-pre-pre-compile"> <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail> - <j2seproject:javac xmlns:j2seproject="http://www.netbeans.org/ns/j2se-project/1"> + <j2seproject3:javac> <customize> <patternset includes="${javac.includes}"/> </customize> - </j2seproject:javac> + </j2seproject3:javac> </target> <target name="-post-compile-single"> <!-- Empty placeholder for easier customization. --> @@ -264,38 +283,71 @@ is divided into following sections: <!-- You can override this target in the ../build.xml file. --> </target> <target name="-do-jar-without-manifest" depends="init,compile,-pre-pre-jar,-pre-jar" unless="manifest.available"> - <j2seproject:jar xmlns:j2seproject="http://www.netbeans.org/ns/j2se-project/1"/> + <j2seproject1:jar/> </target> <target name="-do-jar-with-manifest" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" unless="manifest.available+main.class"> - <j2seproject:jar manifest="${manifest.file}" xmlns:j2seproject="http://www.netbeans.org/ns/j2se-project/1"/> - </target> - <target name="-do-jar-with-mainclass" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class"> - <j2seproject:jar manifest="${manifest.file}" xmlns:j2seproject="http://www.netbeans.org/ns/j2se-project/1"> - <manifest xmlns="http://www.netbeans.org/ns/j2se-project/1"> - <attribute j2seproject:name="Main-Class" value="${main.class}"/> + <j2seproject1:jar manifest="${manifest.file}"/> + </target> + <target name="-do-jar-with-mainclass" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class" unless="manifest.available+main.class+mkdist.available"> + <j2seproject1:jar manifest="${manifest.file}"> + <j2seproject1:manifest> + <j2seproject1:attribute name="Main-Class" value="${main.class}"/> + </j2seproject1:manifest> + </j2seproject1:jar> + <echo>To run this application from the command line without Ant, try:</echo> + <property name="build.classes.dir.resolved" location="${build.classes.dir}"/> + <property name="dist.jar.resolved" location="${dist.jar}"/> + <pathconvert property="run.classpath.with.dist.jar"> + <path path="${run.classpath}"/> + <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/> + </pathconvert> + <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo> + </target> + <target name="-do-jar-with-libraries" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available"> + <property name="build.classes.dir.resolved" location="${build.classes.dir}"/> + <pathconvert property="run.classpath.without.build.classes.dir"> + <path path="${run.classpath}"/> + <map from="${build.classes.dir.resolved}" to=""/> + </pathconvert> + <pathconvert property="jar.classpath" pathsep=" "> + <path path="${run.classpath.without.build.classes.dir}"/> + <chainedmapper> + <flattenmapper/> + <globmapper from="*" to="lib/*"/> + </chainedmapper> + </pathconvert> + <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" name="copylibs" classpath="${libs.CopyLibs.classpath}"/> + <copylibs manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}" jarfile="${dist.jar}" compress="${jar.compress}"> + <fileset dir="${build.classes.dir}"/> + <manifest> + <attribute name="Main-Class" value="${main.class}"/> + <attribute name="Class-Path" value="${jar.classpath}"/> </manifest> - </j2seproject:jar> + </copylibs> + <echo>To run this application from the command line without Ant, try:</echo> + <property name="dist.jar.resolved" location="${dist.jar}"/> + <echo>java -jar "${dist.jar.resolved}"</echo> </target> <target name="-post-jar"> <!-- Empty placeholder for easier customization. --> <!-- You can override this target in the ../build.xml file. --> </target> - <target name="jar" depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-post-jar" description="Build JAR."/> + <target name="jar" depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-post-jar" description="Build JAR."/> <!-- ================= EXECUTION SECTION ================= --> <target name="run" depends="init,compile" description="Run a main class."> - <j2seproject:java xmlns:j2seproject="http://www.netbeans.org/ns/j2se-project/1"> + <j2seproject1:java> <customize> <arg line="${application.args}"/> </customize> - </j2seproject:java> + </j2seproject1:java> </target> <target name="run-single" depends="init,compile-single"> <fail unless="run.class">Must select one file in the IDE or set run.class</fail> - <j2seproject:java classname="${run.class}" xmlns:j2seproject="http://www.netbeans.org/ns/j2se-project/1"/> + <j2seproject1:java classname="${run.class}"/> </target> <!-- ================= @@ -303,19 +355,23 @@ is divided into following sections: ================= --> <target name="-debug-start-debugger" if="netbeans.home" depends="init"> - <j2seproject:nbjpdastart name="${debug.class}" xmlns:j2seproject="http://www.netbeans.org/ns/j2se-project/1"/> + <j2seproject1:nbjpdastart name="${debug.class}"/> </target> <target name="-debug-start-debuggee" depends="init,compile"> - <j2seproject:debug xmlns:j2seproject="http://www.netbeans.org/ns/j2se-project/1"/> + <j2seproject3:debug> + <customize> + <arg line="${application.args}"/> + </customize> + </j2seproject3:debug> </target> <target name="debug" if="netbeans.home" depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE."/> <target name="-debug-start-debugger-stepinto" if="netbeans.home" depends="init"> - <j2seproject:nbjpdastart stopclassname="${main.class}" xmlns:j2seproject="http://www.netbeans.org/ns/j2se-project/1"/> + <j2seproject1:nbjpdastart stopclassname="${main.class}"/> </target> <target name="debug-stepinto" if="netbeans.home" depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee"/> <target name="-debug-start-debuggee-single" if="netbeans.home" depends="init,compile-single"> <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail> - <j2seproject:debug classname="${debug.class}" xmlns:j2seproject="http://www.netbeans.org/ns/j2se-project/1"/> + <j2seproject3:debug classname="${debug.class}"/> </target> <target name="debug-single" if="netbeans.home" depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single"/> <target name="-pre-debug-fix" depends="init"> @@ -323,7 +379,7 @@ is divided into following sections: <property name="javac.includes" value="${fix.includes}.java"/> </target> <target name="-do-debug-fix" if="netbeans.home" depends="init,-pre-debug-fix,compile-single"> - <j2seproject:nbjpdareload xmlns:j2seproject="http://www.netbeans.org/ns/j2se-project/1"/> + <j2seproject1:nbjpdareload/> </target> <target name="debug-fix" if="netbeans.home" depends="init,-pre-debug-fix,-do-debug-fix"/> <!-- @@ -333,14 +389,15 @@ is divided into following sections: --> <target name="-javadoc-build" depends="init"> <mkdir dir="${dist.javadoc.dir}"/> - <javadoc destdir="${dist.javadoc.dir}" source="${javac.source}" notree="${javadoc.notree}" use="${javadoc.use}" nonavbar="${javadoc.nonavbar}" noindex="${javadoc.noindex}" splitindex="${javadoc.splitindex}" author="${javadoc.author}" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}" private="${javadoc.private}" failonerror="true"> + <javadoc destdir="${dist.javadoc.dir}" source="${javac.source}" notree="${javadoc.notree}" use="${javadoc.use}" nonavbar="${javadoc.nonavbar}" noindex="${javadoc.noindex}" splitindex="${javadoc.splitindex}" author="${javadoc.author}" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}" private="${javadoc.private}" additionalparam="${javadoc.additionalparam}" failonerror="true" useexternalfile="true"> <classpath> <path path="${javac.classpath}"/> </classpath> <sourcepath> <pathelement location="${src.dir}"/> </sourcepath> - <fileset dir="${src.dir}"/> + <packageset dir="${src.dir}" includes="*/**"/> + <fileset dir="${src.dir}" includes="*.java"/> </javadoc> </target> <target name="-javadoc-browse" if="netbeans.home" unless="no.javadoc.preview" depends="init,-javadoc-build"> @@ -360,11 +417,9 @@ is divided into following sections: <!-- You can override this target in the ../build.xml file. --> </target> <target name="-do-compile-test" if="have.tests" depends="init,compile,-pre-pre-compile-test,-pre-compile-test"> - <j2seproject:javac srcdir="${test.src.dir}" destdir="${build.test.classes.dir}" debug="true" classpath="${javac.test.classpath}" xmlns:j2seproject="http://www.netbeans.org/ns/j2se-project/1"/> + <j2seproject3:javac srcdir="${test.src.dir}" destdir="${build.test.classes.dir}" debug="true" classpath="${javac.test.classpath}"/> <copy todir="${build.test.classes.dir}"> - <fileset dir="${test.src.dir}"> - <exclude name="**/*.java"/> - </fileset> + <fileset dir="${test.src.dir}" excludes="**/*.java"/> </copy> </target> <target name="-post-compile-test"> @@ -378,11 +433,14 @@ is divided into following sections: </target> <target name="-do-compile-test-single" if="have.tests" depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single"> <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail> - <j2seproject:javac srcdir="${test.src.dir}" destdir="${build.test.classes.dir}" debug="true" classpath="${javac.test.classpath}" xmlns:j2seproject="http://www.netbeans.org/ns/j2se-project/1"> + <j2seproject3:javac srcdir="${test.src.dir}" destdir="${build.test.classes.dir}" debug="true" classpath="${javac.test.classpath}"> <customize> <patternset includes="${javac.includes}"/> </customize> - </j2seproject:javac> + </j2seproject3:javac> + <copy todir="${build.test.classes.dir}"> + <fileset dir="${test.src.dir}" excludes="**/*.java"/> + </copy> </target> <target name="-post-compile-test-single"> <!-- Empty placeholder for easier customization. --> @@ -398,7 +456,7 @@ is divided into following sections: <mkdir dir="${build.test.results.dir}"/> </target> <target name="-do-test-run" if="have.tests" depends="init,compile-test,-pre-test-run"> - <j2seproject:junit xmlns:j2seproject="http://www.netbeans.org/ns/j2se-project/1"/> + <j2seproject3:junit/> </target> <target name="-post-test-run" if="have.tests" depends="init,compile-test,-pre-test-run,-do-test-run"> <fail if="tests.failed">Some tests failed; see details above.</fail> @@ -411,7 +469,7 @@ is divided into following sections: </target> <target name="-do-test-run-single" if="have.tests" depends="init,compile-test-single,-pre-test-run-single"> <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail> - <j2seproject:junit includes="${test.includes}" xmlns:j2seproject="http://www.netbeans.org/ns/j2se-project/1"/> + <j2seproject3:junit includes="${test.includes}"/> </target> <target name="-post-test-run-single" if="have.tests" depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single"> <fail if="tests.failed">Some tests failed; see details above.</fail> @@ -424,14 +482,18 @@ is divided into following sections: --> <target name="-debug-start-debuggee-test" if="have.tests" depends="init,compile-test"> <fail unless="test.class">Must select one file in the IDE or set test.class</fail> - <j2seproject:debug classname="junit.textui.TestRunner" classpath="${debug.test.classpath}" args="${test.class}" xmlns:j2seproject="http://www.netbeans.org/ns/j2se-project/1"/> + <j2seproject3:debug classname="junit.textui.TestRunner" classpath="${debug.test.classpath}"> + <customize> + <arg line="${test.class}"/> + </customize> + </j2seproject3:debug> </target> <target name="-debug-start-debugger-test" if="netbeans.home+have.tests" depends="init,compile-test"> - <j2seproject:nbjpdastart name="${test.class}" classpath="${debug.test.classpath}" xmlns:j2seproject="http://www.netbeans.org/ns/j2se-project/1"/> + <j2seproject1:nbjpdastart name="${test.class}" classpath="${debug.test.classpath}"/> </target> <target name="debug-test" depends="init,compile-test,-debug-start-debugger-test,-debug-start-debuggee-test"/> <target name="-do-debug-fix-test" if="netbeans.home" depends="init,-pre-debug-fix,compile-test-single"> - <j2seproject:nbjpdareload dir="${build.test.classes.dir}" xmlns:j2seproject="http://www.netbeans.org/ns/j2se-project/1"/> + <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/> </target> <target name="debug-fix-test" if="netbeans.home" depends="init,-pre-debug-fix,-do-debug-fix-test"/> <!-- @@ -441,11 +503,11 @@ is divided into following sections: --> <target name="run-applet" depends="init,compile-single"> <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> - <j2seproject:java classname="sun.applet.AppletViewer" xmlns:j2seproject="http://www.netbeans.org/ns/j2se-project/1"> + <j2seproject1:java classname="sun.applet.AppletViewer"> <customize> <arg value="${applet.url}"/> </customize> - </j2seproject:java> + </j2seproject1:java> </target> <!-- ========================= @@ -454,7 +516,11 @@ is divided into following sections: --> <target name="-debug-start-debuggee-applet" if="netbeans.home" depends="init,compile-single"> <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> - <j2seproject:debug classname="sun.applet.AppletViewer" args=""${applet.url}"" xmlns:j2seproject="http://www.netbeans.org/ns/j2se-project/1"/> + <j2seproject3:debug classname="sun.applet.AppletViewer"> + <customize> + <arg value="${applet.url}"/> + </customize> + </j2seproject3:debug> </target> <target name="debug-applet" if="netbeans.home" depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet"/> <!-- diff --git a/nbproject/genfiles.properties b/nbproject/genfiles.properties index 03eda76..1eb5de7 100644 --- a/nbproject/genfiles.properties +++ b/nbproject/genfiles.properties @@ -1,6 +1,6 @@ build.xml.data.CRC32=c32ad9b4 build.xml.script.CRC32=fb22312b build.xml.stylesheet.CRC32=ba5d3624 -nbproject/build-impl.xml.data.CRC32=c32ad9b4 -nbproject/build-impl.xml.script.CRC32=33409d25 -nbproject/build-impl.xml.stylesheet.CRC32=1cf0b40c +nbproject/build-impl.xml.data.CRC32=ca6f3ced +nbproject/build-impl.xml.script.CRC32=3b54f9f3 +nbproject/build-impl.xml.stylesheet.CRC32=20b9345e diff --git a/nbproject/project.properties b/nbproject/project.properties index 90c9053..9e197e2 100644 --- a/nbproject/project.properties +++ b/nbproject/project.properties @@ -17,13 +17,12 @@ dist.jar=${dist.dir}/typecast.jar dist.javadoc.dir=${dist.dir}/javadoc file.reference.jlfgr-1_0.jar=lib/jlfgr-1_0.jar jar.compress=true -javac.classpath=\ - +javac.classpath= # Space-separated list of extra javac options javac.compilerargs=-Xlint -javac.deprecation=false -javac.source=${default.javac.source} -javac.target=${default.javac.target} +javac.deprecation=true +javac.source=1.5 +javac.target=1.5 javac.test.classpath=\ ${javac.classpath}:\ ${build.classes.dir}:\ @@ -42,13 +41,13 @@ main.class=net.java.dev.typecast.app.editor.Main manifest.file=manifest.mf platform.active=default_platform run.classpath=\ - ${javac.classpath};\ - ${build.classes.dir};\ + ${javac.classpath}:\ + ${build.classes.dir}:\ ${file.reference.jlfgr-1_0.jar} # Space-separated list of JVM arguments used when running the project # (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value # or test-sys-prop.name=value to set system properties for unit tests): -run.jvmargs= +run.jvmargs=-Dapple.laf.useScreenMenuBar=true -Xdock:name=Typecast run.test.classpath=\ ${javac.test.classpath}:\ ${build.test.classes.dir} diff --git a/nbproject/project.xml b/nbproject/project.xml index ca56777..5eff858 100644 --- a/nbproject/project.xml +++ b/nbproject/project.xml @@ -2,9 +2,15 @@ <project xmlns="http://www.netbeans.org/ns/project/1"> <type>org.netbeans.modules.java.j2seproject</type> <configuration> - <data xmlns="http://www.netbeans.org/ns/j2se-project/1"> + <data xmlns="http://www.netbeans.org/ns/j2se-project/3"> <name>typecast</name> - <minimum-ant-version>1.6</minimum-ant-version> + <minimum-ant-version>1.6.5</minimum-ant-version> + <source-roots> + <root id="src.dir"/> + </source-roots> + <test-roots> + <root id="test.src.dir"/> + </test-roots> </data> </configuration> </project> |