diff --git a/bigapps/EnsembleTest/.gitignore b/bigapps/EnsembleTest/.gitignore new file mode 100644 index 00000000..567609b1 --- /dev/null +++ b/bigapps/EnsembleTest/.gitignore @@ -0,0 +1 @@ +build/ diff --git a/bigapps/EnsembleTest/README b/bigapps/EnsembleTest/README index b97f0edd..37996259 100644 --- a/bigapps/EnsembleTest/README +++ b/bigapps/EnsembleTest/README @@ -1,3 +1,3 @@ -To build: - - copy Ensemble.jar into lib - - call "ant test" +Some refactoring is needed in the EnsembleTestUtil +Some stabilization work needed: see TODOs +More test dev needed diff --git a/bigapps/EnsembleTest/build.xml b/bigapps/EnsembleTest/build.xml index 7a3a18bb..ea092432 100644 --- a/bigapps/EnsembleTest/build.xml +++ b/bigapps/EnsembleTest/build.xml @@ -1,76 +1,16 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- You may freely edit this file. See commented blocks below for --> -<!-- some examples of how to customize the build. --> -<!-- (If you delete it and reopen the project it will be recreated.) --> -<!-- By default, only the Clean and Build commands use this build script. --> -<!-- Commands such as Run, Debug, and Test only use this build script if --> -<!-- the Compile on Save feature is turned off for the project. --> -<!-- You can turn off the Compile on Save (or Deploy on Save) setting --> -<!-- in the project's Project Properties dialog box.--> -<project name="EnsembleTest2" default="default" basedir="."> - <description>Builds, tests, and runs the project EnsembleTest2.</description> - <import file="nbproject/build-impl.xml"/> - <property file="../../tools/Jemmy/JemmyFX/build.properties"/> - <echo message="javafx.home = ${javafx.home}"/> - <!-- - - There exist several targets which are by default empty and which can be - used for execution of your tasks. These targets are usually executed - before and after some main targets. They are: - - -pre-init: called before initialization of project properties - -post-init: called after initialization of project properties - -pre-compile: called before javac compilation - -post-compile: called after javac compilation - -pre-compile-single: called before javac compilation of single file - -post-compile-single: called after javac compilation of single file - -pre-compile-test: called before javac compilation of JUnit tests - -post-compile-test: called after javac compilation of JUnit tests - -pre-compile-test-single: called before javac compilation of single JUnit test - -post-compile-test-single: called after javac compilation of single JUunit test - -pre-jar: called before JAR building - -post-jar: called after JAR building - -post-clean: called after cleaning build products - - (Targets beginning with '-' are not intended to be called on their own.) - - Example of inserting an obfuscator after compilation could look like this: - - <target name="-post-compile"> - <obfuscate> - <fileset dir="${build.classes.dir}"/> - </obfuscate> - </target> - - For list of available properties check the imported - nbproject/build-impl.xml file. - - - Another way to customize the build is by overriding existing main targets. - The targets of interest are: - - -init-macrodef-javac: defines macro for javac compilation - -init-macrodef-junit: defines macro for junit execution - -init-macrodef-debug: defines macro for class debugging - -init-macrodef-java: defines macro for class execution - -do-jar-with-manifest: JAR building (if you are using a manifest) - -do-jar-without-manifest: JAR building (if you are not using a manifest) - run: execution of project - -javadoc-build: Javadoc generation - test-report: JUnit report generation - - An example of overriding the target for project execution could look like this: - - <target name="run" depends="EnsembleTest2-impl.jar"> - <exec dir="bin" executable="launcher.exe"> - <arg file="${dist.jar}"/> - </exec> - </target> - - Notice that the overridden target depends on the jar target and not only on - the compile target as the regular run target does. Again, for a list of available - properties which you can use, check the target you are overriding in the - nbproject/build-impl.xml file. - - --> -</project> +<?xml version="1.0" encoding="UTF-8"?> +<project name="ensemble.tests" default="compile"> + <basename file="${basedir}" property="."/> + <property name="rootdir" location="${basedir}/../.."/> + <property name="project.name" value="EnsembleTest"/> + <import file="${basedir}/../../tools/make/build-template.xml"/> + <property name="dependencies.classpath" value="${jemmyfx-src}/build/classes${path.separator}${glass-robot-src}/build/classes${path.separator}${glass-image-src}/build/classes${path.separator}${jemmyfx-browser-src}/build/classes${path.separator}${jtreg.home}/lib/junit.jar${path.separator}${javafx.home}/lib/javafx-swt.jar${path.separator}${javafx.home}/lib/javafx.swing.jar${path.separator}${ensemble.jar}"/> + <target name="build-dependencies"> + <fail message="Please specify ensemble.jar" unless="ensemble.jar"/> + <antcall target="build-other-project"> + <param name="project" value="${jemmyfx-browser-src}"/> + </antcall> + </target> + <target name="compile" depends="compile-src"/> + <target name="build-test-dependencies"/> +</project> diff --git a/bigapps/EnsembleTest/manifest.mf b/bigapps/EnsembleTest/manifest.mf deleted file mode 100644 index 1574df4a..00000000 --- a/bigapps/EnsembleTest/manifest.mf +++ /dev/null @@ -1,3 +0,0 @@ -Manifest-Version: 1.0 -X-COMMENT: Main-Class will be added automatically by build - diff --git a/bigapps/EnsembleTest/nbproject/build-impl.xml b/bigapps/EnsembleTest/nbproject/build-impl.xml deleted file mode 100644 index 1320298c..00000000 --- a/bigapps/EnsembleTest/nbproject/build-impl.xml +++ /dev/null @@ -1,1081 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -*** GENERATED FROM project.xml - DO NOT EDIT *** -*** EDIT ../build.xml INSTEAD *** - -For the purpose of easier reading the script -is divided into following sections: - - - initialization - - compilation - - jar - - execution - - debugging - - javadoc - - junit compilation - - junit execution - - junit debugging - - applet - - cleanup - - --> -<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="EnsembleTest-impl"> - <fail message="Please build using Ant 1.8.0 or higher."> - <condition> - <not> - <antversion atleast="1.8.0"/> - </not> - </condition> - </fail> - <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/> - <!-- - ====================== - INITIALIZATION SECTION - ====================== - --> - <target name="-pre-init"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="-pre-init" name="-init-private"> - <property file="nbproject/private/config.properties"/> - <property file="nbproject/private/configs/${config}.properties"/> - <property file="nbproject/private/private.properties"/> - </target> - <target depends="-pre-init,-init-private" name="-init-user"> - <property file="${user.properties.file}"/> - <!-- The two properties below are usually overridden --> - <!-- by the active platform. Just a fallback. --> - <property name="default.javac.source" value="1.4"/> - <property name="default.javac.target" value="1.4"/> - </target> - <target depends="-pre-init,-init-private,-init-user" name="-init-project"> - <property file="nbproject/configs/${config}.properties"/> - <property file="nbproject/project.properties"/> - </target> - <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init"> - <available file="${manifest.file}" property="manifest.available"/> - <condition property="splashscreen.available"> - <and> - <not> - <equals arg1="${application.splash}" arg2="" trim="true"/> - </not> - <available file="${application.splash}"/> - </and> - </condition> - <condition property="main.class.available"> - <and> - <isset property="main.class"/> - <not> - <equals arg1="${main.class}" arg2="" trim="true"/> - </not> - </and> - </condition> - <condition property="manifest.available+main.class"> - <and> - <isset property="manifest.available"/> - <isset property="main.class.available"/> - </and> - </condition> - <condition property="do.archive"> - <not> - <istrue value="${jar.archive.disabled}"/> - </not> - </condition> - <condition property="do.mkdist"> - <and> - <isset property="do.archive"/> - <isset property="libs.CopyLibs.classpath"/> - <not> - <istrue value="${mkdist.disabled}"/> - </not> - </and> - </condition> - <condition property="manifest.available+main.class+mkdist.available"> - <and> - <istrue value="${manifest.available+main.class}"/> - <isset property="do.mkdist"/> - </and> - </condition> - <condition property="do.archive+manifest.available"> - <and> - <isset property="manifest.available"/> - <istrue value="${do.archive}"/> - </and> - </condition> - <condition property="do.archive+main.class.available"> - <and> - <isset property="main.class.available"/> - <istrue value="${do.archive}"/> - </and> - </condition> - <condition property="do.archive+splashscreen.available"> - <and> - <isset property="splashscreen.available"/> - <istrue value="${do.archive}"/> - </and> - </condition> - <condition property="do.archive+manifest.available+main.class"> - <and> - <istrue value="${manifest.available+main.class}"/> - <istrue value="${do.archive}"/> - </and> - </condition> - <condition property="manifest.available-mkdist.available"> - <or> - <istrue value="${manifest.available}"/> - <isset property="do.mkdist"/> - </or> - </condition> - <condition property="manifest.available+main.class-mkdist.available"> - <or> - <istrue value="${manifest.available+main.class}"/> - <isset property="do.mkdist"/> - </or> - </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"/> - <isset property="have.tests"/> - </and> - </condition> - <condition property="no.javadoc.preview"> - <and> - <isset property="javadoc.preview"/> - <isfalse value="${javadoc.preview}"/> - </and> - </condition> - <property name="run.jvmargs" value=""/> - <property name="javac.compilerargs" value=""/> - <property name="work.dir" value="${basedir}"/> - <condition property="no.deps"> - <and> - <istrue value="${no.dependencies}"/> - </and> - </condition> - <property name="javac.debug" value="true"/> - <property name="javadoc.preview" value="true"/> - <property name="application.args" value=""/> - <property name="source.encoding" value="${file.encoding}"/> - <property name="runtime.encoding" value="${source.encoding}"/> - <condition property="javadoc.encoding.used" value="${javadoc.encoding}"> - <and> - <isset property="javadoc.encoding"/> - <not> - <equals arg1="${javadoc.encoding}" arg2=""/> - </not> - </and> - </condition> - <property name="javadoc.encoding.used" value="${source.encoding}"/> - <property name="includes" value="**"/> - <property name="excludes" value=""/> - <property name="do.depend" value="false"/> - <condition property="do.depend.true"> - <istrue value="${do.depend}"/> - </condition> - <path id="endorsed.classpath.path" path="${endorsed.classpath}"/> - <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'"> - <length length="0" string="${endorsed.classpath}" when="greater"/> - </condition> - <condition else="false" property="jdkBug6558476"> - <and> - <matches pattern="1\.[56]" string="${java.specification.version}"/> - <not> - <os family="unix"/> - </not> - </and> - </condition> - <property name="javac.fork" value="${jdkBug6558476}"/> - <property name="jar.index" value="false"/> - <property name="jar.index.metainf" value="${jar.index}"/> - <property name="copylibs.rebase" value="true"/> - <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/> - </target> - <target name="-post-init"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check"> - <fail unless="src.dir">Must set src.dir</fail> - <fail unless="test.src.dir">Must set test.src.dir</fail> - <fail unless="build.dir">Must set build.dir</fail> - <fail unless="dist.dir">Must set dist.dir</fail> - <fail unless="build.classes.dir">Must set build.classes.dir</fail> - <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail> - <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail> - <fail unless="build.test.results.dir">Must set build.test.results.dir</fail> - <fail unless="build.classes.excludes">Must set build.classes.excludes</fail> - <fail unless="dist.jar">Must set dist.jar</fail> - </target> - <target name="-init-macrodef-property"> - <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1"> - <attribute name="name"/> - <attribute name="value"/> - <sequential> - <property name="@{name}" value="${@{value}}"/> - </sequential> - </macrodef> - </target> - <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors"> - <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${src.dir}" name="srcdir"/> - <attribute default="${build.classes.dir}" name="destdir"/> - <attribute default="${javac.classpath}" name="classpath"/> - <attribute default="${javac.processorpath}" name="processorpath"/> - <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="${javac.debug}" name="debug"/> - <attribute default="${empty.dir}" name="sourcepath"/> - <attribute default="${empty.dir}" name="gensrcdir"/> - <element name="customize" optional="true"/> - <sequential> - <property location="${build.dir}/empty" name="empty.dir"/> - <mkdir dir="${empty.dir}"/> - <mkdir dir="@{apgeneratedsrcdir}"/> - <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}"> - <src> - <dirset dir="@{gensrcdir}" erroronmissingdir="false"> - <include name="*"/> - </dirset> - </src> - <classpath> - <path path="@{classpath}"/> - </classpath> - <compilerarg line="${endorsed.classpath.cmd.line.arg}"/> - <compilerarg line="${javac.compilerargs}"/> - <compilerarg value="-processorpath"/> - <compilerarg path="@{processorpath}:${empty.dir}"/> - <compilerarg line="${ap.processors.internal}"/> - <compilerarg line="${annotation.processing.processor.options}"/> - <compilerarg value="-s"/> - <compilerarg path="@{apgeneratedsrcdir}"/> - <compilerarg line="${ap.proc.none.internal}"/> - <customize/> - </javac> - </sequential> - </macrodef> - </target> - <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal"> - <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${src.dir}" name="srcdir"/> - <attribute default="${build.classes.dir}" name="destdir"/> - <attribute default="${javac.classpath}" name="classpath"/> - <attribute default="${javac.processorpath}" name="processorpath"/> - <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="${javac.debug}" name="debug"/> - <attribute default="${empty.dir}" name="sourcepath"/> - <attribute default="${empty.dir}" name="gensrcdir"/> - <element name="customize" optional="true"/> - <sequential> - <property location="${build.dir}/empty" name="empty.dir"/> - <mkdir dir="${empty.dir}"/> - <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}"> - <src> - <dirset dir="@{gensrcdir}" erroronmissingdir="false"> - <include name="*"/> - </dirset> - </src> - <classpath> - <path path="@{classpath}"/> - </classpath> - <compilerarg line="${endorsed.classpath.cmd.line.arg}"/> - <compilerarg line="${javac.compilerargs}"/> - <customize/> - </javac> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac"> - <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${src.dir}" name="srcdir"/> - <attribute default="${build.classes.dir}" name="destdir"/> - <attribute default="${javac.classpath}" name="classpath"/> - <sequential> - <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}"> - <classpath> - <path path="@{classpath}"/> - </classpath> - </depend> - </sequential> - </macrodef> - <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${build.classes.dir}" name="destdir"/> - <sequential> - <fail unless="javac.includes">Must set javac.includes</fail> - <pathconvert pathsep="${line.separator}" property="javac.includes.binary"> - <path> - <filelist dir="@{destdir}" files="${javac.includes}"/> - </path> - <globmapper from="*.java" to="*.class"/> - </pathconvert> - <tempfile deleteonexit="true" property="javac.includesfile.binary"/> - <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/> - <delete> - <files includesfile="${javac.includesfile.binary}"/> - </delete> - <delete> - <fileset file="${javac.includesfile.binary}"/> - </delete> - </sequential> - </macrodef> - </target> - <target name="-init-macrodef-junit"> - <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <sequential> - <property name="junit.forkmode" value="perTest"/> - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> - <batchtest todir="${build.test.results.dir}"> - <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}"> - <filename name="@{testincludes}"/> - </fileset> - </batchtest> - <classpath> - <path path="${run.test.classpath}"/> - </classpath> - <syspropertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <formatter type="brief" usefile="false"/> - <formatter type="xml"/> - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> - <jvmarg value="-ea"/> - <jvmarg line="${run.jvmargs}"/> - </junit> - </sequential> - </macrodef> - </target> - <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" name="profile-init"/> - <target name="-profile-pre-init"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target name="-profile-post-init"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target name="-profile-init-macrodef-profile"> - <macrodef name="resolve"> - <attribute name="name"/> - <attribute name="value"/> - <sequential> - <property name="@{name}" value="${env.@{value}}"/> - </sequential> - </macrodef> - <macrodef name="profile"> - <attribute default="${main.class}" name="classname"/> - <element name="customize" optional="true"/> - <sequential> - <property environment="env"/> - <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/> - <java classname="@{classname}" dir="${profiler.info.dir}" fork="true" jvm="${profiler.info.jvm}"> - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> - <jvmarg value="${profiler.info.jvmargs.agent}"/> - <jvmarg line="${profiler.info.jvmargs}"/> - <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/> - <arg line="${application.args}"/> - <classpath> - <path path="${run.classpath}"/> - </classpath> - <syspropertyset> - <propertyref prefix="run-sys-prop."/> - <mapper from="run-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <customize/> - </java> - </sequential> - </macrodef> - </target> - <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" name="-profile-init-check"> - <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail> - <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail> - </target> - <target depends="-init-debug-args" name="-init-macrodef-nbjpda"> - <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1"> - <attribute default="${main.class}" name="name"/> - <attribute default="${debug.classpath}" name="classpath"/> - <attribute default="" name="stopclassname"/> - <sequential> - <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}"> - <classpath> - <path path="@{classpath}"/> - </classpath> - </nbjpdastart> - </sequential> - </macrodef> - <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1"> - <attribute default="${build.classes.dir}" name="dir"/> - <sequential> - <nbjpdareload> - <fileset dir="@{dir}" includes="${fix.classes}"> - <include name="${fix.includes}*.class"/> - </fileset> - </nbjpdareload> - </sequential> - </macrodef> - </target> - <target name="-init-debug-args"> - <property name="version-output" value="java version "${ant.java.version}"/> - <condition property="have-jdk-older-than-1.4"> - <or> - <contains string="${version-output}" substring="java version "1.0"/> - <contains string="${version-output}" substring="java version "1.1"/> - <contains string="${version-output}" substring="java version "1.2"/> - <contains string="${version-output}" substring="java version "1.3"/> - </or> - </condition> - <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none"> - <istrue value="${have-jdk-older-than-1.4}"/> - </condition> - <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem"> - <os family="windows"/> - </condition> - <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}"> - <isset property="debug.transport"/> - </condition> - </target> - <target depends="-init-debug-args" name="-init-macrodef-debug"> - <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${main.class}" name="classname"/> - <attribute default="${debug.classpath}" name="classpath"/> - <element name="customize" optional="true"/> - <sequential> - <java classname="@{classname}" dir="${work.dir}" fork="true"> - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> - <jvmarg line="${debug-args-line}"/> - <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> - <jvmarg value="-Dfile.encoding=${runtime.encoding}"/> - <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/> - <jvmarg line="${run.jvmargs}"/> - <classpath> - <path path="@{classpath}"/> - </classpath> - <syspropertyset> - <propertyref prefix="run-sys-prop."/> - <mapper from="run-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <customize/> - </java> - </sequential> - </macrodef> - </target> - <target name="-init-macrodef-java"> - <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1"> - <attribute default="${main.class}" name="classname"/> - <attribute default="${run.classpath}" name="classpath"/> - <element name="customize" optional="true"/> - <sequential> - <java classname="@{classname}" dir="${work.dir}" fork="true"> - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> - <jvmarg value="-Dfile.encoding=${runtime.encoding}"/> - <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/> - <jvmarg line="${run.jvmargs}"/> - <classpath> - <path path="@{classpath}"/> - </classpath> - <syspropertyset> - <propertyref prefix="run-sys-prop."/> - <mapper from="run-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <customize/> - </java> - </sequential> - </macrodef> - </target> - <target name="-init-macrodef-copylibs"> - <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${manifest.file}" name="manifest"/> - <element name="customize" optional="true"/> - <sequential> - <property location="${build.classes.dir}" name="build.classes.dir.resolved"/> - <pathconvert property="run.classpath.without.build.classes.dir"> - <path path="${run.classpath}"/> - <map from="${build.classes.dir.resolved}" to=""/> - </pathconvert> - <pathconvert pathsep=" " property="jar.classpath"> - <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" classpath="${libs.CopyLibs.classpath}" name="copylibs"/> - <copylibs compress="${jar.compress}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" rebase="${copylibs.rebase}" runtimeclasspath="${run.classpath.without.build.classes.dir}"> - <fileset dir="${build.classes.dir}"/> - <manifest> - <attribute name="Class-Path" value="${jar.classpath}"/> - <customize/> - </manifest> - </copylibs> - </sequential> - </macrodef> - </target> - <target name="-init-presetdef-jar"> - <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1"> - <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}"> - <j2seproject1:fileset dir="${build.classes.dir}"/> - </jar> - </presetdef> - </target> - <target name="-init-ap-cmdline-properties"> - <property name="annotation.processing.enabled" value="true"/> - <property name="annotation.processing.processors.list" value=""/> - <property name="annotation.processing.processor.options" value=""/> - <property name="annotation.processing.run.all.processors" value="true"/> - <property name="javac.processorpath" value="${javac.classpath}"/> - <property name="javac.test.processorpath" value="${javac.test.classpath}"/> - <condition property="ap.supported.internal" value="true"> - <not> - <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/> - </not> - </condition> - </target> - <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported"> - <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}"> - <isfalse value="${annotation.processing.run.all.processors}"/> - </condition> - <condition else="" property="ap.proc.none.internal" value="-proc:none"> - <isfalse value="${annotation.processing.enabled}"/> - </condition> - </target> - <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline"> - <property name="ap.cmd.line.internal" value=""/> - </target> - <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,-init-ap-cmdline" name="init"/> - <!-- - =================== - COMPILATION SECTION - =================== - --> - <target name="-deps-jar-init" unless="built-jar.properties"> - <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/> - <delete file="${built-jar.properties}" quiet="true"/> - </target> - <target if="already.built.jar.${basedir}" name="-warn-already-built-jar"> - <echo level="warn" message="Cycle detected: EnsembleTest was already built"/> - </target> - <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps"> - <mkdir dir="${build.dir}"/> - <touch file="${built-jar.properties}" verbose="false"/> - <property file="${built-jar.properties}" prefix="already.built.jar."/> - <antcall target="-warn-already-built-jar"/> - <propertyfile file="${built-jar.properties}"> - <entry key="${basedir}" value=""/> - </propertyfile> - <antcall target="-maybe-call-dep"> - <param name="call.built.properties" value="${built-jar.properties}"/> - <param location="${project.GlassImage}" name="call.subproject"/> - <param location="${project.GlassImage}/build.xml" name="call.script"/> - <param name="call.target" value="jar"/> - <param name="transfer.built-jar.properties" value="${built-jar.properties}"/> - </antcall> - <antcall target="-maybe-call-dep"> - <param name="call.built.properties" value="${built-jar.properties}"/> - <param location="${project.GlassRobot}" name="call.subproject"/> - <param location="${project.GlassRobot}/build.xml" name="call.script"/> - <param name="call.target" value="jar"/> - <param name="transfer.built-jar.properties" value="${built-jar.properties}"/> - </antcall> - </target> - <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/> - <target depends="init" name="-check-automatic-build"> - <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/> - </target> - <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build"> - <antcall target="clean"/> - </target> - <target depends="init,deps-jar" name="-pre-pre-compile"> - <mkdir dir="${build.classes.dir}"/> - </target> - <target name="-pre-compile"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target if="do.depend.true" name="-compile-depend"> - <pathconvert property="build.generated.subdirs"> - <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false"> - <include name="*"/> - </dirset> - </pathconvert> - <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/> - </target> - <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile"> - <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/> - <copy todir="${build.classes.dir}"> - <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> - </copy> - </target> - <target if="has.persistence.xml" name="-copy-persistence-xml"> - <mkdir dir="${build.classes.dir}/META-INF"/> - <copy todir="${build.classes.dir}/META-INF"> - <fileset dir="${meta.inf.dir}" includes="persistence.xml"/> - </copy> - </target> - <target name="-post-compile"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/> - <target name="-pre-compile-single"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single"> - <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail> - <j2seproject3:force-recompile/> - <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}"/> - </target> - <target name="-post-compile-single"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/> - <!-- - ==================== - JAR BUILDING SECTION - ==================== - --> - <target depends="init" name="-pre-pre-jar"> - <dirname file="${dist.jar}" property="dist.jar.dir"/> - <mkdir dir="${dist.jar.dir}"/> - </target> - <target name="-pre-jar"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive" name="-do-jar-without-manifest" unless="manifest.available-mkdist.available"> - <j2seproject1:jar/> - </target> - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class-mkdist.available"> - <j2seproject1:jar manifest="${manifest.file}"/> - </target> - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available+main.class" name="-do-jar-with-mainclass" 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 level="info">To run this application from the command line without Ant, try:</echo> - <property location="${build.classes.dir}" name="build.classes.dir.resolved"/> - <property location="${dist.jar}" name="dist.jar.resolved"/> - <pathconvert property="run.classpath.with.dist.jar"> - <path path="${run.classpath}"/> - <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/> - </pathconvert> - <echo level="info">java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo> - </target> - <target depends="init" if="do.archive" name="-do-jar-with-libraries-create-manifest" unless="manifest.available"> - <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/> - <touch file="${tmp.manifest.file}" verbose="false"/> - </target> - <target depends="init" if="do.archive+manifest.available" name="-do-jar-with-libraries-copy-manifest"> - <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/> - <copy file="${manifest.file}" tofile="${tmp.manifest.file}"/> - </target> - <target depends="init,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest" if="do.archive+main.class.available" name="-do-jar-with-libraries-set-main"> - <manifest file="${tmp.manifest.file}" mode="update"> - <attribute name="Main-Class" value="${main.class}"/> - </manifest> - </target> - <target depends="init,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-with-libraries-set-splashscreen"> - <basename file="${application.splash}" property="splashscreen.basename"/> - <mkdir dir="${build.classes.dir}/META-INF"/> - <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/> - <manifest file="${tmp.manifest.file}" mode="update"> - <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/> - </manifest> - </target> - <target depends="init,-init-macrodef-copylibs,compile,-pre-pre-jar,-pre-jar,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest,-do-jar-with-libraries-set-main,-do-jar-with-libraries-set-splashscreen" if="do.mkdist" name="-do-jar-with-libraries-pack"> - <j2seproject3:copylibs manifest="${tmp.manifest.file}"/> - <echo level="info">To run this application from the command line without Ant, try:</echo> - <property location="${dist.jar}" name="dist.jar.resolved"/> - <echo level="info">java -jar "${dist.jar.resolved}"</echo> - </target> - <target depends="-do-jar-with-libraries-pack" if="do.archive" name="-do-jar-with-libraries-delete-manifest"> - <delete> - <fileset file="${tmp.manifest.file}"/> - </delete> - </target> - <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest,-do-jar-with-libraries-set-main,-do-jar-with-libraries-set-splashscreen,-do-jar-with-libraries-pack,-do-jar-with-libraries-delete-manifest" name="-do-jar-with-libraries"/> - <target name="-post-jar"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target 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." name="jar"/> - <!-- - ================= - EXECUTION SECTION - ================= - --> - <target depends="init,compile" description="Run a main class." name="run"> - <j2seproject1:java> - <customize> - <arg line="${application.args}"/> - </customize> - </j2seproject1:java> - </target> - <target name="-do-not-recompile"> - <property name="javac.includes.binary" value=""/> - </target> - <target depends="init,compile-single" name="run-single"> - <fail unless="run.class">Must select one file in the IDE or set run.class</fail> - <j2seproject1:java classname="${run.class}"/> - </target> - <target depends="init,compile-test-single" name="run-test-with-main"> - <fail unless="run.class">Must select one file in the IDE or set run.class</fail> - <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/> - </target> - <!-- - ================= - DEBUGGING SECTION - ================= - --> - <target depends="init" if="netbeans.home" name="-debug-start-debugger"> - <j2seproject1:nbjpdastart name="${debug.class}"/> - </target> - <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test"> - <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/> - </target> - <target depends="init,compile" name="-debug-start-debuggee"> - <j2seproject3:debug> - <customize> - <arg line="${application.args}"/> - </customize> - </j2seproject3:debug> - </target> - <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/> - <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto"> - <j2seproject1:nbjpdastart stopclassname="${main.class}"/> - </target> - <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/> - <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single"> - <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail> - <j2seproject3:debug classname="${debug.class}"/> - </target> - <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/> - <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test"> - <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail> - <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/> - </target> - <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/> - <target depends="init" name="-pre-debug-fix"> - <fail unless="fix.includes">Must set fix.includes</fail> - <property name="javac.includes" value="${fix.includes}.java"/> - </target> - <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix"> - <j2seproject1:nbjpdareload/> - </target> - <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/> - <!-- - ================= - PROFILING SECTION - ================= - --> - <target depends="profile-init,compile" description="Profile a project in the IDE." if="netbeans.home" name="profile"> - <nbprofiledirect> - <classpath> - <path path="${run.classpath}"/> - </classpath> - </nbprofiledirect> - <profile/> - </target> - <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="netbeans.home" name="profile-single"> - <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail> - <nbprofiledirect> - <classpath> - <path path="${run.classpath}"/> - </classpath> - </nbprofiledirect> - <profile classname="${profile.class}"/> - </target> - <!-- - ========================= - APPLET PROFILING SECTION - ========================= - --> - <target depends="profile-init,compile-single" if="netbeans.home" name="profile-applet"> - <nbprofiledirect> - <classpath> - <path path="${run.classpath}"/> - </classpath> - </nbprofiledirect> - <profile classname="sun.applet.AppletViewer"> - <customize> - <arg value="${applet.url}"/> - </customize> - </profile> - </target> - <!-- - ========================= - TESTS PROFILING SECTION - ========================= - --> - <target depends="profile-init,compile-test-single" if="netbeans.home" name="profile-test-single"> - <nbprofiledirect> - <classpath> - <path path="${run.test.classpath}"/> - </classpath> - </nbprofiledirect> - <junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true"> - <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/> - <jvmarg value="${profiler.info.jvmargs.agent}"/> - <jvmarg line="${profiler.info.jvmargs}"/> - <test name="${profile.class}"/> - <classpath> - <path path="${run.test.classpath}"/> - </classpath> - <syspropertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <formatter type="brief" usefile="false"/> - <formatter type="xml"/> - </junit> - </target> - <!-- - =============== - JAVADOC SECTION - =============== - --> - <target depends="init" if="have.sources" name="-javadoc-build"> - <mkdir dir="${dist.javadoc.dir}"/> - <condition else="" property="javadoc.endorsed.classpath.cmd.line.arg" value="-J${endorsed.classpath.cmd.line.arg}"> - <and> - <isset property="endorsed.classpath.cmd.line.arg"/> - <not> - <equals arg1="${endorsed.classpath.cmd.line.arg}" arg2=""/> - </not> - </and> - </condition> - <javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" 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}"> - <classpath> - <path path="${javac.classpath}"/> - </classpath> - <fileset dir="${src.dir}" excludes="*.java,${excludes}" includes="${includes}"> - <filename name="**/*.java"/> - </fileset> - <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false"> - <include name="**/*.java"/> - <exclude name="*.java"/> - </fileset> - <arg line="${javadoc.endorsed.classpath.cmd.line.arg}"/> - </javadoc> - <copy todir="${dist.javadoc.dir}"> - <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}"> - <filename name="**/doc-files/**"/> - </fileset> - <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false"> - <include name="**/doc-files/**"/> - </fileset> - </copy> - </target> - <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview"> - <nbbrowse file="${dist.javadoc.dir}/index.html"/> - </target> - <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/> - <!-- - ========================= - JUNIT COMPILATION SECTION - ========================= - --> - <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test"> - <mkdir dir="${build.test.classes.dir}"/> - </target> - <target name="-pre-compile-test"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target if="do.depend.true" name="-compile-test-depend"> - <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/> - </target> - <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test"> - <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" processorpath="${javac.test.processorpath}" srcdir="${test.src.dir}"/> - <copy todir="${build.test.classes.dir}"> - <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> - </copy> - </target> - <target name="-post-compile-test"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/> - <target name="-pre-compile-test-single"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single"> - <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail> - <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/> - <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" processorpath="${javac.test.processorpath}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/> - <copy todir="${build.test.classes.dir}"> - <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> - </copy> - </target> - <target name="-post-compile-test-single"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/> - <!-- - ======================= - JUNIT EXECUTION SECTION - ======================= - --> - <target depends="init" if="have.tests" name="-pre-test-run"> - <mkdir dir="${build.test.results.dir}"/> - </target> - <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run"> - <j2seproject3:junit testincludes="**/*Test.java"/> - </target> - <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run"> - <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail> - </target> - <target depends="init" if="have.tests" name="test-report"/> - <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/> - <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/> - <target depends="init" if="have.tests" name="-pre-test-run-single"> - <mkdir dir="${build.test.results.dir}"/> - </target> - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single"> - <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail> - <j2seproject3:junit excludes="" includes="${test.includes}"/> - </target> - <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single"> - <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail> - </target> - <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/> - <!-- - ======================= - JUNIT DEBUGGING SECTION - ======================= - --> - <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test"> - <fail unless="test.class">Must select one file in the IDE or set test.class</fail> - <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/> - <delete file="${test.report.file}"/> - <mkdir dir="${build.test.results.dir}"/> - <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}"> - <customize> - <syspropertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <arg value="${test.class}"/> - <arg value="showoutput=true"/> - <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/> - <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/> - </customize> - </j2seproject3:debug> - </target> - <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test"> - <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/> - </target> - <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/> - <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test"> - <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/> - </target> - <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/> - <!-- - ========================= - APPLET EXECUTION SECTION - ========================= - --> - <target depends="init,compile-single" name="run-applet"> - <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> - <j2seproject1:java classname="sun.applet.AppletViewer"> - <customize> - <arg value="${applet.url}"/> - </customize> - </j2seproject1:java> - </target> - <!-- - ========================= - APPLET DEBUGGING SECTION - ========================= - --> - <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet"> - <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> - <j2seproject3:debug classname="sun.applet.AppletViewer"> - <customize> - <arg value="${applet.url}"/> - </customize> - </j2seproject3:debug> - </target> - <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/> - <!-- - =============== - CLEANUP SECTION - =============== - --> - <target name="-deps-clean-init" unless="built-clean.properties"> - <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/> - <delete file="${built-clean.properties}" quiet="true"/> - </target> - <target if="already.built.clean.${basedir}" name="-warn-already-built-clean"> - <echo level="warn" message="Cycle detected: EnsembleTest was already built"/> - </target> - <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps"> - <mkdir dir="${build.dir}"/> - <touch file="${built-clean.properties}" verbose="false"/> - <property file="${built-clean.properties}" prefix="already.built.clean."/> - <antcall target="-warn-already-built-clean"/> - <propertyfile file="${built-clean.properties}"> - <entry key="${basedir}" value=""/> - </propertyfile> - <antcall target="-maybe-call-dep"> - <param name="call.built.properties" value="${built-clean.properties}"/> - <param location="${project.GlassImage}" name="call.subproject"/> - <param location="${project.GlassImage}/build.xml" name="call.script"/> - <param name="call.target" value="clean"/> - <param name="transfer.built-clean.properties" value="${built-clean.properties}"/> - </antcall> - <antcall target="-maybe-call-dep"> - <param name="call.built.properties" value="${built-clean.properties}"/> - <param location="${project.GlassRobot}" name="call.subproject"/> - <param location="${project.GlassRobot}/build.xml" name="call.script"/> - <param name="call.target" value="clean"/> - <param name="transfer.built-clean.properties" value="${built-clean.properties}"/> - </antcall> - </target> - <target depends="init" name="-do-clean"> - <delete dir="${build.dir}"/> - <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/> - </target> - <target name="-post-clean"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/> - <target name="-check-call-dep"> - <property file="${call.built.properties}" prefix="already.built."/> - <condition property="should.call.dep"> - <not> - <isset property="already.built.${call.subproject}"/> - </not> - </condition> - </target> - <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep"> - <ant antfile="${call.script}" inheritall="false" target="${call.target}"> - <propertyset> - <propertyref prefix="transfer."/> - <mapper from="transfer.*" to="*" type="glob"/> - </propertyset> - </ant> - </target> -</project> diff --git a/bigapps/EnsembleTest/nbproject/build-impl.xml~ b/bigapps/EnsembleTest/nbproject/build-impl.xml~ deleted file mode 100644 index bfc3ab68..00000000 --- a/bigapps/EnsembleTest/nbproject/build-impl.xml~ +++ /dev/null @@ -1,896 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -*** GENERATED FROM project.xml - DO NOT EDIT *** -*** EDIT ../build.xml INSTEAD *** - -For the purpose of easier reading the script -is divided into following sections: - - - initialization - - compilation - - jar - - execution - - debugging - - javadoc - - junit compilation - - junit execution - - junit debugging - - applet - - cleanup - - --> -<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="EnsembleTest2-impl"> - <fail message="Please build using Ant 1.7.1 or higher."> - <condition> - <not> - <antversion atleast="1.7.1"/> - </not> - </condition> - </fail> - <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/> - <!-- - ====================== - INITIALIZATION SECTION - ====================== - --> - <target name="-pre-init"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="-pre-init" name="-init-private"> - <property file="nbproject/private/config.properties"/> - <property file="nbproject/private/configs/${config}.properties"/> - <property file="nbproject/private/private.properties"/> - </target> - <target depends="-pre-init,-init-private" name="-init-user"> - <property file="${user.properties.file}"/> - <!-- The two properties below are usually overridden --> - <!-- by the active platform. Just a fallback. --> - <property name="default.javac.source" value="1.4"/> - <property name="default.javac.target" value="1.4"/> - </target> - <target depends="-pre-init,-init-private,-init-user" name="-init-project"> - <property file="nbproject/configs/${config}.properties"/> - <property file="nbproject/project.properties"/> - </target> - <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init"> - <available file="${manifest.file}" property="manifest.available"/> - <available file="${application.splash}" property="splashscreen.available"/> - <condition property="main.class.available"> - <and> - <isset property="main.class"/> - <not> - <equals arg1="${main.class}" arg2="" trim="true"/> - </not> - </and> - </condition> - <condition property="manifest.available+main.class"> - <and> - <isset property="manifest.available"/> - <isset property="main.class.available"/> - </and> - </condition> - <condition property="do.mkdist"> - <and> - <isset property="libs.CopyLibs.classpath"/> - <not> - <istrue value="${mkdist.disabled}"/> - </not> - </and> - </condition> - <condition property="manifest.available+main.class+mkdist.available"> - <and> - <istrue value="${manifest.available+main.class}"/> - <isset property="do.mkdist"/> - </and> - </condition> - <condition property="manifest.available+main.class+mkdist.available+splashscreen.available"> - <and> - <istrue value="${manifest.available+main.class+mkdist.available}"/> - <istrue value="${splashscreen.available}"/> - </and> - </condition> - <condition property="do.archive"> - <not> - <istrue value="${jar.archive.disabled}"/> - </not> - </condition> - <condition property="do.archive+manifest.available"> - <and> - <isset property="manifest.available"/> - <istrue value="${do.archive}"/> - </and> - </condition> - <condition property="do.archive+manifest.available+main.class"> - <and> - <istrue value="${manifest.available+main.class}"/> - <istrue value="${do.archive}"/> - </and> - </condition> - <condition property="do.archive+manifest.available+main.class+mkdist.available"> - <and> - <istrue value="${manifest.available+main.class+mkdist.available}"/> - <istrue value="${do.archive}"/> - </and> - </condition> - <condition property="do.archive+manifest.available+main.class+mkdist.available+splashscreen.available"> - <and> - <istrue value="${manifest.available+main.class+mkdist.available+splashscreen.available}"/> - <istrue value="${do.archive}"/> - </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"/> - <isset property="have.tests"/> - </and> - </condition> - <condition property="no.javadoc.preview"> - <and> - <isset property="javadoc.preview"/> - <isfalse value="${javadoc.preview}"/> - </and> - </condition> - <property name="run.jvmargs" value=""/> - <property name="javac.compilerargs" value=""/> - <property name="work.dir" value="${basedir}"/> - <condition property="no.deps"> - <and> - <istrue value="${no.dependencies}"/> - </and> - </condition> - <property name="javac.debug" value="true"/> - <property name="javadoc.preview" value="true"/> - <property name="application.args" value=""/> - <property name="source.encoding" value="${file.encoding}"/> - <property name="runtime.encoding" value="${source.encoding}"/> - <condition property="javadoc.encoding.used" value="${javadoc.encoding}"> - <and> - <isset property="javadoc.encoding"/> - <not> - <equals arg1="${javadoc.encoding}" arg2=""/> - </not> - </and> - </condition> - <property name="javadoc.encoding.used" value="${source.encoding}"/> - <property name="includes" value="**"/> - <property name="excludes" value=""/> - <property name="do.depend" value="false"/> - <condition property="do.depend.true"> - <istrue value="${do.depend}"/> - </condition> - <path id="endorsed.classpath.path" path="${endorsed.classpath}"/> - <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'"> - <length length="0" string="${endorsed.classpath}" when="greater"/> - </condition> - <property name="javac.fork" value="false"/> - <property name="jar.index" value="false"/> - <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/> - </target> - <target name="-post-init"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check"> - <fail unless="src.dir">Must set src.dir</fail> - <fail unless="test.src.dir">Must set test.src.dir</fail> - <fail unless="build.dir">Must set build.dir</fail> - <fail unless="dist.dir">Must set dist.dir</fail> - <fail unless="build.classes.dir">Must set build.classes.dir</fail> - <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail> - <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail> - <fail unless="build.test.results.dir">Must set build.test.results.dir</fail> - <fail unless="build.classes.excludes">Must set build.classes.excludes</fail> - <fail unless="dist.jar">Must set dist.jar</fail> - </target> - <target name="-init-macrodef-property"> - <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1"> - <attribute name="name"/> - <attribute name="value"/> - <sequential> - <property name="@{name}" value="${@{value}}"/> - </sequential> - </macrodef> - </target> - <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors"> - <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${src.dir}" name="srcdir"/> - <attribute default="${build.classes.dir}" name="destdir"/> - <attribute default="${javac.classpath}" name="classpath"/> - <attribute default="${javac.processorpath}" name="processorpath"/> - <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="${javac.debug}" name="debug"/> - <attribute default="${empty.dir}" name="sourcepath"/> - <attribute default="${empty.dir}" name="gensrcdir"/> - <element name="customize" optional="true"/> - <sequential> - <property location="${build.dir}/empty" name="empty.dir"/> - <mkdir dir="${empty.dir}"/> - <mkdir dir="@{apgeneratedsrcdir}"/> - <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}"> - <src> - <dirset dir="@{gensrcdir}" erroronmissingdir="false"> - <include name="*"/> - </dirset> - </src> - <classpath> - <path path="@{classpath}"/> - </classpath> - <compilerarg line="${endorsed.classpath.cmd.line.arg}"/> - <compilerarg line="${javac.compilerargs}"/> - <compilerarg value="-processorpath"/> - <compilerarg path="@{processorpath}:${empty.dir}"/> - <compilerarg line="${ap.processors.internal}"/> - <compilerarg line="${annotation.processing.processor.options}"/> - <compilerarg value="-s"/> - <compilerarg path="@{apgeneratedsrcdir}"/> - <compilerarg line="${ap.proc.none.internal}"/> - <customize/> - </javac> - </sequential> - </macrodef> - </target> - <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal"> - <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${src.dir}" name="srcdir"/> - <attribute default="${build.classes.dir}" name="destdir"/> - <attribute default="${javac.classpath}" name="classpath"/> - <attribute default="${javac.processorpath}" name="processorpath"/> - <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="${javac.debug}" name="debug"/> - <attribute default="${empty.dir}" name="sourcepath"/> - <attribute default="${empty.dir}" name="gensrcdir"/> - <element name="customize" optional="true"/> - <sequential> - <property location="${build.dir}/empty" name="empty.dir"/> - <mkdir dir="${empty.dir}"/> - <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}"> - <src> - <dirset dir="@{gensrcdir}" erroronmissingdir="false"> - <include name="*"/> - </dirset> - </src> - <classpath> - <path path="@{classpath}"/> - </classpath> - <compilerarg line="${endorsed.classpath.cmd.line.arg}"/> - <compilerarg line="${javac.compilerargs}"/> - <customize/> - </javac> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac"> - <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${src.dir}" name="srcdir"/> - <attribute default="${build.classes.dir}" name="destdir"/> - <attribute default="${javac.classpath}" name="classpath"/> - <sequential> - <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}"> - <classpath> - <path path="@{classpath}"/> - </classpath> - </depend> - </sequential> - </macrodef> - <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${build.classes.dir}" name="destdir"/> - <sequential> - <fail unless="javac.includes">Must set javac.includes</fail> - <pathconvert pathsep="${line.separator}" property="javac.includes.binary"> - <path> - <filelist dir="@{destdir}" files="${javac.includes}"/> - </path> - <globmapper from="*.java" to="*.class"/> - </pathconvert> - <tempfile deleteonexit="true" property="javac.includesfile.binary"/> - <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/> - <delete> - <files includesfile="${javac.includesfile.binary}"/> - </delete> - <delete file="${javac.includesfile.binary}"/> - </sequential> - </macrodef> - </target> - <target name="-init-macrodef-junit"> - <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <sequential> - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${build.dir}"> - <batchtest todir="${build.test.results.dir}"> - <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}"> - <filename name="@{testincludes}"/> - </fileset> - </batchtest> - <classpath> - <path path="${run.test.classpath}"/> - </classpath> - <syspropertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <formatter type="brief" usefile="false"/> - <formatter type="xml"/> - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> - <jvmarg line="${run.jvmargs}"/> - </junit> - </sequential> - </macrodef> - </target> - <target depends="-init-debug-args" name="-init-macrodef-nbjpda"> - <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1"> - <attribute default="${main.class}" name="name"/> - <attribute default="${debug.classpath}" name="classpath"/> - <attribute default="" name="stopclassname"/> - <sequential> - <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}"> - <classpath> - <path path="@{classpath}"/> - </classpath> - </nbjpdastart> - </sequential> - </macrodef> - <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1"> - <attribute default="${build.classes.dir}" name="dir"/> - <sequential> - <nbjpdareload> - <fileset dir="@{dir}" includes="${fix.classes}"> - <include name="${fix.includes}*.class"/> - </fileset> - </nbjpdareload> - </sequential> - </macrodef> - </target> - <target name="-init-debug-args"> - <property name="version-output" value="java version "${ant.java.version}"/> - <condition property="have-jdk-older-than-1.4"> - <or> - <contains string="${version-output}" substring="java version "1.0"/> - <contains string="${version-output}" substring="java version "1.1"/> - <contains string="${version-output}" substring="java version "1.2"/> - <contains string="${version-output}" substring="java version "1.3"/> - </or> - </condition> - <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none"> - <istrue value="${have-jdk-older-than-1.4}"/> - </condition> - <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem"> - <os family="windows"/> - </condition> - <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}"> - <isset property="debug.transport"/> - </condition> - </target> - <target depends="-init-debug-args" name="-init-macrodef-debug"> - <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${main.class}" name="classname"/> - <attribute default="${debug.classpath}" name="classpath"/> - <element name="customize" optional="true"/> - <sequential> - <java classname="@{classname}" dir="${work.dir}" fork="true"> - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> - <jvmarg line="${debug-args-line}"/> - <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> - <jvmarg value="-Dfile.encoding=${runtime.encoding}"/> - <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/> - <jvmarg line="${run.jvmargs}"/> - <classpath> - <path path="@{classpath}"/> - </classpath> - <syspropertyset> - <propertyref prefix="run-sys-prop."/> - <mapper from="run-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <customize/> - </java> - </sequential> - </macrodef> - </target> - <target name="-init-macrodef-java"> - <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1"> - <attribute default="${main.class}" name="classname"/> - <attribute default="${run.classpath}" name="classpath"/> - <element name="customize" optional="true"/> - <sequential> - <java classname="@{classname}" dir="${work.dir}" fork="true"> - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> - <jvmarg value="-Dfile.encoding=${runtime.encoding}"/> - <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/> - <jvmarg line="${run.jvmargs}"/> - <classpath> - <path path="@{classpath}"/> - </classpath> - <syspropertyset> - <propertyref prefix="run-sys-prop."/> - <mapper from="run-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <customize/> - </java> - </sequential> - </macrodef> - </target> - <target name="-init-macrodef-copylibs"> - <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3"> - <element name="customize" optional="true"/> - <sequential> - <property location="${build.classes.dir}" name="build.classes.dir.resolved"/> - <pathconvert property="run.classpath.without.build.classes.dir"> - <path path="${run.classpath}"/> - <map from="${build.classes.dir.resolved}" to=""/> - </pathconvert> - <pathconvert pathsep=" " property="jar.classpath"> - <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" classpath="${libs.CopyLibs.classpath}" name="copylibs"/> - <copylibs compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}"> - <fileset dir="${build.classes.dir}"/> - <manifest> - <attribute name="Class-Path" value="${jar.classpath}"/> - <customize/> - </manifest> - </copylibs> - </sequential> - </macrodef> - </target> - <target name="-init-presetdef-jar"> - <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1"> - <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}"> - <j2seproject1:fileset dir="${build.classes.dir}"/> - </jar> - </presetdef> - </target> - <target name="-init-ap-cmdline-properties"> - <property name="annotation.processing.enabled" value="true"/> - <property name="annotation.processing.processors.list" value=""/> - <property name="annotation.processing.processor.options" value=""/> - <property name="annotation.processing.run.all.processors" value="true"/> - <property name="javac.processorpath" value="${javac.classpath}"/> - <property name="javac.test.processorpath" value="${javac.test.classpath}"/> - <condition property="ap.supported.internal" value="true"> - <not> - <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/> - </not> - </condition> - </target> - <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported"> - <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}"> - <isfalse value="${annotation.processing.run.all.processors}"/> - </condition> - <condition else="" property="ap.proc.none.internal" value="-proc:none"> - <isfalse value="${annotation.processing.enabled}"/> - </condition> - </target> - <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline"> - <property name="ap.cmd.line.internal" value=""/> - </target> - <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,-init-ap-cmdline" name="init"/> - <!-- - =================== - COMPILATION SECTION - =================== - --> - <target name="-deps-jar-init" unless="built-jar.properties"> - <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/> - <delete file="${built-jar.properties}" quiet="true"/> - </target> - <target if="already.built.jar.${basedir}" name="-warn-already-built-jar"> - <echo level="warn" message="Cycle detected: EnsembleTest2 was already built"/> - </target> - <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps"> - <mkdir dir="${build.dir}"/> - <touch file="${built-jar.properties}" verbose="false"/> - <property file="${built-jar.properties}" prefix="already.built.jar."/> - <antcall target="-warn-already-built-jar"/> - <propertyfile file="${built-jar.properties}"> - <entry key="${basedir}" value=""/> - </propertyfile> - </target> - <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/> - <target depends="init" name="-check-automatic-build"> - <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/> - </target> - <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build"> - <antcall target="clean"/> - </target> - <target depends="init,deps-jar" name="-pre-pre-compile"> - <mkdir dir="${build.classes.dir}"/> - </target> - <target name="-pre-compile"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target if="do.depend.true" name="-compile-depend"> - <pathconvert property="build.generated.subdirs"> - <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false"> - <include name="*"/> - </dirset> - </pathconvert> - <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/> - </target> - <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile"> - <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/> - <copy todir="${build.classes.dir}"> - <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> - </copy> - </target> - <target if="has.persistence.xml" name="-copy-persistence-xml"> - <mkdir dir="${build.classes.dir}/META-INF"/> - <copy todir="${build.classes.dir}/META-INF"> - <fileset dir="${meta.inf.dir}" includes="persistence.xml"/> - </copy> - </target> - <target name="-post-compile"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/> - <target name="-pre-compile-single"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single"> - <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail> - <j2seproject3:force-recompile/> - <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}"/> - </target> - <target name="-post-compile-single"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/> - <!-- - ==================== - JAR BUILDING SECTION - ==================== - --> - <target depends="init" name="-pre-pre-jar"> - <dirname file="${dist.jar}" property="dist.jar.dir"/> - <mkdir dir="${dist.jar.dir}"/> - </target> - <target name="-pre-jar"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive" name="-do-jar-without-manifest" unless="manifest.available"> - <j2seproject1:jar/> - </target> - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class"> - <j2seproject1:jar manifest="${manifest.file}"/> - </target> - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available+main.class" name="-do-jar-with-mainclass" 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 location="${build.classes.dir}" name="build.classes.dir.resolved"/> - <property location="${dist.jar}" name="dist.jar.resolved"/> - <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 depends="init,compile,-pre-pre-jar,-pre-jar,-init-macrodef-copylibs" if="do.archive+manifest.available+main.class+mkdist.available+splashscreen.available" name="-do-jar-with-libraries-and-splashscreen"> - <basename file="${application.splash}" property="splashscreen.basename"/> - <mkdir dir="${build.classes.dir}/META-INF"/> - <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/> - <j2seproject3:copylibs> - <customize> - <attribute name="Main-Class" value="${main.class}"/> - <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/> - </customize> - </j2seproject3:copylibs> - <echo>To run this application from the command line without Ant, try:</echo> - <property location="${dist.jar}" name="dist.jar.resolved"/> - <echo>java -jar "${dist.jar.resolved}"</echo> - </target> - <target depends="init,compile,-pre-pre-jar,-pre-jar,-init-macrodef-copylibs" if="do.archive+manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries" unless="splashscreen.available"> - <j2seproject3:copylibs> - <customize> - <attribute name="Main-Class" value="${main.class}"/> - </customize> - </j2seproject3:copylibs> - <echo>To run this application from the command line without Ant, try:</echo> - <property location="${dist.jar}" name="dist.jar.resolved"/> - <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 depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries-and-splashscreen,-do-jar-with-libraries,-post-jar" description="Build JAR." name="jar"/> - <!-- - ================= - EXECUTION SECTION - ================= - --> - <target depends="init,compile" description="Run a main class." name="run"> - <echo message="file.reference.jfxrt.jar is ${file.reference.jfxrt.jar}"/> - <j2seproject1:java> - <customize> - <arg line="${application.args}"/> - </customize> - </j2seproject1:java> - </target> - <target name="-do-not-recompile"> - <property name="javac.includes.binary" value=""/> - </target> - <target depends="init,compile-single" name="run-single"> - <fail unless="run.class">Must select one file in the IDE or set run.class</fail> - <j2seproject1:java classname="${run.class}"/> - </target> - <target depends="init,compile-test-single" name="run-test-with-main"> - <fail unless="run.class">Must select one file in the IDE or set run.class</fail> - <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/> - </target> - <!-- - ================= - DEBUGGING SECTION - ================= - --> - <target depends="init" if="netbeans.home" name="-debug-start-debugger"> - <j2seproject1:nbjpdastart name="${debug.class}"/> - </target> - <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test"> - <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/> - </target> - <target depends="init,compile" name="-debug-start-debuggee"> - <j2seproject3:debug> - <customize> - <arg line="${application.args}"/> - </customize> - </j2seproject3:debug> - </target> - <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/> - <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto"> - <j2seproject1:nbjpdastart stopclassname="${main.class}"/> - </target> - <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/> - <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single"> - <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail> - <j2seproject3:debug classname="${debug.class}"/> - </target> - <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/> - <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test"> - <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail> - <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/> - </target> - <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/> - <target depends="init" name="-pre-debug-fix"> - <fail unless="fix.includes">Must set fix.includes</fail> - <property name="javac.includes" value="${fix.includes}.java"/> - </target> - <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix"> - <j2seproject1:nbjpdareload/> - </target> - <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/> - <!-- - =============== - JAVADOC SECTION - =============== - --> - <target depends="init" if="have.sources" name="-javadoc-build"> - <mkdir dir="${dist.javadoc.dir}"/> - <javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" 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}"> - <classpath> - <path path="${javac.classpath}"/> - </classpath> - <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}"> - <filename name="**/*.java"/> - </fileset> - <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false"> - <include name="**/*.java"/> - </fileset> - </javadoc> - <copy todir="${dist.javadoc.dir}"> - <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}"> - <filename name="**/doc-files/**"/> - </fileset> - <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false"> - <include name="**/doc-files/**"/> - </fileset> - </copy> - </target> - <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview"> - <nbbrowse file="${dist.javadoc.dir}/index.html"/> - </target> - <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/> - <!-- - ========================= - JUNIT COMPILATION SECTION - ========================= - --> - <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test"> - <mkdir dir="${build.test.classes.dir}"/> - </target> - <target name="-pre-compile-test"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target if="do.depend.true" name="-compile-test-depend"> - <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/> - </target> - <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test"> - <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" processorpath="${javac.test.processorpath}" srcdir="${test.src.dir}"/> - <copy todir="${build.test.classes.dir}"> - <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> - </copy> - </target> - <target name="-post-compile-test"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/> - <target name="-pre-compile-test-single"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single"> - <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail> - <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/> - <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" processorpath="${javac.test.processorpath}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/> - <copy todir="${build.test.classes.dir}"> - <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> - </copy> - </target> - <target name="-post-compile-test-single"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/> - <!-- - ======================= - JUNIT EXECUTION SECTION - ======================= - --> - <target depends="init" if="have.tests" name="-pre-test-run"> - <mkdir dir="${build.test.results.dir}"/> - </target> - <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run"> - <j2seproject3:junit testincludes="**/*Test.java"/> - </target> - <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run"> - <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail> - </target> - <target depends="init" if="have.tests" name="test-report"/> - <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/> - <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/> - <target depends="init" if="have.tests" name="-pre-test-run-single"> - <mkdir dir="${build.test.results.dir}"/> - </target> - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single"> - <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail> - <j2seproject3:junit excludes="" includes="${test.includes}"/> - </target> - <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single"> - <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail> - </target> - <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"> - </target> - <!-- - ======================= - JUNIT DEBUGGING SECTION - ======================= - --> - <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test"> - <fail unless="test.class">Must select one file in the IDE or set test.class</fail> - <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/> - <delete file="${test.report.file}"/> - <mkdir dir="${build.test.results.dir}"/> - <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}"> - <customize> - <syspropertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <arg value="${test.class}"/> - <arg value="showoutput=true"/> - <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/> - <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/> - </customize> - </j2seproject3:debug> - </target> - <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test"> - <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/> - </target> - <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/> - <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test"> - <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/> - </target> - <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/> - <!-- - ========================= - APPLET EXECUTION SECTION - ========================= - --> - <target depends="init,compile-single" name="run-applet"> - <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> - <j2seproject1:java classname="sun.applet.AppletViewer"> - <customize> - <arg value="${applet.url}"/> - </customize> - </j2seproject1:java> - </target> - <!-- - ========================= - APPLET DEBUGGING SECTION - ========================= - --> - <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet"> - <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> - <j2seproject3:debug classname="sun.applet.AppletViewer"> - <customize> - <arg value="${applet.url}"/> - </customize> - </j2seproject3:debug> - </target> - <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/> - <!-- - =============== - CLEANUP SECTION - =============== - --> - <target name="-deps-clean-init" unless="built-clean.properties"> - <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/> - <delete file="${built-clean.properties}" quiet="true"/> - </target> - <target if="already.built.clean.${basedir}" name="-warn-already-built-clean"> - <echo level="warn" message="Cycle detected: EnsembleTest2 was already built"/> - </target> - <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps"> - <mkdir dir="${build.dir}"/> - <touch file="${built-clean.properties}" verbose="false"/> - <property file="${built-clean.properties}" prefix="already.built.clean."/> - <antcall target="-warn-already-built-clean"/> - <propertyfile file="${built-clean.properties}"> - <entry key="${basedir}" value=""/> - </propertyfile> - </target> - <target depends="init" name="-do-clean"> - <delete dir="${build.dir}"/> - <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/> - </target> - <target name="-post-clean"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/> - <target name="-check-call-dep"> - <property file="${call.built.properties}" prefix="already.built."/> - <condition property="should.call.dep"> - <not> - <isset property="already.built.${call.subproject}"/> - </not> - </condition> - </target> - <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep"> - <ant antfile="${call.script}" inheritall="false" target="${call.target}"> - <propertyset> - <propertyref prefix="transfer."/> - <mapper from="transfer.*" to="*" type="glob"/> - </propertyset> - </ant> - </target> -</project> diff --git a/bigapps/EnsembleTest/nbproject/genfiles.properties b/bigapps/EnsembleTest/nbproject/genfiles.properties deleted file mode 100644 index 577ef535..00000000 --- a/bigapps/EnsembleTest/nbproject/genfiles.properties +++ /dev/null @@ -1,8 +0,0 @@ -build.xml.data.CRC32=7a439b8e -build.xml.script.CRC32=feb97122 -build.xml.stylesheet.CRC32=28e38971@1.38.3.45 -# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. -# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. -nbproject/build-impl.xml.data.CRC32=2fabf465 -nbproject/build-impl.xml.script.CRC32=0d44b7d5 -nbproject/build-impl.xml.stylesheet.CRC32=fcddb364@1.50.3.46 diff --git a/bigapps/EnsembleTest/nbproject/project.properties b/bigapps/EnsembleTest/nbproject/project.properties deleted file mode 100644 index 8cc2ed54..00000000 --- a/bigapps/EnsembleTest/nbproject/project.properties +++ /dev/null @@ -1,95 +0,0 @@ -annotation.processing.enabled=true -annotation.processing.enabled.in.editor=false -annotation.processing.processors.list= -annotation.processing.run.all.processors=true -annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output -application.title=EnsembleTest -application.vendor=Oleg G. Barbashov -build.classes.dir=${build.dir}/classes -build.classes.excludes=**/*.java,**/*.form -# This directory is removed when the project is cleaned: -build.dir=build -build.generated.dir=${build.dir}/generated -build.generated.sources.dir=${build.dir}/generated-sources -# Only compile against the classpath explicitly listed here: -build.sysclasspath=ignore -build.test.classes.dir=${build.dir}/test/classes -build.test.results.dir=${build.dir}/test/results -# Uncomment to specify the preferred debugger connection transport: -#debug.transport=dt_socket -debug.classpath=\ - ${run.classpath} -debug.test.classpath=\ - ${run.test.classpath} -# This directory is removed when the project is cleaned: -dist.dir=dist -dist.jar=${dist.dir}/EnsembleTest.jar -dist.javadoc.dir=${dist.dir}/javadoc -endorsed.classpath= -excludes= -file.reference.Ensemble.jar=lib/Ensemble.jar -file.reference.JemmyAWTInput.jar=../../tools/Jemmy/jemmy_core/JemmyAWTInput.jar -file.reference.JemmyBrowser.jar=../../tools/Jemmy/jemmy_core/JemmyBrowser.jar -file.reference.JemmyCore.jar=../../tools/Jemmy/jemmy_core/JemmyCore.jar -file.reference.JemmyFX.jar=../../tools/Jemmy/JemmyFX/dist/JemmyFX.jar -file.reference.JemmyFXBrowser.jar=../../tools/Jemmy/JemmyFXBrowser/dist/JemmyFXBrowser.jar -file.reference.jfxrt.jar=../../tools/Jemmy/JemmyFX/lib/javafx/lib/jfxrt.jar -includes=** -jar.compress=false -javac.classpath=\ - ${file.reference.Ensemble.jar}:\ - ${file.reference.JemmyAWTInput.jar}:\ - ${file.reference.jfxrt.jar}:\ - ${file.reference.JemmyBrowser.jar}:\ - ${file.reference.JemmyCore.jar}:\ - ${file.reference.JemmyFX.jar}:\ - ${reference.GlassImage.jar}:\ - ${reference.GlassRobot.jar}:\ - ${file.reference.JemmyFXBrowser.jar} -# Space-separated list of extra javac options -javac.compilerargs= -javac.deprecation=false -javac.processorpath=\ - ${javac.classpath} -javac.source=1.6 -javac.target=1.6 -javac.test.classpath=\ - ${javac.classpath}:\ - ${build.classes.dir}:\ - ${libs.junit.classpath}:\ - ${libs.junit_4.classpath} -javac.test.processorpath=\ - ${javac.test.classpath} -javadoc.additionalparam= -javadoc.author=false -javadoc.encoding=${source.encoding} -javadoc.noindex=false -javadoc.nonavbar=false -javadoc.notree=false -javadoc.private=false -javadoc.splitindex=true -javadoc.use=true -javadoc.version=false -javadoc.windowtitle= -main.class=prim.Main -manifest.file=manifest.mf -meta.inf.dir=${src.dir}/META-INF -mkdist.disabled=false -platform.active=default_platform -project.GlassImage=../../tools/Jemmy/GlassImage -project.GlassRobot=../../tools/Jemmy/GlassRobot -reference.GlassImage.jar=${project.GlassImage}/dist/GlassImage.jar -reference.GlassRobot.jar=${project.GlassRobot}/dist/GlassRobot.jar -run.classpath=\ - ${javac.classpath}:\ - ${build.classes.dir} -# 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="-Ddocs.url=file://${javafx.home}/docs/api/" -run.test.classpath=\ - ${javac.test.classpath}:\ - ${build.test.classes.dir} -source.encoding=UTF-8 -src.dir=src -test.src.dir=test diff --git a/bigapps/EnsembleTest/nbproject/project.xml b/bigapps/EnsembleTest/nbproject/project.xml deleted file mode 100644 index 3fd3b15d..00000000 --- a/bigapps/EnsembleTest/nbproject/project.xml +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<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/3"> - <name>EnsembleTest</name> - <source-roots> - <root id="src.dir"/> - </source-roots> - <test-roots> - <root id="test.src.dir"/> - </test-roots> - </data> - <references xmlns="http://www.netbeans.org/ns/ant-project-references/1"> - <reference> - <foreign-project>GlassImage</foreign-project> - <artifact-type>jar</artifact-type> - <script>build.xml</script> - <target>jar</target> - <clean-target>clean</clean-target> - <id>jar</id> - </reference> - <reference> - <foreign-project>GlassRobot</foreign-project> - <artifact-type>jar</artifact-type> - <script>build.xml</script> - <target>jar</target> - <clean-target>clean</clean-target> - <id>jar</id> - </reference> - </references> - </configuration> -</project> diff --git a/bigapps/EnsembleTest/src/test/ensemble/EnsembleTestUtil.java b/bigapps/EnsembleTest/src/test/ensemble/EnsembleTestUtil.java new file mode 100644 index 00000000..8ba247f5 --- /dev/null +++ b/bigapps/EnsembleTest/src/test/ensemble/EnsembleTestUtil.java @@ -0,0 +1,135 @@ +/* + * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code 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 General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package test.ensemble; + +import ensemble.EnsembleApp; +import ensemble.control.Popover; +import ensemble.samplepage.SamplePage; +import javafx.application.Application; +import javafx.event.EventHandler; +import javafx.scene.Node; +import javafx.scene.control.Hyperlink; +import javafx.scene.control.ListCell; +import javafx.scene.input.KeyCode; +import javafx.scene.input.KeyEvent; +import javafx.stage.Stage; +import org.jemmy.action.GetAction; +import org.jemmy.control.Wrap; +import org.jemmy.fx.Browser; +import org.jemmy.fx.ByText; +import org.jemmy.fx.ByWindowType; +import org.jemmy.fx.NodeDock; +import org.jemmy.fx.SceneDock; +import org.jemmy.fx.control.ToggleButtonDock; +import org.jemmy.fx.control.WebViewDock; +import org.jemmy.interfaces.Parent; + +import java.util.Objects; + +public class EnsembleTestUtil { + + private SceneDock mainScene; + private Parent<Node> sceneAsParent; + private NodeDock mainToolbar; + + public SceneDock mainScene() { + return mainScene; + } + + public Parent<Node> sceneAsParent() { + return sceneAsParent; + } + + public NodeDock mainToolbar() { + return mainToolbar; + } + + public void start() { + launchEnsemble(); + init(); + addBrowser(); + } + + private void launchEnsemble() { + new Thread(() -> Application.launch(EnsembleApp.class, new String[0]), "FX app launch thread").start(); + } + + // init operators for UI elements that constantly persist on scene + private void init() { + mainScene = new SceneDock(new ByWindowType(Stage.class)); + sceneAsParent = mainScene.asParent(); + mainToolbar = new NodeDock(sceneAsParent, bar -> bar.getStyleClass().contains("ensmeble-tool-bar")); + } + + public NodeDock sampleArea() { + return new NodeDock(sceneAsParent, SamplePage.class); + } + + // ads spy utility to browse scene content + public void addBrowser() { + new GetAction() { + + @Override + public void run(Object... os) throws Exception { + mainScene.wrap().getControl().setOnKeyPressed(new EventHandler<KeyEvent>() { + boolean browserStarted = false; + @Override + public void handle(KeyEvent ke) { + if (!browserStarted && ke.isControlDown() && ke.isShiftDown() && ke.getCode() == KeyCode.B) { + browserStarted = true; + javafx.application.Platform.runLater(() -> Browser.runBrowser()); + } + } + }); + } + }.dispatch(mainScene.wrap().getEnvironment()); + System.err.println("Click Ctrl-Shift-B to run FX Browser."); + } + + public void selectInPupup(String text) throws InterruptedException { + //TODO + Thread.sleep(1000); + Wrap<? extends Popover> popover = sceneAsParent.lookup(Popover.class).wrap(); + popover.as(Parent.class, Node.class) + .lookup(ListCell.class, cell -> Objects.equals(((ListCell)cell).getText(), text)) + .wrap().mouse().click(); + } + + public void selectDemo(String... texts) throws InterruptedException { + new ToggleButtonDock(sceneAsParent, "list").mouse().click(); + for(String text : texts) selectInPupup(text); + //TODO + Thread.sleep(1000); + } + + public WebViewDock viewSource() { + new NodeDock(sceneAsParent, Hyperlink.class, new ByText<Hyperlink>("VIEW SOURCE")).mouse().click(); + return new WebViewDock(sceneAsParent); + } + + public static void main(String[] args) { + new EnsembleTestUtil().start(); + } +} diff --git a/bigapps/EnsembleTest/test/TEST.ROOT b/bigapps/EnsembleTest/test/TEST.ROOT new file mode 100644 index 00000000..0d841c11 --- /dev/null +++ b/bigapps/EnsembleTest/test/TEST.ROOT @@ -0,0 +1,2 @@ +TestNG.dirs = . + diff --git a/bigapps/EnsembleTest/test/ensemble/test/End2EndTest.java b/bigapps/EnsembleTest/test/ensemble/test/End2EndTest.java index a6a67fef..8a4e4db4 100644 --- a/bigapps/EnsembleTest/test/ensemble/test/End2EndTest.java +++ b/bigapps/EnsembleTest/test/ensemble/test/End2EndTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,144 +24,73 @@ */ package ensemble.test; +import ensemble.control.Popover; import javafx.scene.Node; import javafx.scene.Scene; -import javafx.scene.control.*; -import javafx.scene.input.Clipboard; -import javafx.scene.web.WebView; -import org.jemmy.action.GetAction; -import org.jemmy.fx.*; -import org.jemmy.fx.control.*; -import org.jemmy.lookup.AbstractLookup; -import org.jemmy.lookup.LookupCriteria; -import org.jemmy.timing.State; -import org.jemmy.timing.Waiter; +import javafx.scene.control.Button; +import javafx.scene.control.TextField; +import javafx.scene.shape.Circle; +import org.jemmy.fx.ByText; +import org.jemmy.fx.NodeDock; +import org.jemmy.fx.SceneDock; +import org.jemmy.fx.SceneWrap; +import org.jemmy.fx.control.ChoiceBoxDock; +import org.jemmy.fx.control.LabeledDock; +import org.jemmy.fx.control.TextInputControlDock; +import org.jemmy.interfaces.Parent; +import org.jemmy.lookup.BySubControl; +import org.jemmy.resources.StringComparePolicy; import org.junit.Test; +import static org.junit.Assert.assertTrue; + public class End2EndTest extends EnsembleTestBase { private static final String ALTERNATIVE_CHOICE = "Cat"; - private static final String CHECK_BOXE_SAMPLE_NAME = "Check Boxes"; - private static final String CHOICE_BOX_SAMPLE_NAME = "Choice Box"; - private static final String COPY_SOURCE_BTN = "Copy Source"; private static final String DEFAULT_CHOICE = "Dog"; - private static final String SOURCE_CODE = "public class ChoiceBoxSample extends Application"; - private static final String SAMPLE_PAGE_TITLE = "Sample"; - private static final String SOURCE_CODE_PAGE_TITLE = "Source Code"; - private static final String INFO_TEXT = "A sample that shows a choice box"; - private static final String JAVADOC = ""; @Test - public void choiseBox() { - //search for "choice " - TextInputControlDock searchField = new TextInputControlDock(mainToolbar.asParent(), TextField.class); - searchField.asSelectionText().clear(); - searchField.asSelectionText().type("choice "); - - //verify popup content - SceneDock popup_scene = new SceneDock(Root.ROOT.lookup(new ByWindowType<Scene>(ContextMenu.class))); - LabeledDock popupItem = new LabeledDock(popup_scene.asParent(), new ByStyleClass<Labeled>("item-label")); - - //make sure the description dialog is there - popupItem.mouse().move(); - SceneDock descWindow = new SceneDock(new LookupCriteria<Scene>() { - - public boolean check(Scene cntrl) { - Node first = cntrl.getRoot().getChildrenUnmodifiable().get(0); - return first != null & first.getId() != null - && first.getId().equals("search-info-box"); - } - }); - //check text of the info message - final LabeledDock info = new LabeledDock(descWindow.asParent(), "search-info-description"); - info.wrap(). - waitState(new State<String>() { + public void source() throws InterruptedException { + //select colored buttons + util().selectDemo("Controls", "Button", "Colored Buttons"); + //push one + new NodeDock(util().sceneAsParent(), Button.class, new ByText<Button>("Indigo")).mouse().click(); + //open the source + assertTrue(util().viewSource().control() != null); + } - public String reached() { - return info.asText().text().contains(INFO_TEXT) ? info.asText().text() : null; + @Test + public void stages() throws InterruptedException { + //select advanced stage + util().selectDemo("Scenegraph", "Advanced Stage"); + new NodeDock(util().sceneAsParent(), Button.class, new ByText<>("Create a Stage")).mouse().click(); + var roundScene = new SceneDock(new BySubControl<Scene, Node>(n -> n instanceof Circle) { + @Override + protected Parent<Node> asParent(Scene scene) { + return new SceneWrap<Scene>(util().mainScene().environment(), scene).asParent(); } }); + new NodeDock(roundScene.asParent(), Button.class, new ByText<Button>("Close me")).mouse().click(); + } - //select the search result - popupItem.mouse().click(); - waitSamplesTreeSelection(CHOICE_BOX_SAMPLE_NAME); + @Test + public void search() throws InterruptedException { + //search for "choiceb" + TextInputControlDock searchField = new TextInputControlDock(util().mainToolbar().asParent(), TextField.class); + searchField.asSelectionText().clear(); + searchField.asSelectionText().type("choiceb"); - //check the _Choice Box_ label - TabPaneDock sample_area = new TabPaneDock(mainScene.asParent(), new ByID<TabPane>("source-tabs")); - System.out.println(new LabeledDock(sample_area.asParent(), Label.class).wrap().getControl().getStyleClass()); - new LabeledDock(sample_area.asParent(), new ByStyleClass<Labeled>("page-header")); + new LabeledDock( + new NodeDock(util().sceneAsParent(), Popover.class, po -> po.getStyleClass().contains("right-tooth")).asParent(), + "An example of a ChoiceBox with several options.", + StringComparePolicy.SUBSTRING).mouse().click(); + //TODO + Thread.sleep(1000); //check that the choice box is indeed shown - final ChoiceBoxDock theChoiceBox = new ChoiceBoxDock(sample_area.asParent()); - theChoiceBox.wrap().waitState(new State<String>() { - - public String reached() { - return (String) theChoiceBox.asSelectable().getState(); - } - }, DEFAULT_CHOICE); - //and also there are other animals + final ChoiceBoxDock theChoiceBox = new ChoiceBoxDock(util().sampleArea().asParent()); + theChoiceBox.wrap().waitState(() -> theChoiceBox.asSelectable().getState(), DEFAULT_CHOICE); theChoiceBox.asSelectable().selector().select(ALTERNATIVE_CHOICE); - - - //get the tab pane - TabPaneDock sampleTabPane = new TabPaneDock(mainScene.asParent(), new ByID<TabPane>("source-tabs")); - - //show the source - new TabDock(sampleTabPane.asTabParent(), new LookupCriteria<Tab>() { - - @Override - public boolean check(Tab cntrl) { - return cntrl.getText().equals(SOURCE_CODE_PAGE_TITLE); - } - }).asCell().select(); - - //copy the source to clipboard - new ControlDock(sampleTabPane.asParent(), new ByText(COPY_SOURCE_BTN)).mouse().click(); - - // check clipboard - new Waiter(Root.ROOT.getEnvironment().getTimeout(AbstractLookup.WAIT_CONTROL_TIMEOUT)).ensureValue(true, new State<Boolean>() { - - @Override - public Boolean reached() { - String content = new GetAction<String>() { - - @Override - public void run(Object... os) throws Exception { - setResult(Clipboard.getSystemClipboard().getString()); - } - }.dispatch(Root.ROOT.getEnvironment()); - return content != null && content.contains(SOURCE_CODE); - } - }); - - //test documentation - TabDock sampleTab = new TabDock(sample_area.asTabParent(), new LookupCriteria<Tab>() { - - @Override - public boolean check(Tab cntrl) { - return cntrl.getText().compareTo(SAMPLE_PAGE_TITLE) == 0; - } - }); - sampleTab.asCell().select(); - NodeDock right_sidebar = new NodeDock(sampleTab.asParent(), - new ByStyleClass<Node>("right-sidebar")); - sampleTab.asParent().lookup(Hyperlink.class, - new ByText<Hyperlink>(ChoiceBox.class.getName())).wrap().mouse().click(); - new NodeDock(mainScene.asParent(), WebView.class, new LookupCriteria<WebView>() { - - public boolean check(WebView cntrl) { - return cntrl.getEngine().getLocation().endsWith("docs/api/javafx/scene/control/ChoiceBox.html"); - } - }); - - //let's look for check box now - searchField.asSelectionText().clear(); - searchField.asSelectionText().type("check "); - - //verify popup content - popup_scene = new SceneDock(Root.ROOT.lookup(new ByWindowType<Scene>(ContextMenu.class))); - new LabeledDock(popup_scene.asParent(), new ByStyleClass<Labeled>("item-label")).mouse().click(); - waitSamplesTreeSelection(CHECK_BOXE_SAMPLE_NAME); } -} \ No newline at end of file +} diff --git a/bigapps/EnsembleTest/test/ensemble/test/EnsembleTestBase.java b/bigapps/EnsembleTest/test/ensemble/test/EnsembleTestBase.java index 6bf5a9a3..360d878c 100644 --- a/bigapps/EnsembleTest/test/ensemble/test/EnsembleTestBase.java +++ b/bigapps/EnsembleTest/test/ensemble/test/EnsembleTestBase.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,106 +24,20 @@ */ package ensemble.test; -import ensemble.Ensemble2; -import java.awt.AWTException; -import javafx.application.Application; -import javafx.event.EventHandler; -import javafx.scene.Node; -import javafx.scene.control.ToolBar; -import javafx.scene.control.TreeItem; -import javafx.scene.control.TreeView; -import javafx.scene.input.KeyCode; -import javafx.scene.input.KeyEvent; -import javafx.stage.Stage; -import org.jemmy.action.GetAction; -import org.jemmy.fx.Browser; -import org.jemmy.fx.ByID; -import org.jemmy.fx.ByWindowType; -import org.jemmy.fx.SceneDock; -import org.jemmy.fx.control.ToolBarDock; -import org.jemmy.fx.control.TreeViewDock; -import org.jemmy.interfaces.Parent; -import org.jemmy.timing.State; import org.junit.BeforeClass; +import test.ensemble.EnsembleTestUtil; public class EnsembleTestBase { - protected static SceneDock mainScene; - protected static Parent<Node> sceneAsParent; - protected static TreeViewDock samplesTree; - protected static ToolBarDock mainToolbar; - protected static ToolBarDock pageTreeToolbar; - - protected static void launch() { - new Thread(new Runnable() { - - @Override - public void run() { - Application.launch(Ensemble2.class, new String[0]); - } - }, "FX app launch thread").start(); - - } + private static EnsembleTestUtil util; @BeforeClass public static void runUI() { - launch(); - initBase(); - addBrowser(); - } - - // init operators for UI elements that constantly persist on scene - protected static void initBase() { - mainScene = new SceneDock(new ByWindowType(Stage.class)); - sceneAsParent = mainScene.asParent(); - mainToolbar = new ToolBarDock(sceneAsParent, new ByID<ToolBar>("mainToolBar")); - samplesTree = new TreeViewDock(sceneAsParent, new ByID<TreeView>("page-tree")); - pageTreeToolbar = new ToolBarDock(sceneAsParent, new ByID<ToolBar>("page-tree-toolbar")); - } - - // ads spy utility to browse scene content - public static void addBrowser() { - new GetAction() { - - @Override - public void run(Object... os) throws Exception { - mainScene.wrap().getControl().setOnKeyPressed(new EventHandler<KeyEvent>() { - - boolean browserStarted = false; - - @Override - public void handle(KeyEvent ke) { - if (!browserStarted && ke.isControlDown() && ke.isShiftDown() && ke.getCode() == KeyCode.B) { - browserStarted = true; - javafx.application.Platform.runLater(new Runnable() { - - public void run() { - try { - Browser.runBrowser(); - } catch (AWTException ex) { - ex.printStackTrace(); - } - } - }); - } - } - }); - } - }.dispatch(mainScene.wrap().getEnvironment()); - - System.err.println("Click Ctrl-Shift-B to run FX Browser."); - } - - protected void waitSamplesTreeSelection(String itemText) { - samplesTree.wrap().waitState(new State<String>() { - - public String reached() { - return (String) ((TreeItem)samplesTree.wrap().getControl().getSelectionModel().getSelectedItem()).getValue(); - } - }, itemText); + util = new EnsembleTestUtil(); + util.start(); } - public static void main(String[] args) { - runUI(); + protected static EnsembleTestUtil util() { + return util; } -} \ No newline at end of file +} diff --git a/bigapps/SceneBuilderTest/.gitignore b/bigapps/SceneBuilderTest/.gitignore new file mode 100644 index 00000000..567609b1 --- /dev/null +++ b/bigapps/SceneBuilderTest/.gitignore @@ -0,0 +1 @@ +build/ diff --git a/bigapps/SceneBuilderTest/README b/bigapps/SceneBuilderTest/README index 22b1520f..d115bf87 100644 --- a/bigapps/SceneBuilderTest/README +++ b/bigapps/SceneBuilderTest/README @@ -1,6 +1,2 @@ -For building Jemmy see tools/Jemmy/README - -To build Scene Builder Test: - - install JavaFX Scene Builder 1.0 - - resolve project dependencies "SceneBuilder.jar", "javafx-designtime.jar", "javafx-beans-dt.jar". This files can be found in Scene Builder installation dir. - - call "ant test" +More tests needed +Some fixes needed - see TODOs diff --git a/bigapps/SceneBuilderTest/build.xml b/bigapps/SceneBuilderTest/build.xml index 84b06bc4..558840c3 100644 --- a/bigapps/SceneBuilderTest/build.xml +++ b/bigapps/SceneBuilderTest/build.xml @@ -1,51 +1,16 @@ -<?xml version="1.0" encoding="UTF-8"?><!-- You may freely edit this file. See commented blocks below for --><!-- some examples of how to customize the build. --><!-- (If you delete it and reopen the project it will be recreated.) --><!-- By default, only the Clean and Build commands use this build script. --><project name="SceneBuilderTest" default="default" basedir="." xmlns:fx="javafx:com.sun.javafx.tools.ant"> - <description>Builds, tests, and runs the project SceneBuilderTest.</description> - <import file="nbproject/build-impl.xml"/> - <!-- - - There exist several targets which are by default empty and which can be - used for execution of your tasks. These targets are usually executed - before and after some main targets. Those of them relevant for JavaFX project are: - - -pre-init: called before initialization of project properties - -post-init: called after initialization of project properties - -pre-compile: called before javac compilation - -post-compile: called after javac compilation - -pre-compile-test: called before javac compilation of JUnit tests - -post-compile-test: called after javac compilation of JUnit tests - -pre-jfx-jar: called before FX SDK specific <fx:jar> task - -post-jfx-jar: called after FX SDK specific <fx:jar> task - -pre-jfx-deploy: called before FX SDK specific <fx:deploy> task - -post-jfx-deploy: called after FX SDK specific <fx:deploy> task - -post-clean: called after cleaning build products - - (Targets beginning with '-' are not intended to be called on their own.) - - Example of inserting a HTML postprocessor after javaFX SDK deployment: - - <target name="-post-jfx-deploy"> - <basename property="jfx.deployment.base" file="${jfx.deployment.jar}" suffix=".jar"/> - <property name="jfx.deployment.html" location="${jfx.deployment.dir}${file.separator}${jfx.deployment.base}.html"/> - <custompostprocess> - <fileset dir="${jfx.deployment.html}"/> - </custompostprocess> - </target> - - Example of calling an Ant task from JavaFX SDK. Note that access to JavaFX SDK Ant tasks must be - initialized; to ensure this is done add the dependence on -check-jfx-sdk-version target: - - <target name="-post-jfx-jar" depends="-check-jfx-sdk-version"> - <echo message="Calling jar task from JavaFX SDK"/> - <fx:jar ...> - ... - </fx:jar> - </target> - - For more details about JavaFX SDK Ant tasks go to - http://docs.oracle.com/javafx/2/deployment/jfxpub-deployment.htm - - For list of available properties check the files - nbproject/build-impl.xml and nbproject/jfx-impl.xml. - - --> -</project> +<?xml version="1.0" encoding="UTF-8"?> +<project name="scenebuilder.tests" default="compile"> + <basename file="${basedir}" property="."/> + <property name="rootdir" location="${basedir}/../.."/> + <property name="project.name" value="SceneBuilderTest"/> + <import file="${basedir}/../../tools/make/build-template.xml"/> + <property name="dependencies.classpath" value="${jemmyfx-src}/build/classes${path.separator}${glass-robot-src}/build/classes${path.separator}${glass-image-src}/build/classes${path.separator}${jemmyfx-browser-src}/build/classes${path.separator}${jtreg.home}/lib/junit.jar${path.separator}${javafx.home}/lib/javafx-swt.jar${path.separator}${javafx.home}/lib/javafx.swing.jar${path.separator}${javafx.home}/lib/javafx.fxml.jar${path.separator}${scenebuilder.jar}"/> + <target name="build-dependencies"> + <fail message="Please specify scenebuilder.jar" unless="scenebuilder.jar"/> + <antcall target="build-other-project"> + <param name="project" value="${jemmyfx-browser-src}"/> + </antcall> + </target> + <target name="compile" depends="compile-src"/> + <target name="build-test-dependencies"/> +</project> diff --git a/bigapps/SceneBuilderTest/nbproject/build-impl.xml b/bigapps/SceneBuilderTest/nbproject/build-impl.xml deleted file mode 100644 index bb2aa89c..00000000 --- a/bigapps/SceneBuilderTest/nbproject/build-impl.xml +++ /dev/null @@ -1,1490 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -*** GENERATED FROM project.xml - DO NOT EDIT *** -*** EDIT ../build.xml INSTEAD *** - -For the purpose of easier reading the script -is divided into following sections: - - - initialization - - compilation - - jar - - execution - - debugging - - javadoc - - test compilation - - test execution - - test debugging - - applet - - cleanup - - --> -<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="SceneBuilderTest-impl"> - <import file="jfx-impl.xml"/> - <fail message="Please build using Ant 1.8.0 or higher."> - <condition> - <not> - <antversion atleast="1.8.0"/> - </not> - </condition> - </fail> - <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/> - <!-- - ====================== - INITIALIZATION SECTION - ====================== - --> - <target name="-pre-init"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="-pre-init" name="-init-private"> - <property file="nbproject/private/config.properties"/> - <property file="nbproject/private/configs/${config}.properties"/> - <property file="nbproject/private/private.properties"/> - </target> - <target depends="-pre-init,-init-private" name="-init-user"> - <property file="${user.properties.file}"/> - <!-- The two properties below are usually overridden --> - <!-- by the active platform. Just a fallback. --> - <property name="default.javac.source" value="1.4"/> - <property name="default.javac.target" value="1.4"/> - </target> - <target depends="-pre-init,-init-private,-init-user" name="-init-project"> - <property file="nbproject/configs/${config}.properties"/> - <property file="nbproject/project.properties"/> - </target> - <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init"> - <j2seproject1:property name="platform.home" value="platforms.${platform.active}.home"/> - <j2seproject1:property name="platform.bootcp" value="platforms.${platform.active}.bootclasspath"/> - <j2seproject1:property name="platform.compiler" value="platforms.${platform.active}.compile"/> - <j2seproject1:property name="platform.javac.tmp" value="platforms.${platform.active}.javac"/> - <condition property="platform.javac" value="${platform.home}/bin/javac"> - <equals arg1="${platform.javac.tmp}" arg2="$${platforms.${platform.active}.javac}"/> - </condition> - <property name="platform.javac" value="${platform.javac.tmp}"/> - <j2seproject1:property name="platform.java.tmp" value="platforms.${platform.active}.java"/> - <condition property="platform.java" value="${platform.home}/bin/java"> - <equals arg1="${platform.java.tmp}" arg2="$${platforms.${platform.active}.java}"/> - </condition> - <property name="platform.java" value="${platform.java.tmp}"/> - <j2seproject1:property name="platform.javadoc.tmp" value="platforms.${platform.active}.javadoc"/> - <condition property="platform.javadoc" value="${platform.home}/bin/javadoc"> - <equals arg1="${platform.javadoc.tmp}" arg2="$${platforms.${platform.active}.javadoc}"/> - </condition> - <property name="platform.javadoc" value="${platform.javadoc.tmp}"/> - <condition property="platform.invalid" value="true"> - <or> - <contains string="${platform.javac}" substring="$${platforms."/> - <contains string="${platform.java}" substring="$${platforms."/> - <contains string="${platform.javadoc}" substring="$${platforms."/> - </or> - </condition> - <fail unless="platform.home">Must set platform.home</fail> - <fail unless="platform.bootcp">Must set platform.bootcp</fail> - <fail unless="platform.java">Must set platform.java</fail> - <fail unless="platform.javac">Must set platform.javac</fail> - <fail if="platform.invalid"> - The J2SE Platform is not correctly set up. - Your active platform is: ${platform.active}, but the corresponding property "platforms.${platform.active}.home" is not found in the project's properties files. - Either open the project in the IDE and setup the Platform with the same name or add it manually. - For example like this: - ant -Duser.properties.file=<path_to_property_file> jar (where you put the property "platforms.${platform.active}.home" in a .properties file) - or ant -Dplatforms.${platform.active}.home=<path_to_JDK_home> jar (where no properties file is used) - </fail> - <available file="${manifest.file}" property="manifest.available"/> - <condition property="splashscreen.available"> - <and> - <not> - <equals arg1="${application.splash}" arg2="" trim="true"/> - </not> - <available file="${application.splash}"/> - </and> - </condition> - <condition property="main.class.available"> - <and> - <isset property="main.class"/> - <not> - <equals arg1="${main.class}" arg2="" trim="true"/> - </not> - </and> - </condition> - <condition property="manifest.available+main.class"> - <and> - <isset property="manifest.available"/> - <isset property="main.class.available"/> - </and> - </condition> - <condition property="do.archive"> - <not> - <istrue value="${jar.archive.disabled}"/> - </not> - </condition> - <condition property="do.mkdist"> - <and> - <isset property="do.archive"/> - <isset property="libs.CopyLibs.classpath"/> - <not> - <istrue value="${mkdist.disabled}"/> - </not> - </and> - </condition> - <condition property="manifest.available+main.class+mkdist.available"> - <and> - <istrue value="${manifest.available+main.class}"/> - <isset property="do.mkdist"/> - </and> - </condition> - <condition property="do.archive+manifest.available"> - <and> - <isset property="manifest.available"/> - <istrue value="${do.archive}"/> - </and> - </condition> - <condition property="do.archive+main.class.available"> - <and> - <isset property="main.class.available"/> - <istrue value="${do.archive}"/> - </and> - </condition> - <condition property="do.archive+splashscreen.available"> - <and> - <isset property="splashscreen.available"/> - <istrue value="${do.archive}"/> - </and> - </condition> - <condition property="do.archive+manifest.available+main.class"> - <and> - <istrue value="${manifest.available+main.class}"/> - <istrue value="${do.archive}"/> - </and> - </condition> - <condition property="manifest.available-mkdist.available"> - <or> - <istrue value="${manifest.available}"/> - <isset property="do.mkdist"/> - </or> - </condition> - <condition property="manifest.available+main.class-mkdist.available"> - <or> - <istrue value="${manifest.available+main.class}"/> - <isset property="do.mkdist"/> - </or> - </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"/> - <isset property="have.tests"/> - </and> - </condition> - <condition property="no.javadoc.preview"> - <and> - <isset property="javadoc.preview"/> - <isfalse value="${javadoc.preview}"/> - </and> - </condition> - <property name="run.jvmargs" value=""/> - <property name="run.jvmargs.ide" value=""/> - <property name="javac.compilerargs" value=""/> - <property name="work.dir" value="${basedir}"/> - <condition property="no.deps"> - <and> - <istrue value="${no.dependencies}"/> - </and> - </condition> - <property name="javac.debug" value="true"/> - <property name="javadoc.preview" value="true"/> - <property name="application.args" value=""/> - <property name="source.encoding" value="${file.encoding}"/> - <property name="runtime.encoding" value="${source.encoding}"/> - <condition property="javadoc.encoding.used" value="${javadoc.encoding}"> - <and> - <isset property="javadoc.encoding"/> - <not> - <equals arg1="${javadoc.encoding}" arg2=""/> - </not> - </and> - </condition> - <property name="javadoc.encoding.used" value="${source.encoding}"/> - <property name="includes" value="**"/> - <property name="excludes" value=""/> - <property name="do.depend" value="false"/> - <condition property="do.depend.true"> - <istrue value="${do.depend}"/> - </condition> - <path id="endorsed.classpath.path" path="${endorsed.classpath}"/> - <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'"> - <length length="0" string="${endorsed.classpath}" when="greater"/> - </condition> - <property name="jar.index" value="false"/> - <property name="jar.index.metainf" value="${jar.index}"/> - <property name="copylibs.rebase" value="true"/> - <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/> - <condition property="junit.available"> - <or> - <available classname="org.junit.Test" classpath="${run.test.classpath}"/> - <available classname="junit.framework.Test" classpath="${run.test.classpath}"/> - </or> - </condition> - <condition property="testng.available"> - <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/> - </condition> - <condition property="junit+testng.available"> - <and> - <istrue value="${junit.available}"/> - <istrue value="${testng.available}"/> - </and> - </condition> - <condition else="testng" property="testng.mode" value="mixed"> - <istrue value="${junit+testng.available}"/> - </condition> - <condition else="" property="testng.debug.mode" value="-mixed"> - <istrue value="${junit+testng.available}"/> - </condition> - </target> - <target name="-post-init"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-check-javafx" name="-init-check"> - <fail unless="src.dir">Must set src.dir</fail> - <fail unless="test.src.dir">Must set test.src.dir</fail> - <fail unless="build.dir">Must set build.dir</fail> - <fail unless="dist.dir">Must set dist.dir</fail> - <fail unless="build.classes.dir">Must set build.classes.dir</fail> - <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail> - <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail> - <fail unless="build.test.results.dir">Must set build.test.results.dir</fail> - <fail unless="build.classes.excludes">Must set build.classes.excludes</fail> - <fail unless="dist.jar">Must set dist.jar</fail> - </target> - <target name="-init-macrodef-property"> - <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1"> - <attribute name="name"/> - <attribute name="value"/> - <sequential> - <property name="@{name}" value="${@{value}}"/> - </sequential> - </macrodef> - </target> - <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors"> - <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${src.dir}" name="srcdir"/> - <attribute default="${build.classes.dir}" name="destdir"/> - <attribute default="${javac.classpath}" name="classpath"/> - <attribute default="${javac.processorpath}" name="processorpath"/> - <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="${javac.debug}" name="debug"/> - <attribute default="${empty.dir}" name="sourcepath"/> - <attribute default="${empty.dir}" name="gensrcdir"/> - <element name="customize" optional="true"/> - <sequential> - <property location="${build.dir}/empty" name="empty.dir"/> - <mkdir dir="${empty.dir}"/> - <mkdir dir="@{apgeneratedsrcdir}"/> - <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}"> - <src> - <dirset dir="@{gensrcdir}" erroronmissingdir="false"> - <include name="*"/> - </dirset> - </src> - <classpath> - <path path="@{classpath}"/> - </classpath> - <compilerarg line="${endorsed.classpath.cmd.line.arg}"/> - <compilerarg line="${javac.compilerargs}"/> - <compilerarg value="-processorpath"/> - <compilerarg path="@{processorpath}:${empty.dir}"/> - <compilerarg line="${ap.processors.internal}"/> - <compilerarg line="${annotation.processing.processor.options}"/> - <compilerarg value="-s"/> - <compilerarg path="@{apgeneratedsrcdir}"/> - <compilerarg line="${ap.proc.none.internal}"/> - <customize/> - </javac> - </sequential> - </macrodef> - </target> - <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal"> - <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${src.dir}" name="srcdir"/> - <attribute default="${build.classes.dir}" name="destdir"/> - <attribute default="${javac.classpath}" name="classpath"/> - <attribute default="${javac.processorpath}" name="processorpath"/> - <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="${javac.debug}" name="debug"/> - <attribute default="${empty.dir}" name="sourcepath"/> - <attribute default="${empty.dir}" name="gensrcdir"/> - <element name="customize" optional="true"/> - <sequential> - <property location="${build.dir}/empty" name="empty.dir"/> - <mkdir dir="${empty.dir}"/> - <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}"> - <src> - <dirset dir="@{gensrcdir}" erroronmissingdir="false"> - <include name="*"/> - </dirset> - </src> - <classpath> - <path path="@{classpath}"/> - </classpath> - <compilerarg line="${endorsed.classpath.cmd.line.arg}"/> - <compilerarg line="${javac.compilerargs}"/> - <customize/> - </javac> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac"> - <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${src.dir}" name="srcdir"/> - <attribute default="${build.classes.dir}" name="destdir"/> - <attribute default="${javac.classpath}" name="classpath"/> - <sequential> - <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}"> - <classpath> - <path path="@{classpath}"/> - </classpath> - </depend> - </sequential> - </macrodef> - <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${build.classes.dir}" name="destdir"/> - <sequential> - <fail unless="javac.includes">Must set javac.includes</fail> - <pathconvert pathsep="${line.separator}" property="javac.includes.binary"> - <path> - <filelist dir="@{destdir}" files="${javac.includes}"/> - </path> - <globmapper from="*.java" to="*.class"/> - </pathconvert> - <tempfile deleteonexit="true" property="javac.includesfile.binary"/> - <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/> - <delete> - <files includesfile="${javac.includesfile.binary}"/> - </delete> - <delete> - <fileset file="${javac.includesfile.binary}"/> - </delete> - </sequential> - </macrodef> - </target> - <target if="${junit.available}" name="-init-macrodef-junit-init"> - <condition else="false" property="nb.junit.batch" value="true"> - <and> - <istrue value="${junit.available}"/> - <not> - <isset property="test.method"/> - </not> - </and> - </condition> - <condition else="false" property="nb.junit.single" value="true"> - <and> - <istrue value="${junit.available}"/> - <isset property="test.method"/> - </and> - </condition> - </target> - <target if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}"> - <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element name="customize" optional="true"/> - <sequential> - <property name="junit.forkmode" value="perTest"/> - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" jvm="${platform.java}" showoutput="true" tempdir="${build.dir}"> - <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/> - <syspropertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <formatter type="brief" usefile="false"/> - <formatter type="xml"/> - <jvmarg value="-ea"/> - <customize/> - </junit> - </sequential> - </macrodef> - </target> - <target if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}"> - <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element name="customize" optional="true"/> - <sequential> - <property name="junit.forkmode" value="perTest"/> - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" jvm="${platform.java}" showoutput="true" tempdir="${build.dir}"> - <batchtest todir="${build.test.results.dir}"> - <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}"> - <filename name="@{testincludes}"/> - </fileset> - </batchtest> - <syspropertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <formatter type="brief" usefile="false"/> - <formatter type="xml"/> - <jvmarg value="-ea"/> - <customize/> - </junit> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/> - <target if="${testng.available}" name="-init-macrodef-testng"> - <macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element name="customize" optional="true"/> - <sequential> - <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}"> - <isset property="test.method"/> - </condition> - <union id="test.set"> - <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}"> - <filename name="@{testincludes}"/> - </fileset> - </union> - <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/> - <testng classfilesetref="test.set" failureProperty="tests.failed" jvm="${platform.java}" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="SceneBuilderTest" testname="TestNG tests" workingDir="${work.dir}"> - <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/> - <propertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </propertyset> - <customize/> - </testng> - </sequential> - </macrodef> - </target> - <target name="-init-macrodef-test-impl"> - <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element implicit="true" name="customize" optional="true"/> - <sequential> - <echo>No tests executed.</echo> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl"> - <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element implicit="true" name="customize" optional="true"/> - <sequential> - <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> - <customize/> - </j2seproject3:junit> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl"> - <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element implicit="true" name="customize" optional="true"/> - <sequential> - <j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> - <customize/> - </j2seproject3:testng> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test"> - <macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <sequential> - <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> - <customize> - <classpath> - <path path="${run.test.classpath}"/> - </classpath> - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> - <jvmarg line="${run.jvmargs}"/> - <jvmarg line="${run.jvmargs.ide}"/> - </customize> - </j2seproject3:test-impl> - </sequential> - </macrodef> - </target> - <target if="${junit.available}" name="-init-macrodef-junit-debug" unless="${nb.junit.batch}"> - <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element name="customize" optional="true"/> - <sequential> - <property name="junit.forkmode" value="perTest"/> - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" jvm="${platform.java}" showoutput="true" tempdir="${build.dir}"> - <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/> - <syspropertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <formatter type="brief" usefile="false"/> - <formatter type="xml"/> - <jvmarg value="-ea"/> - <jvmarg line="${debug-args-line}"/> - <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> - <customize/> - </junit> - </sequential> - </macrodef> - </target> - <target if="${nb.junit.batch}" name="-init-macrodef-junit-debug-batch"> - <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element name="customize" optional="true"/> - <sequential> - <property name="junit.forkmode" value="perTest"/> - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" jvm="${platform.java}" showoutput="true" tempdir="${build.dir}"> - <batchtest todir="${build.test.results.dir}"> - <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}"> - <filename name="@{testincludes}"/> - </fileset> - </batchtest> - <syspropertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <formatter type="brief" usefile="false"/> - <formatter type="xml"/> - <jvmarg value="-ea"/> - <jvmarg line="${debug-args-line}"/> - <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> - <customize/> - </junit> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-junit-debug,-init-macrodef-junit-debug-batch" if="${junit.available}" name="-init-macrodef-junit-debug-impl"> - <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element implicit="true" name="customize" optional="true"/> - <sequential> - <j2seproject3:junit-debug excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> - <customize/> - </j2seproject3:junit-debug> - </sequential> - </macrodef> - </target> - <target if="${testng.available}" name="-init-macrodef-testng-debug"> - <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${main.class}" name="testClass"/> - <attribute default="" name="testMethod"/> - <element name="customize2" optional="true"/> - <sequential> - <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}"> - <isset property="test.method"/> - </condition> - <condition else="-suitename SceneBuilderTest -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}"> - <matches pattern=".*\.xml" string="@{testClass}"/> - </condition> - <delete dir="${build.test.results.dir}" quiet="true"/> - <mkdir dir="${build.test.results.dir}"/> - <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}"> - <customize> - <customize2/> - <jvmarg value="-ea"/> - <arg line="${testng.debug.mode}"/> - <arg line="-d ${build.test.results.dir}"/> - <arg line="-listener org.testng.reporters.VerboseReporter"/> - <arg line="${testng.cmd.args}"/> - </customize> - </j2seproject3:debug> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl"> - <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${main.class}" name="testClass"/> - <attribute default="" name="testMethod"/> - <element implicit="true" name="customize2" optional="true"/> - <sequential> - <j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}"> - <customize2/> - </j2seproject3:testng-debug> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit"> - <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <attribute default="${main.class}" name="testClass"/> - <attribute default="" name="testMethod"/> - <sequential> - <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> - <customize> - <classpath> - <path path="${run.test.classpath}"/> - </classpath> - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> - <jvmarg line="${run.jvmargs}"/> - <jvmarg line="${run.jvmargs.ide}"/> - </customize> - </j2seproject3:test-debug-impl> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng"> - <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <attribute default="${main.class}" name="testClass"/> - <attribute default="" name="testMethod"/> - <sequential> - <j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}"> - <customize2> - <syspropertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - </customize2> - </j2seproject3:testng-debug-impl> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/> - <!-- - pre NB7.2 profiling section; consider it deprecated - --> - <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/> - <target if="profiler.info.jvmargs.agent" name="-profile-pre-init"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target if="profiler.info.jvmargs.agent" name="-profile-post-init"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile"> - <macrodef name="resolve"> - <attribute name="name"/> - <attribute name="value"/> - <sequential> - <property name="@{name}" value="${env.@{value}}"/> - </sequential> - </macrodef> - <macrodef name="profile"> - <attribute default="${main.class}" name="classname"/> - <element name="customize" optional="true"/> - <sequential> - <property environment="env"/> - <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/> - <java classname="@{classname}" dir="${profiler.info.dir}" fork="true" jvm="${profiler.info.jvm}"> - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> - <jvmarg value="${profiler.info.jvmargs.agent}"/> - <jvmarg line="${profiler.info.jvmargs}"/> - <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/> - <arg line="${application.args}"/> - <classpath> - <path path="${run.classpath}"/> - </classpath> - <syspropertyset> - <propertyref prefix="run-sys-prop."/> - <mapper from="run-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <customize/> - </java> - </sequential> - </macrodef> - </target> - <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" name="-profile-init-check"> - <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail> - <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail> - </target> - <!-- - end of pre NB7.2 profiling section - --> - <target depends="-init-debug-args" name="-init-macrodef-nbjpda"> - <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1"> - <attribute default="${main.class}" name="name"/> - <attribute default="${debug.classpath}" name="classpath"/> - <attribute default="" name="stopclassname"/> - <sequential> - <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}"> - <classpath> - <path path="@{classpath}"/> - </classpath> - <bootclasspath> - <path path="${platform.bootcp}"/> - </bootclasspath> - </nbjpdastart> - </sequential> - </macrodef> - <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1"> - <attribute default="${build.classes.dir}" name="dir"/> - <sequential> - <nbjpdareload> - <fileset dir="@{dir}" includes="${fix.classes}"> - <include name="${fix.includes}*.class"/> - </fileset> - </nbjpdareload> - </sequential> - </macrodef> - </target> - <target name="-init-debug-args"> - <exec executable="${platform.java}" outputproperty="version-output"> - <arg value="-version"/> - </exec> - <condition property="have-jdk-older-than-1.4"> - <or> - <contains string="${version-output}" substring="java version "1.0"/> - <contains string="${version-output}" substring="java version "1.1"/> - <contains string="${version-output}" substring="java version "1.2"/> - <contains string="${version-output}" substring="java version "1.3"/> - </or> - </condition> - <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none"> - <istrue value="${have-jdk-older-than-1.4}"/> - </condition> - <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem"> - <os family="windows"/> - </condition> - <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}"> - <isset property="debug.transport"/> - </condition> - </target> - <target depends="-init-debug-args" name="-init-macrodef-debug"> - <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${main.class}" name="classname"/> - <attribute default="${debug.classpath}" name="classpath"/> - <element name="customize" optional="true"/> - <sequential> - <java classname="@{classname}" dir="${work.dir}" fork="true" jvm="${platform.java}"> - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> - <jvmarg line="${debug-args-line}"/> - <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> - <jvmarg value="-Dfile.encoding=${runtime.encoding}"/> - <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/> - <jvmarg line="${run.jvmargs}"/> - <jvmarg line="${run.jvmargs.ide}"/> - <classpath> - <path path="@{classpath}"/> - </classpath> - <syspropertyset> - <propertyref prefix="run-sys-prop."/> - <mapper from="run-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <customize/> - </java> - </sequential> - </macrodef> - </target> - <target name="-init-macrodef-java"> - <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1"> - <attribute default="${main.class}" name="classname"/> - <attribute default="${run.classpath}" name="classpath"/> - <attribute default="jvm" name="jvm"/> - <element name="customize" optional="true"/> - <sequential> - <java classname="@{classname}" dir="${work.dir}" fork="true" jvm="${platform.java}"> - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> - <jvmarg value="-Dfile.encoding=${runtime.encoding}"/> - <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/> - <jvmarg line="${run.jvmargs}"/> - <jvmarg line="${run.jvmargs.ide}"/> - <classpath> - <path path="@{classpath}"/> - </classpath> - <syspropertyset> - <propertyref prefix="run-sys-prop."/> - <mapper from="run-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <customize/> - </java> - </sequential> - </macrodef> - </target> - <target name="-init-macrodef-copylibs"> - <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${manifest.file}" name="manifest"/> - <element name="customize" optional="true"/> - <sequential> - <property location="${build.classes.dir}" name="build.classes.dir.resolved"/> - <pathconvert property="run.classpath.without.build.classes.dir"> - <path path="${run.classpath}"/> - <map from="${build.classes.dir.resolved}" to=""/> - </pathconvert> - <pathconvert pathsep=" " property="jar.classpath"> - <path path="${run.classpath.without.build.classes.dir}"/> - <chainedmapper> - <flattenmapper/> - <filtermapper> - <replacestring from=" " to="%20"/> - </filtermapper> - <globmapper from="*" to="lib/*"/> - </chainedmapper> - </pathconvert> - <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/> - <copylibs compress="${jar.compress}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" rebase="${copylibs.rebase}" runtimeclasspath="${run.classpath.without.build.classes.dir}"> - <fileset dir="${build.classes.dir}"/> - <manifest> - <attribute name="Class-Path" value="${jar.classpath}"/> - <customize/> - </manifest> - </copylibs> - </sequential> - </macrodef> - </target> - <target name="-init-presetdef-jar"> - <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1"> - <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}"> - <j2seproject1:fileset dir="${build.classes.dir}"/> - </jar> - </presetdef> - </target> - <target name="-init-ap-cmdline-properties"> - <property name="annotation.processing.enabled" value="true"/> - <property name="annotation.processing.processors.list" value=""/> - <property name="annotation.processing.processor.options" value=""/> - <property name="annotation.processing.run.all.processors" value="true"/> - <property name="javac.processorpath" value="${javac.classpath}"/> - <property name="javac.test.processorpath" value="${javac.test.classpath}"/> - <condition property="ap.supported.internal" value="true"> - <not> - <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/> - </not> - </condition> - </target> - <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported"> - <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}"> - <isfalse value="${annotation.processing.run.all.processors}"/> - </condition> - <condition else="" property="ap.proc.none.internal" value="-proc:none"> - <isfalse value="${annotation.processing.enabled}"/> - </condition> - </target> - <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline"> - <property name="ap.cmd.line.internal" value=""/> - </target> - <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-test,-init-macrodef-test-debug,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/> - <!-- - =================== - COMPILATION SECTION - =================== - --> - <target name="-deps-jar-init" unless="built-jar.properties"> - <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/> - <delete file="${built-jar.properties}" quiet="true"/> - </target> - <target if="already.built.jar.${basedir}" name="-warn-already-built-jar"> - <echo level="warn" message="Cycle detected: SceneBuilderTest was already built"/> - </target> - <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps"> - <mkdir dir="${build.dir}"/> - <touch file="${built-jar.properties}" verbose="false"/> - <property file="${built-jar.properties}" prefix="already.built.jar."/> - <antcall target="-warn-already-built-jar"/> - <propertyfile file="${built-jar.properties}"> - <entry key="${basedir}" value=""/> - </propertyfile> - <antcall target="-maybe-call-dep"> - <param name="call.built.properties" value="${built-jar.properties}"/> - <param location="${project.GlassImage}" name="call.subproject"/> - <param location="${project.GlassImage}/build.xml" name="call.script"/> - <param name="call.target" value="jar"/> - <param name="transfer.built-jar.properties" value="${built-jar.properties}"/> - </antcall> - <antcall target="-maybe-call-dep"> - <param name="call.built.properties" value="${built-jar.properties}"/> - <param location="${project.GlassRobot}" name="call.subproject"/> - <param location="${project.GlassRobot}/build.xml" name="call.script"/> - <param name="call.target" value="jar"/> - <param name="transfer.built-jar.properties" value="${built-jar.properties}"/> - </antcall> - <antcall target="-maybe-call-dep"> - <param name="call.built.properties" value="${built-jar.properties}"/> - <param location="${project.JemmyFX}" name="call.subproject"/> - <param location="${project.JemmyFX}/build.xml" name="call.script"/> - <param name="call.target" value="jar"/> - <param name="transfer.built-jar.properties" value="${built-jar.properties}"/> - </antcall> - <antcall target="-maybe-call-dep"> - <param name="call.built.properties" value="${built-jar.properties}"/> - <param location="${project.JemmyFXBrowser}" name="call.subproject"/> - <param location="${project.JemmyFXBrowser}/build.xml" name="call.script"/> - <param name="call.target" value="jar"/> - <param name="transfer.built-jar.properties" value="${built-jar.properties}"/> - </antcall> - </target> - <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/> - <target depends="init" name="-check-automatic-build"> - <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/> - </target> - <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build"> - <antcall target="clean"/> - </target> - <target depends="init,deps-jar" name="-pre-pre-compile"> - <mkdir dir="${build.classes.dir}"/> - </target> - <target name="-pre-compile"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target if="do.depend.true" name="-compile-depend"> - <pathconvert property="build.generated.subdirs"> - <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false"> - <include name="*"/> - </dirset> - </pathconvert> - <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/> - </target> - <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile"> - <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/> - <copy todir="${build.classes.dir}"> - <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> - </copy> - </target> - <target if="has.persistence.xml" name="-copy-persistence-xml"> - <mkdir dir="${build.classes.dir}/META-INF"/> - <copy todir="${build.classes.dir}/META-INF"> - <fileset dir="${meta.inf.dir}" includes="persistence.xml"/> - </copy> - </target> - <target name="-post-compile"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/> - <target name="-pre-compile-single"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single"> - <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail> - <j2seproject3:force-recompile/> - <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}"/> - </target> - <target name="-post-compile-single"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/> - <!-- - ==================== - JAR BUILDING SECTION - ==================== - --> - <target depends="init" name="-pre-pre-jar"> - <dirname file="${dist.jar}" property="dist.jar.dir"/> - <mkdir dir="${dist.jar.dir}"/> - </target> - <target name="-pre-jar"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive" name="-do-jar-without-manifest" unless="manifest.available-mkdist.available"> - <j2seproject1:jar/> - </target> - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class-mkdist.available"> - <j2seproject1:jar manifest="${manifest.file}"/> - </target> - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available+main.class" name="-do-jar-with-mainclass" 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 level="info">To run this application from the command line without Ant, try:</echo> - <property location="${build.classes.dir}" name="build.classes.dir.resolved"/> - <property location="${dist.jar}" name="dist.jar.resolved"/> - <pathconvert property="run.classpath.with.dist.jar"> - <path path="${run.classpath}"/> - <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/> - </pathconvert> - <echo level="info">${platform.java} -cp "${run.classpath.with.dist.jar}" ${main.class}</echo> - </target> - <target depends="init" if="do.archive" name="-do-jar-with-libraries-create-manifest" unless="manifest.available"> - <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/> - <touch file="${tmp.manifest.file}" verbose="false"/> - </target> - <target depends="init" if="do.archive+manifest.available" name="-do-jar-with-libraries-copy-manifest"> - <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/> - <copy file="${manifest.file}" tofile="${tmp.manifest.file}"/> - </target> - <target depends="init,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest" if="do.archive+main.class.available" name="-do-jar-with-libraries-set-main"> - <manifest file="${tmp.manifest.file}" mode="update"> - <attribute name="Main-Class" value="${main.class}"/> - </manifest> - </target> - <target depends="init,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-with-libraries-set-splashscreen"> - <basename file="${application.splash}" property="splashscreen.basename"/> - <mkdir dir="${build.classes.dir}/META-INF"/> - <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/> - <manifest file="${tmp.manifest.file}" mode="update"> - <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/> - </manifest> - </target> - <target depends="init,-init-macrodef-copylibs,compile,-pre-pre-jar,-pre-jar,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest,-do-jar-with-libraries-set-main,-do-jar-with-libraries-set-splashscreen" if="do.mkdist" name="-do-jar-with-libraries-pack"> - <j2seproject3:copylibs manifest="${tmp.manifest.file}"/> - <echo level="info">To run this application from the command line without Ant, try:</echo> - <property location="${dist.jar}" name="dist.jar.resolved"/> - <echo level="info">${platform.java} -jar "${dist.jar.resolved}"</echo> - </target> - <target depends="-do-jar-with-libraries-pack" if="do.archive" name="-do-jar-with-libraries-delete-manifest"> - <delete> - <fileset file="${tmp.manifest.file}"/> - </delete> - </target> - <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest,-do-jar-with-libraries-set-main,-do-jar-with-libraries-set-splashscreen,-do-jar-with-libraries-pack,-do-jar-with-libraries-delete-manifest" name="-do-jar-with-libraries"/> - <target depends="-jfx-copylibs,-rebase-libs,jfx-deployment" name="-post-jar"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-post-jar,-jfx-copylibs,-rebase-libs" description="Build JAR." name="jar"/> - <!-- - ================= - EXECUTION SECTION - ================= - --> - <target depends="init,compile,jar" description="Run a main class." name="run"> - <j2seproject1:java> - <customize> - <arg line="${application.args}"/> - </customize> - </j2seproject1:java> - </target> - <target name="-do-not-recompile"> - <property name="javac.includes.binary" value=""/> - </target> - <target depends="init,compile-single" name="run-single"> - <fail unless="run.class">Must select one file in the IDE or set run.class</fail> - <j2seproject1:java classname="${run.class}"/> - </target> - <target depends="init,compile-test-single" name="run-test-with-main"> - <fail unless="run.class">Must select one file in the IDE or set run.class</fail> - <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/> - </target> - <!-- - ================= - DEBUGGING SECTION - ================= - --> - <target depends="init" if="netbeans.home" name="-debug-start-debugger"> - <j2seproject1:nbjpdastart name="${debug.class}"/> - </target> - <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test"> - <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/> - </target> - <target depends="init,compile" name="-debug-start-debuggee"> - <j2seproject3:debug> - <customize> - <arg line="${application.args}"/> - </customize> - </j2seproject3:debug> - </target> - <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee,jar" description="Debug project in IDE." if="netbeans.home" name="debug"/> - <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto"> - <j2seproject1:nbjpdastart stopclassname="${main.class}"/> - </target> - <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/> - <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single"> - <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail> - <j2seproject3:debug classname="${debug.class}"/> - </target> - <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/> - <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test"> - <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail> - <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/> - </target> - <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/> - <target depends="init" name="-pre-debug-fix"> - <fail unless="fix.includes">Must set fix.includes</fail> - <property name="javac.includes" value="${fix.includes}.java"/> - </target> - <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix"> - <j2seproject1:nbjpdareload/> - </target> - <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/> - <!-- - ================= - PROFILING SECTION - ================= - --> - <!-- - pre NB7.2 profiler integration - --> - <target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72"> - <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> - <nbprofiledirect> - <classpath> - <path path="${run.classpath}"/> - </classpath> - </nbprofiledirect> - <profile/> - </target> - <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72"> - <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail> - <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> - <nbprofiledirect> - <classpath> - <path path="${run.classpath}"/> - </classpath> - </nbprofiledirect> - <profile classname="${profile.class}"/> - </target> - <target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72"> - <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> - <nbprofiledirect> - <classpath> - <path path="${run.classpath}"/> - </classpath> - </nbprofiledirect> - <profile classname="sun.applet.AppletViewer"> - <customize> - <arg value="${applet.url}"/> - </customize> - </profile> - </target> - <target depends="profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72"> - <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> - <nbprofiledirect> - <classpath> - <path path="${run.test.classpath}"/> - </classpath> - </nbprofiledirect> - <junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true"> - <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/> - <jvmarg value="${profiler.info.jvmargs.agent}"/> - <jvmarg line="${profiler.info.jvmargs}"/> - <test name="${profile.class}"/> - <classpath> - <path path="${run.test.classpath}"/> - </classpath> - <syspropertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <formatter type="brief" usefile="false"/> - <formatter type="xml"/> - </junit> - </target> - <!-- - end of pre NB72 profiling section - --> - <target if="netbeans.home" name="-profile-check"> - <condition property="profiler.configured"> - <or> - <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/> - <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/> - </or> - </condition> - </target> - <target depends="-profile-check,-profile-pre72,jar" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent"> - <startprofiler/> - <antcall target="run"/> - </target> - <target depends="-profile-check,-profile-single-pre72" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-single" unless="profiler.info.jvmargs.agent"> - <fail unless="run.class">Must select one file in the IDE or set run.class</fail> - <startprofiler/> - <antcall target="run-single"/> - </target> - <target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/> - <target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs"> - <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail> - <startprofiler/> - <antcall target="test-single"/> - </target> - <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main"> - <fail unless="run.class">Must select one file in the IDE or set run.class</fail> - <startprofiler/> - <antcal target="run-test-with-main"/> - </target> - <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent"> - <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> - <startprofiler/> - <antcall target="run-applet"/> - </target> - <!-- - =============== - JAVADOC SECTION - =============== - --> - <target depends="init" if="have.sources" name="-javadoc-build"> - <mkdir dir="${dist.javadoc.dir}"/> - <condition else="" property="javadoc.endorsed.classpath.cmd.line.arg" value="-J${endorsed.classpath.cmd.line.arg}"> - <and> - <isset property="endorsed.classpath.cmd.line.arg"/> - <not> - <equals arg1="${endorsed.classpath.cmd.line.arg}" arg2=""/> - </not> - </and> - </condition> - <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}"> - <classpath> - <path path="${javac.classpath}"/> - </classpath> - <fileset dir="${src.dir}" excludes="*.java,${excludes}" includes="${includes}"> - <filename name="**/*.java"/> - </fileset> - <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false"> - <include name="**/*.java"/> - <exclude name="*.java"/> - </fileset> - <arg line="${javadoc.endorsed.classpath.cmd.line.arg}"/> - </javadoc> - <copy todir="${dist.javadoc.dir}"> - <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}"> - <filename name="**/doc-files/**"/> - </fileset> - <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false"> - <include name="**/doc-files/**"/> - </fileset> - </copy> - </target> - <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview"> - <nbbrowse file="${dist.javadoc.dir}/index.html"/> - </target> - <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/> - <!-- - ========================= - TEST COMPILATION SECTION - ========================= - --> - <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test"> - <mkdir dir="${build.test.classes.dir}"/> - </target> - <target name="-pre-compile-test"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target if="do.depend.true" name="-compile-test-depend"> - <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/> - </target> - <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test"> - <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" processorpath="${javac.test.processorpath}" srcdir="${test.src.dir}"/> - <copy todir="${build.test.classes.dir}"> - <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> - </copy> - </target> - <target name="-post-compile-test"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/> - <target name="-pre-compile-test-single"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single"> - <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail> - <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/> - <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" processorpath="${javac.test.processorpath}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/> - <copy todir="${build.test.classes.dir}"> - <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> - </copy> - </target> - <target name="-post-compile-test-single"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/> - <!-- - ======================= - TEST EXECUTION SECTION - ======================= - --> - <target depends="init" if="have.tests" name="-pre-test-run"> - <mkdir dir="${build.test.results.dir}"/> - </target> - <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run"> - <j2seproject3:test testincludes="**/*Test.java"/> - </target> - <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run"> - <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail> - </target> - <target depends="init" if="have.tests" name="test-report"/> - <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/> - <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/> - <target depends="init" if="have.tests" name="-pre-test-run-single"> - <mkdir dir="${build.test.results.dir}"/> - </target> - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single"> - <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail> - <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/> - </target> - <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single"> - <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail> - </target> - <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/> - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method"> - <fail unless="test.class">Must select some files in the IDE or set test.class</fail> - <fail unless="test.method">Must select some method in the IDE or set test.method</fail> - <j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/> - </target> - <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method"> - <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail> - </target> - <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method,-post-test-run-single-method" description="Run single unit test." name="test-single-method"/> - <!-- - ======================= - TEST DEBUGGING SECTION - ======================= - --> - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test"> - <fail unless="test.class">Must select one file in the IDE or set test.class</fail> - <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/> - </target> - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method"> - <fail unless="test.class">Must select one file in the IDE or set test.class</fail> - <fail unless="test.method">Must select some method in the IDE or set test.method</fail> - <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/> - </target> - <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test"> - <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/> - </target> - <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/> - <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/> - <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test"> - <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/> - </target> - <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/> - <!-- - ========================= - APPLET EXECUTION SECTION - ========================= - --> - <target depends="init,compile-single" name="run-applet"> - <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> - <j2seproject1:java classname="sun.applet.AppletViewer"> - <customize> - <arg value="${applet.url}"/> - </customize> - </j2seproject1:java> - </target> - <!-- - ========================= - APPLET DEBUGGING SECTION - ========================= - --> - <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet"> - <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> - <j2seproject3:debug classname="sun.applet.AppletViewer"> - <customize> - <arg value="${applet.url}"/> - </customize> - </j2seproject3:debug> - </target> - <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/> - <!-- - =============== - CLEANUP SECTION - =============== - --> - <target name="-deps-clean-init" unless="built-clean.properties"> - <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/> - <delete file="${built-clean.properties}" quiet="true"/> - </target> - <target if="already.built.clean.${basedir}" name="-warn-already-built-clean"> - <echo level="warn" message="Cycle detected: SceneBuilderTest was already built"/> - </target> - <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps"> - <mkdir dir="${build.dir}"/> - <touch file="${built-clean.properties}" verbose="false"/> - <property file="${built-clean.properties}" prefix="already.built.clean."/> - <antcall target="-warn-already-built-clean"/> - <propertyfile file="${built-clean.properties}"> - <entry key="${basedir}" value=""/> - </propertyfile> - <antcall target="-maybe-call-dep"> - <param name="call.built.properties" value="${built-clean.properties}"/> - <param location="${project.GlassImage}" name="call.subproject"/> - <param location="${project.GlassImage}/build.xml" name="call.script"/> - <param name="call.target" value="clean"/> - <param name="transfer.built-clean.properties" value="${built-clean.properties}"/> - </antcall> - <antcall target="-maybe-call-dep"> - <param name="call.built.properties" value="${built-clean.properties}"/> - <param location="${project.GlassRobot}" name="call.subproject"/> - <param location="${project.GlassRobot}/build.xml" name="call.script"/> - <param name="call.target" value="clean"/> - <param name="transfer.built-clean.properties" value="${built-clean.properties}"/> - </antcall> - <antcall target="-maybe-call-dep"> - <param name="call.built.properties" value="${built-clean.properties}"/> - <param location="${project.JemmyFX}" name="call.subproject"/> - <param location="${project.JemmyFX}/build.xml" name="call.script"/> - <param name="call.target" value="clean"/> - <param name="transfer.built-clean.properties" value="${built-clean.properties}"/> - </antcall> - <antcall target="-maybe-call-dep"> - <param name="call.built.properties" value="${built-clean.properties}"/> - <param location="${project.JemmyFXBrowser}" name="call.subproject"/> - <param location="${project.JemmyFXBrowser}/build.xml" name="call.script"/> - <param name="call.target" value="clean"/> - <param name="transfer.built-clean.properties" value="${built-clean.properties}"/> - </antcall> - </target> - <target depends="init" name="-do-clean"> - <delete dir="${build.dir}"/> - <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/> - </target> - <target name="-post-clean"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/> - <target name="-check-call-dep"> - <property file="${call.built.properties}" prefix="already.built."/> - <condition property="should.call.dep"> - <and> - <not> - <isset property="already.built.${call.subproject}"/> - </not> - <available file="${call.script}"/> - </and> - </condition> - </target> - <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep"> - <ant antfile="${call.script}" inheritall="false" target="${call.target}"> - <propertyset> - <propertyref prefix="transfer."/> - <mapper from="transfer.*" to="*" type="glob"/> - </propertyset> - </ant> - </target> -</project> diff --git a/bigapps/SceneBuilderTest/nbproject/configs/Run_as_WebStart.properties b/bigapps/SceneBuilderTest/nbproject/configs/Run_as_WebStart.properties deleted file mode 100644 index e69de29b..00000000 diff --git a/bigapps/SceneBuilderTest/nbproject/configs/Run_in_Browser.properties b/bigapps/SceneBuilderTest/nbproject/configs/Run_in_Browser.properties deleted file mode 100644 index e69de29b..00000000 diff --git a/bigapps/SceneBuilderTest/nbproject/genfiles.properties b/bigapps/SceneBuilderTest/nbproject/genfiles.properties deleted file mode 100644 index 0676da8a..00000000 --- a/bigapps/SceneBuilderTest/nbproject/genfiles.properties +++ /dev/null @@ -1,8 +0,0 @@ -build.xml.data.CRC32=30a9b89f -build.xml.script.CRC32=52e8bbe8 -build.xml.stylesheet.CRC32=28e38971@1.53.1.46 -# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. -# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. -nbproject/build-impl.xml.data.CRC32=fa16cdae -nbproject/build-impl.xml.script.CRC32=fd5a3f83 -nbproject/build-impl.xml.stylesheet.CRC32=6ddba6b6@1.53.1.46 diff --git a/bigapps/SceneBuilderTest/nbproject/jfx-impl.xml b/bigapps/SceneBuilderTest/nbproject/jfx-impl.xml deleted file mode 100644 index ed52086f..00000000 --- a/bigapps/SceneBuilderTest/nbproject/jfx-impl.xml +++ /dev/null @@ -1,2374 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -*** GENERATED FROM TEMPLATE - DO NOT EDIT *** -*** EDIT ../build.xml INSTEAD *** ---> - -<project name="jfx-impl" default="jfx-deployment" basedir=".." xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" - xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:fx="javafx:com.sun.javafx.tools.ant"> - <description>JavaFX-specific Ant calls</description> - - - <!-- Empty placeholders for easier customization in ../build.xml --> - - <target name="-pre-jfx-jar"> - <!-- Called right before <fx:jar> task. You can override this target in the ../build.xml file. --> - </target> - - <target name="-post-jfx-jar"> - <!-- Called right after <fx:jar> task. You can override this target in the ../build.xml file. --> - </target> - - <target name="-pre-jfx-deploy"> - <!-- Called right before <fx:deploy> task. You can override this target in the ../build.xml file. --> - </target> - - <target name="-post-jfx-deploy"> - <!-- Called right after <fx:deploy> task. You can override this target in the ../build.xml file. --> - </target> - - - <!-- Check system and JDK version --> - - <target name="-check-operating-system"> - <condition property="running.on.unix"> - <os family="unix"/> - </condition> - <condition property="running.on.windows"> - <os family="windows"/> - </condition> - <echo message="running.on.unix = ${running.on.unix}" level="verbose"/> - <echo message="running.on.windows = ${running.on.windows}" level="verbose"/> - </target> - - <target name="-check-platform-home-fxsdk-java" depends="-check-property-javafx.sdk" if="javafx.sdk.defined"> - <condition property="do.set.platform.home.fxsdk.java"> - <and> - <not><isset property="active.platform.home.java.executable"/></not> - <or> - <available file="${javafx.sdk}${file.separator}bin${file.separator}java"/> - <available file="${javafx.sdk}${file.separator}bin${file.separator}java.exe"/> - </or> - </and> - </condition> - </target> - <target name="-set-platform-home-fxsdk-java" depends="-check-platform-home-fxsdk-java" if="do.set.platform.home.fxsdk.java"> - <property name="active.platform.home.java.executable" value="${javafx.sdk}${file.separator}bin${file.separator}java"/> - </target> - <target name="-check-platform-home-java" if="platform.home"> - <condition property="do.set.platform.home.java"> - <and> - <not><isset property="active.platform.home.java.executable"/></not> - <or> - <available file="${platform.home}${file.separator}bin${file.separator}java"/> - <available file="${platform.home}${file.separator}bin${file.separator}java.exe"/> - </or> - </and> - </condition> - </target> - <target name="-set-platform-home-java" depends="-set-platform-home-fxsdk-java,-check-platform-home-java" if="do.set.platform.home.java"> - <property name="active.platform.home.java.executable" value="${platform.home}${file.separator}bin${file.separator}java"/> - </target> - <target name="-check-platform-home-probjdk-java" unless="active.platform.home.java.executable"> - <condition property="do.set.platform.home.probjdk.java"> - <and> - <not><isset property="active.platform.home.java.executable"/></not> - <or> - <available file="${java.home}${file.separator}..${file.separator}bin${file.separator}java"/> - <available file="${java.home}${file.separator}..${file.separator}bin${file.separator}java.exe"/> - </or> - </and> - </condition> - </target> - <target name="-set-platform-home-probjdk-java" depends="-set-platform-home-java,-check-platform-home-probjdk-java" if="do.set.platform.home.probjdk.java"> - <property name="active.platform.home.java.executable" value="${java.home}${file.separator}..${file.separator}bin${file.separator}java"/> - </target> - <target name="-check-platform-home-envjdk-java" unless="active.platform.home.java.executable"> - <property environment="env"/> - <condition property="do.set.platform.home.envjdk.java"> - <and> - <not><isset property="active.platform.home.java.executable"/></not> - <or> - <available file="${env.JAVA_HOME}${file.separator}bin${file.separator}java"/> - <available file="${env.JAVA_HOME}${file.separator}bin${file.separator}java.exe"/> - </or> - </and> - </condition> - </target> - <target name="-set-platform-home-envjdk-java" depends="-set-platform-home-probjdk-java,-check-platform-home-envjdk-java" if="do.set.platform.home.envjdk.java"> - <property environment="env"/> - <property name="active.platform.home.java.executable" value="${env.JAVA_HOME}${file.separator}bin${file.separator}java"/> - </target> - <target name="-check-platform-home-fxrt-java" depends="-check-property-javafx.runtime" if="javafx.runtime.defined"> - <condition property="do.set.platform.home.fxrt.java"> - <and> - <not><isset property="active.platform.home.java.executable"/></not> - <or> - <available file="${javafx.runtime}${file.separator}bin${file.separator}java"/> - <available file="${javafx.runtime}${file.separator}bin${file.separator}java.exe"/> - </or> - </and> - </condition> - </target> - <target name="-set-platform-home-fxrt-java" depends="-set-platform-home-envjdk-java,-check-platform-home-fxrt-java" if="do.set.platform.home.fxrt.java"> - <property name="active.platform.home.java.executable" value="${javafx.runtime}${file.separator}bin${file.separator}java"/> - <echo message="Warning: java executable not found in JDK, evaluating java executable in RT instead." level="info"/> - </target> - <target name="-check-platform-home-jre-java" unless="active.platform.home.java.executable"> - <condition property="do.set.platform.home.jre.java"> - <and> - <not><isset property="active.platform.home.java.executable"/></not> - <or> - <available file="${java.home}${file.separator}bin${file.separator}java"/> - <available file="${java.home}${file.separator}bin${file.separator}java.exe"/> - </or> - </and> - </condition> - </target> - <target name="-set-platform-home-jre-java" depends="-set-platform-home-fxrt-java,-check-platform-home-jre-java" if="do.set.platform.home.jre.java"> - <property name="active.platform.home.java.executable" value="${java.home}${file.separator}bin${file.separator}java"/> - <echo message="Warning: java executable not found in JDK, evaluating java executable in RT instead." level="info"/> - </target> - <target name="-check-platform-home" depends="-set-platform-home-jre-java"> - <echo message="active.platform.home.java.executable = ${active.platform.home.java.executable}" level="verbose"/> - <fail message="Error:${line.separator}java executable not found !" unless="active.platform.home.java.executable"/> - </target> - - <target name="-check-jdk-version" depends="-do-init,-check-platform-home" unless="jdk-version-checked-in-jfximpl"> - <local name="version-output"/> - <exec executable="${active.platform.home.java.executable}" outputproperty="version-output"> - <arg value="-version"/> - </exec> - <echo message="version-output:${line.separator}${version-output}" level="verbose"/> - <condition property="have-jdk-older-than-1.6"> - <or> - <contains string="${version-output}" substring="java version "1.0"/> - <contains string="${version-output}" substring="java version "1.1"/> - <contains string="${version-output}" substring="java version "1.2"/> - <contains string="${version-output}" substring="java version "1.3"/> - <contains string="${version-output}" substring="java version "1.4"/> - <contains string="${version-output}" substring="java version "1.5"/> - </or> - </condition> - <fail message="Error:${line.separator}JavaFX 2.0+ projects require JDK version 1.6+ !" if="have-jdk-older-than-1.6"/> - <condition property="have-jdk-7u4or5-mac"> - <and> - <or> - <contains string="${version-output}" substring="java version "1.7.0_04"/> - <contains string="${version-output}" substring="java version "1.7.0_05"/> - </or> - <os family="mac"/> - </and> - </condition> - <condition property="have-jdk-pre7u6"> - <or> - <contains string="${version-output}" substring="java version "1.6"/> - <contains string="${version-output}" substring="java version "1.7.0""/> - <contains string="${version-output}" substring="java version "1.7.0_01"/> - <contains string="${version-output}" substring="java version "1.7.0_02"/> - <contains string="${version-output}" substring="java version "1.7.0_03"/> - <contains string="${version-output}" substring="java version "1.7.0_04"/> - <contains string="${version-output}" substring="java version "1.7.0_05"/> - </or> - </condition> - <property name="jdk-version-checked-in-jfximpl" value="true"/> - <echo message="have-jdk-7u4or5-mac = ${have-jdk-7u4or5-mac}" level="verbose"/> - <echo message="have-jdk-pre7u6 = ${have-jdk-pre7u6}" level="verbose"/> - </target> - - <target name="-check-jdk-7u4or5-mac" depends="-check-jdk-version" if="have-jdk-7u4or5-mac"> - <fail message="Error:${line.separator}JDK 7u4 Mac and 7u5 Mac do not support WebStart and JavaFX 2.0+ browser plugin technologies.${line.separator}Please upgrade to JDK 7u6 or later."/> - </target> - - - <!-- Check availability of JavaFX SDK deployment support (ant-javafx.jar) --> - - <target name="-check-endorsed-javafx-ant-classpath"> - <condition property="endorsed-javafx-ant-classpath-available"> - <and> - <isset property="endorsed.javafx.ant.classpath"/> - <not> - <equals arg1="${endorsed.javafx.ant.classpath}" arg2=""/> - </not> - </and> - </condition> - <echo message="endorsed-javafx-ant-classpath-available = ${endorsed-javafx-ant-classpath-available}" level="verbose"/> - </target> - - <target name="-check-property-javafx.sdk"> - <echo message="javafx.sdk = ${javafx.sdk}" level="verbose"/> - <condition property="javafx.sdk.defined"> - <and> - <isset property="javafx.sdk"/> - <not><contains string="${javafx.sdk}" substring="$${platform" casesensitive="false"/></not> - </and> - </condition> - <condition property="javafx.sdk.missing+default"> - <and> - <equals arg1="${platform.active}" arg2="Default_JavaFX_Platform" trim="true"/> - <not><isset property="javafx.sdk.defined"/></not> - </and> - </condition> - <condition property="javafx.sdk.missing-default"> - <and> - <not><equals arg1="${platform.active}" arg2="Default_JavaFX_Platform" trim="true"/></not> - <not><isset property="javafx.sdk.defined"/></not> - </and> - </condition> - <echo message="javafx.sdk.defined = ${javafx.sdk.defined}" level="verbose"/> - <echo message="javafx.sdk.missing+default = ${javafx.sdk.missing+default}" level="verbose"/> - <echo message="javafx.sdk.missing-default = ${javafx.sdk.missing-default}" level="verbose"/> - </target> - - <target name="-check-ant-javafx-in-fxsdk-lib" depends="-check-property-javafx.sdk" if="javafx.sdk.defined"> - <condition property="do.set.ant-javafx.in.fxsdk.lib"> - <and> - <not><isset property="ant-javafx.jar.location"/></not> - <available file="${javafx.sdk}${file.separator}lib${file.separator}ant-javafx.jar"/> - </and> - </condition> - </target> - <target name="-set-ant-javafx-in-fxsdk-lib" depends="-check-ant-javafx-in-fxsdk-lib" if="do.set.ant-javafx.in.fxsdk.lib"> - <property name="ant-javafx.jar.location" value="${javafx.sdk}${file.separator}lib${file.separator}ant-javafx.jar"/> - </target> - <target name="-check-ant-javafx-in-fxsdk-tools" depends="-check-property-javafx.sdk" if="javafx.sdk.defined"> - <condition property="do.set.ant-javafx.in.fxsdk.tools"> - <and> - <not><isset property="ant-javafx.jar.location"/></not> - <available file="${javafx.sdk}${file.separator}tools${file.separator}ant-javafx.jar"/> - </and> - </condition> - </target> - <target name="-set-ant-javafx-in-fxsdk-tools" depends="-set-ant-javafx-in-fxsdk-lib,-check-ant-javafx-in-fxsdk-tools" if="do.set.ant-javafx.in.fxsdk.tools"> - <property name="ant-javafx.jar.location" value="${javafx.sdk}${file.separator}tools${file.separator}ant-javafx.jar"/> - </target> - <target name="-check-ant-javafx-in-platform-home-lib" if="platform.home"> - <condition property="do.set.ant-javafx.in.platform.home.lib"> - <and> - <not><isset property="ant-javafx.jar.location"/></not> - <available file="${platform.home}${file.separator}lib${file.separator}ant-javafx.jar"/> - </and> - </condition> - </target> - <target name="-set-ant-javafx-in-platform-home-lib" depends="-set-ant-javafx-in-fxsdk-tools,-check-ant-javafx-in-platform-home-lib" if="do.set.ant-javafx.in.platform.home.lib"> - <property name="ant-javafx.jar.location" value="${platform.home}${file.separator}lib${file.separator}ant-javafx.jar"/> - </target> - <target name="-check-ant-javafx-in-platform-home-tools" if="platform.home"> - <condition property="do.set.ant-javafx.in.platform.home.tools"> - <and> - <not><isset property="ant-javafx.jar.location"/></not> - <available file="${platform.home}${file.separator}tools${file.separator}ant-javafx.jar"/> - </and> - </condition> - </target> - <target name="-set-ant-javafx-in-platform-home-tools" depends="-set-ant-javafx-in-platform-home-lib,-check-ant-javafx-in-platform-home-tools" if="do.set.ant-javafx.in.platform.home.tools"> - <property name="ant-javafx.jar.location" value="${platform.home}${file.separator}tools${file.separator}ant-javafx.jar"/> - </target> - <target name="-check-ant-javafx-in-probjdk-lib" unless="ant-javafx.jar.location"> - <condition property="do.set.ant-javafx.in.probjdk.lib"> - <and> - <not><isset property="ant-javafx.jar.location"/></not> - <available file="${java.home}${file.separator}..${file.separator}lib${file.separator}ant-javafx.jar"/> - </and> - </condition> - </target> - <target name="-set-ant-javafx-in-probjdk-lib" depends="-set-ant-javafx-in-platform-home-tools,-check-ant-javafx-in-probjdk-lib" if="do.set.ant-javafx.in.probjdk.lib"> - <property name="ant-javafx.jar.location" value="${java.home}${file.separator}..${file.separator}lib${file.separator}ant-javafx.jar"/> - </target> - <target name="-check-ant-javafx-in-probjdk-tools" unless="ant-javafx.jar.location"> - <condition property="do.set.ant-javafx.in.probjdk.tools"> - <and> - <not><isset property="ant-javafx.jar.location"/></not> - <available file="${java.home}${file.separator}..${file.separator}tools${file.separator}ant-javafx.jar"/> - </and> - </condition> - </target> - <target name="-set-ant-javafx-in-probjdk-tools" depends="-set-ant-javafx-in-probjdk-lib,-check-ant-javafx-in-probjdk-tools" if="do.set.ant-javafx.in.probjdk.tools"> - <property name="ant-javafx.jar.location" value="${java.home}${file.separator}..${file.separator}tools${file.separator}ant-javafx.jar"/> - </target> - <target name="-check-ant-javafx-in-macjdk-lib" unless="ant-javafx.jar.location"> - <condition property="do.set.ant-javafx.in.macjdk.lib"> - <and> - <not><isset property="ant-javafx.jar.location"/></not> - <available file="${java.home}${file.separator}lib${file.separator}ant-javafx.jar"/> - </and> - </condition> - </target> - <target name="-set-ant-javafx-in-macjdk-lib" depends="-set-ant-javafx-in-probjdk-tools,-check-ant-javafx-in-macjdk-lib" if="do.set.ant-javafx.in.macjdk.lib"> - <property name="ant-javafx.jar.location" value="${java.home}${file.separator}lib${file.separator}ant-javafx.jar"/> - </target> - <target name="-check-ant-javafx-in-envjdk-lib" unless="ant-javafx.jar.location"> - <property environment="env"/> - <condition property="do.set.ant-javafx.in.envjdk.lib"> - <and> - <not><isset property="ant-javafx.jar.location"/></not> - <available file="${env.JAVA_HOME}${file.separator}lib${file.separator}ant-javafx.jar"/> - </and> - </condition> - </target> - <target name="-set-ant-javafx-in-envjdk-lib" depends="-set-ant-javafx-in-macjdk-lib,-check-ant-javafx-in-envjdk-lib" if="do.set.ant-javafx.in.envjdk.lib"> - <property name="ant-javafx.jar.location" value="${env.JAVA_HOME}${file.separator}lib${file.separator}ant-javafx.jar"/> - </target> - <target name="-check-ant-javafx-in-envjdk-tools" unless="ant-javafx.jar.location"> - <property environment="env"/> - <condition property="do.set.ant-javafx.in.envjdk.tools"> - <and> - <not><isset property="ant-javafx.jar.location"/></not> - <available file="${env.JAVA_HOME}${file.separator}tools${file.separator}ant-javafx.jar"/> - </and> - </condition> - </target> - <target name="-set-ant-javafx-in-envjdk-tools" depends="-set-ant-javafx-in-envjdk-lib,-check-ant-javafx-in-envjdk-tools" if="do.set.ant-javafx.in.envjdk.tools"> - <property name="ant-javafx.jar.location" value="${env.JAVA_HOME}${file.separator}tools${file.separator}ant-javafx.jar"/> - </target> - <target name="-pre-check-ant-javafx-version" depends="-set-ant-javafx-in-envjdk-tools" unless="ant-javafx-version-already-checked-in-jfximpl"> - <condition property="do.check.ant-javafx.version"> - <and> - <isset property="ant-javafx.jar.location"/> - <not><isset property="ant-javafx-version-already-checked-in-jfximpl"/></not> - </and> - </condition> - </target> - <target name="-set-endorsed-javafx-ant-classpath" depends="-check-endorsed-javafx-ant-classpath,-pre-check-ant-javafx-version" if="endorsed-javafx-ant-classpath-available"> - <property name="javafx.ant.classpath" value="${endorsed.javafx.ant.classpath}:${ant-javafx.jar.location}"/> - </target> - <target name="-set-javafx-ant-classpath" depends="-check-endorsed-javafx-ant-classpath,-pre-check-ant-javafx-version" unless="endorsed-javafx-ant-classpath-available"> - <property name="javafx.ant.classpath" value="${ant-javafx.jar.location}"/> - </target> - <target name="-check-ant-javafx-version" depends="-pre-check-ant-javafx-version, - -set-endorsed-javafx-ant-classpath,-set-javafx-ant-classpath" if="do.check.ant-javafx.version"> - <echo message="ant-javafx.jar.location = ${ant-javafx.jar.location}" level="verbose"/> - <echo message="javafx.ant.classpath = ${javafx.ant.classpath}" level="verbose"/> - <taskdef resource="com/sun/javafx/tools/ant/antlib.xml" - uri="javafx:com.sun.javafx.tools.ant" - classpath="${javafx.ant.classpath}"/> - <condition property="have-fx-ant-init"> - <typefound name="javafx:com.sun.javafx.tools.ant:init-ant"/> - </condition> - <property name="ant-javafx-version-already-checked-in-jfximpl" value="true"/> - <echo message="have-fx-ant-init = ${have-fx-ant-init}" level="verbose"/> - </target> - <target name="-check-jfx-sdk-version-old" depends="-check-ant-javafx-version" unless="have-fx-ant-init"> - <property name="javafx.ant.version" value="1.0"/> - </target> - <target name="-check-jfx-sdk-version-new" depends="-check-ant-javafx-version" if="have-fx-ant-init"> - <fx:init-ant/> - <condition property="have-fx-ant-api-1.1"> - <!-- new features from JavaFX 2.0.2 are available in API version 1.1 or later --> - <matches pattern="1.[1-9]" string="${javafx.ant.version}"/> - </condition> - </target> - <target name="-check-jfx-sdk-version" depends="-check-jfx-sdk-version-old, -check-jfx-sdk-version-new"> - <echo message="Detected JavaFX Ant API version ${javafx.ant.version}" level="info"/> - <echo message="have-fx-ant-api-1.1 = ${have-fx-ant-api-1.1}" level="verbose"/> - <echo message="javafx.ant.classpath = ${javafx.ant.classpath}" level="verbose"/> - </target> - - <target name="-check-jfx-deployment" depends="-check-jdk-version,-check-jfx-sdk-version"> - <condition property="jfx-deployment-available"> - <and> - <or> - <isset property="do.set.ant-javafx.in.fxsdk.lib"/> - <isset property="do.set.ant-javafx.in.fxsdk.tools"/> - <isset property="do.set.ant-javafx.in.platform.home.lib"/> - <isset property="do.set.ant-javafx.in.platform.home.tools"/> - <isset property="do.set.ant-javafx.in.probjdk.lib"/> - <isset property="do.set.ant-javafx.in.probjdk.tools"/> - <isset property="do.set.ant-javafx.in.envjdk.lib"/> - <isset property="do.set.ant-javafx.in.envjdk.tools"/> - </or> - <isset property="ant-javafx.jar.location"/> - </and> - </condition> - <condition property="jfx-deployment-missing+jdk7u6"> - <and> - <not><isset property="jfx-deployment-available"/></not> - <not><isset property="have-jdk-pre7u6"/></not> - </and> - </condition> - <condition property="jfx-deployment-missing+javafx.sdk.missing+default"> - <and> - <not><isset property="jfx-deployment-available"/></not> - <isset property="have-jdk-pre7u6"/> - <isset property="javafx.sdk.missing+default"/> - </and> - </condition> - <condition property="jfx-deployment-missing+javafx.sdk.missing-default"> - <and> - <not><isset property="jfx-deployment-available"/></not> - <isset property="have-jdk-pre7u6"/> - <isset property="javafx.sdk.missing-default"/> - </and> - </condition> - <fail message="Error:${line.separator}JavaFX deployment library not found in active JDK.${line.separator}Please check that the JDK is correctly installed and its version is at least 7u4 on Mac or 7u6 on other systems." if="jfx-deployment-missing+jdk7u6"/> - <fail message="Error:${line.separator}JavaFX deployment library not found.${line.separator}JavaFX SDK path undefined. Check the definition of ${platform.active} in Java Platform Manager${line.separator}(or directly the properties platform.active and javafx.sdk in project.properties file).${line.separator}Note: If missing, the default JavaFX-enabled platform gets created automatically when creating a new FX Project." if="jfx-deployment-missing+javafx.sdk.missing+default"/> - <fail message="Error:${line.separator}JavaFX deployment library not found.${line.separator}JavaFX SDK path undefined. Check the definition of ${platform.active} in Java Platform Manager${line.separator}(or directly the properties platform.active and javafx.sdk in project.properties file)." if="jfx-deployment-missing+javafx.sdk.missing-default"/> - <fail message="Error:${line.separator}JavaFX deployment library not found." unless="jfx-deployment-available"/> - <echo message="jfx-deployment-available = ${jfx-deployment-available}" level="verbose"/> - </target> - - - <!-- Check availability of main JavaFX runtime jar (jfxrt.jar) --> - - <target name="-check-property-javafx.runtime"> - <echo message="javafx.runtime = ${javafx.runtime}" level="verbose"/> - <condition property="javafx.runtime.defined"> - <and> - <isset property="javafx.runtime"/> - <not><contains string="${javafx.runtime}" substring="$${platform" casesensitive="false"/></not> - </and> - </condition> - <condition property="javafx.runtime.missing+default"> - <and> - <equals arg1="${platform.active}" arg2="Default_JavaFX_Platform" trim="true"/> - <not><isset property="javafx.runtime.defined"/></not> - </and> - </condition> - <condition property="javafx.runtime.missing-default"> - <and> - <not><equals arg1="${platform.active}" arg2="Default_JavaFX_Platform" trim="true"/></not> - <not><isset property="javafx.runtime.defined"/></not> - </and> - </condition> - <echo message="javafx.runtime.defined = ${javafx.runtime.defined}" level="verbose"/> - <echo message="javafx.runtime.missing+default = ${javafx.runtime.missing+default}" level="verbose"/> - <echo message="javafx.runtime.missing-default = ${javafx.runtime.missing-default}" level="verbose"/> - </target> - - <target name="-check-jfxrt-in-fxrt" depends="-check-property-javafx.runtime" if="javafx.runtime.defined"> - <condition property="do.set.jfxrt.in.fxrt"> - <and> - <not><isset property="jfxrt.jar.location"/></not> - <available file="${javafx.runtime}${file.separator}lib${file.separator}jfxrt.jar"/> - </and> - </condition> - </target> - <target name="-set-jfxrt-in-fxrt" depends="-check-jfxrt-in-fxrt" if="do.set.jfxrt.in.fxrt"> - <property name="jfxrt.jar.location" value="${javafx.runtime}${file.separator}lib${file.separator}jfxrt.jar"/> - </target> - <target name="-check-jfxrt-in-fxsdk-jre" depends="-check-property-javafx.sdk" if="javafx.sdk.defined"> - <condition property="do.set.jfxrt.in.fxsdk.jre"> - <and> - <not><isset property="jfxrt.jar.location"/></not> - <available file="${javafx.sdk}${file.separator}jre${file.separator}lib${file.separator}jfxrt.jar"/> - </and> - </condition> - </target> - <target name="-set-jfxrt-in-fxsdk-jre" depends="-set-jfxrt-in-fxrt,-check-jfxrt-in-fxsdk-jre" if="do.set.jfxrt.in.fxsdk.jre"> - <property name="jfxrt.jar.location" value="${javafx.sdk}${file.separator}jre${file.separator}lib${file.separator}jfxrt.jar"/> - </target> - <target name="-check-jfxrt-in-fxsdk-rt" depends="-check-property-javafx.sdk" if="javafx.sdk.defined"> - <condition property="do.set.jfxrt.in.fxsdk.rt"> - <and> - <not><isset property="jfxrt.jar.location"/></not> - <available file="${javafx.sdk}${file.separator}rt${file.separator}lib${file.separator}jfxrt.jar"/> - </and> - </condition> - </target> - <target name="-set-jfxrt-in-fxsdk-rt" depends="-set-jfxrt-in-fxsdk-jre,-check-jfxrt-in-fxsdk-rt" if="do.set.jfxrt.in.fxsdk.rt"> - <property name="jfxrt.jar.location" value="${javafx.sdk}${file.separator}rt${file.separator}lib${file.separator}jfxrt.jar"/> - </target> - <target name="-check-jfxrt-in-platform-home-jre" if="platform.home"> - <condition property="do.set.jfxrt.in.platform.home.jre"> - <and> - <not><isset property="jfxrt.jar.location"/></not> - <available file="${platform.home}${file.separator}jre${file.separator}lib${file.separator}jfxrt.jar"/> - </and> - </condition> - </target> - <target name="-set-jfxrt-in-platform-home-jre" depends="-set-jfxrt-in-fxsdk-rt,-check-jfxrt-in-platform-home-jre" if="do.set.jfxrt.in.platform.home.jre"> - <property name="jfxrt.jar.location" value="${platform.home}${file.separator}jre${file.separator}lib${file.separator}jfxrt.jar"/> - </target> - <target name="-check-jfxrt-in-platform-home-rt" if="platform.home"> - <condition property="do.set.jfxrt.in.platform.home.rt"> - <and> - <not><isset property="jfxrt.jar.location"/></not> - <available file="${platform.home}${file.separator}rt${file.separator}lib${file.separator}jfxrt.jar"/> - </and> - </condition> - </target> - <target name="-set-jfxrt-in-platform-home-rt" depends="-set-jfxrt-in-platform-home-jre,-check-jfxrt-in-platform-home-rt" if="do.set.jfxrt.in.platform.home.rt"> - <property name="jfxrt.jar.location" value="${platform.home}${file.separator}rt${file.separator}lib${file.separator}jfxrt.jar"/> - </target> - <target name="-check-jfxrt-in-jre" unless="jfxrt.jar.location"> - <condition property="do.set.jfxrt.in.jre"> - <and> - <not><isset property="jfxrt.jar.location"/></not> - <available file="${java.home}${file.separator}lib${file.separator}jfxrt.jar"/> - </and> - </condition> - </target> - <target name="-set-jfxrt-in-jre" depends="-set-jfxrt-in-platform-home-rt,-check-jfxrt-in-jre" if="do.set.jfxrt.in.jre"> - <property name="jfxrt.jar.location" value="${java.home}${file.separator}lib${file.separator}jfxrt.jar"/> - </target> - <target name="-check-jfxrt-in-envjdk-jre" unless="jfxrt.jar.location"> - <property environment="env"/> - <condition property="do.set.jfxrt.in.envjdk.jre"> - <and> - <not><isset property="ant-javafx.jar.location"/></not> - <available file="${env.JAVA_HOME}${file.separator}jre${file.separator}lib${file.separator}jfxrt.jar"/> - </and> - </condition> - </target> - <target name="-set-jfxrt-in-envjdk-jre" depends="-set-jfxrt-in-jre,-check-jfxrt-in-envjdk-jre" if="do.set.jfxrt.in.envjdk.jre"> - <property name="jfxrt.jar.location" value="${env.JAVA_HOME}${file.separator}jre${file.separator}lib${file.separator}jfxrt.jar"/> - </target> - <target name="-pre-check-jfx-runtime" depends="-set-jfxrt-in-envjdk-jre"> - <echo message="jfxrt.jar.location = ${jfxrt.jar.location}" level="verbose"/> - </target> - - <target name="-check-jfx-runtime" depends="-check-jdk-version, -pre-check-jfx-runtime"> - <condition property="jfx-runtime-available"> - <and> - <or> - <isset property="do.set.jfxrt.in.fxrt"/> - <isset property="do.set.jfxrt.in.fxsdk.jre"/> - <isset property="do.set.jfxrt.in.fxsdk.rt"/> - <isset property="do.set.jfxrt.in.platform.home.jre"/> - <isset property="do.set.jfxrt.in.platform.home.rt"/> - <isset property="do.set.jfxrt.in.jre"/> - <isset property="do.set.jfxrt.in.envjdk.jre"/> - </or> - <isset property="jfxrt.jar.location"/> - </and> - </condition> - <fail message="Error:${line.separator}JavaFX runtime JAR not found." unless="jfx-runtime-available"/> - <echo message="jfx-runtime-available = ${jfx-runtime-available}" level="verbose"/> - </target> - - - <!-- Check availability of WebStart executable --> - - <target name="-check-webstart-in-fxrt" depends="-check-property-javafx.runtime" if="javafx.runtime.defined"> - <condition property="do.set.webstart.in.fxrt"> - <and> - <not><isset property="active.webstart.executable"/></not> - <isset property="javafx.runtime.defined"/> - <or> - <available file="${javafx.runtime}${file.separator}bin${file.separator}javaws.exe"/> - <available file="${javafx.runtime}${file.separator}bin${file.separator}javaws"/> - </or> - </and> - </condition> - </target> - <target name="-set-webstart-in-fxrt" depends="-check-webstart-in-fxrt" if="do.set.webstart.in.fxrt"> - <property name="active.webstart.executable" value="${javafx.runtime}${file.separator}bin${file.separator}javaws"/> - </target> - <target name="-check-webstart-in-fxsdk-jre" depends="-check-property-javafx.sdk" if="javafx.sdk.defined"> - <condition property="do.set.webstart.in.fxsdk.jre"> - <and> - <not><isset property="active.webstart.executable"/></not> - <isset property="javafx.sdk.defined"/> - <or> - <available file="${javafx.sdk}${file.separator}jre${file.separator}bin${file.separator}javaws.exe"/> - <available file="${javafx.sdk}${file.separator}jre${file.separator}bin${file.separator}javaws"/> - </or> - </and> - </condition> - </target> - <target name="-set-webstart-in-fxsdk-jre" depends="-set-webstart-in-fxrt,-check-webstart-in-fxsdk-jre" if="do.set.webstart.in.fxsdk.jre"> - <property name="active.webstart.executable" value="${javafx.sdk}${file.separator}jre${file.separator}bin${file.separator}javaws"/> - </target> - <target name="-check-webstart-in-fxsdk" depends="-check-property-javafx.sdk" if="javafx.sdk.defined"> - <condition property="do.set.webstart.in.fxsdk"> - <and> - <not><isset property="active.webstart.executable"/></not> - <isset property="javafx.sdk.defined"/> - <or> - <available file="${javafx.sdk}${file.separator}bin${file.separator}javaws.exe"/> - <available file="${javafx.sdk}${file.separator}bin${file.separator}javaws"/> - </or> - </and> - </condition> - </target> - <target name="-set-webstart-in-fxsdk" depends="-set-webstart-in-fxsdk-jre,-check-webstart-in-fxsdk" if="do.set.webstart.in.fxsdk"> - <property name="active.webstart.executable" value="${javafx.sdk}${file.separator}bin${file.separator}javaws"/> - </target> - <target name="-check-webstart-in-platform-home-jre" if="platform.home"> - <condition property="do.set.webstart.in.platform.home.jre"> - <and> - <not><isset property="active.webstart.executable"/></not> - <or> - <available file="${platform.home}${file.separator}jre${file.separator}bin${file.separator}javaws.exe"/> - <available file="${platform.home}${file.separator}jre${file.separator}bin${file.separator}javaws"/> - </or> - </and> - </condition> - </target> - <target name="-set-webstart-in-platform-home-jre" depends="-set-webstart-in-fxsdk,-check-webstart-in-platform-home-jre" if="do.set.webstart.in.platform.home.jre"> - <property name="active.webstart.executable" value="${platform.home}${file.separator}jre${file.separator}bin${file.separator}javaws"/> - </target> - <target name="-check-webstart-in-platform-home" if="platform.home"> - <condition property="do.set.webstart.in.platform.home"> - <and> - <not><isset property="active.webstart.executable"/></not> - <or> - <available file="${platform.home}${file.separator}bin${file.separator}javaws.exe"/> - <available file="${platform.home}${file.separator}bin${file.separator}javaws"/> - </or> - </and> - </condition> - </target> - <target name="-set-webstart-in-platform-home" depends="-set-webstart-in-platform-home-jre,-check-webstart-in-platform-home" if="do.set.webstart.in.platform.home"> - <property name="active.webstart.executable" value="${platform.home}${file.separator}bin${file.separator}javaws"/> - </target> - <target name="-check-webstart-in-jre" unless="active.webstart.executable"> - <condition property="do.set.webstart.in.jre"> - <and> - <not><isset property="active.webstart.executable"/></not> - <or> - <available file="${java.home}${file.separator}bin${file.separator}javaws.exe"/> - <available file="${java.home}${file.separator}bin${file.separator}javaws"/> - </or> - </and> - </condition> - </target> - <target name="-set-webstart-in-jre" depends="-set-webstart-in-platform-home,-check-webstart-in-jre" if="do.set.webstart.in.jre"> - <property name="active.webstart.executable" value="${java.home}${file.separator}bin${file.separator}javaws"/> - </target> - <target name="-check-webstart-in-probjdk" unless="active.webstart.executable"> - <condition property="do.set.webstart.in.probjdk"> - <and> - <not><isset property="active.webstart.executable"/></not> - <or> - <available file="${java.home}${file.separator}..${file.separator}bin${file.separator}javaws.exe"/> - <available file="${java.home}${file.separator}..${file.separator}bin${file.separator}javaws"/> - </or> - </and> - </condition> - </target> - <target name="-set-webstart-in-probjdk" depends="-set-webstart-in-jre,-check-webstart-in-probjdk" if="do.set.webstart.in.probjdk"> - <property name="active.webstart.executable" value="${java.home}${file.separator}..${file.separator}bin${file.separator}javaws"/> - </target> - <target name="-check-webstart-in-envjdk" unless="active.webstart.executable"> - <property environment="env"/> - <condition property="do.set.webstart.in.envjdk"> - <and> - <not><isset property="active.webstart.executable"/></not> - <or> - <available file="${env.JAVA_HOME}${file.separator}bin${file.separator}javaws.exe"/> - <available file="${env.JAVA_HOME}${file.separator}bin${file.separator}javaws"/> - </or> - </and> - </condition> - </target> - <target name="-set-webstart-in-envjdk" depends="-set-webstart-in-probjdk,-check-webstart-in-envjdk" if="do.set.webstart.in.envjdk"> - <property name="active.webstart.executable" value="${env.JAVA_HOME}${file.separator}bin${file.separator}javaws"/> - </target> - <target name="-pre-check-webstart-in-unix" depends="-check-operating-system,-set-webstart-in-envjdk" unless="active.webstart.executable"> - <condition property="running.on.unix-active.webstart.executable"> - <and> - <not><isset property="active.webstart.executable"/></not> - <isset property="running.on.unix"/> - </and> - </condition> - </target> - <target name="-check-webstart-in-unix" depends="-pre-check-webstart-in-unix" if="running.on.unix-active.webstart.executable"> - <local name="exec.which.javaws.result"/> - <exec executable="which" failifexecutionfails="false" failonerror="false" resultproperty="exec.which.javaws.result" outputproperty="exec.which.javaws.output"> - <arg value="javaws"/> - </exec> - <condition property="do.set.webstart.in.unix"> - <and> - <not><isset property="active.webstart.executable"/></not> - <isset property="exec.which.javaws.result"/> - <equals arg1="${exec.which.javaws.result}" arg2="0"/> - <isset property="exec.which.javaws.output"/> - <not><equals arg1="${exec.which.javaws.output}" arg2=""/></not> - </and> - </condition> - <echo message="do.set.webstart.in.unix = ${do.set.webstart.in.unix}" level="verbose"/> - </target> - <target name="-set-webstart-in-unix" depends="-set-webstart-in-envjdk,-check-webstart-in-unix" if="do.set.webstart.in.unix"> - <property name="active.webstart.executable" value="${exec.which.javaws.output}"/> - </target> - <target name="-pre-check-jfx-webstart" depends="-set-webstart-in-unix"> - <echo message="active.webstart.executable = ${active.webstart.executable}" level="verbose"/> - </target> - - <target name="-check-jfx-webstart" depends="-pre-check-jfx-webstart"> - <condition property="jfx-webstart-available"> - <and> - <or> - <isset property="do.set.webstart.in.fxrt"/> - <isset property="do.set.webstart.in.fxsdk.jre"/> - <isset property="do.set.webstart.in.fxsdk"/> - <isset property="do.set.webstart.in.platform.home.jre"/> - <isset property="do.set.webstart.in.platform.home"/> - <isset property="do.set.webstart.in.jre"/> - <isset property="do.set.webstart.in.probjdk"/> - <isset property="do.set.webstart.in.envjdk"/> - <isset property="do.set.webstart.in.unix"/> - </or> - <isset property="active.webstart.executable"/> - </and> - </condition> - <condition property="jfx-webstart-missing+jdk7u6"> - <and> - <not><isset property="jfx-webstart-available"/></not> - <not><isset property="have-jdk-pre7u6"/></not> - </and> - </condition> - <condition property="jfx-webstart-missing+javafx.runtime.missing+default"> - <and> - <not><isset property="jfx-webstart-available"/></not> - <isset property="have-jdk-pre7u6"/> - <isset property="javafx.runtime.missing+default"/> - </and> - </condition> - <condition property="jfx-webstart-missing+javafx.runtime.missing-default"> - <and> - <not><isset property="jfx-webstart-available"/></not> - <isset property="have-jdk-pre7u6"/> - <isset property="javafx.runtime.missing-default"/> - </and> - </condition> - <fail message="Error:${line.separator}WebStart executable could not be found in active JDK.${line.separator}Please check that the JDK is correctly installed and its version is at least 7u6." if="jfx-webstart-missing+jdk7u6"/> - <fail message="Error:${line.separator}WebStart executable could not be found.${line.separator}JavaFX RT path undefined. Check the definition of ${platform.active} in Java Platform Manager${line.separator}(or directly the properties platform.active and javafx.runtime in project.properties file).${line.separator}Note: If missing, the default JavaFX-enabled platform gets created automatically when creating a new FX Project." if="jfx-webstart-missing+javafx.runtime.missing+default"/> - <fail message="Error:${line.separator}WebStart executable could not be found.${line.separator}JavaFX RT path undefined. Check the definition of ${platform.active} in Java Platform Manager${line.separator}(or directly the properties platform.active and javafx.runtime in project.properties file)." if="jfx-webstart-missing+javafx.runtime.missing-default"/> - <fail message="Error:${line.separator}WebStart executable could not be found." unless="jfx-webstart-available"/> - <echo message="jfx-webstart-available = ${jfx-webstart-available}" level="verbose"/> - </target> - - - <!-- Legacy targets kept for compatibility with older build-impl.xml scripts --> - - <!-- Note: target "-check-javafx" is not necessary any more but is referenced from NB 7.1 build-impl.xml --> - <target name="-check-javafx"/> - <!-- Note: target "-javafx-check-error" is not necessary any more but is referenced from NB 7.1 build-impl.xml --> - <target name="-javafx-check-error"/> - <!-- Note: target "-init-javafx" is not necessary any more but is referenced from NB 7.1 build-impl.xml --> - <target name="-init-javafx"/> - - - <!-- Check project properties --> - - <target name="-check-default-run-config" unless="config"> - <property name="config" value="<default config>"/> - </target> - - <target name="-check-project"> - <condition property="main-class-available"> - <isset property="javafx.main.class"/> - </condition> - <condition property="vmargs-available"> - <and> - <isset property="run.jvmargs"/> - <not><equals arg1="${run.jvmargs}" arg2=""/></not> - </and> - </condition> - <condition property="preloader-available"> - <and> - <isset property="javafx.preloader.enabled"/> - <equals arg1="${javafx.preloader.enabled}" arg2="true"/> - <isset property="javafx.preloader.class"/> - <not><equals arg1="${javafx.preloader.class}" arg2=""/></not> - <isset property="javafx.preloader.jar.filename"/> - <not><equals arg1="${javafx.preloader.jar.filename}" arg2=""/></not> - </and> - </condition> - <condition property="app-with-preloader"> - <and> - <istrue value="${preloader-available}"/> - <istrue value="${main-class-available}"/> - </and> - </condition> - <condition property="app-with-external-preloader-jar"> - <and> - <isset property="app-with-preloader"/> - <isset property="javafx.preloader.type"/> - <equals arg1="${javafx.preloader.type}" arg2="jar" trim="true"/> - </and> - </condition> - <condition property="app-without-preloader"> - <and> - <not> - <istrue value="${preloader-available}"/> - </not> - <istrue value="${main-class-available}"/> - </and> - </condition> - <condition property="preloader-app"> - <and> - <isset property="javafx.preloader"/> - <equals arg1="${javafx.preloader}" arg2="true"/> - </and> - </condition> - <condition property="fx-in-swing-app"> - <and> - <isset property="javafx.swing"/> - <equals arg1="${javafx.swing}" arg2="true"/> - </and> - </condition> - <condition property="fx-in-swing-workaround-app"> - <and> - <istrue value="${fx-in-swing-app}"/> - <istrue value="${preloader-app}"/> - </and> - </condition> - <condition property="preloader-app-no-workaround"> - <and> - <istrue value="${preloader-app}"/> - <not><istrue value="${fx-in-swing-app}"/></not> - </and> - </condition> - <condition property="html-template-available"> - <and> - <isset property="javafx.run.htmltemplate"/> - <not> - <equals arg1="${javafx.run.htmltemplate}" arg2=""/> - </not> - </and> - </condition> - <condition property="icon-available"> - <and> - <isset property="javafx.deploy.icon"/> - <not> - <equals arg1="${javafx.deploy.icon}" arg2=""/> - </not> - </and> - </condition> - <condition property="dimensions-available"> - <and> - <isset property="javafx.run.width"/> - <isset property="javafx.run.height"/> - <not><equals arg1="${javafx.run.width}" arg2=""/></not> - <not><equals arg1="${javafx.run.height}" arg2=""/></not> - </and> - </condition> - <condition property="update-mode-background"> - <and> - <isset property="javafx.deploy.backgroundupdate"/> - <equals arg1="${javafx.deploy.backgroundupdate}" arg2="true" trim="true"/> - </and> - </condition> - <condition property="offline-allowed"> - <and> - <isset property="javafx.deploy.allowoffline"/> - <equals arg1="${javafx.deploy.allowoffline}" arg2="true" trim="true"/> - </and> - </condition> - <condition property="permissions-elevated"> - <and> - <isset property="javafx.deploy.permissionselevated"/> - <equals arg1="${javafx.deploy.permissionselevated}" arg2="true" trim="true"/> - </and> - </condition> - <condition property="binary-encode-css"> - <and> - <isset property="javafx.binarycss"/> - <equals arg1="${javafx.binarycss}" arg2="true" trim="true"/> - </and> - </condition> - <condition property="rebase-lib-jars"> - <and> - <isset property="javafx.rebase.libs"/> - <equals arg1="${javafx.rebase.libs}" arg2="true" trim="true"/> - </and> - </condition> - - <echo message="main-class-available = ${main-class-available}" level="verbose"/> - <echo message="vmargs-available = ${vmargs-available}" level="verbose"/> - <echo message="preloader-available = ${preloader-available}" level="verbose"/> - <echo message="app-with-preloader = ${app-with-preloader}" level="verbose"/> - <echo message="app-with-preloader-without-project = ${app-with-preloader-without-project}" level="verbose"/> - <echo message="app-without-preloader = ${app-without-preloader}" level="verbose"/> - <echo message="preloader-app = ${preloader-app}" level="verbose"/> - <echo message="fx-in-swing-app = ${fx-in-swing-app}" level="verbose"/> - <echo message="fx-in-swing-workaround-app = ${fx-in-swing-workaround-app}" level="verbose"/> - <echo message="preloader-app-no-workaround = ${preloader-app-no-workaround}" level="verbose"/> - <echo message="html-template-available = ${html-template-available}" level="verbose"/> - <echo message="icon-available = ${icon-available}" level="verbose"/> - <echo message="dimensions-available = ${dimensions-available}" level="verbose"/> - <echo message="update-mode-background = ${update-mode-background}" level="verbose"/> - <echo message="offline-allowed = ${offline-allowed}" level="verbose"/> - <echo message="permissions-elevated = ${permissions-elevated}" level="verbose"/> - <echo message="binary-encode-css = ${binary-encode-css}" level="verbose"/> - <echo message="rebase-lib-jars = ${rebase-lib-jars}" level="verbose"/> - </target> - - <target name="-icon-deployment-check" depends="-check-project,-check-jfx-deployment" if="icon-available"> - <condition property="icon-deployment-may-not-be-supported"> - <and> - <isset property="icon-available"/> - <not><isset property="have-fx-ant-api-1.1"/></not> - </and> - </condition> - </target> - <target name="-icon-warning" depends="-icon-deployment-check" if="icon-deployment-may-not-be-supported"> - <echo message="Warning: Note that due to a bug in early JavaFX 2.0 SDK distributions the icon may not be properly set in deployment files."/> - </target> - - <target name="-set-dimensions" depends="-check-project" if="dimensions-available"> - <property name="javafx.width" value="${javafx.run.width}"/> - <property name="javafx.height" value="${javafx.run.height}"/> - </target> - <target name="-reset-dimensions" depends="-check-project" unless="dimensions-available"> - <property name="javafx.width" value="800"/> - <property name="javafx.height" value="600"/> - </target> - - <target name="-set-update-mode-background" depends="-check-project" if="update-mode-background"> - <property name="update-mode" value="background"/> - </target> - <target name="-set-update-mode-eager" depends="-check-project" unless="update-mode-background"> - <property name="update-mode" value="eager"/> - </target> - - <target name="-set-permissions-elevated" depends="-check-project" if="permissions-elevated"> - <property name="permissions.elevated" value="true"/> - </target> - <target name="-reset-permissions-elevated" depends="-check-project" unless="permissions-elevated"> - <property name="permissions.elevated" value="false"/> - </target> - - <target name="-set-binary-css" depends="-check-project" if="binary-encode-css"> - <property name="css-include-ext" value="bss"/> - <property name="css-exclude-ext" value="css"/> - </target> - <target name="-unset-binary-css" depends="-check-project" unless="binary-encode-css"> - <property name="css-include-ext" value="css"/> - <property name="css-exclude-ext" value="bss"/> - </target> - <target name="-copy-binary-css" depends="-check-project" if="binary-encode-css"> - <fileset id="cssfiles" dir="${basedir}${file.separator}${build.classes.dir}"> - <include name="**${file.separator}*.css"/> - </fileset> - <property name="cssfileslist" refid="cssfiles"/> - <echo message="css files to binary convert: " level="verbose">${cssfileslist}</echo> - <fx:csstobin outdir="${basedir}${file.separator}${build.classes.dir}"> - <fileset refid="cssfiles"/> - </fx:csstobin> - </target> - - - <!-- Copy dependent libraries --> - - <!-- Note: target "-jfx-copylibs" is referenced from NB 7.1 build-impl.xml --> - <target name="-jfx-copylibs" depends="init,compile,-pre-pre-jar,-pre-jar"> - <local name="run.classpath.without.build.classes.and.dist.dir"/> - <pathconvert property="run.classpath.without.build.classes.and.dist.dir"> - <path path="${run.classpath}"/> - <map from="${basedir}${file.separator}${build.classes.dir}" to=""/> - <map from="${basedir}${file.separator}${dist.jar}" to=""/> - <map from="${javafx.runtime}${file.separator}lib${file.separator}jfxrt.jar" to=""/> - <map from="${javafx.runtime}${file.separator}lib${file.separator}deploy.jar" to=""/> - <map from="${javafx.runtime}${file.separator}lib${file.separator}javaws.jar" to=""/> - <map from="${javafx.runtime}${file.separator}lib${file.separator}plugin.jar" to=""/> - </pathconvert> - <!-- add possibly missing dependencies at distance 2 (build system logic thus provides transitive closure) --> - <local name="run.and.lib.classpath"/> - <script language="javascript"> - <![CDATA[ - var pathConvert = project.createTask("pathconvert"); - pathConvert.setProperty("run.and.lib.classpath"); - var classPath = project.getProperty("run.classpath.without.build.classes.and.dist.dir"); - var fileSeparator = project.getProperty("file.separator"); - if(classPath != null) { - var classPathCopy = pathConvert.createPath(); - classPathCopy.setPath(classPath); - if(classPath.indexOf(";") != -1) { - var pathArray = classPath.split(";"); - } else { - var pathArray = classPath.split(":"); - } - var added = ""; - for (var i=0; i<pathArray.length; i++) { - var index = pathArray[i].lastIndexOf(fileSeparator); - if (index >=0) { - var onePath = pathArray[i].substr(0,index+1) + "lib"; - var oneDir = new java.io.File(onePath); - if(oneDir.exists()) { - var fs = project.createDataType("fileset"); - fs.setDir( oneDir ); - fs.setIncludes("*.jar"); - var ds = fs.getDirectoryScanner(project); - var srcFiles = ds.getIncludedFiles(); - for (j=0; j<srcFiles.length; j++) { - if(classPath.indexOf(srcFiles[j]) == -1 && added.indexOf(srcFiles[j]) == -1) { - var path = pathConvert.createPath(); - path.setPath(onePath + fileSeparator + srcFiles[j]); - added += srcFiles[j]; - } - } - } - } - } - } - pathConvert.perform(); - ]]> - </script> - <echo message="run.and.lib.classpath = ${run.and.lib.classpath}" level="verbose"/> - <delete dir="${dist.dir}${file.separator}lib" includeEmptyDirs="true" quiet="true"/> - <copy todir="${dist.dir}${file.separator}lib" flatten="true" preservelastmodified="true" overwrite="true"> - <path> - <pathelement path="${run.and.lib.classpath}"/> - </path> - </copy> - </target> - - <target name="-copy-external-preloader-jar" depends="-check-project" if="app-with-external-preloader-jar"> - <copy file="${javafx.preloader.jar.path}" todir="${dist.dir}${file.separator}lib"/> - </target> - - - <!-- Optional classpath re-base of dependent JAR manifests after copy to lib/, required by GlassFish --> - - <macrodef name="rebase-lib"> - <attribute name="jarfile"/> - <sequential> - <local name="tmpdir"/> - <property name="tmpdir" value="${java.io.tmpdir}${file.separator}${user.name}_${ant.project.name}_rebase" /> - <echo message="tmpdir = ${tmpdir}" level="verbose"/> - <delete dir="${tmpdir}" quiet="true"/> - <mkdir dir="${tmpdir}"/> - <unzip src="@{jarfile}" dest="${tmpdir}"> - <patternset> - <include name="META-INF${file.separator}MANIFEST.MF"/> - </patternset> - </unzip> - <local name="manifest.file.temp"/> - <property name="manifest.file.temp" value="${tmpdir}${file.separator}META-INF${file.separator}MANIFEST.MF" /> - <echo message="manifest.file.temp = ${manifest.file.temp}" level="verbose"/> - <!-- edited manifest file --> - <local name="manifest.file.temp.new"/> - <property name="manifest.file.temp.new" value="${manifest.file.temp}_new" /> - <echo message="manifest.file.temp.new = ${manifest.file.temp.new}" level="verbose"/> - <script language="javascript"> - <![CDATA[ - var UTF_8 = "UTF-8"; - var ATTR_CLASS_PATH = "Class-Path"; - var ATTR_CLASS_PATH_FX = "JavaFX-Class-Path"; - function isSigned(manifest) { - var sections = manifest.getSectionNames(); - while(sections.hasMoreElements()) { - var sectionname = sections.nextElement(); - var section = manifest.getSection(sectionname); - if(section != null) { - var sectionKeys = section.getAttributeKeys(); - while (sectionKeys.hasMoreElements()) { - var element = sectionKeys.nextElement(); - if (element.endsWith("-Digest") || element.endsWith("-digest")) { - return true; - } - } - } - } - return false; - } - var src = project.getProperty("manifest.file.temp"); - var srf = new java.io.File(src); - try { - var fis = new java.io.FileInputStream(srf); - try { - var isr = new java.io.InputStreamReader(fis, UTF_8); - try { - var manifest = new org.apache.tools.ant.taskdefs.Manifest(isr); - } finally { - isr.close(); - } - } finally { - fis.close(); - } - } catch(e) { - var manifest = null; - } - if(manifest != null) { - if(isSigned(manifest)) { - println("Warning: Signed JAR can not be rebased."); - } else { - var mainSection = manifest.getMainSection(); - var classPath = mainSection.getAttributeValue(ATTR_CLASS_PATH); - if (classPath != null) { - var classPathAttr = ATTR_CLASS_PATH; - } else { - classPath = mainSection.getAttributeValue(ATTR_CLASS_PATH_FX); - if(classPath != null) { - var classPathAttr = ATTR_CLASS_PATH_FX; - } - } - if(classPath != null) { - var result = new java.lang.StringBuilder(); - var changed = false; - var pathArray = classPath.split(" "); - for (var i=0; i<pathArray.length; i++) { - if (result.length() > 0) { - result.append(' '); - } - var index = pathArray[i].lastIndexOf('/'); - if (index >=0 && index < pathArray[i].length()-1) { - pathArray[i] = pathArray[i].substring(index+1); - changed = true; - } - result.append(pathArray[i]); - } - mainSection.removeAttribute(classPathAttr); - mainSection.addAttributeAndCheck(new org.apache.tools.ant.taskdefs.Manifest.Attribute(classPathAttr, result.toString())); - var tgt = project.getProperty("manifest.file.temp.new"); - var tgf = new java.io.File(tgt); - try { - var fos = new java.io.FileOutputStream(tgf); - try { - var osw = new java.io.OutputStreamWriter(fos, UTF_8); - try { - var manifestOut = new java.io.PrintWriter(osw); - manifest.write(manifestOut); - manifestOut.close(); - } finally { - osw.close(); - } - } finally { - fos.close(); - } - } catch(e) { - println("Warning: problem storing rebased manifest file."); - } - } - } - } - ]]> - </script> - <antcall target="-move-new-manifest-if-exists"> - <param name="move.file.from" value="${manifest.file.temp.new}"/> - <param name="move.file.to" value="${manifest.file.temp}"/> - </antcall> - <zip destfile="@{jarfile}" basedir="${tmpdir}" update="true"/> - <delete dir="${tmpdir}" quiet="true"/> - </sequential> - </macrodef> - - <target name="-new-temp-mainfest-existence"> - <condition property="new-temp-manifest-exists"> - <available file="${move.file.from}"/> - </condition> - <echo message="new-temp-manifest-exists = ${new-temp-manifest-exists}" level="verbose"/> - </target> - - <target name="-move-new-manifest-if-exists" depends="-new-temp-mainfest-existence" if="new-temp-manifest-exists"> - <move file="${move.file.from}" tofile="${move.file.to}" failonerror="false"/> - </target> - - <target name="-rebase-libs-macro-call"> - <echo message="Rebase jarfile = ${jar.file.to.rebase}" level="verbose"/> - <rebase-lib jarfile="${jar.file.to.rebase}"/> - </target> - - <!-- Note: target "-rebase-libs" is referenced from NB 7.1 build-impl.xml --> - <target name="-rebase-libs" depends="-check-project, -jfx-copylibs" if="rebase-lib-jars"> - <property name="pp_rebase_dir" value="${basedir}${file.separator}${dist.dir}${file.separator}lib"/> - <property name="pp_rebase_fs" value="*.jar"/> - <script language="javascript"> - <![CDATA[ - var dir = project.getProperty("pp_rebase_dir"); - var fDir = new java.io.File(dir); - if( fDir.exists() ) { - var callTask = project.createTask("antcall"); - callTask.setTarget("-rebase-libs-macro-call"); - var param = callTask.createParam(); - param.setName("jar.file.to.rebase"); - var includes = project.getProperty("pp_rebase_fs"); - var fs = project.createDataType("fileset"); - fs.setDir( fDir ); - fs.setIncludes(includes); - var ds = fs.getDirectoryScanner(project); - var srcFiles = ds.getIncludedFiles(); - for (i=0; i<srcFiles.length; i++) { - param.setValue(dir + "${file.separator}" + srcFiles[i]); - callTask.perform(); - } - } - ]]> - </script> - </target> - - - <!-- Main Deployment Target --> - - <!-- Note: target "jfx-deployment" is referenced from NB 7.1 build-impl.xml --> - <target name="jfx-deployment" depends="-check-jfx-deployment,-check-project,-icon-warning, - -set-dimensions,-reset-dimensions,-set-update-mode-background,-set-update-mode-eager, - -set-permissions-elevated,-reset-permissions-elevated, - -copy-external-preloader-jar,-set-binary-css,-unset-binary-css,-copy-binary-css, - -deploy-app-sign-nopreloader-notemplate, - -deploy-app-sign-preloader-notemplate, - -deploy-app-sign-nopreloader-template, - -deploy-app-sign-preloader-template, - -deploy-app-sign-nopreloader-notemplate-swing, - -deploy-app-sign-nopreloader-template-swing, - -deploy-app-nosign-nopreloader-notemplate, - -deploy-app-nosign-preloader-notemplate, - -deploy-app-nosign-nopreloader-template, - -deploy-app-nosign-preloader-template, - -deploy-app-nosign-nopreloader-notemplate-swing, - -deploy-app-nosign-nopreloader-template-swing" - if="jfx-deployment-available"> - </target> - - - <!-- Security / Signing --> - - <target name="-unavailable-signjars-task" depends="-check-jfx-deployment" unless="jfx-deployment-available"> - <echo message="Warning: Task required to sign JAR file is missing, check the availability of JavaFX 2.0 deployment tasks. JAR files will not be signed."/> - </target> - - <target name="-security-props-check"> - <condition property="javafx.signed.true"> - <istrue value="${javafx.signing.enabled}"/> - </condition> - </target> - - <target name="-check-signing-possible" depends="-security-props-check,-check-jfx-deployment,-unavailable-signjars-task"> - <condition property="javafx.signed.true+signjars.task.available"> - <and> - <isset property="javafx.signed.true"/> - <isset property="jfx-deployment-available"/> - </and> - </condition> - </target> - - <target name="-javafx-init-keystore" depends="-check-signing-possible,-javafx-init-signing,-javafx-init-keystore1,-javafx-init-keystore2,-check-keystore-exists" - if="javafx.signed.true+signjars.task.available" unless="javafx.signjar.keystore.exists"> - <property name="javafx.signjar.vendor" value="CN=${application.vendor}"/> - <echo message="Going to create default keystore in ${javafx.signjar.keystore}"/> - <genkey dname="${javafx.signjar.vendor}" alias="${javafx.signjar.alias}" keystore="${javafx.signjar.keystore}" - storepass="${javafx.signjar.storepass}" keypass="${javafx.signjar.keypass}"/> - </target> - - <target name="-check-keystore-exists"> - <available property="javafx.signjar.keystore.exists" file="${javafx.signjar.keystore}"/> - </target> - - <target name="-javafx-init-signing"> - <condition property="generated.key.signing"> - <equals arg1="${javafx.signing.type}" arg2="self" trim="true"/> - </condition> - </target> - - <target name="-javafx-init-keystore1" depends="-javafx-init-signing" if="generated.key.signing"> - <property name="javafx.signjar.keystore" value="${basedir}${file.separator}build${file.separator}nb-jfx.jks" /> - <property name="javafx.signjar.storepass" value="storepass"/> - <property name="javafx.signjar.keypass" value="keypass"/> - <property name="javafx.signjar.alias" value="nb-jfx"/> - </target> - - <target name="-javafx-init-keystore2" depends="-javafx-init-signing" unless="generated.key.signing"> - <property name="javafx.signjar.keystore" value="${javafx.signing.keystore}" /> - <property name="javafx.signjar.storepass" value="${javafx.signing.keystore.password}"/> - <property name="javafx.signjar.keypass" value="${javafx.signing.keyalias.password}"/> - <property name="javafx.signjar.alias" value="${javafx.signing.keyalias}"/> - </target> - - - <!-- Project Deployment Macros --> - - <macrodef name="deploy-defines"> - <sequential> - <basename property="jfx.deployment.jar" file="${dist.jar}"/> - <property name="jfx.deployment.dir" location="${dist.dir}"/> - </sequential> - </macrodef> - - <macrodef name="deploy-preprocess"> - <sequential> - <delete includeEmptyDirs="true" quiet="true"> - <fileset dir="${jfx.deployment.dir}${file.separator}lib"> - <exclude name="**${file.separator}*.jar"/> - </fileset> - </delete> - </sequential> - </macrodef> - - <!-- fx:jar scripted call enables passing of arbitrarily long list of params and fx-version dependent behavior --> - <macrodef name="deploy-jar"> - <sequential> - <antcall target="-pre-jfx-jar"/> - <echo message="javafx.ant.classpath = ${javafx.ant.classpath}" level="verbose"/> - <typedef name="fx_jar" classname="com.sun.javafx.tools.ant.FXJar" classpath="${javafx.ant.classpath}"/> - <echo message="Launching <fx:jar> task from ${ant-javafx.jar.location}" level="info"/> - <property name="pp_jar_destfile" value="${jfx.deployment.dir}${file.separator}${jfx.deployment.jar}"/> - <property name="pp_jar_buildclasses" value="${basedir}${file.separator}${build.classes.dir}"/> - <property name="pp_jar_cssbss" value="**${file.separator}*.${css-exclude-ext}"/> - <property name="pp_jar_dir" value="${jfx.deployment.dir}"/> - <property name="pp_jar_fs1" value="lib${file.separator}${javafx.preloader.jar.filename}"/> - <property name="pp_jar_fs2" value="lib${file.separator}*.jar"/> - <echo message="deploy_jar: pp_jar_destfile = ${pp_jar_destfile}" level="verbose"/> - <echo message="deploy_jar: pp_jar_buildclasses = ${pp_jar_buildclasses}" level="verbose"/> - <echo message="deploy_jar: pp_jar_cssbss = ${pp_jar_cssbss}" level="verbose"/> - <echo message="deploy_jar: pp_jar_dir = ${pp_jar_dir}" level="verbose"/> - <echo message="deploy_jar: pp_jar_fs1 = ${pp_jar_fs1}" level="verbose"/> - <echo message="deploy_jar: pp_jar_fs2 = ${pp_jar_fs2}" level="verbose"/> - <script language="javascript"> - <![CDATA[ - var S = java.io.File.separator; - var JFXPAR = "javafx.param"; - var JFXPARN = "name"; - var JFXPARV = "value"; - var JFXLAZY = "download.mode.lazy.jar"; - var withpreloader = project.getProperty("app-with-preloader"); - var fx_ant_api_1_1 = project.getProperty("have-fx-ant-api-1.1"); - - // get jars with lazy download mode property set - function getLazyJars() { - var jars = new Array(); - var keys = project.getProperties().keys(); - while(keys.hasMoreElements()) { - var pn = keys.nextElement(); - if(pn.substr(0,JFXLAZY.length) == JFXLAZY) { - var fname = pn.substring(JFXLAZY.length+1); - jars.push(fname); - } - } - return jars.length > 0 ? jars : null; - } - // set download mode of dependent libraries - function setDownloadMode(fsEager, fsLazy, jars) { - for(i = 0; i < jars.length; i++) { - fsEager.setExcludes("lib" + S + jars[i]); - fsLazy.setIncludes("lib" + S + jars[i]); - } - } - - // fx:jar - var jar = project.createTask("fx_jar"); - jar.setProject(project); - var destfile = project.getProperty("pp_jar_destfile"); - jar.setDestfile(destfile); - - // fx:application - var app = jar.createApplication(); - app.setProject(project); - var title = project.getProperty("application.title"); - var mainclass = project.getProperty("javafx.main.class"); - var fallback = project.getProperty("javafx.fallback.class"); - app.setName(title); - app.setMainClass(mainclass); - app.setFallbackClass(fallback); - if(withpreloader == "true") { - preloaderclass = project.getProperty("javafx.preloader.class"); - app.setPreloaderClass(preloaderclass); - } - // fx:param, fx:argument - var keys = project.getProperties().keys(); - while(keys.hasMoreElements()) { - var pn = keys.nextElement(); - if(pn.substr(0,JFXPAR.length) == JFXPAR && pn.indexOf(JFXPARN) == (pn.length()-JFXPARN.length)) { - var propn = project.getProperty(pn); - if(propn != null && propn.length() > 0) { - var pv = pn.substr(0,pn.indexOf(JFXPARN)) + JFXPARV; - var propv = project.getProperty(pv); - if(propv != null && propv.length() > 0) { - var par = app.createParam(); - par.setName(propn); - par.setValue(propv); - } else { - if(fx_ant_api_1_1 == "true") { - var arg = app.createArgument(); - arg.addText(propn); - } - } - } - } - } - - // fx:resources - var res = jar.createResources(); - res.setProject(project); - var pdir = project.getProperty("pp_jar_dir"); - if(withpreloader == "true") { - var f1 = res.createFileSet(); - f1.setProject(project); - f1.setDir(new java.io.File(pdir)); - var i1 = project.getProperty("pp_jar_fs1"); - f1.setIncludes(i1); - f1.setRequiredFor("preloader"); - var f2 = res.createFileSet(); - f2.setProject(project); - f2.setDir(new java.io.File(pdir)); - var i2a = project.getProperty("jfx.deployment.jar"); - var i2b = project.getProperty("pp_jar_fs2"); - var e2c = project.getProperty("pp_jar_fs1"); - f2.setIncludes(i2a); - f2.setIncludes(i2b); - f2.setExcludes(e2c); - f2.setRequiredFor("startup"); - var lazyjars = getLazyJars(); - if(lazyjars != null) { - var f3 = res.createFileSet(); - f3.setProject(project); - f3.setDir(new java.io.File(pdir)); - f3.setRequiredFor("runtime"); - setDownloadMode(f2,f3,lazyjars); - } - } else { - var fn = res.createFileSet(); - fn.setProject(project); - fn.setDir(new java.io.File(pdir)); - var ia = project.getProperty("jfx.deployment.jar"); - var ib = project.getProperty("pp_jar_fs2"); - fn.setIncludes(ia); - fn.setIncludes(ib); - fn.setRequiredFor("startup"); - var lazyjars = getLazyJars(); - if(lazyjars != null) { - var fn2 = res.createFileSet(); - fn2.setProject(project); - fn2.setDir(new java.io.File(pdir)); - fn2.setRequiredFor("runtime"); - setDownloadMode(fn,fn2,lazyjars); - } - } - - // fileset to exclude *.css or *.bss - var fs = jar.createFileSet(); - fs.setProject(project); - var buildcls = project.getProperty("pp_jar_buildclasses"); - var exc = project.getProperty("pp_jar_cssbss"); - fs.setDir(new java.io.File(buildcls)); - fs.setExcludes(exc); - - // manifest - var man = jar.createManifest(); - var a1val = project.getProperty("application.vendor"); - var a1 = new org.apache.tools.ant.taskdefs.Manifest.Attribute(); - a1.setName("Implementation-Vendor"); - a1.setValue(a1val); - man.addConfiguredAttribute(a1); - var a2val = project.getProperty("application.title"); - var a2 = new org.apache.tools.ant.taskdefs.Manifest.Attribute(); - a2.setName("Implementation-Title"); - a2.setValue(a2val); - man.addConfiguredAttribute(a2); - var a3 = new org.apache.tools.ant.taskdefs.Manifest.Attribute(); - a3.setName("Implementation-Version"); - a3.setValue("1.0"); - man.addConfiguredAttribute(a3); - - jar.perform(); - ]]> - </script> - <antcall target="-post-jfx-jar"/> - </sequential> - </macrodef> - - <macrodef name="deploy-sign"> - <sequential> - <echo message="keystore=${javafx.signjar.keystore}" level="verbose"/> - <echo message="storepass=${javafx.signjar.storepass}" level="verbose"/> - <echo message="alias=${javafx.signjar.alias}" level="verbose"/> - <echo message="keypass=${javafx.signjar.keypass}" level="verbose"/> - <signjar keystore="${javafx.signjar.keystore}" - storepass="${javafx.signjar.storepass}" - alias="${javafx.signjar.alias}" - keypass="${javafx.signjar.keypass}"> - <fileset dir="${jfx.deployment.dir}"> - <include name="${jfx.deployment.jar}"/> - <include name="lib${file.separator}*.jar"/> - </fileset> - </signjar> - </sequential> - </macrodef> - - <macrodef name="deploy-sign-preloader"> - <sequential> - <echo message="keystore=${javafx.signjar.keystore}" level="verbose"/> - <echo message="storepass=${javafx.signjar.storepass}" level="verbose"/> - <echo message="alias=${javafx.signjar.alias}" level="verbose"/> - <echo message="keypass=${javafx.signjar.keypass}" level="verbose"/> - <signjar keystore="${javafx.signjar.keystore}" - storepass="${javafx.signjar.storepass}" - alias="${javafx.signjar.alias}" - keypass="${javafx.signjar.keypass}"> - <fileset dir="${jfx.deployment.dir}"> - <include name="lib${file.separator}${javafx.preloader.jar.filename}"/> - </fileset> - </signjar> - <signjar keystore="${javafx.signjar.keystore}" - storepass="${javafx.signjar.storepass}" - alias="${javafx.signjar.alias}" - keypass="${javafx.signjar.keypass}"> - <fileset dir="${jfx.deployment.dir}"> - <include name="${jfx.deployment.jar}"/> - <include name="lib${file.separator}*.jar"/> - <exclude name="lib${file.separator}${javafx.preloader.jar.filename}"/> - </fileset> - </signjar> - </sequential> - </macrodef> - - <macrodef name="deploy-process-template"> - <sequential> - <echo message="javafx.run.htmltemplate = ${javafx.run.htmltemplate}" level="verbose"/> - <pathconvert property="javafx.run.htmltemplate.processed"> - <path path="${javafx.run.htmltemplate}"/> - <mapper> - <chainedmapper> - <flattenmapper/> - <globmapper from="*" to="${jfx.deployment.dir}${file.separator}*" casesensitive="no"/> - </chainedmapper> - </mapper> - </pathconvert> - <echo message="javafx.run.htmltemplate.processed = ${javafx.run.htmltemplate.processed}" level="verbose"/> - </sequential> - </macrodef> - - <!-- fx:deploy scripted call enables passing of arbitrarily long lists of params, vmoptions and callbacks and fx-version dependent behavior --> - <macrodef name="deploy-deploy"> - <sequential> - <antcall target="-pre-jfx-deploy"/> - <echo message="javafx.ant.classpath = ${javafx.ant.classpath}" level="verbose"/> - <typedef name="fx_deploy" classname="com.sun.javafx.tools.ant.DeployFXTask" classpath="${javafx.ant.classpath}"/> - <echo message="Launching <fx:deploy> task from ${ant-javafx.jar.location}" level="info"/> - <property name="pp_deploy_dir" value="${jfx.deployment.dir}"/> - <property name="pp_deploy_fs1" value="lib${file.separator}${javafx.preloader.jar.filename}"/> - <property name="pp_deploy_fs2" value="lib${file.separator}*.jar"/> - <echo message="deploy_deploy: pp_deploy_dir = ${pp_deploy_dir}" level="verbose"/> - <echo message="deploy_deploy: pp_deploy_fs1 = ${pp_deploy_fs1}" level="verbose"/> - <echo message="deploy_deploy: pp_deploy_fs2 = ${pp_deploy_fs2}" level="verbose"/> - <script language="javascript"> - <![CDATA[ - function isTrue(prop) { - return prop != null && - (prop.toLowerCase()=="true" || prop.toLowerCase()=="yes" || prop.toLowerCase()=="on"); - } - var S = java.io.File.separator; - var JFXPAR = "javafx.param"; - var JFXPARN = "name"; - var JFXPARV = "value"; - var JFXCALLB = "javafx.jscallback"; - var JFXLAZY = "download.mode.lazy.jar"; - var withpreloader = project.getProperty("app-with-preloader"); - var fx_ant_api_1_1 = project.getProperty("have-fx-ant-api-1.1"); - - // get jars with lazy download mode property set - function getLazyJars() { - var jars = new Array(); - var keys = project.getProperties().keys(); - while(keys.hasMoreElements()) { - var pn = keys.nextElement(); - if(pn.substr(0,JFXLAZY.length) == JFXLAZY) { - var fname = pn.substring(JFXLAZY.length+1); - jars.push(fname); - } - } - return jars.length > 0 ? jars : null; - } - // set download mode of dependent libraries - function setDownloadMode(fsEager, fsLazy, jars) { - for(i = 0; i < jars.length; i++) { - fsEager.setExcludes("lib" + S + jars[i]); - fsLazy.setIncludes("lib" + S + jars[i]); - } - } - - // fx:deploy - var deploy = project.createTask("fx_deploy"); - deploy.setProject(project); - var width = project.getProperty("javafx.width"); - var height = project.getProperty("javafx.height"); - var outdir = project.getProperty("jfx.deployment.dir"); - var embedJNLP = project.getProperty("javafx.deploy.embedJNLP"); - var updatemode = project.getProperty("update-mode"); - var outfile = project.getProperty("application.title"); - var includeDT = project.getProperty("javafx.deploy.includeDT"); - var offline = project.getProperty("javafx.deploy.allowoffline"); - deploy.setWidth(width); - deploy.setHeight(height); - deploy.setOutdir(outdir); - deploy.setEmbedJNLP(isTrue(embedJNLP)); - deploy.setUpdateMode(updatemode); - deploy.setOutfile(outfile); - deploy.setIncludeDT(isTrue(includeDT)); - if(offline != null) { - if(fx_ant_api_1_1 == "true") { - deploy.setOfflineAllowed(isTrue(offline)); - } else { - println("Warning: offlineAllowed not supported by this version of JavaFX SDK deployment Ant task. Please upgrade JavaFX to 2.0.2 or higher."); - } - } - - // fx:application - var app = deploy.createApplication(); - app.setProject(project); - var title = project.getProperty("application.title"); - var mainclass = project.getProperty("javafx.main.class"); - var fallback = project.getProperty("javafx.fallback.class"); - app.setName(title); - app.setMainClass(mainclass); - app.setFallbackClass(fallback); - if(withpreloader == "true") { - preloaderclass = project.getProperty("javafx.preloader.class"); - app.setPreloaderClass(preloaderclass); - } - // fx:param, fx:argument - var keys = project.getProperties().keys(); - while(keys.hasMoreElements()) { - var pn = keys.nextElement(); - if(pn.substr(0,JFXPAR.length) == JFXPAR && pn.indexOf(JFXPARN) == (pn.length()-JFXPARN.length)) { - var propn = project.getProperty(pn); - if(propn != null && propn.length() > 0) { - var pv = pn.substr(0,pn.indexOf(JFXPARN)) + JFXPARV; - var propv = project.getProperty(pv); - if(propv != null && propv.length() > 0) { - var par = app.createParam(); - par.setName(propn); - par.setValue(propv); - } else { - if(fx_ant_api_1_1 == "true") { - var arg = app.createArgument(); - arg.addText(propn); - } else { - println("Warning: Unnamed parameters not supported by this version of JavaFX SDK deployment Ant tasks. Upgrade JavaFX to 2.0.2 or higher."); - } - } - } - } - } - - // fx:resources - var res = deploy.createResources(); - res.setProject(project); - var deploydir = project.getProperty("pp_deploy_dir"); - if(withpreloader == "true") { - var f1 = res.createFileSet(); - f1.setProject(project); - f1.setDir(new java.io.File(deploydir)); - var i1 = project.getProperty("pp_deploy_fs1"); - f1.setIncludes(i1); - f1.setRequiredFor("preloader"); - var f2 = res.createFileSet(); - f2.setProject(project); - f2.setDir(new java.io.File(deploydir)); - var i2a = project.getProperty("jfx.deployment.jar"); - var i2b = project.getProperty("pp_deploy_fs2"); - var e2c = project.getProperty("pp_deploy_fs1"); - f2.setIncludes(i2a); - f2.setIncludes(i2b); - f2.setExcludes(e2c); - f2.setRequiredFor("startup"); - var lazyjars = getLazyJars(); - if(lazyjars != null) { - var f3 = res.createFileSet(); - f3.setProject(project); - f3.setDir(new java.io.File(deploydir)); - f3.setRequiredFor("runtime"); - setDownloadMode(f2,f3,lazyjars); - } - } else { - var fn = res.createFileSet(); - fn.setProject(project); - fn.setDir(new java.io.File(deploydir)); - var ia = project.getProperty("jfx.deployment.jar"); - var ib = project.getProperty("pp_deploy_fs2"); - fn.setIncludes(ia); - fn.setIncludes(ib); - fn.setRequiredFor("startup"); - var lazyjars = getLazyJars(); - if(lazyjars != null) { - var fn2 = res.createFileSet(); - fn2.setProject(project); - fn2.setDir(new java.io.File(deploydir)); - fn2.setRequiredFor("runtime"); - setDownloadMode(fn,fn2,lazyjars); - } - } - - // fx:info - var info = deploy.createInfo(); - info.setProject(project); - var vendor = project.getProperty("application.vendor"); - info.setTitle(title); // title known from before - info.setVendor(vendor); - var icon = project.getProperty("javafx.deploy.icon"); - if(icon != null) { - if(fx_ant_api_1_1 == "true") { - var iicon = info.createIcon(); - iicon.setHref(icon); - } else { - println("Warning: Icon not supported by this version of JavaFX SDK deployment Ant task. Please upgrade JavaFX to 2.0.2 or higher."); - } - } - - // fx:permissions - var perm = deploy.createPermissions(); - perm.setProject(project); - var elev = project.getProperty("permissions.elevated"); - perm.setElevated(isTrue(elev)); - - // fx:preferences - var pref = deploy.createPreferences(); - pref.setProject(project); - var scut = project.getProperty("javafx.deploy.adddesktopshortcut"); - var instp = project.getProperty("javafx.deploy.installpermanently"); - var smenu = project.getProperty("javafx.deploy.addstartmenushortcut"); - pref.setShortcut(isTrue(scut)); - pref.setInstall(isTrue(instp)); - pref.setMenu(isTrue(smenu)); - - // fx:template - var templ = project.getProperty("javafx.run.htmltemplate"); - var templp = project.getProperty("javafx.run.htmltemplate.processed"); - if(templ != null && templp != null && templ.length() > 0 && templp.length() > 0) { - var temp = deploy.createTemplate(); - temp.setProject(project); - temp.setFile(new java.io.File(templ)); - temp.setTofile(new java.io.File(templp)); - } - - // fx:platform - var plat = deploy.createPlatform(); - plat.setProject(project); - var jvmargs = project.getProperty("run.jvmargs"); - if(jvmargs != null && jvmargs.length() > 0) { - var jvmargss = jvmargs.split(" "); - for(i = 0; i < jvmargss.length; i++) { - if(jvmargss[i] != null && jvmargss[i].length() > 0) { - var vmarg = plat.createJvmarg(); - vmarg.setValue(jvmargss[i]); - } - } - } - - // fx:callbacks - var callbs = deploy.createCallbacks(); - callbs.setProject(project); - var keys = project.getProperties().keys(); - while(keys.hasMoreElements()) { - var pn = keys.nextElement(); - if(pn.substr(0,JFXCALLB.length) == JFXCALLB) { - var prop = project.getProperty(pn); - if(prop != null && prop.length() > 0) { - var cname = pn.substring(JFXCALLB.length+1); - var cb = callbs.createCallback(); - cb.setProject(project); - cb.setName(cname); - cb.addText(prop); - } - } - } - - deploy.perform(); - ]]> - </script> - <antcall target="-post-jfx-deploy"/> - </sequential> - </macrodef> - - <!-- JavaFX 2.0+ deploy task as yet can not generate pre-FX jnlp which is needed for FX-in-Swing projects--> - <macrodef name="deploy-deploy-swing"> - <sequential> - <antcall target="-pre-jfx-deploy"/> - <local name="permissions-elevated-token"/> - <condition property="permissions-elevated-token" value="${line.separator} <security>${line.separator} <all-permissions/>${line.separator} </security>" else=""> - <isset property="permissions-elevated"/> - </condition> - <local name="offline-allowed-token"/> - <condition property="offline-allowed-token" value="${line.separator} <offline-allowed/>" else=""> - <isset property="offline-allowed"/> - </condition> - <local name="update-mode-background-token"/> - <condition property="update-mode-background-token" value="background" else="always"> - <isset property="update-mode-background"/> - </condition> - <local name="html-template-processed-available"/> - <condition property="html-template-processed-available"> - <and> - <isset property="javafx.run.htmltemplate.processed"/> - <not> - <equals arg1="${javafx.run.htmltemplate.processed}" arg2=""/> - </not> - </and> - </condition> - <local name="javafx.deploy.icon.basename"/> - <basename property="javafx.deploy.icon.basename" file="${javafx.deploy.icon}"/> - <local name="local-icon-filename-available"/> - <condition property="local-icon-filename-available"> - <and> - <isset property="icon-available"/> - <isset property="javafx.deploy.icon.basename"/> - <not><equals arg1="${javafx.deploy.icon.basename}" arg2=""/></not> - <not><contains string="${javafx.deploy.icon.basename}" substring="$${javafx" casesensitive="false"/></not> - <not><contains string="${javafx.deploy.icon}" substring="http:" casesensitive="false"/></not> - </and> - </condition> - <local name="icon-token"/> - <condition property="icon-token" value="${line.separator} <icon href="${javafx.deploy.icon.basename}" kind="default"/>"> - <isset property="local-icon-filename-available"/> - </condition> - <condition property="icon-token" value="${line.separator} <icon href="${javafx.deploy.icon}" kind="default"/>" else=""> - <isset property="icon-available"/> - </condition> - <basename property="dist.filename" file="${dist.jar}" suffix=".jar"/> - <length file="${dist.jar}" property="dist.jar.size" /> - <local name="vmargs-token"/> - <condition property="vmargs-token" value="java-vm-args="${run.jvmargs}" " else=""> - <isset property="vmargs-available"/> - </condition> - <local name="applet-params-token"/> - <local name="application-args-token"/> - <script language="javascript"> - <![CDATA[ - var JFXPAR = "javafx.param"; - var JFXPARN = "name"; - var JFXPARV = "value"; - - var params = ""; - var args = ""; - var keys = project.getProperties().keys(); - while(keys.hasMoreElements()) { - var pn = keys.nextElement(); - if(pn.substr(0,JFXPAR.length) == JFXPAR && pn.indexOf(JFXPARN) == (pn.length()-JFXPARN.length)) { - var propn = project.getProperty(pn); - if(propn != null && propn.length() > 0) { - var pv = pn.substr(0,pn.indexOf(JFXPARN)) + JFXPARV; - var propv = project.getProperty(pv); - if(propv != null && propv.length() > 0) { - params += "\n <param name=\"" + propn + "\" value=\"" + propv + "\"/>"; - args += "\n <argument>" + propn + "=" + propv + "</argument>"; - } else { - params += "\n <param name=\"" + propn + "\" value=\"\"/>"; - args += "\n <argument>" + propn + "</argument>"; - } - } - } - } - project.setProperty("applet-params-token", params); - project.setProperty("application-args-token", args); - ]]> - </script> - <filterchain id="jnlp.template.filter"> - <replacetokens> - <token key="NAME" value="${dist.filename}"/> - <token key="MAINCLASS" value="${main.class}"/> - <token key="FILESIZE" value="${dist.jar.size}"/> - <token key="VENDOR" value="${application.vendor}"/> - <token key="TITLE" value="${application.title}"/> - <token key="WIDTH" value="${javafx.run.width}"/> - <token key="HEIGHT" value="${javafx.run.height}"/> - <token key="PERMISSIONS" value="${permissions-elevated-token}"/> - <token key="OFFLINE" value="${offline-allowed-token}"/> - <token key="UPDATEMODE" value="${update-mode-background-token}"/> - <token key="ICON" value="${icon-token}"/> - <token key="VMARGS" value="${vmargs-token}"/> - <token key="PARAMETERS" value="${applet-params-token}"/> - <token key="ARGUMENTS" value="${application-args-token}"/> - </replacetokens> - </filterchain> - <copy file="${basedir}${file.separator}nbproject${file.separator}templates${file.separator}FXSwingTemplateApplication.jnlp" - tofile="${dist.dir}${file.separator}${dist.filename}_application.jnlp" > - <filterchain refid="jnlp.template.filter"/> - </copy> - <copy file="${basedir}${file.separator}nbproject${file.separator}templates${file.separator}FXSwingTemplateApplet.jnlp" - tofile="${dist.dir}${file.separator}${dist.filename}_applet.jnlp" > - <filterchain refid="jnlp.template.filter"/> - </copy> - <copy file="${basedir}${file.separator}nbproject${file.separator}templates${file.separator}FXSwingTemplate.html" - tofile="${dist.dir}${file.separator}${dist.filename}.html" > - <filterchain refid="jnlp.template.filter"/> - </copy> - <script language="javascript"> - <![CDATA[ - var PREF = "file:"; - var doCopyIcon = project.getProperty("local-icon-filename-available"); - if(doCopyIcon != null) { - var iconProp = project.getProperty("javafx.deploy.icon"); - if(iconProp.indexOf(PREF) == 0) { - iconProp = iconProp.slice(PREF.length); - } - while(iconProp.charAt(0) == "/") { - iconProp = iconProp.slice(1); - } - var S = java.io.File.separator; - var baseDir = project.getProperty("basedir"); - var distDir = project.getProperty("dist.dir"); - var copyTask = project.createTask("copy"); - var source = new java.io.File(iconProp); - var target = new java.io.File(baseDir + S + distDir); - copyTask.setFile(source); - copyTask.setTodir(target); - copyTask.setFlatten(true); - copyTask.setFailOnError(false); - copyTask.perform(); - } - var doCopyHTMLFrom = project.getProperty("html-template-available"); - var doCopyHTMLTo = project.getProperty("html-template-processed-available"); - if(doCopyHTMLFrom != null && doCopyHTMLTo != null) { - var htmlFrom = project.getProperty("javafx.run.htmltemplate"); - if(htmlFrom.indexOf(PREF) == 0) { - htmlFrom = htmlFrom.slice(PREF.length); - } - while(htmlFrom.charAt(0) == "/") { - htmlFrom = htmlFrom.slice(1); - } - var htmlTo = project.getProperty("javafx.run.htmltemplate.processed"); - if(htmlTo.indexOf(PREF) == 0) { - htmlTo = htmlTo.slice(PREF.length); - } - while(htmlTo.charAt(0) == "/") { - htmlTo = htmlTo.slice(1); - } - var copyTask = project.createTask("copy"); - var source = new java.io.File(htmlFrom); - var target = new java.io.File(htmlTo); - copyTask.setFile(source); - copyTask.setTofile(target); - copyTask.setFailOnError(false); - copyTask.perform(); - } - ]]> - </script> - <antcall target="-post-jfx-deploy"/> - </sequential> - </macrodef> - - - <!-- Project Deployment Targets --> - - <target name="-check-sign" depends="-check-project,-javafx-init-keystore" if="javafx.signed.true+signjars.task.available"> - <condition property="sign-nopreloader-notemplate"> - <and> - <isset property="app-without-preloader"/> - <not><isset property="html-template-available"/></not> - <not><isset property="fx-in-swing-app"/></not> - </and> - </condition> - <condition property="sign-preloader-notemplate"> - <and> - <isset property="app-with-preloader"/> - <not><isset property="html-template-available"/></not> - <not><isset property="fx-in-swing-app"/></not> - </and> - </condition> - <condition property="sign-nopreloader-template"> - <and> - <isset property="app-without-preloader"/> - <isset property="html-template-available"/> - <not><isset property="fx-in-swing-app"/></not> - </and> - </condition> - <condition property="sign-preloader-template"> - <and> - <isset property="app-with-preloader"/> - <isset property="html-template-available"/> - <not><isset property="fx-in-swing-app"/></not> - </and> - </condition> - <condition property="sign-nopreloader-notemplate-swing"> - <and> - <isset property="app-without-preloader"/> - <not><isset property="html-template-available"/></not> - <isset property="fx-in-swing-app"/> - </and> - </condition> - <condition property="sign-nopreloader-template-swing"> - <and> - <isset property="app-without-preloader"/> - <isset property="html-template-available"/> - <isset property="fx-in-swing-app"/> - </and> - </condition> - </target> - <target name="-check-nosign" depends="-check-project"> - <condition property="nosign-nopreloader-notemplate"> - <and> - <isset property="app-without-preloader"/> - <not><isset property="html-template-available"/></not> - <not><isset property="javafx.signed.true"/></not> - <not><isset property="fx-in-swing-app"/></not> - </and> - </condition> - <condition property="nosign-preloader-notemplate"> - <and> - <isset property="app-with-preloader"/> - <not><isset property="html-template-available"/></not> - <not><isset property="javafx.signed.true"/></not> - <not><isset property="fx-in-swing-app"/></not> - </and> - </condition> - <condition property="nosign-nopreloader-template"> - <and> - <isset property="app-without-preloader"/> - <isset property="html-template-available"/> - <not><isset property="javafx.signed.true"/></not> - <not><isset property="fx-in-swing-app"/></not> - </and> - </condition> - <condition property="nosign-preloader-template"> - <and> - <isset property="app-with-preloader"/> - <isset property="html-template-available"/> - <not><isset property="javafx.signed.true"/></not> - <not><isset property="fx-in-swing-app"/></not> - </and> - </condition> - <condition property="nosign-nopreloader-notemplate-swing"> - <and> - <isset property="app-without-preloader"/> - <not><isset property="html-template-available"/></not> - <not><isset property="javafx.signed.true"/></not> - <isset property="fx-in-swing-app"/> - </and> - </condition> - <condition property="nosign-nopreloader-template-swing"> - <and> - <isset property="app-without-preloader"/> - <isset property="html-template-available"/> - <not><isset property="javafx.signed.true"/></not> - <isset property="fx-in-swing-app"/> - </and> - </condition> - </target> - - - <!-- WITH SIGNING --> - - <!-- project without preloader --> - <!-- no html template --> - <target name="-deploy-app-sign-nopreloader-notemplate" depends="-check-sign" if="sign-nopreloader-notemplate" unless="preloader-app"> - <echo message="-deploy-app-sign-nopreloader-notemplate" level="verbose"/> - <deploy-defines/> - <deploy-preprocess/> - <deploy-jar/> - <deploy-sign/> - <deploy-deploy/> - </target> - - <!-- project with preloader --> - <!-- no html template --> - <target name="-deploy-app-sign-preloader-notemplate" depends="-check-sign" if="sign-preloader-notemplate" unless="preloader-app"> - <echo message="-deploy-app-sign-preloader-notemplate" level="verbose"/> - <deploy-defines/> - <deploy-preprocess/> - <deploy-jar/> - <deploy-sign-preloader/> - <deploy-deploy/> - </target> - - <!-- project without preloader --> - <!-- html template --> - <target name="-deploy-app-sign-nopreloader-template" depends="-check-sign" if="sign-nopreloader-template" unless="preloader-app"> - <echo message="-deploy-app-sign-nopreloader-template" level="verbose"/> - <deploy-defines/> - <deploy-preprocess/> - <deploy-jar/> - <deploy-sign/> - <deploy-process-template/> - <deploy-deploy/> - </target> - - <!-- project with preloader --> - <!-- html template --> - <target name="-deploy-app-sign-preloader-template" depends="-check-sign" if="sign-preloader-template" unless="preloader-app"> - <echo message="-deploy-app-sign-preloader-template" level="verbose"/> - <deploy-defines/> - <deploy-preprocess/> - <deploy-jar/> - <deploy-sign-preloader/> - <deploy-process-template/> - <deploy-deploy/> - </target> - - <!-- project without preloader --> - <!-- no html template --> - <!-- FX in Swing app --> - <target name="-deploy-app-sign-nopreloader-notemplate-swing" depends="-check-sign" if="sign-nopreloader-notemplate-swing" unless="preloader-app-no-workaround"> - <echo message="-deploy-app-sign-nopreloader-notemplate-swing" level="verbose"/> - <deploy-defines/> - <deploy-preprocess/> - <deploy-jar/> - <deploy-sign/> - <deploy-deploy-swing/> - </target> - - <!-- project without preloader --> - <!-- html template --> - <!-- FX in Swing app --> - <target name="-deploy-app-sign-nopreloader-template-swing" depends="-check-sign" if="sign-nopreloader-template-swing" unless="preloader-app-no-workaround"> - <echo message="-deploy-app-sign-nopreloader-template-swing" level="verbose"/> - <deploy-defines/> - <deploy-preprocess/> - <deploy-jar/> - <deploy-sign/> - <deploy-process-template/> - <deploy-deploy-swing/> - </target> - - - <!-- NO SIGNING --> - - <!-- project without preloader --> - <!-- no html template --> - <target name="-deploy-app-nosign-nopreloader-notemplate" depends="-check-nosign" if="nosign-nopreloader-notemplate" unless="preloader-app"> - <echo message="-deploy-app-nosign-nopreloader-notemplate" level="verbose"/> - <deploy-defines/> - <deploy-preprocess/> - <deploy-jar/> - <deploy-deploy/> - </target> - - <!-- project with preloader --> - <!-- no html template --> - <target name="-deploy-app-nosign-preloader-notemplate" depends="-check-nosign" if="nosign-preloader-notemplate" unless="preloader-app"> - <echo message="-deploy-app-nosign-preloader-notemplate" level="verbose"/> - <deploy-defines/> - <deploy-preprocess/> - <deploy-jar/> - <deploy-deploy/> - </target> - - <!-- project without preloader --> - <!-- html template --> - <target name="-deploy-app-nosign-nopreloader-template" depends="-check-nosign" if="nosign-nopreloader-template" unless="preloader-app"> - <echo message="-deploy-app-nosign-nopreloader-template" level="verbose"/> - <deploy-defines/> - <deploy-preprocess/> - <deploy-jar/> - <deploy-process-template/> - <deploy-deploy/> - </target> - - <!-- project with preloader --> - <!-- html template --> - <target name="-deploy-app-nosign-preloader-template" depends="-check-nosign" if="nosign-preloader-template" unless="preloader-app"> - <echo message="-deploy-app-nosign-preloader-template" level="verbose"/> - <deploy-defines/> - <deploy-preprocess/> - <deploy-jar/> - <deploy-process-template/> - <deploy-deploy/> - </target> - - <!-- project without preloader --> - <!-- no html template --> - <!-- FX in Swing app --> - <target name="-deploy-app-nosign-nopreloader-notemplate-swing" depends="-check-nosign" if="nosign-nopreloader-notemplate-swing" unless="preloader-app-no-workaround"> - <echo message="-deploy-app-nosign-nopreloader-notemplate-swing" level="verbose"/> - <deploy-defines/> - <deploy-preprocess/> - <deploy-jar/> - <deploy-deploy-swing/> - </target> - - <!-- project without preloader --> - <!-- html template --> - <!-- FX in Swing app --> - <target name="-deploy-app-nosign-nopreloader-template-swing" depends="-check-nosign" if="nosign-nopreloader-template-swing" unless="preloader-app-no-workaround"> - <echo message="-deploy-app-nosign-nopreloader-template-swing" level="verbose"/> - <deploy-defines/> - <deploy-preprocess/> - <deploy-jar/> - <deploy-process-template/> - <deploy-deploy-swing/> - </target> - - - <!-- Project Run Targets --> - - <target name="-warn-of-preloader" depends="-check-project" if="preloader-app-no-workaround"> - <fail message="Error:${line.separator}JavaFX 2 Preloader Project can not be executed directly.${line.separator}Please execute instead a JavaFX Application that uses the Preloader."/> - </target> - - - <!-- Running/Debugging/Profiling Standalone --> - - <target name="jfxsa-run" depends="-check-jfx-runtime,-warn-of-preloader,run"/> - - <target name="jfxsa-debug" depends="jar,-check-jfx-runtime,-warn-of-preloader,debug"/> - - <target name="jfxsa-profile" depends="-check-jfx-runtime,-warn-of-preloader,profile"/> - - - <!-- Shared Debugging init --> - - <target name="-init-debug-args"> - <property name="version-output" value="java version "${ant.java.version}"/> - <condition property="have-jdk-older-than-1.4"> - <or> - <contains string="${version-output}" substring="java version "1.0"/> - <contains string="${version-output}" substring="java version "1.1"/> - <contains string="${version-output}" substring="java version "1.2"/> - <contains string="${version-output}" substring="java version "1.3"/> - </or> - </condition> - <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none"> - <istrue value="${have-jdk-older-than-1.4}"/> - </condition> - <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem"> - <os family="windows"/> - </condition> - <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}"> - <isset property="debug.transport"/> - </condition> - </target> - - - <!-- Running/Debugging/Profiling as WebStart --> - - <target name="-check-jnlp-file-fx" depends="-check-project" unless="fx-in-swing-app"> - <basename property="jfx.deployment.base" file="${jfx.deployment.jar}" suffix=".jar"/> - <property name="jfx.deployment.jnlp" location="${jfx.deployment.dir}${file.separator}${jfx.deployment.base}.jnlp"/> - </target> - <target name="-check-jnlp-file-swing" depends="-check-project" if="fx-in-swing-app"> - <basename property="jfx.deployment.base" file="${jfx.deployment.jar}" suffix=".jar"/> - <property name="jfx.deployment.jnlp" location="${jfx.deployment.dir}${file.separator}${jfx.deployment.base}_application.jnlp"/> - </target> - <target name="-check-jnlp-file" depends="-check-jnlp-file-fx,-check-jnlp-file-swing"> - <condition property="jnlp-file-exists"> - <available file="${jfx.deployment.jnlp}"/> - </condition> - <condition property="jnlp-file-exists+netbeans.home"> - <and> - <isset property="jnlp-file-exists"/> - <isset property="netbeans.home"/> - </and> - </condition> - </target> - - <target name="-resolve-jnlp-file" depends="-check-jnlp-file" unless="jnlp-file-exists"> - <antcall target="jfx-deployment"/> - <antcall target="-check-jnlp-file"/> - </target> - - <target name="jfxws-run" if="jnlp-file-exists" depends="-check-jdk-7u4or5-mac,jar,-check-jfx-webstart,-resolve-jnlp-file,-check-jfx-runtime" description="Start fx javaws execution"> - <echo message="Executing ${jfx.deployment.jnlp} using ${active.webstart.executable}"/> - <exec executable="${active.webstart.executable}"> - <arg file="${jfx.deployment.jnlp}"/> - </exec> - </target> - - <target name="jfxws-debug" if="jnlp-file-exists+netbeans.home" depends="-check-jdk-7u4or5-mac,jar,-check-jfx-webstart,-resolve-jnlp-file,-check-jfx-runtime,-debug-start-debugger,-debug-javaws-debuggee" - description="Debug fx javaws project in IDE"/> - - <target name="-debug-javaws-debuggee" depends="-init-debug-args"> - <echo message="Executing ${jfx.deployment.jnlp} in debug mode using ${active.webstart.executable}"/> - <exec executable="${active.webstart.executable}"> - <env key="JAVAWS_VM_ARGS" value="${debug-args-line} -Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> - <arg value="-wait"/> - <arg file="${jfx.deployment.jnlp}"/> - </exec> - </target> - - <target name="-profile-check-1"> - <condition property="profiler.configured"> - <or> - <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/> - <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/> - </or> - </condition> - </target> - - <target if="jnlp-file-exists+netbeans.home" name="-profile-check-jnlp"> - <antcall target="-profile-check-1"/> - </target> - - <target name="-do-jfxws-profile" depends="-check-jdk-7u4or5-mac,jar,-check-jfx-webstart,-resolve-jnlp-file,-check-jfx-runtime"> - <echo message="Executing ${jfx.deployment.jnlp} in profile mode using ${active.webstart.executable}"/> - <exec executable="${active.webstart.executable}"> - <env key="JAVAWS_VM_ARGS" value="${run.jvmargs.ide}"/> - <arg value="-wait"/> - <arg file="${jfx.deployment.jnlp}"/> - </exec> - </target> - - <target name="jfxws-profile" if="profiler.configured" - depends="-profile-check-1" - description="Profile fx javaws project in IDE"> - <startprofiler/> - - <antcall target="-do-jfxws-profile"/> - </target> - - - <!-- Running/Debugging/Profiling in Browser --> - - <target name="-check-selected-browser-path" depends="-check-default-run-config"> - <condition property="javafx.run.inbrowser.undefined"> - <or> - <and> - <isset property="javafx.run.inbrowser"/> - <equals arg1="${javafx.run.inbrowser}" arg2="undefined"/> - </and> - <and> - <isset property="javafx.run.inbrowser.path"/> - <equals arg1="${javafx.run.inbrowser.path}" arg2="undefined"/> - </and> - </or> - </condition> - <condition property="javafx.run.inbrowser.path-exists"> - <and> - <isset property="javafx.run.inbrowser.path"/> - <available file="${javafx.run.inbrowser.path}"/> - </and> - </condition> - <fail message="Error:${line.separator}Browser selection not recognizable from ${config} run configuration.${line.separator}Please go to Project Properties dialog, category Run, to select a valid browser." unless="javafx.run.inbrowser.path"/> - <fail message="Error:${line.separator}No browser defined in ${config} run configuration.${line.separator}Please verify in Tools->Options dialog that NetBeans recognizes a valid browser, then go to Project Properties dialog, category Run, to select a valid browser." if="javafx.run.inbrowser.undefined"/> - <fail message="Error:${line.separator}Browser ${javafx.run.inbrowser.path} referred from ${config} run configuration can not be found.${line.separator}(This can happen, e.g, when the FX Project is transferred to another system.)${line.separator}Please go to Project Properties dialog, category Run, to select a valid browser." unless="javafx.run.inbrowser.path-exists"/> - </target> - - <target name="-check-template-processed-html-file"> - <condition property="html-file-exists"> - <and> - <isset property="html-template-available"/> - <available file="${javafx.run.htmltemplate.processed}"/> - </and> - </condition> - </target> - - <target name="-set-template-processed-html-file" depends="-check-template-processed-html-file" if="html-file-exists"> - <property name="jfx.deployment.html" location="${javafx.run.htmltemplate.processed}"/> - </target> - - <target name="-set-html-file" depends="-set-template-processed-html-file" unless="html-file-exists"> - <basename property="jfx.deployment.base" file="${jfx.deployment.jar}" suffix=".jar"/> - <property name="jfx.deployment.html" location="${jfx.deployment.dir}${file.separator}${jfx.deployment.base}.html"/> - <condition property="html-file-exists"> - <available file="${jfx.deployment.html}"/> - </condition> - <condition property="html-file-exists+netbeans.home"> - <and> - <isset property="html-file-exists"/> - <isset property="netbeans.home"/> - </and> - </condition> - </target> - - <target name="jfxbe-run" if="html-file-exists" depends="-check-jdk-7u4or5-mac,jar,-check-selected-browser-path,-set-html-file,-check-jfx-runtime" description="Start JavaFX execution in browser"> - <echo message="Executing ${jfx.deployment.html} using ${javafx.run.inbrowser}"/> - <echo message="(${javafx.run.inbrowser.path})"/> - <exec executable="${javafx.run.inbrowser.path}"> - <arg file="${jfx.deployment.html}"/> - </exec> - </target> - - <target name="jfxbe-debug" if="html-file-exists+netbeans.home" depends="-check-jdk-7u4or5-mac,jar,-check-selected-browser-path,-set-html-file,-check-jfx-runtime,-debug-start-debugger,-debug-jfxbe-debuggee" - description="Debug JavaFX project in browser"/> - - <target name="-debug-jfxbe-debuggee" depends="-init-debug-args"> - <echo message="Executing ${jfx.deployment.html} in debug mode using ${javafx.run.inbrowser}"/> - <echo message="(${javafx.run.inbrowser.path})"/> - <exec executable="${javafx.run.inbrowser.path}"> - <env key="_JPI_VM_OPTIONS" value="${debug-args-line} -Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> - <arg file="${jfx.deployment.html}"/> - </exec> - </target> - - <target if="html-file-exists+netbeans.home" name="-profile-check-html"> - <antcall target="-profile-check-1"/> - </target> - - <target name="-do-jfxbe-profile" depends="-check-jdk-7u4or5-mac,jar,-check-selected-browser-path,-set-html-file,-check-jfx-runtime"> - <echo message="Executing ${jfx.deployment.html} in profile mode using ${javafx.run.inbrowser}"/> - <echo message="(${javafx.run.inbrowser.path})"/> - <exec executable="${javafx.run.inbrowser.path}"> - <env key="_JPI_VM_OPTIONS" value="${run.jvmargs.ide}"/> - <arg file="${jfx.deployment.html}"/> - </exec> - </target> - - <target name="jfxbe-profile" if="profiler.configured" - depends="-profile-check-html" - description="Profile JavaFX project in browser"> - <startprofiler/> - - <antcall target="-do-jfxbe-profile"/> - </target> -</project> diff --git a/bigapps/SceneBuilderTest/nbproject/project.properties b/bigapps/SceneBuilderTest/nbproject/project.properties deleted file mode 100644 index 90b4846c..00000000 --- a/bigapps/SceneBuilderTest/nbproject/project.properties +++ /dev/null @@ -1,149 +0,0 @@ -annotation.processing.enabled=true -annotation.processing.enabled.in.editor=false -annotation.processing.processors.list= -annotation.processing.run.all.processors=true -annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output -application.title=SceneBuilderTest -application.vendor=andrey -build.classes.dir=${build.dir}/classes -build.classes.excludes=**/*.java,**/*.form -# This directory is removed when the project is cleaned: -build.dir=build -build.generated.dir=${build.dir}/generated -build.generated.sources.dir=${build.dir}/generated-sources -# Only compile against the classpath explicitly listed here: -build.sysclasspath=ignore -build.test.classes.dir=${build.dir}/test/classes -build.test.results.dir=${build.dir}/test/results -compile.on.save=true -compile.on.save.unsupported.javafx=true -# Uncomment to specify the preferred debugger connection transport: -#debug.transport=dt_socket -debug.classpath=\ - ${run.classpath} -debug.test.classpath=\ - ${run.test.classpath} -# This directory is removed when the project is cleaned: -dist.dir=dist -dist.jar=${dist.dir}/SceneBuilderTest.jar -dist.javadoc.dir=${dist.dir}/javadoc -endorsed.classpath= -excludes= -file.reference.javafx-beans-dt.jar=../../../SceneBuilder/SceneBuilder/app/javafx-beans-dt.jar -file.reference.javafx-designtime.jar=../../../SceneBuilder/SceneBuilder/app/javafx-designtime.jar -file.reference.JemmyAWTInput.jar=../../tools/Jemmy/jemmy_core/JemmyAWTInput.jar -file.reference.JemmyBrowser.jar=../../tools/Jemmy/jemmy_core/JemmyBrowser.jar -file.reference.JemmyCore.jar=../../tools/Jemmy/jemmy_core/JemmyCore.jar -file.reference.JemmySupport.jar=../../tools/Jemmy/jemmy_core/JemmySupport.jar -file.reference.jfxrt.jar=../../tools/Jemmy/JemmyFX/lib/javafx/lib/jfxrt.jar -file.reference.SceneBuilder.jar=../../../SceneBuilder/SceneBuilder/app/SceneBuilder.jar -includes=** -# Non-JavaFX jar file creation is deactivated in JavaFX 2.0+ projects -jar.archive.disabled=true -jar.compress=false -jar.index=${jnlp.enabled} -javac.classpath=\ - ${javafx.runtime}/lib/jfxrt.jar:\ - ${javafx.runtime}/lib/deploy.jar:\ - ${javafx.runtime}/lib/javaws.jar:\ - ${javafx.runtime}/lib/plugin.jar:\ - ${reference.GlassRobot.jar}:\ - ${reference.JemmyFX.jar}:\ - ${file.reference.JemmyAWTInput.jar}:\ - ${file.reference.JemmyCore.jar}:\ - ${file.reference.JemmySupport.jar}:\ - ${file.reference.jfxrt.jar}:\ - ${file.reference.SceneBuilder.jar}:\ - ${file.reference.javafx-beans-dt.jar}:\ - ${file.reference.javafx-designtime.jar}:\ - ${reference.GlassImage.jar}:\ - ${reference.JemmyFXBrowser.jar}:\ - ${file.reference.JemmyBrowser.jar} -# Space-separated list of extra javac options -javac.compilerargs= -javac.deprecation=false -javac.processorpath=\ - ${javac.classpath} -javac.source=1.7 -javac.target=1.7 -javac.test.classpath=\ - ${javac.classpath}:\ - ${build.classes.dir}:\ - ${libs.junit_4.classpath} -javac.test.processorpath=\ - ${javac.test.classpath} -javadoc.additionalparam= -javadoc.author=false -javadoc.encoding=${source.encoding} -javadoc.noindex=false -javadoc.nonavbar=false -javadoc.notree=false -javadoc.private=false -javadoc.splitindex=true -javadoc.use=true -javadoc.version=false -javadoc.windowtitle= -javafx.binarycss=false -javafx.deploy.adddesktopshortcut=false -javafx.deploy.addstartmenushortcut=false -javafx.deploy.allowoffline=true -# If true, application update mode is set to 'background', if false, update mode is set to 'eager' -javafx.deploy.backgroundupdate=false -javafx.deploy.embedJNLP=true -javafx.deploy.includeDT=true -javafx.deploy.installpermanently=false -javafx.deploy.permissionselevated=false -# This is a JavaFX project -javafx.enabled=true -javafx.fallback.class=com.javafx.main.NoJavaFXFallback -# Main class for JavaFX -javafx.main.class=scenebuilder.RunGUIBrowser -javafx.preloader.class= -# This project does not use Preloader -javafx.preloader.enabled=false -javafx.preloader.jar.filename= -javafx.preloader.jar.path= -javafx.preloader.project.path= -javafx.preloader.type=none -# Set true for GlassFish only. Rebases manifest classpaths of JARs in lib dir. Not usable with signed JARs. -javafx.rebase.libs=false -javafx.run.height=600 -javafx.run.width=800 -javafx.runtime=${platforms.__________JavaFX_____________.javafx.runtime.home} -javafx.sdk=${platforms.__________JavaFX_____________.javafx.sdk.home} -javafx.signing.enabled=false -javafx.signing.type=notsigned -jnlp.codebase.type=no.codebase -jnlp.descriptor=application -# Pre-JavaFX 2.0 WebStart is deactivated in JavaFX 2.0+ projects -jnlp.enabled=false -jnlp.mixed.code=default -jnlp.offline-allowed=false -jnlp.signed=false -jnlp.signing= -jnlp.signing.alias= -jnlp.signing.keystore= -# Main class for Java launcher -main.class=com.javafx.main.Main -manifest.file=manifest.mf -meta.inf.dir=${src.dir}/META-INF -mkdist.disabled=false -platform.active=__________JavaFX_____________ -project.GlassImage=../../tools/Jemmy/GlassImage -project.GlassRobot=../../tools/Jemmy/GlassRobot -project.JemmyFX=../../tools/Jemmy/JemmyFX -project.JemmyFXBrowser=../../tools/Jemmy/JemmyFXBrowser -reference.GlassImage.jar=${project.GlassImage}/dist/GlassImage.jar -reference.GlassRobot.jar=${project.GlassRobot}/dist/GlassRobot.jar -reference.JemmyFX.jar=${project.JemmyFX}/dist/JemmyFX.jar -reference.JemmyFXBrowser.jar=${project.JemmyFXBrowser}/dist/JemmyFXBrowser.jar -run.classpath=\ - ${dist.jar}:\ - ${javac.classpath} -run.jvmargs=-da -run.test.classpath=\ - ${javac.test.classpath}:\ - ${build.test.classes.dir} -source.encoding=UTF-8 -src.dir=src -test.src.dir=test diff --git a/bigapps/SceneBuilderTest/nbproject/project.xml b/bigapps/SceneBuilderTest/nbproject/project.xml deleted file mode 100644 index eeac9ed9..00000000 --- a/bigapps/SceneBuilderTest/nbproject/project.xml +++ /dev/null @@ -1,63 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project xmlns="http://www.netbeans.org/ns/project/1"> - <type>org.netbeans.modules.java.j2seproject</type> - <configuration> - <buildExtensions xmlns="http://www.netbeans.org/ns/ant-build-extender/1"> - <extension file="jfx-impl.xml" id="jfx"> - <dependency dependsOn="-check-javafx" target="-init-check"/> - <dependency dependsOn="-jfx-copylibs" target="-post-jar"/> - <dependency dependsOn="-rebase-libs" target="-post-jar"/> - <dependency dependsOn="jfx-deployment" target="-post-jar"/> - <dependency dependsOn="jar" target="debug"/> - <dependency dependsOn="-jfx-copylibs" target="jar"/> - <dependency dependsOn="-rebase-libs" target="jar"/> - <dependency dependsOn="jar" target="profile"/> - <dependency dependsOn="jar" target="run"/> - </extension> - </buildExtensions> - <data xmlns="http://www.netbeans.org/ns/j2se-project/3"> - <name>SceneBuilderTest</name> - <explicit-platform explicit-source-supported="true"/> - <source-roots> - <root id="src.dir"/> - </source-roots> - <test-roots> - <root id="test.src.dir"/> - </test-roots> - </data> - <references xmlns="http://www.netbeans.org/ns/ant-project-references/1"> - <reference> - <foreign-project>GlassImage</foreign-project> - <artifact-type>jar</artifact-type> - <script>build.xml</script> - <target>jar</target> - <clean-target>clean</clean-target> - <id>jar</id> - </reference> - <reference> - <foreign-project>GlassRobot</foreign-project> - <artifact-type>jar</artifact-type> - <script>build.xml</script> - <target>jar</target> - <clean-target>clean</clean-target> - <id>jar</id> - </reference> - <reference> - <foreign-project>JemmyFX</foreign-project> - <artifact-type>jar</artifact-type> - <script>build.xml</script> - <target>jar</target> - <clean-target>clean</clean-target> - <id>jar</id> - </reference> - <reference> - <foreign-project>JemmyFXBrowser</foreign-project> - <artifact-type>jar</artifact-type> - <script>build.xml</script> - <target>jar</target> - <clean-target>clean</clean-target> - <id>jar</id> - </reference> - </references> - </configuration> -</project> diff --git a/bigapps/SceneBuilderTest/src/scenebuilder/RunGUIBrowser.java b/bigapps/SceneBuilderTest/src/scenebuilder/RunGUIBrowser.java index 5bd8527a..46920cba 100644 --- a/bigapps/SceneBuilderTest/src/scenebuilder/RunGUIBrowser.java +++ b/bigapps/SceneBuilderTest/src/scenebuilder/RunGUIBrowser.java @@ -1,10 +1,42 @@ +/* + * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code 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 General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ package scenebuilder; -import com.oracle.javafx.authoring.Main; -import java.awt.AWTException; +import com.oracle.javafx.scenebuilder.app.SceneBuilderApp; import javafx.application.Application; +import javafx.event.EventHandler; +import javafx.scene.input.KeyCode; +import javafx.scene.input.KeyEvent; +import javafx.stage.Stage; +import org.jemmy.action.GetAction; import org.jemmy.fx.Browser; +import org.jemmy.fx.ByWindowType; +import org.jemmy.fx.SceneDock; + +import java.awt.AWTException; /** * @@ -13,13 +45,24 @@ public class RunGUIBrowser { public static void main(String[] args) throws AWTException { - new Thread(new Runnable() { + new Thread(() -> Application.launch(SceneBuilderApp.class)).start(); + SceneDock mainScene = new SceneDock(new ByWindowType(Stage.class)); + new GetAction() { - public void run() { - Application.launch(Main.class); + @Override + public void run(Object... os) throws Exception { + mainScene.wrap().getControl().setOnKeyPressed(new EventHandler<KeyEvent>() { + boolean browserStarted = false; + @Override + public void handle(KeyEvent ke) { + if (!browserStarted && ke.isControlDown() && ke.isShiftDown() && ke.getCode() == KeyCode.B) { + browserStarted = true; + javafx.application.Platform.runLater(() -> Browser.runBrowser()); + } + } + }); } - }).start(); - - Browser.runBrowser(); + }.dispatch(mainScene.wrap().getEnvironment()); + System.err.println("Click Ctrl-Shift-B to run FX Browser."); } } diff --git a/bigapps/SceneBuilderTest/test/TEST.ROOT b/bigapps/SceneBuilderTest/test/TEST.ROOT new file mode 100644 index 00000000..0d841c11 --- /dev/null +++ b/bigapps/SceneBuilderTest/test/TEST.ROOT @@ -0,0 +1,2 @@ +TestNG.dirs = . + diff --git a/bigapps/SceneBuilderTest/test/scenebuildertest/SceneBuilderTest.java b/bigapps/SceneBuilderTest/test/scenebuildertest/SceneBuilderTest.java index 47961de8..5d077136 100644 --- a/bigapps/SceneBuilderTest/test/scenebuildertest/SceneBuilderTest.java +++ b/bigapps/SceneBuilderTest/test/scenebuildertest/SceneBuilderTest.java @@ -1,6 +1,6 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,32 +25,28 @@ */ package scenebuildertest; -import com.oracle.javafx.authoring.Main; -import java.util.logging.Level; -import java.util.logging.Logger; +import com.oracle.javafx.scenebuilder.app.SceneBuilderApp; import javafx.application.Application; +import javafx.geometry.Orientation; +import javafx.scene.Node; +import javafx.scene.Scene; import org.jemmy.fx.ByID; +import org.jemmy.fx.ByText; import org.jemmy.fx.ByTitleSceneLookup; import org.jemmy.fx.NodeDock; +import org.jemmy.fx.NodeParentImpl; import org.jemmy.fx.SceneDock; -import org.jemmy.fx.control.ByIdMenuItem; -import org.jemmy.fx.control.ListItemDock; +import org.jemmy.fx.control.AccordionDock; +import org.jemmy.fx.control.LabeledDock; import org.jemmy.fx.control.ListViewDock; -import org.jemmy.fx.control.MenuBarDock; +import org.jemmy.fx.control.ScrollBarDock; import org.jemmy.fx.control.TextInputControlDock; -import org.jemmy.fx.control.TitledPaneDock; import org.jemmy.interfaces.Keyboard; +import org.jemmy.interfaces.Parent; +import org.jemmy.lookup.BySubControl; import org.jemmy.resources.StringComparePolicy; import org.junit.BeforeClass; import org.junit.Test; -import static com.oracle.javafx.authoring.internal.QEConstants.*; -import javafx.scene.Scene; -import javafx.scene.control.Button; -import javafx.scene.control.TextField; -import javafx.stage.PopupWindow; -import org.jemmy.fx.ByText; -import org.jemmy.fx.control.LabeledDock; -import org.jemmy.lookup.LookupCriteria; /** * This sample demonstrates different approaches for testing real application. @@ -61,89 +57,55 @@ public class SceneBuilderTest { @BeforeClass public static void RunUI() { - //Use Application.launch(...) to run JavaFX application. - new Thread(new Runnable() { - public void run() { - Application.launch(Main.class); - } - }).start(); + new Thread(() -> Application.launch(SceneBuilderApp.class)).start(); } @Test - public void testPrototype() { - //find Scene Builder scene - final SceneDock sceneBuilder = new SceneDock(new ByTitleSceneLookup<>("Scene Builder", StringComparePolicy.SUBSTRING)); - //find library panel by node ID using Scene Builder's scene as Parent - ListViewDock library = new ListViewDock(sceneBuilder.asParent(), ID_LIBRARY_PANEL_LIST_VIEW); - - //find button in library - ListItemDock button = new ListItemDock(library.asList(), new ByID("Button")); - - //show list item with button by scrolling listview - button.shower().show(); - - //find design surface by node ID "Anchor Pane". - NodeDock designSurface = new NodeDock(sceneBuilder.asParent(), "AnchorPane"); - - //drag list item with button and drop in center of design surface - button.drag().dnd(designSurface.wrap(), designSurface.wrap().getClickPoint()); - - //find properties panel by node ID - TitledPaneDock titledPaneDock = new TitledPaneDock(sceneBuilder.asParent(), "Properties"); - - //find text field for property "Text" - TextInputControlDock textField = new TextInputControlDock(new NodeDock(titledPaneDock.asParent(), "TextValue").asParent()); - //clear and type text - textField.clear(); - textField.type("Submit"); - //push enter to complete - textField.keyboard().pushKey(Keyboard.KeyboardButtons.ENTER); - - //Add text field///////////////////////////////////////////////////////////////////////////////////////////////////// - - //find text field in library - ListItemDock textFieldControl = new ListItemDock(library.asList(), new ByID("Text Field")); - - //show list item with text field by scrolling listview - textFieldControl.shower().show(); - - //drag list item with text field and drop on design surface near button - textFieldControl.drag().dnd(designSurface.wrap(), designSurface.wrap().getClickPoint().translate(70, 50)); - - //find text field on design surface and double click to invoke inline editing - new TextInputControlDock(designSurface.asParent()).mouse().click(2); - - //find inline text field and type text "Name". - TextInputControlDock inline = new TextInputControlDock(sceneBuilder.asParent(), ID_TEXT_INLINE_EDITING); - inline.clear(); - inline.type("Name"); - inline.keyboard().pushKey(Keyboard.KeyboardButtons.ENTER); - - - //show preview - //find menu bar by ID then push "Preview" menu. Finally push "Show preview" menu item. All menu item have id's that help to find them. - new MenuBarDock(sceneBuilder.asParent(), ID_MENU_BAR).menu().push(new ByIdMenuItem(ID_PREVIEW_MENU), new ByIdMenuItem(ID_PREVIEW_MENU_ITEM)); - - //find preview scene. Criteria: scene is not existing scene builder scene and scene.getWindow is not PopupWindow - SceneDock previewScene = new SceneDock(new LookupCriteria<Scene>() { + public void testPrototype() throws InterruptedException { + var templateSelector = new SceneDock(new ByTitleSceneLookup<>("Scene Builder", StringComparePolicy.SUBSTRING)); + new NodeDock(templateSelector.asParent(), new ByText<>("Basic Application")).mouse().click(); + + //TODO + //may be identify the scene by the content + var sceneBuilder = new SceneDock(new ByTitleSceneLookup<>("Untitled", StringComparePolicy.SUBSTRING)); + var library = new AccordionDock(sceneBuilder.asParent(), "libAccordion"); + library.selector().select("Controls"); + var controls = new ListViewDock(library.asParent(), "ControlsList"); + var buttonInPalette = new LabeledDock(controls.asParent(), "Button", StringComparePolicy.EXACT); + buttonInPalette.mouse().click(); + + var designSurface = new NodeDock(sceneBuilder.asParent(), "contentSubScene"); + + buttonInPalette.drag().dnd(buttonInPalette.wrap().getClickPoint(), + designSurface.wrap(), + designSurface.wrap().getClickPoint()); + + var inspector = new AccordionDock(sceneBuilder.asParent(), "accordion"); + inspector.selector().select("Properties"); + var id = new TextInputControlDock(inspector.asParent(), "Id Value"); + //TODO + //why is awuto scroll not working? + var propertyScroll = new ScrollBarDock( + new NodeDock(sceneBuilder.asParent(), "propertiesTitledPane") + .asParent(), sb -> sb.getOrientation() == Orientation.VERTICAL && sb.isVisible()).asScroll(); + //TODO + //scroll till visible + propertyScroll.to(propertyScroll.maximum()); + id.clear(); + id.type("Awesome!"); + id.keyboard().pushKey(Keyboard.KeyboardButtons.ENTER); + + sceneBuilder.keyboard().pushKey(Keyboard.KeyboardButtons.P, Keyboard.KeyboardModifiers.META_DOWN_MASK); + + //TODO + //how to better find it? + var preview = new SceneDock(new BySubControl<Scene, Node>(new ByID<>("Awesome!")) { @Override - public boolean check(Scene cntrl) { - return (cntrl != sceneBuilder.wrap().getControl() && !(cntrl.getWindow() instanceof PopupWindow)); + protected Parent<Node> asParent(Scene scene) { + return new NodeParentImpl(scene.getRoot(), sceneBuilder.environment()); } }); - //find Button with text "Submit" on preview scene - new LabeledDock(previewScene.asParent(), Button.class, new ByText<Button>("Submit")); - //find TextField with text "Name" on preview scene - new TextInputControlDock(previewScene.asParent(), TextField.class, new ByText<TextField>("Name")); - - - try { - Thread.sleep(5000); - } catch (InterruptedException ex) { - Logger.getLogger(SceneBuilderTest.class.getName()).log(Level.SEVERE, null, ex); - } - - + new NodeDock(preview.asParent(), "Awesome!").mouse().click(); } } diff --git a/functional/3DTests/build.xml b/functional/3DTests/build.xml index 4df43900..40121d16 100644 --- a/functional/3DTests/build.xml +++ b/functional/3DTests/build.xml @@ -1,94 +1,16 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -/* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code 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 General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ ---> -<project name="3DTests" default="default" basedir="."> - <description>Builds, tests, and runs the project 3DTests.</description> - - <import file="../../tools/SharedTestUtilsOpen/image-utils.xml"/> - <import file="../../tools/FxTestRunner/javatest_fx.xml"/> - <import file="../../tools/FxTestRunner/run_javatest_macro.xml"/> - <import file="../../tools/FxTestRunner/plugin_support.xml"/> - - <condition property="external.output" value="${external.output}" else="${basedir}/.."> - <isset property="external.output"/> - </condition> - - <property name="image.properties" location="${basedir}/image.properties"/> - <property name="test.sources" value="test"/> - - <target name="-pre-init" unless="no.need.to.find.java.fx"> - <ant antfile="../../detect_javafx-nb.xml" inheritall="true"> - <property name="basedir" location="${basedir}/../.."/> - <property name="property.file" value="${basedir}/nbproject/private/private.properties"/> - </ant> - </target> - - <import file="nbproject/build-impl.xml"/> - - <target name="-post-clean" depends="delete-jcov"> - <delete dir="dist-plugin"/> - </target> - <!-- javatest support --> - <target name="javatest" depends="compile, compile-test, run-manual"/> - <target name="run-manual" depends="init,dojavatest"/> - <target name="run-automated" depends="-post-jar, javatest-automated"/> - <target name="run-automated-nobuild" depends="init, dist-plugin, javatest-automated"/> - <target name="-post-jar" depends="compile-test, dist-plugin"/> - - <target name="check-template" unless="template"> - <fail message="template variable must be set to merge"/> - </target> - <target name="feature-coverage-merge" depends="-post-jar, check-template"> - <java classname="com.oracle.jdk.sqe.cc.markup.Merger"> - <classpath> - <pathelement location="../lib/TestMarkup.jar"/> - </classpath> - <arg line="-o"/> - <arg line="${basedir}/result.fcov"/> - <arg line="${template}"/> - <arg line="${basedir}/coverage.fcov"/> - </java> - <java classname="com.oracle.jdk.sqe.cc.markup.Report"> - <classpath> - <pathelement location="${basedir}/../lib/TestMarkup.jar"/> - </classpath> - <arg line="-o"/> - <arg line="${basedir}/report.html"/> - <arg line="${basedir}/result.fcov"/> - </java> - </target> - - <target name="-skipper"> - <property name="fxsqe.nosvn" value="true"/> - </target> - <target name="delete-jcov" unless="testbase.readonly"> - <echo message="Delete jcoverage data"/> - <delete file="${ant.project.name}.jcov" failonerror="false"/> - <delete dir="${ant.project.name}.report" failonerror="false"/> - <delete dir="jcov-results" failonerror="false"/> - </target> -</project> +<?xml version="1.0" encoding="UTF-8"?> +<project name="3d.tests" default="compile"> + <basename file="${basedir}" property="."/> + <property name="rootdir" location="${basedir}/../.."/> + <property name="project.name" value="3DTests"/> + <!--property name="test.problem.list" location="test/ProblemList.txt"/--> + <import file="${basedir}/../../tools/make/build-template.xml"/> + <property name="dependencies.classpath" value="${jemmyfx-src}/build/classes${path.separator}${glass-robot-src}/build/classes${path.separator}${glass-image-src}/build/classes${path.separator}${jemmyfx-browser-src}/build/classes${path.separator}${jtreg.home}/lib/junit.jar${path.separator}${javafx.home}/lib/javafx-swt.jar${path.separator}${javafx.home}/lib/javafx.swing.jar${path.separator}${shared-test-utils-src}/build/classes"/> + <target name="build-dependencies"> + <antcall target="build-other-project"> + <param name="project" value="${shared-test-utils-src}"/> + </antcall> + </target> + <target name="compile" depends="compile-src"/> + <target name="build-test-dependencies"/> +</project> diff --git a/functional/3DTests/test/ProblemList.txt b/functional/3DTests/test/ProblemList.txt new file mode 100644 index 00000000..32d28676 --- /dev/null +++ b/functional/3DTests/test/ProblemList.txt @@ -0,0 +1 @@ +#test/scenegraph/fx3d/lighting/SingleLightingTest.java <bug_id> generic-all diff --git a/functional/3DTests/test/TEST.ROOT b/functional/3DTests/test/TEST.ROOT new file mode 100644 index 00000000..c40832b9 --- /dev/null +++ b/functional/3DTests/test/TEST.ROOT @@ -0,0 +1 @@ +TestNG.dirs = . diff --git a/functional/ControlsTests/.gitignore b/functional/ControlsTests/.gitignore new file mode 100644 index 00000000..567609b1 --- /dev/null +++ b/functional/ControlsTests/.gitignore @@ -0,0 +1 @@ +build/ diff --git a/functional/ControlsTests/Readme.md b/functional/ControlsTests/Readme.md new file mode 100644 index 00000000..9161e91e --- /dev/null +++ b/functional/ControlsTests/Readme.md @@ -0,0 +1 @@ +various tests are failing for various reasons. diff --git a/functional/ControlsTests/build.xml b/functional/ControlsTests/build.xml index 78337e44..f30b7856 100644 --- a/functional/ControlsTests/build.xml +++ b/functional/ControlsTests/build.xml @@ -1,130 +1,18 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- -/* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code 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 General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ ---> -<project name="ControlsTests" default="default" basedir="." - xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:fx="javafx:com.sun.javafx.tools.ant"> - <description>Builds, tests, and runs the project ControlsTests.</description> - - <import file="../../tools/SharedTestUtilsOpen/image-utils.xml"/> - <import file="../../tools/FxTestRunner/javatest_fx.xml"/> - <import file="../../tools/FxTestRunner/run_javatest_macro.xml"/> - <import file="../../tools/FxTestRunner/plugin_support.xml"/> - - <condition property="external.output" value="${external.output}" else="${basedir}/.."> - <isset property="external.output"/> - </condition> - - <property name="image.properties" location="${basedir}/image.properties"/> - <property name="test.sources" value="test"/> - - <target name="-pre-init" unless="no.need.to.find.java.fx"> - <ant antfile="../../detect_javafx-nb.xml" inheritall="true"> - <property name="basedir" location="${basedir}/../.."/> - <property name="property.file" value="${basedir}/nbproject/private/private.properties"/> - </ant> +<project name="controls.tests" default="compile"> + <basename file="${basedir}" property="."/> + <property name="rootdir" location="${basedir}/../.."/> + <property name="project.name" value="ControlsTests"/> + <import file="${basedir}/../../tools/make/build-template.xml"/> + <property name="dependencies.classpath" value="${jemmyfx-src}/build/classes${path.separator}${glass-robot-src}/build/classes${path.separator}${glass-image-src}/build/classes${path.separator}${jtreg.home}/lib/junit.jar${path.separator}${javafx.home}/lib/javafx-swt.jar${path.separator}${javafx.home}/lib/javafx.swing.jar${path.separator}${shared-test-utils-src}/build/classes${path.separator}${test-markup-src}/build/classes"/> + <target name="build-dependencies"> + <antcall target="build-other-project"> + <param name="project" value="${shared-test-utils-src}"/> + </antcall> + <antcall target="build-other-project"> + <param name="project" value="${test-markup-src}"/> + </antcall> </target> - - <import file="nbproject/build-impl.xml"/> - - <target name="test-dir" depends="init, compile-test,-pre-test-run" if="have.tests"> - <fail unless="test.subdir">Must set test.subdir with short name of root dir of tests; eg ListView</fail> - <j2seproject3:junit testincludes="javafx/scene/control/test/${test.subdir}/**/*Test.java"/> - </target> - - <!-- javatest support --> - <target name="javatest" depends="compile, compile-test, run-manual"/> - <target name="run-manual" depends="init,dojavatest"/> - <target name="run-automated" depends="-post-jar, javatest-automated"/> - <target name="run-automated-nobuild" depends="init, dist-plugin, javatest-automated"/> - <target name="-post-jar" depends="compile-test, dist-plugin"/> - - <!-- Prepare jars for manual testing --> - <target name="-post-compile-test" depends="manual-jars" /> - <property name="content.dir" value="${basedir}/content" /> - <target name="manual-jars" depends="init"> - <echo message="FX-ANT=${file.reference.ant-javafx.jar}" /> - - <condition property="file.reference.ant-javafx.jar" value="${javafx.home}/lib/ant-javafx.jar" else="${javafx.rt}/lib/ant-javafx.jar"> - <isset property="javafx.home"/> - </condition> - <echo message="debug: file.reference.ant-javafx.jar = ${file.reference.ant-javafx.jar}"/> - - <taskdef resource="com/sun/javafx/tools/ant/antlib.xml" - uri="javafx:com.sun.javafx.tools.ant" - classpath="${file.reference.ant-javafx.jar}"/> - - <fx:jar destfile="${content.dir}/source.jar"> - <application mainClass="javafx.draganddrop.DragDropWithControls" name="DragAndClipboard" /> - <fileset dir="${build.classes.dir}"> - <include name="javafx/**" /> - </fileset> - <fileset dir="${build.test.classes.dir}"/> - <manifest> - <attribute name="Implementation-Vendor" value="Oracle"/> - <attribute name="Implementation-Title" value="FXSQE Manual Test"/> - <attribute name="Implementation-Version" value="1.0"/> - </manifest> - <fx:resources> - <fx:fileset dir="${content.dir}" includes="SharedTestUtilsOpen.jar"/> - <fx:fileset dir="${content.dir}" includes="JemmyAWTInput.jar"/> - <fx:fileset dir="${content.dir}" includes="JemmyCore.jar"/> - <fx:fileset dir="${content.dir}" includes="JemmyFX.jar"/> - </fx:resources> - </fx:jar> - <copy file="../../tools/SharedTestUtilsOpen/dist/SharedTestUtilsOpen.jar" tofile="${content.dir}/SharedTestUtilsOpen.jar"/> - <copy file="../../tools/Jemmy/jemmy_core/JemmyAWTInput.jar" tofile="${content.dir}/JemmyAWTInput.jar"/> - <copy file="../../tools/Jemmy/jemmy_core/JemmyCore.jar" tofile="${content.dir}/JemmyCore.jar"/> - <copy file="../../tools/Jemmy/JemmyFX/dist/JemmyFX.jar" tofile="${content.dir}/JemmyFX.jar"/> - </target> - - <target name="check-template" unless="template"> - <fail message="template variable must be set to merge"/> - </target> - <target name="feature-coverage-merge" depends="-post-compile-test, check-template"> - <java classname="com.oracle.jdk.sqe.cc.markup.Merger"> - <classpath> - <pathelement location="../../tools/TestMarkup/dist/TestMarkup.jar"/> - </classpath> - <arg line="-o"/> - <arg line="${basedir}/result.fcov"/> - <arg line="${template}"/> - <arg line="${basedir}/coverage.fcov"/> - </java> - <java classname="com.oracle.jdk.sqe.cc.markup.Report"> - <classpath> - <pathelement location="../../tools/TestMarkup/dist/TestMarkup.jar"/> - </classpath> - <arg line="-o"/> - <arg line="${basedir}/report.html"/> - <arg line="${basedir}/result.fcov"/> - </java> - </target> - <target name="-post-clean"> <!-- depends="delete-jcov" --> - <delete dir="dist-plugin"/> - </target> - + <target name="compile" depends="compile-src"/> + <target name="build-test-dependencies"/> </project> diff --git a/functional/ControlsTests/nbproject/build-impl.xml b/functional/ControlsTests/nbproject/build-impl.xml deleted file mode 100644 index cc039e43..00000000 --- a/functional/ControlsTests/nbproject/build-impl.xml +++ /dev/null @@ -1,1407 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -*** GENERATED FROM project.xml - DO NOT EDIT *** -*** EDIT ../build.xml INSTEAD *** - -For the purpose of easier reading the script -is divided into following sections: - - - initialization - - compilation - - jar - - execution - - debugging - - javadoc - - test compilation - - test execution - - test debugging - - applet - - cleanup - - --> -<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="ControlsTests-impl"> - <fail message="Please build using Ant 1.8.0 or higher."> - <condition> - <not> - <antversion atleast="1.8.0"/> - </not> - </condition> - </fail> - <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/> - <!-- - ====================== - INITIALIZATION SECTION - ====================== - --> - <target name="-pre-init"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="-pre-init" name="-init-private"> - <property file="nbproject/private/config.properties"/> - <property file="nbproject/private/configs/${config}.properties"/> - <property file="nbproject/private/private.properties"/> - </target> - <target depends="-pre-init,-init-private" name="-init-user"> - <property file="${user.properties.file}"/> - <!-- The two properties below are usually overridden --> - <!-- by the active platform. Just a fallback. --> - <property name="default.javac.source" value="1.4"/> - <property name="default.javac.target" value="1.4"/> - </target> - <target depends="-pre-init,-init-private,-init-user" name="-init-project"> - <property file="nbproject/configs/${config}.properties"/> - <property file="nbproject/project.properties"/> - </target> - <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init"> - <property name="platform.java" value="${java.home}/bin/java"/> - <available file="${manifest.file}" property="manifest.available"/> - <condition property="splashscreen.available"> - <and> - <not> - <equals arg1="${application.splash}" arg2="" trim="true"/> - </not> - <available file="${application.splash}"/> - </and> - </condition> - <condition property="main.class.available"> - <and> - <isset property="main.class"/> - <not> - <equals arg1="${main.class}" arg2="" trim="true"/> - </not> - </and> - </condition> - <condition property="profile.available"> - <and> - <isset property="javac.profile"/> - <length length="0" string="${javac.profile}" when="greater"/> - <matches pattern="1\.[89](\..*)?" string="${javac.source}"/> - </and> - </condition> - <condition property="do.archive"> - <not> - <istrue value="${jar.archive.disabled}"/> - </not> - </condition> - <condition property="do.mkdist"> - <and> - <isset property="do.archive"/> - <isset property="libs.CopyLibs.classpath"/> - <not> - <istrue value="${mkdist.disabled}"/> - </not> - </and> - </condition> - <condition property="do.archive+manifest.available"> - <and> - <isset property="manifest.available"/> - <istrue value="${do.archive}"/> - </and> - </condition> - <condition property="do.archive+main.class.available"> - <and> - <isset property="main.class.available"/> - <istrue value="${do.archive}"/> - </and> - </condition> - <condition property="do.archive+splashscreen.available"> - <and> - <isset property="splashscreen.available"/> - <istrue value="${do.archive}"/> - </and> - </condition> - <condition property="do.archive+profile.available"> - <and> - <isset property="profile.available"/> - <istrue value="${do.archive}"/> - </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"/> - <isset property="have.tests"/> - </and> - </condition> - <condition property="no.javadoc.preview"> - <and> - <isset property="javadoc.preview"/> - <isfalse value="${javadoc.preview}"/> - </and> - </condition> - <property name="run.jvmargs" value=""/> - <property name="run.jvmargs.ide" value=""/> - <property name="javac.compilerargs" value=""/> - <property name="work.dir" value="${basedir}"/> - <condition property="no.deps"> - <and> - <istrue value="${no.dependencies}"/> - </and> - </condition> - <property name="javac.debug" value="true"/> - <property name="javadoc.preview" value="true"/> - <property name="application.args" value=""/> - <property name="source.encoding" value="${file.encoding}"/> - <property name="runtime.encoding" value="${source.encoding}"/> - <condition property="javadoc.encoding.used" value="${javadoc.encoding}"> - <and> - <isset property="javadoc.encoding"/> - <not> - <equals arg1="${javadoc.encoding}" arg2=""/> - </not> - </and> - </condition> - <property name="javadoc.encoding.used" value="${source.encoding}"/> - <property name="includes" value="**"/> - <property name="excludes" value=""/> - <property name="do.depend" value="false"/> - <condition property="do.depend.true"> - <istrue value="${do.depend}"/> - </condition> - <path id="endorsed.classpath.path" path="${endorsed.classpath}"/> - <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'"> - <and> - <isset property="endorsed.classpath"/> - <not> - <equals arg1="${endorsed.classpath}" arg2="" trim="true"/> - </not> - </and> - </condition> - <condition else="" property="javac.profile.cmd.line.arg" value="-profile ${javac.profile}"> - <isset property="profile.available"/> - </condition> - <condition else="false" property="jdkBug6558476"> - <and> - <matches pattern="1\.[56]" string="${java.specification.version}"/> - <not> - <os family="unix"/> - </not> - </and> - </condition> - <property name="javac.fork" value="${jdkBug6558476}"/> - <property name="jar.index" value="false"/> - <property name="jar.index.metainf" value="${jar.index}"/> - <property name="copylibs.rebase" value="true"/> - <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/> - <condition property="junit.available"> - <or> - <available classname="org.junit.Test" classpath="${run.test.classpath}"/> - <available classname="junit.framework.Test" classpath="${run.test.classpath}"/> - </or> - </condition> - <condition property="testng.available"> - <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/> - </condition> - <condition property="junit+testng.available"> - <and> - <istrue value="${junit.available}"/> - <istrue value="${testng.available}"/> - </and> - </condition> - <condition else="testng" property="testng.mode" value="mixed"> - <istrue value="${junit+testng.available}"/> - </condition> - <condition else="" property="testng.debug.mode" value="-mixed"> - <istrue value="${junit+testng.available}"/> - </condition> - </target> - <target name="-post-init"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check"> - <fail unless="src.dir">Must set src.dir</fail> - <fail unless="test.src.dir">Must set test.src.dir</fail> - <fail unless="build.dir">Must set build.dir</fail> - <fail unless="dist.dir">Must set dist.dir</fail> - <fail unless="build.classes.dir">Must set build.classes.dir</fail> - <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail> - <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail> - <fail unless="build.test.results.dir">Must set build.test.results.dir</fail> - <fail unless="build.classes.excludes">Must set build.classes.excludes</fail> - <fail unless="dist.jar">Must set dist.jar</fail> - </target> - <target name="-init-macrodef-property"> - <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1"> - <attribute name="name"/> - <attribute name="value"/> - <sequential> - <property name="@{name}" value="${@{value}}"/> - </sequential> - </macrodef> - </target> - <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors"> - <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${src.dir}" name="srcdir"/> - <attribute default="${build.classes.dir}" name="destdir"/> - <attribute default="${javac.classpath}" name="classpath"/> - <attribute default="${javac.processorpath}" name="processorpath"/> - <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="${javac.debug}" name="debug"/> - <attribute default="${empty.dir}" name="sourcepath"/> - <attribute default="${empty.dir}" name="gensrcdir"/> - <element name="customize" optional="true"/> - <sequential> - <property location="${build.dir}/empty" name="empty.dir"/> - <mkdir dir="${empty.dir}"/> - <mkdir dir="@{apgeneratedsrcdir}"/> - <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}"> - <src> - <dirset dir="@{gensrcdir}" erroronmissingdir="false"> - <include name="*"/> - </dirset> - </src> - <classpath> - <path path="@{classpath}"/> - </classpath> - <compilerarg line="${endorsed.classpath.cmd.line.arg}"/> - <compilerarg line="${javac.profile.cmd.line.arg}"/> - <compilerarg line="${javac.compilerargs}"/> - <compilerarg value="-processorpath"/> - <compilerarg path="@{processorpath}:${empty.dir}"/> - <compilerarg line="${ap.processors.internal}"/> - <compilerarg line="${annotation.processing.processor.options}"/> - <compilerarg value="-s"/> - <compilerarg path="@{apgeneratedsrcdir}"/> - <compilerarg line="${ap.proc.none.internal}"/> - <customize/> - </javac> - </sequential> - </macrodef> - </target> - <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal"> - <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${src.dir}" name="srcdir"/> - <attribute default="${build.classes.dir}" name="destdir"/> - <attribute default="${javac.classpath}" name="classpath"/> - <attribute default="${javac.processorpath}" name="processorpath"/> - <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="${javac.debug}" name="debug"/> - <attribute default="${empty.dir}" name="sourcepath"/> - <attribute default="${empty.dir}" name="gensrcdir"/> - <element name="customize" optional="true"/> - <sequential> - <property location="${build.dir}/empty" name="empty.dir"/> - <mkdir dir="${empty.dir}"/> - <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}"> - <src> - <dirset dir="@{gensrcdir}" erroronmissingdir="false"> - <include name="*"/> - </dirset> - </src> - <classpath> - <path path="@{classpath}"/> - </classpath> - <compilerarg line="${endorsed.classpath.cmd.line.arg}"/> - <compilerarg line="${javac.profile.cmd.line.arg}"/> - <compilerarg line="${javac.compilerargs}"/> - <customize/> - </javac> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac"> - <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${src.dir}" name="srcdir"/> - <attribute default="${build.classes.dir}" name="destdir"/> - <attribute default="${javac.classpath}" name="classpath"/> - <sequential> - <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}"> - <classpath> - <path path="@{classpath}"/> - </classpath> - </depend> - </sequential> - </macrodef> - <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${build.classes.dir}" name="destdir"/> - <sequential> - <fail unless="javac.includes">Must set javac.includes</fail> - <pathconvert pathsep="${line.separator}" property="javac.includes.binary"> - <path> - <filelist dir="@{destdir}" files="${javac.includes}"/> - </path> - <globmapper from="*.java" to="*.class"/> - </pathconvert> - <tempfile deleteonexit="true" property="javac.includesfile.binary"/> - <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/> - <delete> - <files includesfile="${javac.includesfile.binary}"/> - </delete> - <delete> - <fileset file="${javac.includesfile.binary}"/> - </delete> - </sequential> - </macrodef> - </target> - <target if="${junit.available}" name="-init-macrodef-junit-init"> - <condition else="false" property="nb.junit.batch" value="true"> - <and> - <istrue value="${junit.available}"/> - <not> - <isset property="test.method"/> - </not> - </and> - </condition> - <condition else="false" property="nb.junit.single" value="true"> - <and> - <istrue value="${junit.available}"/> - <isset property="test.method"/> - </and> - </condition> - </target> - <target name="-init-test-properties"> - <property name="test.binaryincludes" value="<nothing>"/> - <property name="test.binarytestincludes" value=""/> - <property name="test.binaryexcludes" value=""/> - </target> - <target if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}"> - <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element name="customize" optional="true"/> - <sequential> - <property name="junit.forkmode" value="perTest"/> - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> - <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/> - <syspropertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <formatter type="brief" usefile="false"/> - <formatter type="xml"/> - <jvmarg value="-ea"/> - <customize/> - </junit> - </sequential> - </macrodef> - </target> - <target depends="-init-test-properties" if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}"> - <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element name="customize" optional="true"/> - <sequential> - <property name="junit.forkmode" value="perTest"/> - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> - <batchtest todir="${build.test.results.dir}"> - <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}"> - <filename name="@{testincludes}"/> - </fileset> - <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}"> - <filename name="${test.binarytestincludes}"/> - </fileset> - </batchtest> - <syspropertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <formatter type="brief" usefile="false"/> - <formatter type="xml"/> - <jvmarg value="-ea"/> - <customize/> - </junit> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/> - <target if="${testng.available}" name="-init-macrodef-testng"> - <macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element name="customize" optional="true"/> - <sequential> - <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}"> - <isset property="test.method"/> - </condition> - <union id="test.set"> - <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}"> - <filename name="@{testincludes}"/> - </fileset> - </union> - <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/> - <testng classfilesetref="test.set" failureProperty="tests.failed" listeners="org.testng.reporters.VerboseReporter" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="ControlsTests" testname="TestNG tests" workingDir="${work.dir}"> - <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/> - <propertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </propertyset> - <customize/> - </testng> - </sequential> - </macrodef> - </target> - <target name="-init-macrodef-test-impl"> - <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element implicit="true" name="customize" optional="true"/> - <sequential> - <echo>No tests executed.</echo> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl"> - <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element implicit="true" name="customize" optional="true"/> - <sequential> - <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> - <customize/> - </j2seproject3:junit> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl"> - <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element implicit="true" name="customize" optional="true"/> - <sequential> - <j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> - <customize/> - </j2seproject3:testng> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test"> - <macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <sequential> - <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> - <customize> - <classpath> - <path path="${run.test.classpath}"/> - </classpath> - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> - <jvmarg line="${run.jvmargs}"/> - <jvmarg line="${run.jvmargs.ide}"/> - </customize> - </j2seproject3:test-impl> - </sequential> - </macrodef> - </target> - <target if="${junit.available}" name="-init-macrodef-junit-debug" unless="${nb.junit.batch}"> - <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element name="customize" optional="true"/> - <sequential> - <property name="junit.forkmode" value="perTest"/> - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> - <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/> - <syspropertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <formatter type="brief" usefile="false"/> - <formatter type="xml"/> - <jvmarg value="-ea"/> - <jvmarg line="${debug-args-line}"/> - <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> - <customize/> - </junit> - </sequential> - </macrodef> - </target> - <target depends="-init-test-properties" if="${nb.junit.batch}" name="-init-macrodef-junit-debug-batch"> - <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element name="customize" optional="true"/> - <sequential> - <property name="junit.forkmode" value="perTest"/> - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> - <batchtest todir="${build.test.results.dir}"> - <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}"> - <filename name="@{testincludes}"/> - </fileset> - <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}"> - <filename name="${test.binarytestincludes}"/> - </fileset> - </batchtest> - <syspropertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <formatter type="brief" usefile="false"/> - <formatter type="xml"/> - <jvmarg value="-ea"/> - <jvmarg line="${debug-args-line}"/> - <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> - <customize/> - </junit> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-junit-debug,-init-macrodef-junit-debug-batch" if="${junit.available}" name="-init-macrodef-junit-debug-impl"> - <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element implicit="true" name="customize" optional="true"/> - <sequential> - <j2seproject3:junit-debug excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> - <customize/> - </j2seproject3:junit-debug> - </sequential> - </macrodef> - </target> - <target if="${testng.available}" name="-init-macrodef-testng-debug"> - <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${main.class}" name="testClass"/> - <attribute default="" name="testMethod"/> - <element name="customize2" optional="true"/> - <sequential> - <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}"> - <isset property="test.method"/> - </condition> - <condition else="-suitename ControlsTests -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}"> - <matches pattern=".*\.xml" string="@{testClass}"/> - </condition> - <delete dir="${build.test.results.dir}" quiet="true"/> - <mkdir dir="${build.test.results.dir}"/> - <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}"> - <customize> - <customize2/> - <jvmarg value="-ea"/> - <arg line="${testng.debug.mode}"/> - <arg line="-d ${build.test.results.dir}"/> - <arg line="-listener org.testng.reporters.VerboseReporter"/> - <arg line="${testng.cmd.args}"/> - </customize> - </j2seproject3:debug> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl"> - <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${main.class}" name="testClass"/> - <attribute default="" name="testMethod"/> - <element implicit="true" name="customize2" optional="true"/> - <sequential> - <j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}"> - <customize2/> - </j2seproject3:testng-debug> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit"> - <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <attribute default="${main.class}" name="testClass"/> - <attribute default="" name="testMethod"/> - <sequential> - <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> - <customize> - <classpath> - <path path="${run.test.classpath}"/> - </classpath> - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> - <jvmarg line="${run.jvmargs}"/> - <jvmarg line="${run.jvmargs.ide}"/> - </customize> - </j2seproject3:test-debug-impl> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng"> - <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <attribute default="${main.class}" name="testClass"/> - <attribute default="" name="testMethod"/> - <sequential> - <j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}"> - <customize2> - <syspropertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - </customize2> - </j2seproject3:testng-debug-impl> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/> - <!-- - pre NB7.2 profiling section; consider it deprecated - --> - <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/> - <target if="profiler.info.jvmargs.agent" name="-profile-pre-init"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target if="profiler.info.jvmargs.agent" name="-profile-post-init"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile"> - <macrodef name="resolve"> - <attribute name="name"/> - <attribute name="value"/> - <sequential> - <property name="@{name}" value="${env.@{value}}"/> - </sequential> - </macrodef> - <macrodef name="profile"> - <attribute default="${main.class}" name="classname"/> - <element name="customize" optional="true"/> - <sequential> - <property environment="env"/> - <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/> - <java classname="@{classname}" dir="${profiler.info.dir}" fork="true" jvm="${profiler.info.jvm}"> - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> - <jvmarg value="${profiler.info.jvmargs.agent}"/> - <jvmarg line="${profiler.info.jvmargs}"/> - <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/> - <arg line="${application.args}"/> - <classpath> - <path path="${run.classpath}"/> - </classpath> - <syspropertyset> - <propertyref prefix="run-sys-prop."/> - <mapper from="run-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <customize/> - </java> - </sequential> - </macrodef> - </target> - <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" name="-profile-init-check"> - <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail> - <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail> - </target> - <!-- - end of pre NB7.2 profiling section - --> - <target depends="-init-debug-args" name="-init-macrodef-nbjpda"> - <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1"> - <attribute default="${main.class}" name="name"/> - <attribute default="${debug.classpath}" name="classpath"/> - <attribute default="" name="stopclassname"/> - <sequential> - <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}"> - <classpath> - <path path="@{classpath}"/> - </classpath> - </nbjpdastart> - </sequential> - </macrodef> - <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1"> - <attribute default="${build.classes.dir}" name="dir"/> - <sequential> - <nbjpdareload> - <fileset dir="@{dir}" includes="${fix.classes}"> - <include name="${fix.includes}*.class"/> - </fileset> - </nbjpdareload> - </sequential> - </macrodef> - </target> - <target name="-init-debug-args"> - <property name="version-output" value="java version "${ant.java.version}"/> - <condition property="have-jdk-older-than-1.4"> - <or> - <contains string="${version-output}" substring="java version "1.0"/> - <contains string="${version-output}" substring="java version "1.1"/> - <contains string="${version-output}" substring="java version "1.2"/> - <contains string="${version-output}" substring="java version "1.3"/> - </or> - </condition> - <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none"> - <istrue value="${have-jdk-older-than-1.4}"/> - </condition> - <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem"> - <os family="windows"/> - </condition> - <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}"> - <isset property="debug.transport"/> - </condition> - </target> - <target depends="-init-debug-args" name="-init-macrodef-debug"> - <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${main.class}" name="classname"/> - <attribute default="${debug.classpath}" name="classpath"/> - <element name="customize" optional="true"/> - <sequential> - <java classname="@{classname}" dir="${work.dir}" fork="true"> - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> - <jvmarg line="${debug-args-line}"/> - <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> - <jvmarg value="-Dfile.encoding=${runtime.encoding}"/> - <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/> - <jvmarg line="${run.jvmargs}"/> - <jvmarg line="${run.jvmargs.ide}"/> - <classpath> - <path path="@{classpath}"/> - </classpath> - <syspropertyset> - <propertyref prefix="run-sys-prop."/> - <mapper from="run-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <customize/> - </java> - </sequential> - </macrodef> - </target> - <target name="-init-macrodef-java"> - <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1"> - <attribute default="${main.class}" name="classname"/> - <attribute default="${run.classpath}" name="classpath"/> - <attribute default="jvm" name="jvm"/> - <element name="customize" optional="true"/> - <sequential> - <java classname="@{classname}" dir="${work.dir}" fork="true"> - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> - <jvmarg value="-Dfile.encoding=${runtime.encoding}"/> - <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/> - <jvmarg line="${run.jvmargs}"/> - <jvmarg line="${run.jvmargs.ide}"/> - <classpath> - <path path="@{classpath}"/> - </classpath> - <syspropertyset> - <propertyref prefix="run-sys-prop."/> - <mapper from="run-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <customize/> - </java> - </sequential> - </macrodef> - </target> - <target name="-init-macrodef-copylibs"> - <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${manifest.file}" name="manifest"/> - <element name="customize" optional="true"/> - <sequential> - <property location="${build.classes.dir}" name="build.classes.dir.resolved"/> - <pathconvert property="run.classpath.without.build.classes.dir"> - <path path="${run.classpath}"/> - <map from="${build.classes.dir.resolved}" to=""/> - </pathconvert> - <pathconvert pathsep=" " property="jar.classpath"> - <path path="${run.classpath.without.build.classes.dir}"/> - <chainedmapper> - <flattenmapper/> - <filtermapper> - <replacestring from=" " to="%20"/> - </filtermapper> - <globmapper from="*" to="lib/*"/> - </chainedmapper> - </pathconvert> - <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/> - <copylibs compress="${jar.compress}" excludeFromCopy="${copylibs.excludes}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" rebase="${copylibs.rebase}" runtimeclasspath="${run.classpath.without.build.classes.dir}"> - <fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/> - <manifest> - <attribute name="Class-Path" value="${jar.classpath}"/> - <customize/> - </manifest> - </copylibs> - </sequential> - </macrodef> - </target> - <target name="-init-presetdef-jar"> - <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1"> - <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}"> - <j2seproject1:fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/> - </jar> - </presetdef> - </target> - <target name="-init-ap-cmdline-properties"> - <property name="annotation.processing.enabled" value="true"/> - <property name="annotation.processing.processors.list" value=""/> - <property name="annotation.processing.processor.options" value=""/> - <property name="annotation.processing.run.all.processors" value="true"/> - <property name="javac.processorpath" value="${javac.classpath}"/> - <property name="javac.test.processorpath" value="${javac.test.classpath}"/> - <condition property="ap.supported.internal" value="true"> - <not> - <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/> - </not> - </condition> - </target> - <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported"> - <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}"> - <isfalse value="${annotation.processing.run.all.processors}"/> - </condition> - <condition else="" property="ap.proc.none.internal" value="-proc:none"> - <isfalse value="${annotation.processing.enabled}"/> - </condition> - </target> - <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline"> - <property name="ap.cmd.line.internal" value=""/> - </target> - <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-test,-init-macrodef-test-debug,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/> - <!-- - =================== - COMPILATION SECTION - =================== - --> - <target name="-deps-jar-init" unless="built-jar.properties"> - <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/> - <delete file="${built-jar.properties}" quiet="true"/> - </target> - <target if="already.built.jar.${basedir}" name="-warn-already-built-jar"> - <echo level="warn" message="Cycle detected: ControlsTests was already built"/> - </target> - <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps"> - <mkdir dir="${build.dir}"/> - <touch file="${built-jar.properties}" verbose="false"/> - <property file="${built-jar.properties}" prefix="already.built.jar."/> - <antcall target="-warn-already-built-jar"/> - <propertyfile file="${built-jar.properties}"> - <entry key="${basedir}" value=""/> - </propertyfile> - </target> - <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/> - <target depends="init" name="-check-automatic-build"> - <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/> - </target> - <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build"> - <antcall target="clean"/> - </target> - <target depends="init,deps-jar" name="-pre-pre-compile"> - <mkdir dir="${build.classes.dir}"/> - </target> - <target name="-pre-compile"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target if="do.depend.true" name="-compile-depend"> - <pathconvert property="build.generated.subdirs"> - <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false"> - <include name="*"/> - </dirset> - </pathconvert> - <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/> - </target> - <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile"> - <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/> - <copy todir="${build.classes.dir}"> - <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> - </copy> - </target> - <target if="has.persistence.xml" name="-copy-persistence-xml"> - <mkdir dir="${build.classes.dir}/META-INF"/> - <copy todir="${build.classes.dir}/META-INF"> - <fileset dir="${meta.inf.dir}" includes="persistence.xml orm.xml"/> - </copy> - </target> - <target name="-post-compile"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/> - <target name="-pre-compile-single"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single"> - <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail> - <j2seproject3:force-recompile/> - <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}"/> - </target> - <target name="-post-compile-single"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/> - <!-- - ==================== - JAR BUILDING SECTION - ==================== - --> - <target depends="init" name="-pre-pre-jar"> - <dirname file="${dist.jar}" property="dist.jar.dir"/> - <mkdir dir="${dist.jar.dir}"/> - </target> - <target name="-pre-jar"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init" if="do.archive" name="-do-jar-create-manifest" unless="manifest.available"> - <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/> - <touch file="${tmp.manifest.file}" verbose="false"/> - </target> - <target depends="init" if="do.archive+manifest.available" name="-do-jar-copy-manifest"> - <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/> - <copy file="${manifest.file}" tofile="${tmp.manifest.file}"/> - </target> - <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+main.class.available" name="-do-jar-set-mainclass"> - <manifest file="${tmp.manifest.file}" mode="update"> - <attribute name="Main-Class" value="${main.class}"/> - </manifest> - </target> - <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+profile.available" name="-do-jar-set-profile"> - <manifest file="${tmp.manifest.file}" mode="update"> - <attribute name="Profile" value="${javac.profile}"/> - </manifest> - </target> - <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-set-splashscreen"> - <basename file="${application.splash}" property="splashscreen.basename"/> - <mkdir dir="${build.classes.dir}/META-INF"/> - <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/> - <manifest file="${tmp.manifest.file}" mode="update"> - <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/> - </manifest> - </target> - <target depends="init,-init-macrodef-copylibs,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen" if="do.mkdist" name="-do-jar-copylibs"> - <j2seproject3:copylibs manifest="${tmp.manifest.file}"/> - <echo level="info">To run this application from the command line without Ant, try:</echo> - <property location="${dist.jar}" name="dist.jar.resolved"/> - <echo level="info">java -jar "${dist.jar.resolved}"</echo> - </target> - <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen" if="do.archive" name="-do-jar-jar" unless="do.mkdist"> - <j2seproject1:jar manifest="${tmp.manifest.file}"/> - <property location="${build.classes.dir}" name="build.classes.dir.resolved"/> - <property location="${dist.jar}" name="dist.jar.resolved"/> - <pathconvert property="run.classpath.with.dist.jar"> - <path path="${run.classpath}"/> - <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/> - </pathconvert> - <condition else="" property="jar.usage.message" value="To run this application from the command line without Ant, try:${line.separator}${platform.java} -cp ${run.classpath.with.dist.jar} ${main.class}"> - <isset property="main.class.available"/> - </condition> - <condition else="debug" property="jar.usage.level" value="info"> - <isset property="main.class.available"/> - </condition> - <echo level="${jar.usage.level}" message="${jar.usage.message}"/> - </target> - <target depends="-do-jar-copylibs" if="do.archive" name="-do-jar-delete-manifest"> - <delete> - <fileset file="${tmp.manifest.file}"/> - </delete> - </target> - <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen,-do-jar-jar,-do-jar-delete-manifest" name="-do-jar-without-libraries"/> - <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen,-do-jar-copylibs,-do-jar-delete-manifest" name="-do-jar-with-libraries"/> - <target name="-post-jar"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,compile,-pre-jar,-do-jar-without-libraries,-do-jar-with-libraries,-post-jar" name="-do-jar"/> - <target depends="init,compile,-pre-jar,-do-jar,-post-jar" description="Build JAR." name="jar"/> - <!-- - ================= - EXECUTION SECTION - ================= - --> - <target depends="init,compile" description="Run a main class." name="run"> - <j2seproject1:java> - <customize> - <arg line="${application.args}"/> - </customize> - </j2seproject1:java> - </target> - <target name="-do-not-recompile"> - <property name="javac.includes.binary" value=""/> - </target> - <target depends="init,compile-single" name="run-single"> - <fail unless="run.class">Must select one file in the IDE or set run.class</fail> - <j2seproject1:java classname="${run.class}"/> - </target> - <target depends="init,compile-test-single" name="run-test-with-main"> - <fail unless="run.class">Must select one file in the IDE or set run.class</fail> - <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/> - </target> - <!-- - ================= - DEBUGGING SECTION - ================= - --> - <target depends="init" if="netbeans.home" name="-debug-start-debugger"> - <j2seproject1:nbjpdastart name="${debug.class}"/> - </target> - <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test"> - <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/> - </target> - <target depends="init,compile" name="-debug-start-debuggee"> - <j2seproject3:debug> - <customize> - <arg line="${application.args}"/> - </customize> - </j2seproject3:debug> - </target> - <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/> - <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto"> - <j2seproject1:nbjpdastart stopclassname="${main.class}"/> - </target> - <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/> - <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single"> - <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail> - <j2seproject3:debug classname="${debug.class}"/> - </target> - <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/> - <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test"> - <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail> - <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/> - </target> - <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/> - <target depends="init" name="-pre-debug-fix"> - <fail unless="fix.includes">Must set fix.includes</fail> - <property name="javac.includes" value="${fix.includes}.java"/> - </target> - <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix"> - <j2seproject1:nbjpdareload/> - </target> - <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/> - <!-- - ================= - PROFILING SECTION - ================= - --> - <!-- - pre NB7.2 profiler integration - --> - <target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72"> - <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> - <nbprofiledirect> - <classpath> - <path path="${run.classpath}"/> - </classpath> - </nbprofiledirect> - <profile/> - </target> - <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72"> - <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail> - <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> - <nbprofiledirect> - <classpath> - <path path="${run.classpath}"/> - </classpath> - </nbprofiledirect> - <profile classname="${profile.class}"/> - </target> - <target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72"> - <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> - <nbprofiledirect> - <classpath> - <path path="${run.classpath}"/> - </classpath> - </nbprofiledirect> - <profile classname="sun.applet.AppletViewer"> - <customize> - <arg value="${applet.url}"/> - </customize> - </profile> - </target> - <target depends="profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72"> - <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> - <nbprofiledirect> - <classpath> - <path path="${run.test.classpath}"/> - </classpath> - </nbprofiledirect> - <junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true"> - <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/> - <jvmarg value="${profiler.info.jvmargs.agent}"/> - <jvmarg line="${profiler.info.jvmargs}"/> - <test name="${profile.class}"/> - <classpath> - <path path="${run.test.classpath}"/> - </classpath> - <syspropertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <formatter type="brief" usefile="false"/> - <formatter type="xml"/> - </junit> - </target> - <!-- - end of pre NB72 profiling section - --> - <target if="netbeans.home" name="-profile-check"> - <condition property="profiler.configured"> - <or> - <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/> - <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/> - </or> - </condition> - </target> - <target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent"> - <startprofiler/> - <antcall target="run"/> - </target> - <target depends="-profile-check,-profile-single-pre72" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-single" unless="profiler.info.jvmargs.agent"> - <fail unless="run.class">Must select one file in the IDE or set run.class</fail> - <startprofiler/> - <antcall target="run-single"/> - </target> - <target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/> - <target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs"> - <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail> - <startprofiler/> - <antcall target="test-single"/> - </target> - <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main"> - <fail unless="run.class">Must select one file in the IDE or set run.class</fail> - <startprofiler/> - <antcal target="run-test-with-main"/> - </target> - <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent"> - <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> - <startprofiler/> - <antcall target="run-applet"/> - </target> - <!-- - =============== - JAVADOC SECTION - =============== - --> - <target depends="init" if="have.sources" name="-javadoc-build"> - <mkdir dir="${dist.javadoc.dir}"/> - <condition else="" property="javadoc.endorsed.classpath.cmd.line.arg" value="-J${endorsed.classpath.cmd.line.arg}"> - <and> - <isset property="endorsed.classpath.cmd.line.arg"/> - <not> - <equals arg1="${endorsed.classpath.cmd.line.arg}" arg2=""/> - </not> - </and> - </condition> - <javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" 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}"> - <classpath> - <path path="${javac.classpath}"/> - </classpath> - <fileset dir="${src.dir}" excludes="*.java,${excludes}" includes="${includes}"> - <filename name="**/*.java"/> - </fileset> - <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false"> - <include name="**/*.java"/> - <exclude name="*.java"/> - </fileset> - <arg line="${javadoc.endorsed.classpath.cmd.line.arg}"/> - </javadoc> - <copy todir="${dist.javadoc.dir}"> - <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}"> - <filename name="**/doc-files/**"/> - </fileset> - <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false"> - <include name="**/doc-files/**"/> - </fileset> - </copy> - </target> - <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview"> - <nbbrowse file="${dist.javadoc.dir}/index.html"/> - </target> - <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/> - <!-- - ========================= - TEST COMPILATION SECTION - ========================= - --> - <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test"> - <mkdir dir="${build.test.classes.dir}"/> - </target> - <target name="-pre-compile-test"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target if="do.depend.true" name="-compile-test-depend"> - <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/> - </target> - <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test"> - <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" processorpath="${javac.test.processorpath}" srcdir="${test.src.dir}"/> - <copy todir="${build.test.classes.dir}"> - <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> - </copy> - </target> - <target name="-post-compile-test"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/> - <target name="-pre-compile-test-single"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single"> - <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail> - <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/> - <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" processorpath="${javac.test.processorpath}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/> - <copy todir="${build.test.classes.dir}"> - <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> - </copy> - </target> - <target name="-post-compile-test-single"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/> - <!-- - ======================= - TEST EXECUTION SECTION - ======================= - --> - <target depends="init" if="have.tests" name="-pre-test-run"> - <mkdir dir="${build.test.results.dir}"/> - </target> - <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run"> - <j2seproject3:test testincludes="**/*Test.java"/> - </target> - <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run"> - <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail> - </target> - <target depends="init" if="have.tests" name="test-report"/> - <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/> - <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/> - <target depends="init" if="have.tests" name="-pre-test-run-single"> - <mkdir dir="${build.test.results.dir}"/> - </target> - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single"> - <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail> - <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/> - </target> - <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single"> - <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail> - </target> - <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/> - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method"> - <fail unless="test.class">Must select some files in the IDE or set test.class</fail> - <fail unless="test.method">Must select some method in the IDE or set test.method</fail> - <j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/> - </target> - <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method"> - <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail> - </target> - <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method,-post-test-run-single-method" description="Run single unit test." name="test-single-method"/> - <!-- - ======================= - TEST DEBUGGING SECTION - ======================= - --> - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test"> - <fail unless="test.class">Must select one file in the IDE or set test.class</fail> - <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/> - </target> - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method"> - <fail unless="test.class">Must select one file in the IDE or set test.class</fail> - <fail unless="test.method">Must select some method in the IDE or set test.method</fail> - <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/> - </target> - <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test"> - <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/> - </target> - <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/> - <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/> - <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test"> - <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/> - </target> - <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/> - <!-- - ========================= - APPLET EXECUTION SECTION - ========================= - --> - <target depends="init,compile-single" name="run-applet"> - <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> - <j2seproject1:java classname="sun.applet.AppletViewer"> - <customize> - <arg value="${applet.url}"/> - </customize> - </j2seproject1:java> - </target> - <!-- - ========================= - APPLET DEBUGGING SECTION - ========================= - --> - <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet"> - <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> - <j2seproject3:debug classname="sun.applet.AppletViewer"> - <customize> - <arg value="${applet.url}"/> - </customize> - </j2seproject3:debug> - </target> - <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/> - <!-- - =============== - CLEANUP SECTION - =============== - --> - <target name="-deps-clean-init" unless="built-clean.properties"> - <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/> - <delete file="${built-clean.properties}" quiet="true"/> - </target> - <target if="already.built.clean.${basedir}" name="-warn-already-built-clean"> - <echo level="warn" message="Cycle detected: ControlsTests was already built"/> - </target> - <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps"> - <mkdir dir="${build.dir}"/> - <touch file="${built-clean.properties}" verbose="false"/> - <property file="${built-clean.properties}" prefix="already.built.clean."/> - <antcall target="-warn-already-built-clean"/> - <propertyfile file="${built-clean.properties}"> - <entry key="${basedir}" value=""/> - </propertyfile> - </target> - <target depends="init" name="-do-clean"> - <delete dir="${build.dir}"/> - <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/> - </target> - <target name="-post-clean"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/> - <target name="-check-call-dep"> - <property file="${call.built.properties}" prefix="already.built."/> - <condition property="should.call.dep"> - <and> - <not> - <isset property="already.built.${call.subproject}"/> - </not> - <available file="${call.script}"/> - </and> - </condition> - </target> - <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep"> - <ant antfile="${call.script}" inheritall="false" target="${call.target}"> - <propertyset> - <propertyref prefix="transfer."/> - <mapper from="transfer.*" to="*" type="glob"/> - </propertyset> - </ant> - </target> -</project> diff --git a/functional/ControlsTests/nbproject/configs/golden.properties b/functional/ControlsTests/nbproject/configs/golden.properties deleted file mode 100644 index 1ed584a4..00000000 --- a/functional/ControlsTests/nbproject/configs/golden.properties +++ /dev/null @@ -1 +0,0 @@ -run.jvmargs=-Dtest.javaclient.creategolden=true diff --git a/functional/ControlsTests/nbproject/configs/golden_prism.properties b/functional/ControlsTests/nbproject/configs/golden_prism.properties deleted file mode 100644 index 1cb98c9b..00000000 --- a/functional/ControlsTests/nbproject/configs/golden_prism.properties +++ /dev/null @@ -1,2 +0,0 @@ -$label=golden prism -run.jvmargs=-Dtest.javaclient.creategolden=true diff --git a/functional/ControlsTests/nbproject/configs/interop.properties b/functional/ControlsTests/nbproject/configs/interop.properties deleted file mode 100644 index 5dce51ff..00000000 --- a/functional/ControlsTests/nbproject/configs/interop.properties +++ /dev/null @@ -1 +0,0 @@ -run.jvmargs=-Djavafx.swinginteroperability=true diff --git a/functional/ControlsTests/nbproject/configs/j2d.properties b/functional/ControlsTests/nbproject/configs/j2d.properties deleted file mode 100644 index df4a09bc..00000000 --- a/functional/ControlsTests/nbproject/configs/j2d.properties +++ /dev/null @@ -1 +0,0 @@ -run.jvmargs=-Dprism.order=sw diff --git a/functional/ControlsTests/nbproject/configs/jcov.properties b/functional/ControlsTests/nbproject/configs/jcov.properties deleted file mode 100644 index 7efc3dcc..00000000 --- a/functional/ControlsTests/nbproject/configs/jcov.properties +++ /dev/null @@ -1,3 +0,0 @@ -run.jvmargs=-javaagent:../../tools/lib/jcov.jar=include=com.sun.javafx.*,include=com.javafx.*,include=javafx.*,include=com.sun.mat.*,include=com.sun.scenario.*,type=all,file=jcov-results/result.xml -Xcheck:jni -do.jcov=true - diff --git a/functional/ControlsTests/nbproject/configs/prism.properties b/functional/ControlsTests/nbproject/configs/prism.properties deleted file mode 100644 index b27bf4ac..00000000 --- a/functional/ControlsTests/nbproject/configs/prism.properties +++ /dev/null @@ -1 +0,0 @@ -run.jvmargs=-Dprism.order=d3d diff --git a/functional/ControlsTests/nbproject/configs/slowmode.properties b/functional/ControlsTests/nbproject/configs/slowmode.properties deleted file mode 100644 index 82bd2b5c..00000000 --- a/functional/ControlsTests/nbproject/configs/slowmode.properties +++ /dev/null @@ -1 +0,0 @@ -run.jvmargs=-Dtest.scenegraph.slowmode=true diff --git a/functional/ControlsTests/nbproject/configs/swing.properties b/functional/ControlsTests/nbproject/configs/swing.properties deleted file mode 100644 index 290a41b4..00000000 --- a/functional/ControlsTests/nbproject/configs/swing.properties +++ /dev/null @@ -1 +0,0 @@ -run.jvmargs=-Djavafx.toolkit=swing -Dimage.utils.platformpath=windows/7/swing diff --git a/functional/ControlsTests/nbproject/configs/swtinterop.properties b/functional/ControlsTests/nbproject/configs/swtinterop.properties deleted file mode 100644 index 0e799d1e..00000000 --- a/functional/ControlsTests/nbproject/configs/swtinterop.properties +++ /dev/null @@ -1 +0,0 @@ -run.jvmargs=-Djavafx.swtinteroperability=true diff --git a/functional/ControlsTests/nbproject/genfiles.properties b/functional/ControlsTests/nbproject/genfiles.properties deleted file mode 100644 index f038b945..00000000 --- a/functional/ControlsTests/nbproject/genfiles.properties +++ /dev/null @@ -1,8 +0,0 @@ -build.xml.data.CRC32=bd291f5a -build.xml.script.CRC32=be0eb5a2 -build.xml.stylesheet.CRC32=28e38971@1.38.3.45 -# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. -# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. -nbproject/build-impl.xml.data.CRC32=581e7a94 -nbproject/build-impl.xml.script.CRC32=3c9ba3fb -nbproject/build-impl.xml.stylesheet.CRC32=5a01deb7@1.68.1.46 diff --git a/functional/ControlsTests/nbproject/project.properties b/functional/ControlsTests/nbproject/project.properties deleted file mode 100644 index 18fa9b67..00000000 --- a/functional/ControlsTests/nbproject/project.properties +++ /dev/null @@ -1,121 +0,0 @@ -annotation.processing.enabled=true -annotation.processing.enabled.in.editor=false -annotation.processing.processors.list= -annotation.processing.run.all.processors=true -annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output -application.title=ControlsTests -application.vendor=Oracle -build.classes.dir=${build.dir}/classes -build.classes.excludes=**/*.java,**/*.form -# This directory is removed when the project is cleaned: -build.dir=build -build.generated.dir=${build.dir}/generated -build.generated.sources.dir=${build.dir}/generated-sources -# Only compile against the classpath explicitly listed here: -build.sysclasspath=ignore -build.test.classes.dir=${build.dir}/test/classes -file.reference.FxTestRunner.jar=../../tools/FxTestRunner/dist/FxTestRunner.jar -file.reference.GlassImage.jar=../../tools/Jemmy/GlassImage/dist/GlassImage.jar -file.reference.GlassRobot.jar=../../tools/Jemmy/GlassRobot/dist/GlassRobot.jar -file.reference.jemmy.jar=../../tools/lib/jemmy.jar -file.reference.JemmyAWT.jar=../../tools/lib/JemmyAWT.jar -file.reference.JemmyAWTInput.jar=../../tools/Jemmy/jemmy_core/JemmyAWTInput.jar -file.reference.JemmyBrowser.jar=../../tools/Jemmy/jemmy_core/JemmyBrowser.jar -file.reference.JemmyCore.jar=../../tools/Jemmy/jemmy_core/JemmyCore.jar -file.reference.JemmyFX.jar=../../tools/Jemmy/JemmyFX/dist/JemmyFX.jar -file.reference.JemmyFXBrowser.jar=../../tools/Jemmy/JemmyFXBrowser/dist/JemmyFXBrowser.jar -file.reference.JemmySWT.jar=../../tools/lib/JemmySWT.jar -file.reference.jfxswt.jar=${java.home}/lib/javafx-swt.jar -build.test.results.dir=${external.output}/${application.title}/build/test/results -file.reference.junit.jar=../../tools/Jemmy/jemmy_core/junit.jar -file.reference.SharedTestUtilsOpen.jar=../../tools/SharedTestUtilsOpen/dist/SharedTestUtilsOpen.jar -file.reference.swt.jar=../../tools/lib/swt.jar -file.reference.TestMarkup.jar=../../tools/TestMarkup/dist/TestMarkup.jar -jar.archive.disabled=${jnlp.enabled} -jar.index=${jnlp.enabled} -jnlp.codebase.type=no.codebase -jnlp.descriptor=application -jnlp.enabled=false -jnlp.mixed.code=default -jnlp.offline-allowed=false -jnlp.signed=false -jnlp.signing= -jnlp.signing.alias= -jnlp.signing.keystore= -# Optional override of default Codebase manifest attribute, use to prevent RIAs from being repurposed -manifest.custom.codebase= -# Optional override of default Permissions manifest attribute (supported values: sandbox, all-permissions) -manifest.custom.permissions= -test-sys-prop.imageutils.outputpath=${build.test.results.dir} -# Uncomment to specify the preferred debugger connection transport: -#debug.transport=dt_socket -debug.classpath=\ - ${run.classpath} -debug.test.classpath=\ - ${run.test.classpath} -# This directory is removed when the project is cleaned: -dist.dir=dist -dist.jar=${dist.dir}/ControlsTests.jar -dist.javadoc.dir=${dist.dir}/javadoc -endorsed.classpath= -excludes= -includes=** -jar.compress=false -javac.classpath=\ - ${file.reference.FxTestRunner.jar}:\ - ${file.reference.GlassImage.jar}:\ - ${file.reference.GlassRobot.jar}:\ - ${file.reference.JemmyAWT.jar}:\ - ${file.reference.JemmyAWTInput.jar}:\ - ${file.reference.JemmyBrowser.jar}:\ - ${file.reference.JemmyCore.jar}:\ - ${file.reference.JemmyFX.jar}:\ - ${file.reference.JemmyFXBrowser.jar}:\ - ${file.reference.JemmySWT.jar}:\ - ${file.reference.SharedTestUtilsOpen.jar}:\ - ${file.reference.TestMarkup.jar}:\ - ${file.reference.jemmy.jar}:\ - ${file.reference.jfxswt.jar}:\ - ${file.reference.junit.jar}:\ - ${file.reference.swt.jar} -# Space-separated list of extra javac options -javac.compilerargs=-processor com.oracle.jdk.sqe.cc.markup.TestMarkupProcessor -Aresult=${basedir}/coverage.fcov -javac.deprecation=false -javac.processorpath=\ - ${javac.classpath} -javac.source=1.8 -javac.target=1.8 -javac.test.classpath=\ - ${javac.classpath}:\ - ${build.classes.dir}:\ - ${file.reference.JemmyAWT.jar}:\ - ${file.reference.jemmy.jar}:\ - ${file.reference.JemmyAWTInput.jar}:\ - ${file.reference.JemmyCore.jar} -javac.test.processorpath=\ - ${javac.test.classpath} -javadoc.additionalparam= -javadoc.author=false -javadoc.encoding=${source.encoding} -javadoc.noindex=false -javadoc.nonavbar=false -javadoc.notree=false -javadoc.private=false -javadoc.splitindex=true -javadoc.use=true -javadoc.version=false -javadoc.windowtitle= -main.class= -manifest.file=manifest.mf -meta.inf.dir=${src.dir}/META-INF -platform.active=default_platform -run.classpath=\ - ${javac.classpath}:\ - ${build.classes.dir} -run.test.classpath=\ - ${javac.test.classpath}:\ - ${build.test.classes.dir} -source.encoding=UTF-8 -src.dir=src -test.src.dir=test -mkdist.disabled=true diff --git a/functional/ControlsTests/nbproject/project.xml b/functional/ControlsTests/nbproject/project.xml deleted file mode 100644 index c7d0bae6..00000000 --- a/functional/ControlsTests/nbproject/project.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<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/3"> - <name>ControlsTests</name> - <source-roots> - <root id="src.dir"/> - </source-roots> - <test-roots> - <root id="test.src.dir"/> - </test-roots> - </data> - <references xmlns="http://www.netbeans.org/ns/ant-project-references/1"/> - </configuration> -</project> diff --git a/functional/ControlsTests/src/javafx/factory/ControlsFactory.java b/functional/ControlsTests/src/javafx/factory/ControlsFactory.java index 580c1d3c..fe3b94c2 100644 --- a/functional/ControlsTests/src/javafx/factory/ControlsFactory.java +++ b/functional/ControlsTests/src/javafx/factory/ControlsFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,13 +28,6 @@ package javafx.factory; import com.sun.javafx.collections.ObservableListWrapper; -import java.lang.reflect.Constructor; -import java.lang.reflect.Method; -import java.time.LocalDate; -import java.time.Month; -import java.util.Arrays; -import java.util.EnumSet; -import java.util.Set; import javafx.beans.property.SimpleObjectProperty; import javafx.beans.property.SimpleStringProperty; import javafx.beans.property.StringProperty; @@ -94,6 +87,14 @@ import javafx.scene.text.TextAlignment; import javafx.util.Callback; +import java.lang.reflect.Constructor; +import java.lang.reflect.Method; +import java.time.LocalDate; +import java.time.Month; +import java.util.Arrays; +import java.util.EnumSet; +import java.util.Set; + public enum ControlsFactory implements NodeFactory { Buttons(new ControlFactory() { @@ -670,9 +671,10 @@ static boolean checkClassOnPresence(String className) { */ public static ControlsFactory[] filteredValues() { Set<ControlsFactory> controlsSet = EnumSet.allOf(ControlsFactory.class); - if (!checkClassOnPresence("javafx.scene.media.MediaView")) { - controlsSet.remove(ControlsFactory.MediaView); - } + //TODO +// if (!checkClassOnPresence("javafx.scene.media.MediaView")) { +// controlsSet.remove(ControlsFactory.MediaView); +// } ControlsFactory[] controlsArray = new ControlsFactory[controlsSet.toArray().length]; Arrays.asList(controlsSet.toArray()).toArray(controlsArray); return controlsArray; diff --git a/functional/ControlsTests/src/javafx/scene/control/test/fxcanvas/FXCanvasApp.java b/functional/ControlsTests/src/javafx/scene/control/test/fxcanvas/FXCanvasApp.java index b311f953..24acd608 100644 --- a/functional/ControlsTests/src/javafx/scene/control/test/fxcanvas/FXCanvasApp.java +++ b/functional/ControlsTests/src/javafx/scene/control/test/fxcanvas/FXCanvasApp.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,20 +25,6 @@ package javafx.scene.control.test.fxcanvas; import java.util.concurrent.Semaphore; -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.SelectionAdapter; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.graphics.Rectangle; -import org.eclipse.swt.layout.FillLayout; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Display; -import org.eclipse.swt.widgets.Event; -import org.eclipse.swt.widgets.Listener; -import org.eclipse.swt.widgets.Monitor; -import org.eclipse.swt.widgets.Scale; -import org.eclipse.swt.widgets.Shell; import javafx.scene.control.Button; import javafx.scene.Scene; import javafx.scene.layout.VBox; @@ -51,8 +37,9 @@ import test.javaclient.shared.OtherThreadRunner; import test.javaclient.shared.Utils; +//TODO public class FXCanvasApp { - +/* public static String TEXT_INPUT_ID = "text.input.id"; public static String BUTTON_ID = "button.id"; public static String MAIN_CONTAINER_ID = "main.container.id"; @@ -283,4 +270,6 @@ public static void main(String[] args) { System.err.printf("Failed to start SWT application: %s.\n", ex); } } + + */ } diff --git a/functional/ControlsTests/src/javafx/scene/control/test/fxcanvas/FXCanvasBrowserApp.java b/functional/ControlsTests/src/javafx/scene/control/test/fxcanvas/FXCanvasBrowserApp.java index 2ebf31f1..c5095118 100644 --- a/functional/ControlsTests/src/javafx/scene/control/test/fxcanvas/FXCanvasBrowserApp.java +++ b/functional/ControlsTests/src/javafx/scene/control/test/fxcanvas/FXCanvasBrowserApp.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,12 +29,6 @@ import javafx.beans.value.ObservableValue; import javafx.concurrent.Worker.State; import javafx.scene.control.Button; -import org.eclipse.swt.SWT; -import org.eclipse.swt.graphics.Rectangle; -import org.eclipse.swt.layout.FillLayout; -import org.eclipse.swt.widgets.Display; -import org.eclipse.swt.widgets.Monitor; -import org.eclipse.swt.widgets.Shell; import javafx.scene.Scene; import javafx.scene.layout.VBox; import javafx.embed.swt.FXCanvas; @@ -46,9 +40,9 @@ import javafx.scene.web.WebView; import test.javaclient.shared.OtherThreadRunner; import test.javaclient.shared.Utils; - +//TODO public class FXCanvasBrowserApp { - +/* public static final String CONTENT_ID = "content.id"; public static final String BUTTON_ID = "button.id"; public static final String SUCCESS_LABEL_ID = "SUCCESS_LABEL_ID"; @@ -138,4 +132,6 @@ public static void main(String[] args) { System.err.printf("Failed to start SWT application: %s.\n", ex); } } + + */ } diff --git a/functional/ControlsTests/src/javafx/scene/control/test/fxcanvas/FXCanvasScrollApp.java b/functional/ControlsTests/src/javafx/scene/control/test/fxcanvas/FXCanvasScrollApp.java index 5c1d9d4f..f3696b5a 100644 --- a/functional/ControlsTests/src/javafx/scene/control/test/fxcanvas/FXCanvasScrollApp.java +++ b/functional/ControlsTests/src/javafx/scene/control/test/fxcanvas/FXCanvasScrollApp.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,13 +25,6 @@ package javafx.scene.control.test.fxcanvas; import java.util.concurrent.Semaphore; -import org.eclipse.swt.SWT; -import org.eclipse.swt.custom.ScrolledComposite; -import org.eclipse.swt.graphics.Rectangle; -import org.eclipse.swt.layout.FillLayout; -import org.eclipse.swt.widgets.Display; -import org.eclipse.swt.widgets.Monitor; -import org.eclipse.swt.widgets.Shell; import javafx.scene.control.Button; import javafx.scene.Scene; import javafx.scene.layout.VBox; @@ -43,8 +36,10 @@ import test.javaclient.shared.OtherThreadRunner; import test.javaclient.shared.Utils; -public class FXCanvasScrollApp { +//TODO +public class FXCanvasScrollApp { +/* public static String TEXT_INPUT_ID = "text.input.id"; public static String BUTTON_ID = "button.id"; public static String SCROLL_CONTAINER_ID = "scroll.container.id"; @@ -136,4 +131,6 @@ public static void main(String[] args) { System.err.printf("Failed to start SWT application: %s.\n", ex); } } + + */ } diff --git a/functional/ControlsTests/src/javafx/scene/control/test/utils/ColorHelper.java b/functional/ControlsTests/src/javafx/scene/control/test/utils/ColorHelper.java index a0278814..21c05059 100644 --- a/functional/ControlsTests/src/javafx/scene/control/test/utils/ColorHelper.java +++ b/functional/ControlsTests/src/javafx/scene/control/test/utils/ColorHelper.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -67,6 +67,8 @@ public void start(final Stage stage) throws Exception { act.setOnAction(new EventHandler<ActionEvent>() { public void handle(ActionEvent t) { try { + //TODO + /* int x = Integer.parseInt(xField.getText()); int y = Integer.parseInt(yField.getText()); @@ -86,6 +88,8 @@ public void run(Object... os) throws Exception { awtField.setText("AWT robot " + getColorDescription(awtColor)); glassField.setText("Glass robot " + getColorDescription(glassColor)); + + */ } catch (Throwable ex) { ex.printStackTrace(); } diff --git a/functional/ControlsTests/src/javafx/scene/control/test/utils/ptables/AbstractPropertyValueSetter.java b/functional/ControlsTests/src/javafx/scene/control/test/utils/ptables/AbstractPropertyValueSetter.java index ddef6f74..690b49ff 100644 --- a/functional/ControlsTests/src/javafx/scene/control/test/utils/ptables/AbstractPropertyValueSetter.java +++ b/functional/ControlsTests/src/javafx/scene/control/test/utils/ptables/AbstractPropertyValueSetter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,16 +24,18 @@ */ package javafx.scene.control.test.utils.ptables; -import java.lang.reflect.Method; import javafx.beans.property.Property; import javafx.event.ActionEvent; import javafx.event.EventHandler; import javafx.scene.control.Button; import javafx.scene.control.Control; import javafx.scene.control.Label; -import static javafx.scene.control.test.utils.ptables.StaticLogger.*; import javafx.scene.layout.HBox; +import java.lang.reflect.Method; + +import static javafx.scene.control.test.utils.ptables.StaticLogger.log; + /** * @author Alexander Kirov * diff --git a/functional/ControlsTests/src/javafx/scene/control/test/utils/ptables/NumberPropertyValueSetter.java b/functional/ControlsTests/src/javafx/scene/control/test/utils/ptables/NumberPropertyValueSetter.java index 7ca74548..78eb4708 100644 --- a/functional/ControlsTests/src/javafx/scene/control/test/utils/ptables/NumberPropertyValueSetter.java +++ b/functional/ControlsTests/src/javafx/scene/control/test/utils/ptables/NumberPropertyValueSetter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -33,11 +33,12 @@ import javafx.scene.Node; import javafx.scene.control.Label; import javafx.scene.control.Slider; -import static javafx.scene.control.test.utils.ptables.StaticLogger.*; import javafx.scene.input.MouseEvent; import javafx.scene.layout.VBox; import javafx.stage.Popup; +import static javafx.scene.control.test.utils.ptables.StaticLogger.log; + /** * @author Alexander Kirov * diff --git a/functional/ControlsTests/src/javafx/scene/control/test/utils/ptables/PropertiesTable.java b/functional/ControlsTests/src/javafx/scene/control/test/utils/ptables/PropertiesTable.java index 5809b93c..b4572529 100644 --- a/functional/ControlsTests/src/javafx/scene/control/test/utils/ptables/PropertiesTable.java +++ b/functional/ControlsTests/src/javafx/scene/control/test/utils/ptables/PropertiesTable.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,19 +24,26 @@ */ package javafx.scene.control.test.utils.ptables; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collection; -import java.util.HashMap; -import java.util.List; import javafx.beans.property.DoubleProperty; import javafx.beans.property.IntegerProperty; import javafx.beans.property.ObjectProperty; import javafx.beans.property.Property; import javafx.beans.property.ReadOnlyProperty; import javafx.scene.Node; +import javafx.scene.control.ScrollPane; +import javafx.scene.control.TableColumn; +import javafx.scene.control.TableView; +import javafx.scene.control.cell.PropertyValueFactory; +import javafx.scene.layout.BorderPane; import javafx.scene.layout.FlowPane; import javafx.scene.layout.VBox; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.HashMap; +import java.util.List; + import static javafx.scene.control.test.utils.ptables.AbstractApplicationPropertiesRegystry.DEFAULT_DOMAIN_NAME; /** @@ -73,9 +80,10 @@ * functionality of this PropertiesTable can be accessed from tests side (it * contains different checkers, value setters, etc). */ -public class PropertiesTable extends VBox implements AbstractPropertiesTable, Refreshable { +public class PropertiesTable extends BorderPane implements AbstractPropertiesTable, Refreshable { public final static String PROPERTIES_TABLE_SUFFIX_ID = "_PROPERTY_TABLE_ID"; + private final TableView<PropertyValue> propTable; private final VBox linesVBox = new VBox(5); private final FlowPane countersFlowPane; private final FlowPane listenersFlowPane; @@ -95,7 +103,17 @@ public class PropertiesTable extends VBox implements AbstractPropertiesTable, Re private HashMap<String, AbstractPropertyValueListener> readonlyPropertyListeners = new HashMap<String, AbstractPropertyValueListener>(); public PropertiesTable(Object testedControl) { - super(5); + super(); + var scroll = new ScrollPane(); + var vbox = new VBox(); + scroll.setContent(vbox); + propTable = new TableView<>(); + TableColumn<PropertyValue, String> propColumn = new TableColumn<>("Name"); + propColumn.setCellValueFactory(new PropertyValueFactory<>("name")); + TableColumn<PropertyValue, Object> valueColumn = new TableColumn<>("Value"); + valueColumn.setCellValueFactory(new PropertyValueFactory<>("value")); + propTable.getColumns().addAll(propColumn, valueColumn); + vbox.getChildren().add(0, propTable); countersFlowPane = new FlowPane(); countersFlowPane.setVgap(5); countersFlowPane.setHgap(5); @@ -104,10 +122,11 @@ public PropertiesTable(Object testedControl) { listenersFlowPane.setHgap(5); this.domainName = DEFAULT_DOMAIN_NAME; this.setId(DEFAULT_DOMAIN_NAME + PROPERTIES_TABLE_SUFFIX_ID); - getChildren().add(0, countersFlowPane); - getChildren().add(1, listenersFlowPane); - getChildren().add(2, linesVBox); + vbox.getChildren().add(1, countersFlowPane); + vbox.getChildren().add(2, listenersFlowPane); + vbox.getChildren().add(3, linesVBox); this.testedControl = testedControl; + setCenter(scroll); } public void refresh() { @@ -184,6 +203,7 @@ public <T> void addObjectEnumPropertyLine(ObjectProperty<T> bindableProperty, Li @Override public void addSimpleListener(ReadOnlyProperty<? extends Object> bindableProperty, Object owningObject) { + propTable.getItems().add(new PropertyValue(bindableProperty)); AbstractPropertyValueListener listener = new PropertyValueListener(bindableProperty, owningObject); readonlyPropertyListeners.put(bindableProperty.getName().toUpperCase(), listener); listenersFlowPane.getChildren().add(listener.getVisualRepresentation()); @@ -224,4 +244,23 @@ public String getDomainName() { public void setDomainName(String domainName) { this.domainName = domainName; } + + //this is a workaround for JDK-8285296 + private class PropertyValue { + private final String name; + private final Object value; + + public PropertyValue(ReadOnlyProperty property) { + this.name = property.getName(); + this.value = property.getValue(); + } + + public String getName() { + return name; + } + + public Object getValue() { + return value; + } + } } diff --git a/functional/ControlsTests/src/javafx/scene/control/test/utils/ptables/PropertyTablesFactory.java b/functional/ControlsTests/src/javafx/scene/control/test/utils/ptables/PropertyTablesFactory.java index 84f3bb7c..c0143d8e 100644 --- a/functional/ControlsTests/src/javafx/scene/control/test/utils/ptables/PropertyTablesFactory.java +++ b/functional/ControlsTests/src/javafx/scene/control/test/utils/ptables/PropertyTablesFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,12 +24,13 @@ */ package javafx.scene.control.test.utils.ptables; -import java.lang.reflect.Method; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Comparator; -import java.util.List; -import javafx.beans.property.*; +import javafx.beans.property.BooleanProperty; +import javafx.beans.property.DoubleProperty; +import javafx.beans.property.IntegerProperty; +import javafx.beans.property.ObjectProperty; +import javafx.beans.property.Property; +import javafx.beans.property.ReadOnlyProperty; +import javafx.beans.property.StringProperty; import javafx.collections.FXCollections; import javafx.collections.ObservableList; import javafx.scene.Cursor; @@ -44,11 +45,17 @@ import javafx.scene.image.Image; import javafx.scene.paint.Color; import javafx.scene.shape.Circle; +import javafx.scene.shape.Polygon; import javafx.scene.shape.Rectangle; import javafx.scene.text.Font; import javafx.scene.text.Text; + +import java.lang.reflect.Method; import java.time.chrono.Chronology; -import javafx.scene.shape.Polygon; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Comparator; +import java.util.List; /** * @author Alexander Kirov @@ -143,6 +150,7 @@ public static void explorePropertiesList(Object control, PropertiesTable tb) { try { Object ob = method.invoke(control); if (ob.getClass().getName().contains("ReadOnly")) { +// if (ob instanceof ReadOnlyProperty) { tb.addSimpleListener((ReadOnlyProperty) ob, control); } } catch (Exception ex) { diff --git a/functional/ControlsTests/src/javafx/scene/control/test/utils/ptables/PropertyValueListener.java b/functional/ControlsTests/src/javafx/scene/control/test/utils/ptables/PropertyValueListener.java index 561c7a54..029925fe 100644 --- a/functional/ControlsTests/src/javafx/scene/control/test/utils/ptables/PropertyValueListener.java +++ b/functional/ControlsTests/src/javafx/scene/control/test/utils/ptables/PropertyValueListener.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,16 +24,16 @@ */ package javafx.scene.control.test.utils.ptables; -import java.lang.reflect.Method; import javafx.beans.property.ReadOnlyProperty; -import javafx.beans.value.ChangeListener; -import javafx.beans.value.ObservableValue; import javafx.scene.control.Label; import javafx.scene.control.TextField; import javafx.scene.control.Tooltip; -import static javafx.scene.control.test.utils.ptables.StaticLogger.*; import javafx.scene.layout.HBox; +import java.lang.reflect.Method; + +import static javafx.scene.control.test.utils.ptables.StaticLogger.log; + /** * @author Alexander Kirov * @@ -93,11 +93,7 @@ public <ValueType> PropertyValueListener(String labelDescription, ReadOnlyProper } getChildren().add(receivedValueTF); - listenedProperty.addListener(new ChangeListener() { - public void changed(ObservableValue ov, Object t, Object t1) { - processNewValue(t1); - } - }); + listenedProperty.addListener((ov, t, t1) -> processNewValue(t1)); processNewValue(listenedProperty.getValue()); } @@ -210,4 +206,4 @@ public int getChangeListenerCounter() { public int getInvalidationListenerCounter() { return counter.getInvalidationCount(); } -} \ No newline at end of file +} diff --git a/functional/ControlsTests/src/javafx/scene/control/test/utils/ptables/SpecialTablePropertiesProvider.java b/functional/ControlsTests/src/javafx/scene/control/test/utils/ptables/SpecialTablePropertiesProvider.java index 8673efb8..fe2a56e3 100644 --- a/functional/ControlsTests/src/javafx/scene/control/test/utils/ptables/SpecialTablePropertiesProvider.java +++ b/functional/ControlsTests/src/javafx/scene/control/test/utils/ptables/SpecialTablePropertiesProvider.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,7 +24,6 @@ */ package javafx.scene.control.test.utils.ptables; -import java.util.Arrays; import javafx.beans.value.ChangeListener; import javafx.beans.value.ObservableValue; import javafx.event.Event; @@ -34,6 +33,8 @@ import javafx.scene.control.Slider; import javafx.scene.control.TreeItem; +import java.util.Arrays; + /** * @author Alexander Kirov */ @@ -94,12 +95,12 @@ public void changed(ObservableValue<? extends Boolean> ov, Boolean t, Boolean t1 public static class ForListView extends PropertiesProvider<ListView> { - public final String GET_ON_EDIT_CANCEL = "GET_ON_EDIT_CANCEL"; - public final String GET_ON_EDIT_COMMIT = "GET_ON_EDIT_COMMIT"; - public final String GET_ON_EDIT_START = "GET_ON_EDIT_START"; - public final String SET_ON_EDIT_CANCEL = "SET_ON_EDIT_CANCEL"; - public final String SET_ON_EDIT_COMMIT = "SET_ON_EDIT_COMMIT"; - public final String SET_ON_EDIT_START = "SET_ON_EDIT_START"; +// public final String GET_ON_EDIT_CANCEL = "GET_ON_EDIT_CANCEL"; +// public final String GET_ON_EDIT_COMMIT = "GET_ON_EDIT_COMMIT"; +// public final String GET_ON_EDIT_START = "GET_ON_EDIT_START"; +// public final String SET_ON_EDIT_CANCEL = "SET_ON_EDIT_CANCEL"; +// public final String SET_ON_EDIT_COMMIT = "SET_ON_EDIT_COMMIT"; +// public final String SET_ON_EDIT_START = "SET_ON_EDIT_START"; @Override public void provide(ListView node, final PropertiesTable tb) { @@ -111,6 +112,8 @@ public void provide(ListView node, final PropertiesTable tb) { tb.addSimpleListener(node.getFocusModel().focusedIndexProperty(), node.getFocusModel()); tb.addSimpleListener(node.getFocusModel().focusedItemProperty(), node.getFocusModel()); + //this is duplication of some other tests + /* tb.addCounter(SET_ON_EDIT_CANCEL); tb.addCounter(SET_ON_EDIT_COMMIT); tb.addCounter(SET_ON_EDIT_START); @@ -148,7 +151,9 @@ public void handle(Event t) { if (node.getOnEditCommit() instanceof EventHandler) { tb.incrementCounter(GET_ON_EDIT_COMMIT); } + */ } + } public static class ForTreeItem extends PropertiesProvider<TreeItem> { diff --git a/functional/ControlsTests/test/TEST.ROOT b/functional/ControlsTests/test/TEST.ROOT new file mode 100644 index 00000000..0d841c11 --- /dev/null +++ b/functional/ControlsTests/test/TEST.ROOT @@ -0,0 +1,2 @@ +TestNG.dirs = . + diff --git a/functional/ControlsTests/test/javafx/commons/ControlsTest.java b/functional/ControlsTests/test/javafx/commons/ControlsTest.java index baa09682..43ba2452 100644 --- a/functional/ControlsTests/test/javafx/commons/ControlsTest.java +++ b/functional/ControlsTests/test/javafx/commons/ControlsTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,26 +26,26 @@ import client.test.ScreenshotCheck; import javafx.scene.Node; -import org.jemmy.fx.ByID; -import org.jemmy.image.Image; -import org.jemmy.interfaces.Selectable; -import org.junit.Test; -import static javafx.commons.ControlChooserApp.*; -import org.junit.runner.RunWith; -import test.javaclient.shared.FilteredTestRunner; import javafx.scene.control.test.utils.ptables.AbstractPropertyController.SettingType; import org.jemmy.env.Environment; import org.jemmy.env.Timeout; -import org.jemmy.image.AWTImage; -import org.jemmy.image.GlassImage; +import org.jemmy.fx.ByID; +import org.jemmy.image.Image; import org.jemmy.image.ImageComparator; +import org.jemmy.image.awt.AWTImage; +import org.jemmy.image.glass.GlassImage; import org.jemmy.image.pixel.MaxDistanceComparator; import org.jemmy.image.pixel.Raster; import org.jemmy.image.pixel.RasterComparator; +import org.jemmy.interfaces.Selectable; import org.jemmy.timing.State; import org.jemmy.timing.Waiter; import org.junit.Assert; +import org.junit.runner.RunWith; +import test.javaclient.shared.FilteredTestRunner; import test.javaclient.shared.screenshots.GoldenImageManager; + +import static javafx.commons.ControlChooserApp.TESTED_CONTROL_ID; /** * * @author Dmitry Zinkevich <dmitry.zinkevich@oracle.com> @@ -145,4 +145,4 @@ public Boolean reached() { Environment.getEnvironment().setProperty(RasterComparator.class, rasterComparator); } } -} \ No newline at end of file +} diff --git a/functional/ControlsTests/test/javafx/draganddrop/ClipboardTest.java b/functional/ControlsTests/test/javafx/draganddrop/ClipboardTest.java index f514fe99..90e49607 100644 --- a/functional/ControlsTests/test/javafx/draganddrop/ClipboardTest.java +++ b/functional/ControlsTests/test/javafx/draganddrop/ClipboardTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -43,7 +43,7 @@ protected void transfer() throws InterruptedException { /** * test passing plain text through clipboard */ - //@Smoke + ////TODO@Smoke @Test(timeout = 300000) public void plainTextTest() throws Exception { setTransferData(DataFormat.PLAIN_TEXT); @@ -54,7 +54,7 @@ public void plainTextTest() throws Exception { /** * test passing url through clipboard */ - //@Smoke + ////TODO@Smoke @Test(timeout = 300000) public void urlTest() throws Exception { setTransferData(DataFormat.URL); @@ -65,7 +65,7 @@ public void urlTest() throws Exception { /** * test passing html through clipboard */ - //@Smoke + ////TODO@Smoke @Test(timeout = 300000) public void htmlTest() throws Exception { setTransferData(DataFormat.HTML); @@ -86,7 +86,7 @@ public void imageTest() throws Exception { /** * test passing rtf through clipboard */ - //@Smoke + ////TODO@Smoke @Test(timeout = 300000) public void rtfTest() throws Exception { setTransferData(DataFormat.RTF); @@ -97,7 +97,7 @@ public void rtfTest() throws Exception { /** * test passing files through clipboard */ - //@Smoke + ////TODO@Smoke @Test(timeout = 300000) public void filesTest() throws Exception { setTransferData(DataFormat.FILES); @@ -108,7 +108,7 @@ public void filesTest() throws Exception { /** * test passing custom bytes through clipboard */ - //@Smoke + ////TODO@Smoke @Test(timeout = 300000) public void customBytesTest() throws Exception { setTransferData(DF_CUSTOM_BYTES); @@ -119,7 +119,7 @@ public void customBytesTest() throws Exception { /** * test passing custom string through clipboard */ - //@Smoke + ////TODO@Smoke @Test(timeout = 300000) public void customStringTest() throws Exception { setTransferData(DF_CUSTOM_STRING); @@ -130,7 +130,7 @@ public void customStringTest() throws Exception { /** * test passing custom class through clipboard */ - //@Smoke + ////TODO@Smoke @Test(timeout = 300000) public void customClassTest() throws Exception { setTransferData(DF_CUSTOM_CLASS); @@ -141,7 +141,7 @@ public void customClassTest() throws Exception { /** * test passing all data formats through clipboard */ - //@Smoke + ////TODO@Smoke @Test(timeout = 300000) public void allFormatsTest() throws Exception { setTransferData(allFormat); @@ -152,7 +152,7 @@ public void allFormatsTest() throws Exception { /** * test passing plain text, html, rtf through clipboard */ - //@Smoke + ////TODO@Smoke @Test(timeout = 300000) public void partFormatsTest() throws Exception { DataFormat[] dfs = new DataFormat[]{DataFormat.PLAIN_TEXT, DataFormat.HTML, DataFormat.RTF}; @@ -164,7 +164,7 @@ public void partFormatsTest() throws Exception { /** * test passing url, html, rtf through clipboard */ - //@Smoke + ////TODO@Smoke @Test(timeout = 300000) public void partFormats2Test() throws Exception { DataFormat[] dfs = new DataFormat[]{DataFormat.URL, DataFormat.HTML, DataFormat.RTF}; diff --git a/functional/ControlsTests/test/javafx/draganddrop/CommonContentNotReceivingTestsGenerator.java b/functional/ControlsTests/test/javafx/draganddrop/CommonContentNotReceivingTestsGenerator.java index 0a464b6a..c8a1681a 100644 --- a/functional/ControlsTests/test/javafx/draganddrop/CommonContentNotReceivingTestsGenerator.java +++ b/functional/ControlsTests/test/javafx/draganddrop/CommonContentNotReceivingTestsGenerator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -97,7 +97,7 @@ public static void main(String[] args) { " */\n" + "package javafx.draganddrop;\n" + "\n" + - "import client.test.Smoke;\n" + + "\n" + "import java.rmi.RemoteException;\n" + "import java.util.ArrayList;\n" + "import static javafx.draganddrop.DragDropWithControls.*;\n" + diff --git a/functional/ControlsTests/test/javafx/draganddrop/DragDropWithControlsTest.java b/functional/ControlsTests/test/javafx/draganddrop/DragDropWithControlsTest.java index 651b8434..7e81901c 100644 --- a/functional/ControlsTests/test/javafx/draganddrop/DragDropWithControlsTest.java +++ b/functional/ControlsTests/test/javafx/draganddrop/DragDropWithControlsTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,7 +24,7 @@ */ package javafx.draganddrop; -import client.test.Smoke; + import java.util.EnumSet; import static javafx.draganddrop.DragDropWithControls.*; import javafx.factory.ControlsFactory; @@ -58,7 +58,7 @@ public class DragDropWithControlsTest extends DragDropWithControlsBase { // sb.append("/**\n"); // sb.append("* test drag and drop with source " + src + "\n"); // sb.append("*/\n"); -// sb.append("//@Smoke\n"); +// sb.append("////TODO@Smoke\n"); // sb.append("@Test(timeout = 300000)\n"); // sb.append("public void from" + src + "() throws InterruptedException {\n"); // } @@ -102,7 +102,7 @@ public class DragDropWithControlsTest extends DragDropWithControlsBase { /** * test drag and drop with source Button */ -//@Smoke +////TODO@Smoke @Test(timeout = 300000) public void fromButton() throws InterruptedException { setTransferMode(TransferMode.COPY); @@ -528,7 +528,7 @@ public void fromButton() throws InterruptedException { /** * test drag and drop with source ChoiceBoxe */ -//@Smoke +////TODO@Smoke @Test(timeout = 300000) public void fromChoiceBoxe() throws InterruptedException { setTransferMode(TransferMode.LINK); @@ -954,7 +954,7 @@ public void fromChoiceBoxe() throws InterruptedException { /** * test drag and drop with source ComboBoxe */ -//@Smoke +////TODO@Smoke @Test(timeout = 300000) public void fromComboBoxe() throws InterruptedException { setTransferMode(TransferMode.MOVE); @@ -1380,7 +1380,7 @@ public void fromComboBoxe() throws InterruptedException { /** * test drag and drop with source EditableComboBoxe */ -//@Smoke +////TODO@Smoke @Test(timeout = 300000) public void fromEditableComboBoxe() throws InterruptedException { setTransferMode(TransferMode.COPY); @@ -1806,7 +1806,7 @@ public void fromEditableComboBoxe() throws InterruptedException { /** * test drag and drop with source Pagination */ -//@Smoke +////TODO@Smoke @Test(timeout = 300000) public void fromPagination() throws InterruptedException { setTransferMode(TransferMode.LINK); @@ -2232,7 +2232,7 @@ public void fromPagination() throws InterruptedException { /** * test drag and drop with source ColorPicker */ -//@Smoke +////TODO@Smoke @Test(timeout = 300000) public void fromColorPicker() throws InterruptedException { setTransferMode(TransferMode.MOVE); @@ -2658,7 +2658,7 @@ public void fromColorPicker() throws InterruptedException { /** * test drag and drop with source CheckBoxe */ -//@Smoke +////TODO@Smoke @Test(timeout = 300000) public void fromCheckBoxe() throws InterruptedException { setTransferMode(TransferMode.COPY); @@ -3084,7 +3084,7 @@ public void fromCheckBoxe() throws InterruptedException { /** * test drag and drop with source RadioButton */ -//@Smoke +////TODO@Smoke @Test(timeout = 300000) public void fromRadioButton() throws InterruptedException { setTransferMode(TransferMode.LINK); @@ -3510,7 +3510,7 @@ public void fromRadioButton() throws InterruptedException { /** * test drag and drop with source TextField */ -//@Smoke +////TODO@Smoke @Test(timeout = 300000) public void fromTextField() throws InterruptedException { setTransferMode(TransferMode.MOVE); @@ -3936,7 +3936,7 @@ public void fromTextField() throws InterruptedException { /** * test drag and drop with source TextArea */ -//@Smoke +////TODO@Smoke @Test(timeout = 300000) public void fromTextArea() throws InterruptedException { setTransferMode(TransferMode.COPY); @@ -4362,7 +4362,7 @@ public void fromTextArea() throws InterruptedException { /** * test drag and drop with source PasswordField */ -//@Smoke +////TODO@Smoke @Test(timeout = 300000) public void fromPasswordField() throws InterruptedException { setTransferMode(TransferMode.LINK); @@ -4788,7 +4788,7 @@ public void fromPasswordField() throws InterruptedException { /** * test drag and drop with source Slider */ -//@Smoke +////TODO@Smoke @Test(timeout = 300000) public void fromSlider() throws InterruptedException { setTransferMode(TransferMode.MOVE); @@ -5214,7 +5214,7 @@ public void fromSlider() throws InterruptedException { /** * test drag and drop with source Label */ -//@Smoke +////TODO@Smoke @Test(timeout = 300000) public void fromLabel() throws InterruptedException { setTransferMode(TransferMode.COPY); @@ -5640,7 +5640,7 @@ public void fromLabel() throws InterruptedException { /** * test drag and drop with source Hyperlink */ -//@Smoke +////TODO@Smoke @Test(timeout = 300000) public void fromHyperlink() throws InterruptedException { setTransferMode(TransferMode.LINK); @@ -6066,7 +6066,7 @@ public void fromHyperlink() throws InterruptedException { /** * test drag and drop with source ImageView */ -//@Smoke +////TODO@Smoke @Test(timeout = 300000) public void fromImageView() throws InterruptedException { setTransferMode(TransferMode.MOVE); @@ -6492,7 +6492,7 @@ public void fromImageView() throws InterruptedException { /** * test drag and drop with source MediaView */ -//@Smoke +////TODO@Smoke @Test(timeout = 300000) public void fromMediaView() throws InterruptedException { setTransferMode(TransferMode.COPY); @@ -6918,7 +6918,7 @@ public void fromMediaView() throws InterruptedException { /** * test drag and drop with source Separator */ -//@Smoke +////TODO@Smoke @Test(timeout = 300000) public void fromSeparator() throws InterruptedException { setTransferMode(TransferMode.LINK); @@ -7344,7 +7344,7 @@ public void fromSeparator() throws InterruptedException { /** * test drag and drop with source ScrollBar */ -//@Smoke +////TODO@Smoke @Test(timeout = 300000) public void fromScrollBar() throws InterruptedException { setTransferMode(TransferMode.MOVE); @@ -7770,7 +7770,7 @@ public void fromScrollBar() throws InterruptedException { /** * test drag and drop with source ScrollPane */ -//@Smoke +////TODO@Smoke @Test(timeout = 300000) public void fromScrollPane() throws InterruptedException { setTransferMode(TransferMode.COPY); @@ -8196,7 +8196,7 @@ public void fromScrollPane() throws InterruptedException { /** * test drag and drop with source ProgressIndicator */ -//@Smoke +////TODO@Smoke @Test(timeout = 300000) public void fromProgressIndicator() throws InterruptedException { setTransferMode(TransferMode.LINK); @@ -8622,7 +8622,7 @@ public void fromProgressIndicator() throws InterruptedException { /** * test drag and drop with source ProgressBar */ -//@Smoke +////TODO@Smoke @Test(timeout = 300000) public void fromProgressBar() throws InterruptedException { setTransferMode(TransferMode.MOVE); @@ -9048,7 +9048,7 @@ public void fromProgressBar() throws InterruptedException { /** * test drag and drop with source ListView */ -//@Smoke +////TODO@Smoke @Test(timeout = 300000) public void fromListView() throws InterruptedException { setTransferMode(TransferMode.COPY); @@ -9474,7 +9474,7 @@ public void fromListView() throws InterruptedException { /** * test drag and drop with source PressedToggleButton */ -//@Smoke +////TODO@Smoke @Test(timeout = 300000) public void fromPressedToggleButton() throws InterruptedException { setTransferMode(TransferMode.LINK); @@ -9900,7 +9900,7 @@ public void fromPressedToggleButton() throws InterruptedException { /** * test drag and drop with source UnPressedToggleButton */ -//@Smoke +////TODO@Smoke @Test(timeout = 300000) public void fromUnPressedToggleButton() throws InterruptedException { setTransferMode(TransferMode.MOVE); @@ -10326,7 +10326,7 @@ public void fromUnPressedToggleButton() throws InterruptedException { /** * test drag and drop with source Toolbar */ -//@Smoke +////TODO@Smoke @Test(timeout = 300000) public void fromToolbar() throws InterruptedException { setTransferMode(TransferMode.COPY); @@ -10752,7 +10752,7 @@ public void fromToolbar() throws InterruptedException { /** * test drag and drop with source Menubar */ -//@Smoke +////TODO@Smoke @Test(timeout = 300000) public void fromMenubar() throws InterruptedException { setTransferMode(TransferMode.LINK); @@ -11178,7 +11178,7 @@ public void fromMenubar() throws InterruptedException { /** * test drag and drop with source SplitMenuButton */ -//@Smoke +////TODO@Smoke @Test(timeout = 300000) public void fromSplitMenuButton() throws InterruptedException { setTransferMode(TransferMode.MOVE); @@ -11604,7 +11604,7 @@ public void fromSplitMenuButton() throws InterruptedException { /** * test drag and drop with source TabPane */ -//@Smoke +////TODO@Smoke @Test(timeout = 300000) public void fromTabPane() throws InterruptedException { setTransferMode(TransferMode.COPY); @@ -12030,7 +12030,7 @@ public void fromTabPane() throws InterruptedException { /** * test drag and drop with source TitledPane */ -//@Smoke +////TODO@Smoke @Test(timeout = 300000) public void fromTitledPane() throws InterruptedException { setTransferMode(TransferMode.LINK); @@ -12456,7 +12456,7 @@ public void fromTitledPane() throws InterruptedException { /** * test drag and drop with source TableView */ -//@Smoke +////TODO@Smoke @Test(timeout = 300000) public void fromTableView() throws InterruptedException { setTransferMode(TransferMode.MOVE); @@ -12882,7 +12882,7 @@ public void fromTableView() throws InterruptedException { /** * test drag and drop with source TreeTableView */ -//@Smoke +////TODO@Smoke @Test(timeout = 300000) public void fromTreeTableView() throws InterruptedException { setTransferMode(TransferMode.COPY); @@ -13308,7 +13308,7 @@ public void fromTreeTableView() throws InterruptedException { /** * test drag and drop with source TreeView */ -//@Smoke +////TODO@Smoke @Test(timeout = 300000) public void fromTreeView() throws InterruptedException { setTransferMode(TransferMode.LINK); @@ -13734,7 +13734,7 @@ public void fromTreeView() throws InterruptedException { /** * test drag and drop with source Accordion */ -//@Smoke +////TODO@Smoke @Test(timeout = 300000) public void fromAccordion() throws InterruptedException { setTransferMode(TransferMode.MOVE); @@ -14160,7 +14160,7 @@ public void fromAccordion() throws InterruptedException { /** * test drag and drop with source SplitPane */ -//@Smoke +////TODO@Smoke @Test(timeout = 300000) public void fromSplitPane() throws InterruptedException { setTransferMode(TransferMode.COPY); @@ -14586,7 +14586,7 @@ public void fromSplitPane() throws InterruptedException { /** * test drag and drop with source DatePicker */ -//@Smoke +////TODO@Smoke @Test(timeout = 300000) public void fromDatePicker() throws InterruptedException { setTransferMode(TransferMode.LINK); @@ -15012,7 +15012,7 @@ public void fromDatePicker() throws InterruptedException { /** * test drag and drop with source Line */ -//@Smoke +////TODO@Smoke @Test(timeout = 300000) public void fromLine() throws InterruptedException { setTransferMode(TransferMode.MOVE); @@ -15438,7 +15438,7 @@ public void fromLine() throws InterruptedException { /** * test drag and drop with source Cirle */ -//@Smoke +////TODO@Smoke @Test(timeout = 300000) public void fromCirle() throws InterruptedException { setTransferMode(TransferMode.COPY); @@ -15864,7 +15864,7 @@ public void fromCirle() throws InterruptedException { /** * test drag and drop with source VBox */ -//@Smoke +////TODO@Smoke @Test(timeout = 300000) public void fromVBox() throws InterruptedException { setTransferMode(TransferMode.LINK); diff --git a/functional/ControlsTests/test/javafx/draganddrop/DragEventOneStageTest.java b/functional/ControlsTests/test/javafx/draganddrop/DragEventOneStageTest.java index 17923fd1..0042bd53 100644 --- a/functional/ControlsTests/test/javafx/draganddrop/DragEventOneStageTest.java +++ b/functional/ControlsTests/test/javafx/draganddrop/DragEventOneStageTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,7 +24,6 @@ */ package javafx.draganddrop; -import client.test.Smoke; import static javafx.draganddrop.ExtendedDragApplication.TITLE1; import static javafx.draganddrop.SimpleDragApplication.*; import javafx.scene.Node; @@ -71,7 +70,8 @@ public void findSourceTarget() { /** * tests drag event getScreenX getScreenY */ - @Smoke + //TODO + ////TODO@Smoke @Test(timeout = 300000) public void testScreenXY() throws InterruptedException { dnd(from, fromPoint, to, toPoint); @@ -82,7 +82,8 @@ public void testScreenXY() throws InterruptedException { /** * tests drag event getSceneX getSceneY */ - @Smoke + //TODO + ////TODO@Smoke @Test(timeout = 300000) public void testSceneXY() throws InterruptedException { dnd(from, fromPoint, to, toPoint); @@ -93,7 +94,8 @@ public void testSceneXY() throws InterruptedException { /** * tests drag event getX getY */ - @Smoke + //TODO + ////TODO@Smoke @Test(timeout = 300000) public void testXY() throws InterruptedException { dnd(from, fromPoint, to, toPoint); diff --git a/functional/ControlsTests/test/javafx/draganddrop/DragEventTwoStageTest.java b/functional/ControlsTests/test/javafx/draganddrop/DragEventTwoStageTest.java index 032a996b..a7a016f4 100644 --- a/functional/ControlsTests/test/javafx/draganddrop/DragEventTwoStageTest.java +++ b/functional/ControlsTests/test/javafx/draganddrop/DragEventTwoStageTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -67,7 +67,7 @@ public void findSourceTarget() { /** * tests drag event getSceneX getSceneY */ - //@Smoke + ////TODO@Smoke @Test(timeout = 300000) @Override public void testSceneXY() throws InterruptedException { @@ -79,7 +79,7 @@ public void testSceneXY() throws InterruptedException { /** * tests drag event getX getY */ - //@Smoke + ////TODO@Smoke @Test(timeout = 300000) @Override public void testXY() throws InterruptedException { diff --git a/functional/ControlsTests/test/javafx/draganddrop/DragboardTest.java b/functional/ControlsTests/test/javafx/draganddrop/DragboardTest.java index 4f04fee9..85be8687 100644 --- a/functional/ControlsTests/test/javafx/draganddrop/DragboardTest.java +++ b/functional/ControlsTests/test/javafx/draganddrop/DragboardTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,7 +40,7 @@ protected void transfer() throws InterruptedException { dnd(); } - //@Smoke + ////TODO@Smoke @Test public void contentNotReceivingDifferentTransferModes1Test() throws InterruptedException { setTransferMode(TransferMode.COPY, TransferMode.LINK); @@ -49,7 +49,7 @@ public void contentNotReceivingDifferentTransferModes1Test() throws InterruptedE verifyContentNotComing(); } - //@Smoke + ////TODO@Smoke @Test public void contentNotReceivingDifferentTransferModes2Test() throws InterruptedException { setTransferMode(TransferMode.COPY, TransferMode.MOVE); @@ -58,7 +58,7 @@ public void contentNotReceivingDifferentTransferModes2Test() throws InterruptedE verifyContentNotComing(); } - //@Smoke + ////TODO@Smoke @Test public void contentNotReceivingDifferentTransferModes3Test() throws InterruptedException { setTransferMode(TransferMode.MOVE, TransferMode.COPY); @@ -67,7 +67,7 @@ public void contentNotReceivingDifferentTransferModes3Test() throws InterruptedE verifyContentNotComing(); } - //@Smoke + ////TODO@Smoke @Test public void contentNotReceivingDifferentTransferModes4Test() throws InterruptedException { setTransferMode(TransferMode.MOVE, TransferMode.LINK); @@ -76,7 +76,7 @@ public void contentNotReceivingDifferentTransferModes4Test() throws InterruptedE verifyContentNotComing(); } - //@Smoke + ////TODO@Smoke @Test public void contentNotReceivingDifferentTransferModes5Test() throws InterruptedException { setTransferMode(TransferMode.LINK, TransferMode.MOVE); @@ -85,7 +85,7 @@ public void contentNotReceivingDifferentTransferModes5Test() throws InterruptedE verifyContentNotComing(); } - //@Smoke + ////TODO@Smoke @Test public void contentNotReceivingDifferentTransferModes6Test() throws InterruptedException { setTransferMode(TransferMode.LINK, TransferMode.COPY); diff --git a/functional/ControlsTests/test/javafx/draganddrop/ExtendedDragTest.java b/functional/ControlsTests/test/javafx/draganddrop/ExtendedDragTest.java index 66a2971f..1826c41b 100644 --- a/functional/ControlsTests/test/javafx/draganddrop/ExtendedDragTest.java +++ b/functional/ControlsTests/test/javafx/draganddrop/ExtendedDragTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,7 +24,7 @@ */ package javafx.draganddrop; -import client.test.Smoke; + import static javafx.draganddrop.ExtendedDragApplication.*; import javafx.scene.Node; import javafx.scene.Scene; @@ -93,7 +93,7 @@ public void findSourceTarget() { /** * basic test drag'n'drop gesture */ - //@Smoke + ////TODO@Smoke @Test(timeout = 300000) public void testScreenXY1() throws InterruptedException { clearEvents(); @@ -105,7 +105,7 @@ public void testScreenXY1() throws InterruptedException { /** * test drag'n'drop gesture to some parent node container */ - //@Smoke + ////TODO@Smoke @Test(timeout = 300000) public void testScreenXY2() throws InterruptedException { clearEvents(); @@ -117,7 +117,7 @@ public void testScreenXY2() throws InterruptedException { /** * test drag'n'drop gesture to some overlapped node */ - //@Smoke + ////TODO@Smoke @Test(timeout = 300000) public void testScreenXY3() throws InterruptedException { clearEvents(); diff --git a/functional/ControlsTests/test/javafx/draganddrop/TestBase.java b/functional/ControlsTests/test/javafx/draganddrop/TestBase.java index 73a00660..5cf04b54 100644 --- a/functional/ControlsTests/test/javafx/draganddrop/TestBase.java +++ b/functional/ControlsTests/test/javafx/draganddrop/TestBase.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,12 +25,13 @@ package javafx.draganddrop; import com.sun.glass.ui.Application; -import com.sun.glass.ui.Robot; import javafx.scene.control.test.ControlsTestBase; +import javafx.scene.input.MouseButton; import org.jemmy.Point; import org.jemmy.action.GetAction; import org.jemmy.control.Wrap; import org.jemmy.fx.Root; +import org.jemmy.input.glass.GlassInputFactory; import test.javaclient.shared.Utils; /** @@ -38,8 +39,6 @@ */ public class TestBase extends ControlsTestBase { - static Robot robot = null; - static { if (Utils.isMacOS()) { runInOtherJVM(true); @@ -68,25 +67,16 @@ protected void dnd(Wrap from, Point from_point, Wrap to, Point to_point) throws abs_from_point.translate((int) from.getScreenBounds().getX(), (int) from.getScreenBounds().getY()); final Point abs_to_point = new Point(to_point); abs_to_point.translate((int) to.getScreenBounds().getX(), (int) to.getScreenBounds().getY()); - if (robot == null) { - robot = new GetAction<com.sun.glass.ui.Robot>() { - @Override - public void run(Object... os) throws Exception { - setResult(com.sun.glass.ui.Application.GetApplication().createRobot()); - } - }.dispatch(Root.ROOT.getEnvironment()); // can not be done in static block due to initialization problems on Mac - } Application.invokeAndWait(new Runnable() { - public void run() { - robot.mouseMove(abs_from_point.x, abs_from_point.y); + GlassInputFactory.getRobot().mouseMove(abs_from_point.x, abs_from_point.y); } }); Application.invokeAndWait(new Runnable() { public void run() { - robot.mousePress(1); + GlassInputFactory.getRobot().mousePress(MouseButton.PRIMARY); } }); @@ -98,7 +88,7 @@ public void run() { Application.invokeAndWait(new Runnable() { public void run() { - robot.mouseMove(abs_from_point.x + differenceX * i / STEPS, abs_from_point.y + differenceY * i / STEPS); + GlassInputFactory.getRobot().mouseMove(abs_from_point.x + differenceX * i / STEPS, abs_from_point.y + differenceY * i / STEPS); } }); @@ -107,7 +97,7 @@ public void run() { Application.invokeAndWait(new Runnable() { public void run() { - robot.mouseRelease(1); + GlassInputFactory.getRobot().mouseRelease(MouseButton.PRIMARY); } }); diff --git a/functional/ControlsTests/test/javafx/scene/control/test/ListView/ListViewAddRemoveTest.java b/functional/ControlsTests/test/javafx/scene/control/test/ListView/ListViewAddRemoveTest.java index dd7da163..2d9ef62d 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/ListView/ListViewAddRemoveTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/ListView/ListViewAddRemoveTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,7 +27,7 @@ import test.javaclient.shared.FilteredTestRunner; import org.junit.runner.RunWith; import client.test.ScreenshotCheck; -import client.test.Smoke; + import org.jemmy.action.Action; import java.util.List; import org.jemmy.interfaces.Selectable; @@ -159,7 +159,7 @@ public void run(Object... os) throws Exception { * Adds one item with long text. */ @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void addLong() { add(ListViewApp.createLongItem(0), 2); @@ -288,4 +288,4 @@ protected void checkShift(boolean pannable) throws InterruptedException { // } ScreenshotUtils.checkScreenshot(this.getClass(), "pannable.shift", list); } -} \ No newline at end of file +} diff --git a/functional/ControlsTests/test/javafx/scene/control/test/ListView/NewListViewTest.java b/functional/ControlsTests/test/javafx/scene/control/test/ListView/NewListViewTest.java index d214e6f7..c1a5bead 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/ListView/NewListViewTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/ListView/NewListViewTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,7 +25,7 @@ package javafx.scene.control.test.ListView; import client.test.ScreenshotCheck; -import client.test.Smoke; + import javafx.collections.ObservableList; import javafx.commons.SortValidator; import javafx.event.EventHandler; @@ -146,7 +146,7 @@ public void _after() { } //SECTION OF TESTS ON PROPERTIES - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void editablePropertyTest() { setPropertyByToggleClick(SettingType.BIDIRECTIONAL, Properties.editable); @@ -162,7 +162,7 @@ public void editablePropertyTest() { checkTextFieldText(Properties.editable, "false"); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void orientationPropertyTest() { setPropertyByChoiceBox(SettingType.BIDIRECTIONAL, Orientation.VERTICAL, Properties.orientation); @@ -178,7 +178,7 @@ public void orientationPropertyTest() { checkTextFieldText(Properties.orientation, "HORIZONTAL"); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void selectionModePropertyTest() { setPropertyByChoiceBox(SettingType.BIDIRECTIONAL, SelectionMode.MULTIPLE, Properties.selectionMode); @@ -194,7 +194,7 @@ public void selectionModePropertyTest() { checkTextFieldText(Properties.selectionMode, "SINGLE"); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void prefHeightPropertyTest() throws InterruptedException { setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefHeight, 200); @@ -210,7 +210,7 @@ public void prefHeightPropertyTest() throws InterruptedException { checkTextFieldValue(Properties.prefHeight, 50); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void prefWidthPropertyTest() throws InterruptedException { setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefWidth, 200); @@ -227,7 +227,7 @@ public void prefWidthPropertyTest() throws InterruptedException { } // SITUATIONAL TESTS - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void keyboardRangeMultipleSelection2Test() throws Throwable { addElements(0, 1, 2, 3, 4, 5, 6, 7, 8, 9); @@ -284,7 +284,7 @@ public void keyboardRangeMultipleSelection2Test() throws Throwable { } } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void scrollToTest() throws InterruptedException { int size = 10; @@ -350,21 +350,21 @@ private boolean isCellShown(final int item, Orientation orientation) { return control.contains(cellRect); } - @Smoke + //TODO@Smoke @Test(timeout = 30000) public void fixedCellSizePropertyTest() throws InterruptedException { adjustControl(); fixedCellSizePropertyTestCommon(testedControl, Properties.fixedCellSize, Utils.isCaspian() ? 19.4 : 21); } - @Smoke + //TODO@Smoke @Test(timeout = 30000) public void fixedCellSizePropertyCSSTest() { adjustControl(); fixedCellSizePropertyCSSTestCommon(testedControl, Properties.fixedCellSize, Utils.isCaspian() ? 19.4 : 21); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void verticalScrollBarBehaviorOnAddingDeletingTest() throws InterruptedException { setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefHeight, 50); @@ -397,7 +397,7 @@ public void steadyScrollingTest() throws InterruptedException { } } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void scrollAppearingOnResizingTest() throws InterruptedException { setSize(50, 50); @@ -424,7 +424,7 @@ public void scrollAppearingOnResizingTest() throws InterruptedException { checkScrollbarsStates(false, false); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void scrollBarAppearingSensitivityTest() throws InterruptedException { addRectangleAtPos(0); @@ -436,7 +436,7 @@ public void scrollBarAppearingSensitivityTest() throws InterruptedException { checkScrollbarsStates(false, false); } - @Smoke + //TODO@Smoke @Test(timeout = 300000)//RT-18293 public void eventsCommingTest() throws InterruptedException { addFormAtPos(0); @@ -475,7 +475,7 @@ public void scrollBarSize2Test() throws InterruptedException, Throwable { throwScreenshotError(); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) //RT-17462 public void scrollBarDisappearTest() throws InterruptedException { setPropertyByChoiceBox(SettingType.BIDIRECTIONAL, Orientation.HORIZONTAL, Properties.orientation); @@ -492,7 +492,7 @@ public void scrollBarDisappearTest() throws InterruptedException { } @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000)//RT-17465 public void selectionSavingTest() throws InterruptedException, Throwable { setSize(100, 100); @@ -559,7 +559,7 @@ public void scrollingConfused3Test() throws Throwable { throwScreenshotError(); } - @Smoke + //TODO@Smoke @Test(timeout = 300000)//RT-17522 public void addingElementOnFocusPositionTest() { addElements(1, 2, 3, 4, 5, 6, 7); @@ -599,7 +599,7 @@ public void knobSizeChangingTest() throws InterruptedException, Throwable { throwScreenshotError(); } - @Smoke + //TODO@Smoke @Test(timeout = 300000)//RT-18234 - possible public void singleSelectionOnKeyBoardTest() throws InterruptedException, Throwable { addElements(0, 1, 2, 3, 4, 5, 6, 7, 8, 9); @@ -637,7 +637,7 @@ public void singleSelectionOnKeyBoardTest() throws InterruptedException, Throwab } } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void multipleSelectionCommonLogicOnKeyBoardTest() throws InterruptedException, Throwable { addElements(0, 1, 2, 3, 4, 5, 6, 7, 8, 9); @@ -706,7 +706,7 @@ public void multipleSelectionCommonLogicOnKeyBoardTest() throws InterruptedExcep } } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void ctrlAClickSingleTest() throws InterruptedException, Throwable { addElements(0, 1, 2, 3, 4, 5, 6, 7, 8, 9); @@ -753,7 +753,7 @@ public void ctrlAClickSingleTest() throws InterruptedException, Throwable { } } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void ctrlAClickMultipleTest() throws InterruptedException, Throwable { addElements(0, 1, 2, 3, 4, 5, 6, 7, 8, 9); @@ -800,25 +800,25 @@ public void ctrlAClickMultipleTest() throws InterruptedException, Throwable { } } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void mouseClickingVerticalMultipleTest() throws InterruptedException, Throwable { commonClickingTest(Orientation.VERTICAL, SelectionMode.MULTIPLE); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void mouseClickingHorizontalMultipleTest() throws InterruptedException, Throwable { commonClickingTest(Orientation.HORIZONTAL, SelectionMode.MULTIPLE); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void mouseClickingVerticalSingleTest() throws InterruptedException, Throwable { commonClickingTest(Orientation.VERTICAL, SelectionMode.SINGLE); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void mouseClickingHorizontalSingleTest() throws InterruptedException, Throwable { commonClickingTest(Orientation.HORIZONTAL, SelectionMode.SINGLE); @@ -1198,7 +1198,7 @@ public void focusTraversalSelectionSavingTest() throws InterruptedException { * Checks that when the sorting is applied to the underlying data collection * the cells are rendered in the right order. */ - @Smoke + //TODO@Smoke @Test(timeout = 30000) public void renderingAfterSortingTest() { try { @@ -1336,4 +1336,4 @@ public void run(Object... os) throws Exception { } applyKeysPushing(numberOfElements, lessKey, CTRL_DOWN_MASK_OS); } -} \ No newline at end of file +} diff --git a/functional/ControlsTests/test/javafx/scene/control/test/ListView/TestBase.java b/functional/ControlsTests/test/javafx/scene/control/test/ListView/TestBase.java index 914eb93d..743d94d3 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/ListView/TestBase.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/ListView/TestBase.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,32 +24,29 @@ */ package javafx.scene.control.test.ListView; -import java.util.Collection; -import java.util.HashSet; -import java.util.List; import javafx.geometry.Orientation; import javafx.scene.Node; import javafx.scene.Scene; -import javafx.scene.control.*; -import static javafx.scene.control.test.ListView.NewListViewApp.*; +import javafx.scene.control.ListCell; +import javafx.scene.control.ListView; +import javafx.scene.control.MultipleSelectionModel; +import javafx.scene.control.ScrollBar; +import javafx.scene.control.SelectionMode; +import javafx.scene.control.TextField; import javafx.scene.control.test.util.MultipleSelectionHelper; import javafx.scene.control.test.util.MultipleSelectionHelper.Range; import javafx.scene.control.test.util.TableListCommonTests; -import static javafx.scene.control.test.utils.ComponentsFactory.*; import javafx.scene.control.test.utils.SelectionFormatter; import javafx.scene.control.test.utils.ptables.AbstractPropertyController.SettingType; -import static javafx.scene.control.test.utils.ptables.NodesChoserFactory.*; import javafx.scene.text.Text; import org.jemmy.Point; import org.jemmy.action.GetAction; import org.jemmy.control.Wrap; -import org.jemmy.env.Environment; import org.jemmy.fx.ByID; import org.jemmy.fx.Root; import org.jemmy.fx.control.ListItemWrap.ListItemByObjectLookup; import org.jemmy.interfaces.Keyboard.KeyboardButtons; import org.jemmy.interfaces.Keyboard.KeyboardModifiers; -import static org.jemmy.interfaces.Keyboard.KeyboardModifiers.META_DOWN_MASK; import org.jemmy.interfaces.Mouse; import org.jemmy.interfaces.Parent; import org.jemmy.interfaces.Selectable; @@ -62,6 +59,15 @@ import org.junit.Before; import org.junit.BeforeClass; import test.javaclient.shared.Utils; + +import java.util.Collection; +import java.util.HashSet; +import java.util.List; + +import static javafx.scene.control.test.ListView.NewListViewApp.*; +import static javafx.scene.control.test.utils.ComponentsFactory.*; +import static javafx.scene.control.test.utils.ptables.NodesChoserFactory.NODE_CHOOSER_ACTION_BUTTON_ID; +import static org.jemmy.interfaces.Keyboard.KeyboardModifiers.META_DOWN_MASK; import static test.javaclient.shared.TestUtil.isEmbedded; /** @@ -627,4 +633,4 @@ static protected enum Counters { set_on_edit_cancel, set_on_edit_commit, set_on_edit_start, get_on_edit_cancel, get_on_edit_commit, get_on_edit_start }; -} \ No newline at end of file +} diff --git a/functional/ControlsTests/test/javafx/scene/control/test/Mnemonics/LabelsMnemonicsTest.java b/functional/ControlsTests/test/javafx/scene/control/test/Mnemonics/LabelsMnemonicsTest.java index 0af4ecd8..9273bfa2 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/Mnemonics/LabelsMnemonicsTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/Mnemonics/LabelsMnemonicsTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,7 +24,7 @@ */ package javafx.scene.control.test.Mnemonics; -import client.test.Smoke; + import javafx.scene.Node; import javafx.scene.control.Button; import javafx.scene.control.CheckBox; @@ -64,7 +64,7 @@ public static void setUpClass() throws Exception { } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void staticTest() throws Throwable { if (!Utils.isMacOS()) { @@ -76,7 +76,7 @@ public void staticTest() throws Throwable { } } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void dynamicTest() throws Throwable { if (!Utils.isMacOS()) { diff --git a/functional/ControlsTests/test/javafx/scene/control/test/Mnemonics/MnemonicsTest.java b/functional/ControlsTests/test/javafx/scene/control/test/Mnemonics/MnemonicsTest.java index a0900ec1..f4b0ea57 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/Mnemonics/MnemonicsTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/Mnemonics/MnemonicsTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,7 +24,7 @@ */ package javafx.scene.control.test.Mnemonics; -import client.test.Smoke; + import java.util.Arrays; import javafx.factory.ControlsFactory; import javafx.scene.control.ChoiceBox; @@ -71,7 +71,7 @@ public void changeByUI(Wrap<?> obj, Boolean value) { }); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void propertyTest() throws Throwable { final Selectable<ControlsFactory> selectable = choice.as(Selectable.class); @@ -109,4 +109,4 @@ public void propertyTest() throws Throwable { } } } -} \ No newline at end of file +} diff --git a/functional/ControlsTests/test/javafx/scene/control/test/ScrollPane/ScrollPaneTest.java b/functional/ControlsTests/test/javafx/scene/control/test/ScrollPane/ScrollPaneTest.java index 1ae7e87e..ca1d9844 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/ScrollPane/ScrollPaneTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/ScrollPane/ScrollPaneTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,7 +25,7 @@ package javafx.scene.control.test.ScrollPane; import client.test.ScreenshotCheck; -import client.test.Smoke; + import com.oracle.jdk.sqe.cc.markup.Covers; import com.oracle.jdk.sqe.cc.markup.Covers.Level; import java.util.EnumSet; @@ -73,7 +73,7 @@ public void setUp() { scene.mouse().move(new Point(0, 0)); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) @Covers(value = {"javafx.scene.control.ScrollPane.vmax.DEFAULT", "javafx.scene.control.ScrollPane.vmax.GET"}, level = Level.FULL) public void checkVMaxOptionTest() throws InterruptedException { @@ -108,7 +108,7 @@ public void checkVMaxOptionTest() throws InterruptedException { checkTextFieldValue(Properties.vmax, -100); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) @Covers(value = {"javafx.scene.control.ScrollPane.vmin.DEFAULT", "javafx.scene.control.ScrollPane.vmin.GET"}, level = Level.FULL) public void checkVMinOptionTest() throws InterruptedException { @@ -143,7 +143,7 @@ public void checkVMinOptionTest() throws InterruptedException { checkTextFieldValue(Properties.vmin, +150); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) @Covers(value = {"javafx.scene.control.ScrollPane.hmax.DEFAULT", "javafx.scene.control.ScrollPane.hmax.GET"}, level = Level.FULL) public void checkHMaxOptionTest() throws InterruptedException { @@ -178,7 +178,7 @@ public void checkHMaxOptionTest() throws InterruptedException { checkTextFieldValue(Properties.hmax, -100); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) @Covers(value = {"javafx.scene.control.ScrollPane.hmin.DEFAULT", "javafx.scene.control.ScrollPane.hmin.GET"}, level = Level.FULL) public void checkHMinOptionTest() throws InterruptedException { @@ -235,7 +235,7 @@ public void checkH_V_ValueOptionTest() throws InterruptedException, Throwable { /** * Assume, that scrollPane contain rectangle 200X200 pixels */ - @Smoke + //TODO@Smoke @Test(timeout = 300000) @Covers(value = {"javafx.scene.control.ScrollPane.prefViewportHeight.GET", "javafx.scene.control.ScrollPane.prefViewportHeight.DEFAULT"}, level = Level.FULL) public void checkPrefViewPortHeightOptionTest() throws InterruptedException { @@ -253,7 +253,7 @@ public void checkPrefViewPortHeightOptionTest() throws InterruptedException { /** * Assume, that scrollPane contain rectangle 200X200 pixels */ - @Smoke + //TODO@Smoke @Test(timeout = 300000) @Covers(value = {"javafx.scene.control.ScrollPane.prefViewportWidth.GET", "javafx.scene.control.ScrollPane.prefViewportWidth.DEFAULT"}, level = Level.FULL) public void checkPrefViewPortWidthOptionTest() throws InterruptedException { @@ -276,7 +276,7 @@ public void checkMinViewPortWidthSetTest() throws InterruptedException { checkTextFieldValue(Properties.width, 600, 20); } - @Smoke + //TODO@Smoke @Test(timeout = 300000)//Property affecting is verified in other test. @Covers(value = {"javafx.scene.control.ScrollPane.pannable.GET", "javafx.scene.control.ScrollPane.pannable.DEFAULT"}, level = Level.FULL) public void checkPannableOptionTest() throws InterruptedException { @@ -295,7 +295,7 @@ public void checkPannableOptionTest() throws InterruptedException { checkTextFieldText(Properties.pannable, "false"); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) @Covers(value = {"javafx.scene.control.ScrollPane.fitToHeight.GET", "javafx.scene.control.ScrollPane.fitToHeight.DEFAULT", "javafx.scene.control.ScrollPane.fitToWidth.GET", "javafx.scene.control.ScrollPane.fitToWidth.DEFAULT"}, level = Level.FULL) @@ -340,7 +340,7 @@ private void checkScrollbarsVisibility(boolean horizontalVisible, boolean vertic Assert.assertFalse(findScrollBar((Parent<Node>) testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, verticalVisible) == null); } - @Smoke + //TODO@Smoke @Test(timeout = 300000)//RT-17395 @Covers(value = {"javafx.scene.control.ScrollPane.vbarPolicy.GET", "javafx.scene.control.ScrollPane.vbarPolicy.DEFAULT", "javafx.scene.control.ScrollPane.hbarPolicy.GET", "javafx.scene.control.ScrollPane.hbarPolicy.DEFAULT"}, level = Level.FULL) @@ -447,7 +447,7 @@ public void resizingTest() throws InterruptedException, Throwable { throwScreenshotError(); } - @Smoke + //TODO@Smoke @Test(timeout = 300000)//RT-17368 public void viewPortPrefSizeTest() throws InterruptedException { changeContentToResizable(); @@ -500,7 +500,7 @@ public void whiteGapTest() throws InterruptedException, Throwable { throwScreenshotError(); } - @Smoke + //TODO@Smoke @Test(timeout = 300000)//(expected=java.lang.RuntimeException.class) //RT-17334 public void unidirectionalBindingForVHValueTest() throws InterruptedException { setPropertyBySlider(SettingType.UNIDIRECTIONAL, Properties.vvalue, 200); @@ -535,7 +535,7 @@ public void contentMovingTest() throws InterruptedException, Throwable { throwScreenshotError(); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void contentReceiveMouseEventsTest() { changeContent(); @@ -544,7 +544,7 @@ public void contentReceiveMouseEventsTest() { checkContentTextFieldValue(1); } - @Smoke + //TODO@Smoke private void checkFocusStates(boolean buttonFocus, boolean textFieldFocus, boolean textAreaFocus, boolean emptyButtonFocus) { checkFocus(CONTENT_BUTTON, buttonFocus); checkFocus(CONTENT_TEXT_FIELD_ID, textFieldFocus); @@ -581,7 +581,7 @@ public void insideTraversalCheckTest() throws Throwable { throwScreenshotError(); } - @Smoke + //TODO@Smoke @Test(timeout = 300000)//RT-17378 public void contentSizeDetectionAndScrolls() throws InterruptedException, Throwable { SettingOption temp = currentSettingOption; @@ -601,7 +601,7 @@ public void contentSizeDetectionAndScrolls() throws InterruptedException, Throwa currentSettingOption = temp; } - @Smoke + //TODO@Smoke @Test(timeout = 300000)//RT-17380 public void focusFromOutsideTest() { changeContent(); @@ -624,7 +624,7 @@ private void makeDND(int initialDeltaX, int initialDeltaY, int deltaX, int delta } @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void panningTest() throws Throwable { setPropertyByToggleClick(SettingType.BIDIRECTIONAL, Properties.pannable); @@ -656,7 +656,7 @@ public void panningTest() throws Throwable { throwScreenshotError(); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void longRotativeDND() throws InterruptedException { setPropertyByToggleClick(SettingType.BIDIRECTIONAL, Properties.pannable); @@ -730,7 +730,7 @@ private void tryToMove(int initX, int initY, int deltaX, int deltaY) throws Inte Assert.assertTrue("[Expected point is too far from actual]", distance_squared <= 2); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void panningAndMouseMovementCompare() throws InterruptedException { setPropertyByToggleClick(SettingType.BIDIRECTIONAL, Properties.pannable); @@ -777,7 +777,7 @@ public void steadyScrollingTest() throws InterruptedException { } } - @Smoke + //TODO@Smoke @Test(timeout = 300000)//RT-17368 @Covers(value = "javafx.scene.control.ScrollPane.viewportBounds.GET", level = Level.FULL) public void boundsTest() throws InterruptedException { @@ -815,7 +815,7 @@ public void run(Object... os) throws Exception { } @Ignore //due to http://javafx-jira.kenai.com/browse/RT-27467 - @Smoke + //TODO@Smoke @Test(timeout = 30000) /** * Test checks method scrollTo of the control. diff --git a/functional/ControlsTests/test/javafx/scene/control/test/ToolBar/ToolBarBase.java b/functional/ControlsTests/test/javafx/scene/control/test/ToolBar/ToolBarBase.java index eaa25dea..ac5ec260 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/ToolBar/ToolBarBase.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/ToolBar/ToolBarBase.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,7 +25,7 @@ package javafx.scene.control.test.ToolBar; import client.test.ScreenshotCheck; -import client.test.Smoke; + import org.jemmy.env.Timeout; import org.jemmy.timing.State; import org.jemmy.interfaces.Keyboard.KeyboardButton; @@ -117,7 +117,7 @@ public void selectionTest() throws InterruptedException { ScreenshotUtils.checkScreenshot(getFullName("Selection"), contentPane); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void keyboardSelectionTest() throws InterruptedException { keyboardSelectionCycle(KeyboardButtons.SPACE); @@ -132,7 +132,7 @@ public void clearTest() throws InterruptedException { } @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void addItemsTest() throws InterruptedException { ScreenshotUtils.checkScreenshot(getFullName("Add"), contentPane); @@ -148,7 +148,7 @@ public void shrinkTest() throws InterruptedException { } @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void vmodeSwitchTest() throws InterruptedException { shrinkBtn.mouse().click(); @@ -204,4 +204,4 @@ public void selectionCheck() throws InterruptedException { checkLastPressed(i); } } -} \ No newline at end of file +} diff --git a/functional/ControlsTests/test/javafx/scene/control/test/cell/CellsTestBase.java b/functional/ControlsTests/test/javafx/scene/control/test/cell/CellsTestBase.java index e9df24d0..16ad57fc 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/cell/CellsTestBase.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/cell/CellsTestBase.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,7 +24,7 @@ */ package javafx.scene.control.test.cell; -import client.test.Smoke; + import com.sun.glass.ui.Application; import com.sun.javafx.scene.control.LabeledText; import java.util.ArrayList; @@ -89,7 +89,7 @@ public void run(Object... os) throws Exception { }.dispatch(Root.ROOT.getEnvironment(), parent.lookup(Button.class, new ByID(RESET_SCENE_BTN_ID)).wrap().getControl()); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void enterTextTest() throws InterruptedException { doFactoryChange(CellType.CustomCell); @@ -103,7 +103,7 @@ public void enterTextTest() throws InterruptedException { select(newData); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void escapeEditingTest() throws Exception { doFactoryChange(CellType.CustomCell); @@ -126,7 +126,7 @@ public void escapeEditingTest() throws Exception { throw new Exception("Test fails, because we've found item, which should be, because editing was escaped"); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void editInnerSelectionTest() throws InterruptedException { doFactoryChange(CellType.CustomCell); @@ -135,7 +135,7 @@ public void editInnerSelectionTest() throws InterruptedException { testedControl.as(Parent.class, Node.class).lookup(TextField.class, new ByID<TextField>(cellID)).wait(1); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void editFocusTest() throws InterruptedException { doFactoryChange(CellType.CustomCell); @@ -144,7 +144,7 @@ public void editFocusTest() throws InterruptedException { testedControl.as(Parent.class, Node.class).lookup(TextField.class, new ByID<TextField>(cellID)).wait(1); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void clickOtherItemTest() throws InterruptedException { doFactoryChange(CellType.CustomCell); @@ -157,7 +157,7 @@ public Integer reached() { }, 0); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void editOtherItemTest() throws InterruptedException { doFactoryChange(CellType.CustomCell); @@ -167,64 +167,64 @@ public void editOtherItemTest() throws InterruptedException { parent.lookup(TextField.class, new ByID<TextField>(cellID)).wait(1); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void commonCheckBoxFactoryWithMouseTest() { doCommonCheckOfChanger(CellType.CheckBox, Boolean.FALSE, Boolean.TRUE, Boolean.TRUE, null, WayOfEditing.ByMouse); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void commonCheckBoxFactoryWithKeyboardTest() { doCommonCheckOfChanger(CellType.CheckBox, Boolean.FALSE, Boolean.TRUE, Boolean.TRUE, null, WayOfEditing.ByKeyboard); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void commonChoiceBoxFacoryWithMouseTest() { doCommonCheckOfChanger(CellType.ChoiceBox, data.get(5), someValues.get(1), someValues.get(1), new CellCustomStringConverter().toString(someValues.get(1).toString()), WayOfEditing.ByMouse); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void commonChoiceBoxFacoryWithKeyboardTest() { doCommonCheckOfChanger(CellType.ChoiceBox, data.get(3), someValues.get(2), someValues.get(2), new CellCustomStringConverter().toString(someValues.get(2).toString()), WayOfEditing.ByKeyboard); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void commonComboBoxFacoryWithMouseTest() { doCommonCheckOfChanger(CellType.ComboBox, data.get(8), someValues.get(2), someValues.get(2), new CellCustomStringConverter().toString(someValues.get(2).toString()), WayOfEditing.ByMouse); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void commonComboBoxFacoryWithKeyboardTest() { doCommonCheckOfChanger(CellType.ComboBox, data.get(4), someValues.get(0), someValues.get(0), new CellCustomStringConverter().toString(someValues.get(0).toString()), WayOfEditing.ByKeyboard); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void commonTextFieldFacoryWithMouseTest() { doCommonCheckOfChanger(CellType.TextField, data.get(7), someValues.get(0), new CellCustomStringConverter().fromString(someValues.get(0).toString()), new CellCustomStringConverter().toString(new CellCustomStringConverter().fromString(someValues.get(0).toString())), WayOfEditing.ByMouse); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void commonTextFieldFacoryWithKeyboardTest() { doCommonCheckOfChanger(CellType.TextField, data.get(2), someValues.get(1), new CellCustomStringConverter().fromString(someValues.get(1).toString()), new CellCustomStringConverter().toString(new CellCustomStringConverter().fromString(someValues.get(1).toString())), WayOfEditing.ByKeyboard); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void commonCustomTextFieldFacoryWithMouseTest() { doCommonCheckOfChanger(CellType.CustomCell, data.get(7), someValues.get(0), new CellCustomStringConverter().fromString(someValues.get(0).toString()), new CellCustomStringConverter().toString(new CellCustomStringConverter().fromString(someValues.get(0).toString())), WayOfEditing.ByMouse); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void commonCustomTextFieldFacoryWithKeyboardTest() { doCommonCheckOfChanger(CellType.CustomCell, data.get(2), someValues.get(1), new CellCustomStringConverter().fromString(someValues.get(1).toString()), diff --git a/functional/ControlsTests/test/javafx/scene/control/test/cell/CheckBoxTreeItemTest.java b/functional/ControlsTests/test/javafx/scene/control/test/cell/CheckBoxTreeItemTest.java index a05ef8f0..dda57a6c 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/cell/CheckBoxTreeItemTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/cell/CheckBoxTreeItemTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,7 +25,7 @@ package javafx.scene.control.test.cell; -import client.test.Smoke; + import java.util.Arrays; import javafx.scene.Node; import javafx.scene.Scene; @@ -111,21 +111,21 @@ public boolean check(TreeItem cntrl) { propertyTableHelper = new PropertyGridHelper<CheckBoxTreeItem>((Wrap<? extends CheckBoxTreeItem>) item, parent.lookup(PropertyCheckingGrid.class).wrap()); } - @Smoke + //TODO@Smoke @Test public void selectedPropertyTest() throws Throwable { PropertyHelper selectedHelper = propertyTableHelper.getPropertyHelper(Boolean.class, "selected"); selectedHelper.checkProperty(true); } - @Smoke + //TODO@Smoke @Test public void indeterminatePropertyTest() throws Throwable { PropertyHelper indeterminateHelper = propertyTableHelper.getPropertyHelper(Boolean.class, "indeterminate"); indeterminateHelper.checkProperty(false); } - @Smoke + //TODO@Smoke @Test public void independentPropertyTest() throws Throwable { PropertyHelper independentHelper = propertyTableHelper.getPropertyHelper(Boolean.class, "independent"); diff --git a/functional/ControlsTests/test/javafx/scene/control/test/cell/TableCellsTest.java b/functional/ControlsTests/test/javafx/scene/control/test/cell/TableCellsTest.java index bc5023d2..7839baaf 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/cell/TableCellsTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/cell/TableCellsTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,7 +24,7 @@ */ package javafx.scene.control.test.cell; -import client.test.Smoke; + import com.sun.javafx.scene.control.LabeledText; import java.util.Map; import javafx.collections.FXCollections; @@ -41,6 +41,7 @@ import org.jemmy.env.Timeout; import org.jemmy.fx.ByID; import org.jemmy.fx.Root; +import org.jemmy.fx.interfaces.Table; import org.jemmy.interfaces.*; import org.jemmy.lookup.Lookup; import org.jemmy.lookup.LookupCriteria; @@ -83,7 +84,7 @@ public boolean check(DataItem tableData) { /** * Content of tableView can be stored */ - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void MapCellFactoryTest() { doFactoryChange(CellType.MapValue); diff --git a/functional/ControlsTests/test/javafx/scene/control/test/cell/TreeTableCellsTest.java b/functional/ControlsTests/test/javafx/scene/control/test/cell/TreeTableCellsTest.java index c3c6ac8a..182b790a 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/cell/TreeTableCellsTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/cell/TreeTableCellsTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,7 +40,7 @@ import org.jemmy.control.Wrap; import org.jemmy.fx.ByID; import org.jemmy.interfaces.Parent; -import org.jemmy.interfaces.Table; +import org.jemmy.fx.interfaces.Table; import org.jemmy.lookup.Lookup; import org.jemmy.lookup.LookupCriteria; import static org.junit.Assert.*; @@ -133,4 +133,4 @@ public void run(Object... os) throws Exception { } }.dispatch(testedControl.getEnvironment()); } -} \ No newline at end of file +} diff --git a/functional/ControlsTests/test/javafx/scene/control/test/chart/AxisBase.java b/functional/ControlsTests/test/javafx/scene/control/test/chart/AxisBase.java index 572c84db..3c46776f 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/chart/AxisBase.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/chart/AxisBase.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,7 +25,7 @@ package javafx.scene.control.test.chart; import client.test.ScreenshotCheck; -import client.test.Smoke; + import javafx.scene.control.test.chart.AxisBaseApp.AxisCSS; import org.junit.Test; import test.javaclient.shared.TestBase; @@ -72,7 +72,7 @@ public void autoRangingTest() throws InterruptedException { * Test for Axis setLabel API */ @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void labelTest() throws InterruptedException { testCommon(Pages.Label.name(), null, true, true, AxisBaseApp.BOOL.length); @@ -100,7 +100,7 @@ public void tickLabelFillTest() throws InterruptedException { * Test for Axis setTickLabelFont API */ @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void tickLabelFontTest() throws InterruptedException { testCommon(Pages.TickLabelFont.name(), null, true, true, AxisBaseApp.BOOL.length); @@ -137,7 +137,7 @@ public void tickLengthTest() throws InterruptedException { * Test for Axis -fx-side CSS */ @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void cssSide() throws InterruptedException { testCommon(AxisCSS.CSSSide.name(), null, true, true, AxisBaseApp.SIDE.length); @@ -183,7 +183,7 @@ public void cssTickMarkVisible() throws InterruptedException { * Test for Axis -fx-tick-labels-visible CSS */ @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void cssTickLabelsVisible() throws InterruptedException { testCommon(AxisCSS.CSSTickLabelsVisible.name(), null, true, true, AxisBaseApp.BOOL.length); @@ -192,4 +192,4 @@ public void cssTickLabelsVisible() throws InterruptedException { protected void testCommon(String name) { testCommon(name, null); } -} \ No newline at end of file +} diff --git a/functional/ControlsTests/test/javafx/scene/control/test/chart/BarChartTest.java b/functional/ControlsTests/test/javafx/scene/control/test/chart/BarChartTest.java index 9e8dbc63..32780c21 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/chart/BarChartTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/chart/BarChartTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,7 +25,7 @@ package javafx.scene.control.test.chart; import client.test.ScreenshotCheck; -import client.test.Smoke; + import javafx.scene.control.test.chart.BarChartApp.Pages; import org.junit.BeforeClass; import org.junit.Test; @@ -54,7 +54,7 @@ public void barGapTest() throws InterruptedException { * Test for BarChart setCategoryGap API */ @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void categoryGapTest() throws InterruptedException { testCommon(Pages.CategoryGap.name(), null, true, true, BarChartApp.GAP_BAR.length); diff --git a/functional/ControlsTests/test/javafx/scene/control/test/chart/CategoryAxisTest.java b/functional/ControlsTests/test/javafx/scene/control/test/chart/CategoryAxisTest.java index b2811a64..e25e7c33 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/chart/CategoryAxisTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/chart/CategoryAxisTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,7 +25,7 @@ package javafx.scene.control.test.chart; import client.test.ScreenshotCheck; -import client.test.Smoke; + import javafx.scene.control.test.chart.CategoryAxisApp.CathegoryAxisCSS; import org.junit.Test; import javafx.scene.control.test.chart.CategoryAxisApp.Pages; @@ -64,7 +64,7 @@ public void endMarginTest() throws InterruptedException { * Test for CategoryAxis setStartAndEndProperty API */ @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void startAndEndPropertyTest() throws InterruptedException { testCommon(Pages.GapStartAndEnd.name(), null, true, true, CategoryAxisApp.BOOL.length); @@ -96,4 +96,4 @@ public void cssGapStartAndEnd() throws InterruptedException { public void cssEndMargin() throws InterruptedException { testCommon(CathegoryAxisCSS.CSSEndMargin.name(), null, true, true, CategoryAxisApp.MARGIN.length); } -} \ No newline at end of file +} diff --git a/functional/ControlsTests/test/javafx/scene/control/test/chart/ChartBase.java b/functional/ControlsTests/test/javafx/scene/control/test/chart/ChartBase.java index 97a955d4..cd594da7 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/chart/ChartBase.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/chart/ChartBase.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,7 +25,7 @@ package javafx.scene.control.test.chart; import client.test.ScreenshotCheck; -import client.test.Smoke; + import javafx.scene.control.test.chart.ChartBaseApp.ChartCSS; import javafx.scene.control.test.chart.ChartBaseApp.Pages; import org.junit.Before; @@ -80,7 +80,7 @@ public void legendSideTest() throws InterruptedException { * Test for Chart setTitle API */ @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void titleTest() throws InterruptedException { testCommon(Pages.Title.name(), null, true, true, ChartBaseApp.BOOL.length); @@ -117,7 +117,7 @@ public void cssTitleSide() throws InterruptedException { * Test for -fx-legend-side CSS */ @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void cssLegendSide() throws InterruptedException { testCommon(ChartCSS.CSSLegendSide.name(), null, true, true, ChartBaseApp.SIDE.length); @@ -131,4 +131,4 @@ public void cssLegendSide() throws InterruptedException { public void cssLegendVisible() throws InterruptedException { testCommon(ChartCSS.CSSLegendVisible.name(), null, true, true, ChartBaseApp.BOOL.length); } -} \ No newline at end of file +} diff --git a/functional/ControlsTests/test/javafx/scene/control/test/chart/LineChartTest.java b/functional/ControlsTests/test/javafx/scene/control/test/chart/LineChartTest.java index 8a0ed94c..74f036e4 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/chart/LineChartTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/chart/LineChartTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,7 +25,7 @@ package javafx.scene.control.test.chart; import client.test.ScreenshotCheck; -import client.test.Smoke; + import javafx.scene.control.test.chart.LineChartApp.LineChartCSS; import javafx.scene.control.test.chart.LineChartApp.Pages; import org.junit.BeforeClass; @@ -55,7 +55,7 @@ public void createSymbolsTest() throws InterruptedException { * Test for -fx-symbol-visible CSS */ @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void cssSymbolVisible() throws InterruptedException { testCommon(LineChartCSS.CSSSymbolVisible.name(), null, true, true, LineChartApp.BOOL.length); diff --git a/functional/ControlsTests/test/javafx/scene/control/test/chart/NumberAxisTest.java b/functional/ControlsTests/test/javafx/scene/control/test/chart/NumberAxisTest.java index b0f01f16..d1394be4 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/chart/NumberAxisTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/chart/NumberAxisTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,7 +25,7 @@ package javafx.scene.control.test.chart; import client.test.ScreenshotCheck; -import client.test.Smoke; + import javafx.scene.control.test.chart.NumberAxisApp.NumberAxisCSS; import org.junit.Test; import javafx.scene.control.test.chart.NumberAxisApp.Pages; @@ -73,7 +73,7 @@ public void tickUnitTest() throws InterruptedException { * Test for NumberAxis -fx-tick-unit CSS */ @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void cssTickUnit() throws InterruptedException { testCommon(NumberAxisCSS.CSSTickUnit.name(), null, true, true, NumberAxisApp.TICK_UNIT_S.length); @@ -84,4 +84,4 @@ public void cssTickUnit() throws InterruptedException { public void tickValueOverflowTest() throws InterruptedException { testCommon(Pages.UpperBoundOverflow.name()); } -} \ No newline at end of file +} diff --git a/functional/ControlsTests/test/javafx/scene/control/test/chart/PieChartTest.java b/functional/ControlsTests/test/javafx/scene/control/test/chart/PieChartTest.java index a673fd1d..3afae0af 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/chart/PieChartTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/chart/PieChartTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,7 +25,7 @@ package javafx.scene.control.test.chart; import client.test.ScreenshotCheck; -import client.test.Smoke; + import javafx.scene.control.test.chart.PieChartApp.Pages; import javafx.scene.control.test.chart.PieChartApp.PieChartCSS; import org.junit.BeforeClass; @@ -55,7 +55,7 @@ public void labelLineLengthTest() throws InterruptedException { * Test for PieChart setLabelsVisible API */ @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void labelsVisibleTest() throws InterruptedException { testCommon(Pages.LabelsVisible.name(), null, true, true, PieChartApp.BOOL.length); @@ -128,7 +128,7 @@ public void cssLabelLineLength() throws InterruptedException { * Test for -fx-start-angle CSS */ @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void cssStartAngle() throws InterruptedException { testCommon(PieChartCSS.CSSStartAngle.name(), null, true, true, PieChartApp.START_ANGLE_S.length); diff --git a/functional/ControlsTests/test/javafx/scene/control/test/chart/StackedBarChartTest.java b/functional/ControlsTests/test/javafx/scene/control/test/chart/StackedBarChartTest.java index 2838f435..211c317d 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/chart/StackedBarChartTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/chart/StackedBarChartTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,7 +25,7 @@ package javafx.scene.control.test.chart; import client.test.ScreenshotCheck; -import client.test.Smoke; + import javafx.scene.control.test.chart.StackedBarChartApp.Pages; import org.junit.BeforeClass; import org.junit.Test; @@ -45,7 +45,7 @@ public static void runUI() { * Test for BarChart setCategoryGap API */ @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void categoryGapTest() throws InterruptedException { testCommon(Pages.CategoryGap.name(), null, true, true, StackedBarChartApp.GAP_STACKED.length); diff --git a/functional/ControlsTests/test/javafx/scene/control/test/chart/ValueAxisBase.java b/functional/ControlsTests/test/javafx/scene/control/test/chart/ValueAxisBase.java index 70e1fa76..68075532 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/chart/ValueAxisBase.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/chart/ValueAxisBase.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,7 +25,7 @@ package javafx.scene.control.test.chart; import client.test.ScreenshotCheck; -import client.test.Smoke; + import javafx.scene.control.test.chart.ValueAxisApp.Pages; import javafx.scene.control.test.chart.ValueAxisApp.ValueAxisCSS; import org.junit.Test; @@ -39,7 +39,7 @@ public class ValueAxisBase extends AxisBase { * Test for ValueAxis setLowerBound API */ @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void lowerBoundTest() throws InterruptedException { testCommon(Pages.LowerBound.name(), null, true, true, ValueAxisApp.BOUNDS.length); @@ -94,7 +94,7 @@ public void cssMinorTickLength() throws InterruptedException { * Test for ValueAxis -fx-minor-tick-count CSS */ @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void cssMinorTickCount() throws InterruptedException { testCommon(ValueAxisCSS.CSSMinorTickCount.name(), null, true, true, ValueAxisApp.LENGTH.length); @@ -108,4 +108,4 @@ public void cssMinorTickCount() throws InterruptedException { public void cssMinorTickVisible() throws InterruptedException { testCommon(ValueAxisCSS.CSSMinorTickVisible.name(), null, true, true, ValueAxisApp.BOOL.length); } -} \ No newline at end of file +} diff --git a/functional/ControlsTests/test/javafx/scene/control/test/chart/XYChartBase.java b/functional/ControlsTests/test/javafx/scene/control/test/chart/XYChartBase.java index 683aae22..a14c9a2a 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/chart/XYChartBase.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/chart/XYChartBase.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,7 +25,7 @@ package javafx.scene.control.test.chart; import client.test.ScreenshotCheck; -import client.test.Smoke; + import javafx.scene.control.test.chart.XYChartBaseApp.Pages; import javafx.scene.control.test.chart.XYChartBaseApp.XYChartCSS; import org.junit.Test; @@ -109,7 +109,7 @@ public void verticalZeroLineVisible() throws InterruptedException { * Test for XYChart adding series */ @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void addSeriesTest() throws InterruptedException { testCommon(Pages.AddSeries.name(), null, true, true, XYChartBaseApp.BOOL.length); @@ -137,7 +137,7 @@ public void changeSeriesDataTest() throws InterruptedException { * Test for XYChart adding series */ @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void removeSeriesTest() throws InterruptedException { testCommon(Pages.RemoveSeries.name(), null, true, true, XYChartBaseApp.BOOL.length); @@ -147,7 +147,7 @@ public void removeSeriesTest() throws InterruptedException { * Test for XYChart adding series data */ @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void removeSeriesDataTest() throws InterruptedException { testCommon(Pages.RemoveSeriesData.name(), null, true, true, XYChartBaseApp.BOOL.length); diff --git a/functional/ControlsTests/test/javafx/scene/control/test/choicebox/ChoiceTest.java b/functional/ControlsTests/test/javafx/scene/control/test/choicebox/ChoiceTest.java index b97c3c61..fed5c1ac 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/choicebox/ChoiceTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/choicebox/ChoiceTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,7 +25,7 @@ package javafx.scene.control.test.choicebox; import client.test.ScreenshotCheck; -import client.test.Smoke; + import com.sun.javafx.scene.control.LabeledText; import javafx.collections.ObservableList; import javafx.commons.SortValidator; @@ -138,7 +138,7 @@ public void setUp() { } @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void initialState() throws InterruptedException { ScreenshotUtils.checkScreenshot("ChoiceBox-initialState", testPane); @@ -208,7 +208,7 @@ public void add() throws InterruptedException { ScreenshotUtils.checkScreenshot("ChoiceBox-add", testPane); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void keyboardCapture() throws InterruptedException { //RT-12597 choice.mouse().click(); @@ -228,7 +228,7 @@ public void clear() throws InterruptedException { ScreenshotUtils.checkScreenshot("ChoiceBox-clear", testPane); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void converter() throws InterruptedException { choice.as(Selectable.class).selector().select("1"); @@ -258,7 +258,7 @@ public Integer reached() { * to the underlying data collection * the cells are rendered in the right order. */ - @Smoke + //TODO@Smoke @Test(timeout=30000) public void renderingAfterSortingTest() { final int ITEMS_COUNT = 10; diff --git a/functional/ControlsTests/test/javafx/scene/control/test/colorpicker/ColorPickerTest.java b/functional/ControlsTests/test/javafx/scene/control/test/colorpicker/ColorPickerTest.java index dca32dc3..c5b3af41 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/colorpicker/ColorPickerTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/colorpicker/ColorPickerTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,7 +25,7 @@ package javafx.scene.control.test.colorpicker; import client.test.ScreenshotCheck; -import client.test.Smoke; + import com.oracle.jdk.sqe.cc.markup.Covers; import java.util.ArrayList; import java.util.Collections; @@ -67,7 +67,7 @@ public class ColorPickerTest extends TestBase { @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void initialControlAppearanceTest() throws Throwable { checkScreenshot("ColorPicker-InitialAppearance", testedControl); @@ -75,7 +75,7 @@ public void initialControlAppearanceTest() throws Throwable { } @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void initialPopupAppearanceTest() throws Throwable { setPropertyBySlider(SettingType.SETTER, Properties.translatex, 10); @@ -92,7 +92,7 @@ public void initialPopupAppearanceTest() throws Throwable { } @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void initialCustomColorPopupWindowAppearanceTest() throws Throwable { setJemmyComparatorByDistance(0.005f); @@ -104,7 +104,7 @@ public void initialCustomColorPopupWindowAppearanceTest() throws Throwable { } @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) /* * This test checks visual appearance of RGB tab in custom color popup (with @@ -124,7 +124,7 @@ public void initialCustomColorPopupWindowRGBTabAppearanceTest() throws Throwable } @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) /* * This test appears like previous one, to check visual appearance of tab, @@ -155,19 +155,19 @@ public void appearanceWhenResizedTest() throws InterruptedException, Throwable { throwScreenshotError(); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void choseColorFromPopupTest() throws InterruptedException { checkAllColorsOnChosability(initialColorsAmountInPopup); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void checkColorAmountTest() throws InterruptedException { checkColorAmountInPopup(initialColorsAmountInPopup); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void popupAppearancePoliticsTest() throws InterruptedException { assertFalse(isPopupVisible()); @@ -212,7 +212,7 @@ public void popupAppearancePoliticsTest() throws InterruptedException { assertFalse(isPopupVisible()); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void customColorAddingTest() throws InterruptedException { int colorNumberToAdd = 26; @@ -223,7 +223,7 @@ public void customColorAddingTest() throws InterruptedException { } @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void popupAppearanceAfterCustomColorsAddingTest() throws InterruptedException, Throwable { setJemmyComparatorByDistance(0.001f); @@ -235,7 +235,7 @@ public void popupAppearanceAfterCustomColorsAddingTest() throws InterruptedExcep throwScreenshotError(); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void currentColorInCustomColorPopupTest() throws InterruptedException { clickControl(); @@ -254,7 +254,7 @@ public void currentColorInCustomColorPopupTest() throws InterruptedException { assertTrue(getFill(rect).equals(getCurrentColorValue())); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void newColorInCustomColorPopupTest() throws InterruptedException { selectColorFromRainbowPallete(0.5); @@ -277,7 +277,7 @@ public void newColorInCustomColorPopupTest() throws InterruptedException { closeCustomColorPopupModalWindow(); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void initialStateOfCurrentAndNewColor() throws InterruptedException { selectColorFromRainbowPallete(0.5); @@ -289,7 +289,7 @@ public void initialStateOfCurrentAndNewColor() throws InterruptedException { closeCustomColorPopupModalWindow(); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void correctCirclePositionOnSettingCustomColor() throws InterruptedException { clickControl(); @@ -305,7 +305,7 @@ public void correctCirclePositionOnSettingCustomColor() throws InterruptedExcept assertTrue(colorDistance(getColorUnderCircle(), javafx.scene.paint.Color.web("#eeaaee", 1.0)) < 10); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void gradientsCorrectnessTest() throws InterruptedException { clickControl(); @@ -318,7 +318,7 @@ public void gradientsCorrectnessTest() throws InterruptedException { closeCustomColorPopupModalWindow(); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void correctColorPropagatingFromInitialTest() throws InterruptedException { clickControl(); @@ -337,7 +337,7 @@ public void correctColorPropagatingFromInitialTest() throws InterruptedException closeCustomColorPopupModalWindow(); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void correctColorPropagatingFromRainbowTest() throws InterruptedException { Color initialColor = getCurrentColorValue(); @@ -359,7 +359,7 @@ public void correctColorPropagatingFromRainbowTest() throws InterruptedException closeCustomColorPopupModalWindow(); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void correctColorPropagatingFromSquareTest() throws InterruptedException { Color initialColor = getCurrentColorValue(); @@ -382,7 +382,7 @@ public void correctColorPropagatingFromSquareTest() throws InterruptedException closeCustomColorPopupModalWindow(); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void correctColorPropagatingFromRGBTest() throws InterruptedException { Color initialColor = getCurrentColorValue(); @@ -406,7 +406,7 @@ public void correctColorPropagatingFromRGBTest() throws InterruptedException { closeCustomColorPopupModalWindow(); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void correctColorPropagatingFromHSBTest() throws InterruptedException { Color initialColor = getCurrentColorValue(); @@ -430,7 +430,7 @@ public void correctColorPropagatingFromHSBTest() throws InterruptedException { closeCustomColorPopupModalWindow(); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void correctColorPropagatingFromWebTest() throws InterruptedException { Color initialColor = getCurrentColorValue(); @@ -452,7 +452,7 @@ public void correctColorPropagatingFromWebTest() throws InterruptedException { closeCustomColorPopupModalWindow(); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void colorSavingTest() throws InterruptedException { Color oldColor = getCurrentColorValue(); @@ -476,7 +476,7 @@ public void colorSavingTest() throws InterruptedException { assertTrue(colorDistance(newColor, oldColor) > 1);//Not equals } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void colorUsingTest() throws InterruptedException { Color oldColor = getCurrentColorValue(); @@ -500,13 +500,13 @@ public void colorUsingTest() throws InterruptedException { assertTrue(colorDistance(newColor, oldColor) > 1); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void cancelCustomColorChosingTest() throws InterruptedException { standartCustomColorChosingPopupDismissTest(); } - @Smoke + //TODO@Smoke @Test(timeout = 900000) public void keyboardArrowHorizontalNavigationInPopupTest() throws InterruptedException { addCustomColors(10, 0.21); @@ -532,7 +532,7 @@ public void keyboardArrowHorizontalNavigationInPopupTest() throws InterruptedExc } } - @Smoke + //TODO@Smoke @Test(timeout = 900000) public void keyboardArrowVerticalNavigationInPopupTest() throws InterruptedException { addCustomColors(10, 0.21); @@ -584,7 +584,7 @@ public void keyboardTabShiftTabInPopupTest() { } @Test(timeout = 300000) - @Smoke + //TODO@Smoke /* * When custom color is added into pallete popup, it can be removed, by * clicking on it with right mouse button, and chosing remove action from @@ -635,7 +635,7 @@ public void keyboardDeleteInPopupTest() { } @Test(timeout = 300000) - @Smoke + //TODO@Smoke /* * Space in pallete popup can be used, for clicking on link to custom color * dialog. But this link should be focused. But in cannot be focused (now, @@ -656,7 +656,7 @@ public void keyboardSpaceInPopupTest() throws InterruptedException { } @Test(timeout = 600000) - @Smoke + //TODO@Smoke /* * You can select color from palete popup, using enter key press, over the * focused color. So, add some amount of custom color, and select each of @@ -684,7 +684,7 @@ public void keyboardEnterInPopupTest() throws InterruptedException { } } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void keyboardEscInPopupTest() throws InterruptedException { showPopup(); @@ -699,7 +699,7 @@ public void keyboardArrowsInCustomColorDialogTest() { } @Test(timeout = 300000) - @Smoke + //TODO@Smoke /* * [A button is focused] Fire the action associated with the button. So, * open three times, custom color dialog, select some color, and request @@ -961,7 +961,7 @@ public void keyboardShiftTabNavigationInCustomColorDialogTest() throws Interrupt } @Test(timeout = 300000)//RT-24842 - @Smoke + //TODO@Smoke /* * Dismiss the dialog. Save the new color to the Custom Colors area in the * Color Palette. Close the Color Palette. Update the Color Chooser. Apply @@ -982,7 +982,7 @@ public void keyboardEnterInCustomColorDialogTest() throws InterruptedException { checkCurrentColorValue(Color.rgb(50, 50, 50)); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void keyboardEscInCustomColorDialogTest() throws InterruptedException { showPopup(); @@ -996,7 +996,7 @@ public void keyboardEscInCustomColorDialogTest() throws InterruptedException { standartCustomColorChosingPopupDismissTest(); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) @Covers(value = {"javafx.scene.control.ColorPicker.value.BEHAVIOR", "javafx.scene.control.ColorPicker.value.GET", "javafx.scene.control.ColorPicker.value.BIND", "javafx.scene.control.ColorPicker.value.DEFAULT", @@ -1014,7 +1014,7 @@ public void colorPropertyTest() { } } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void listOfCustomColorsPropertyTest() throws InterruptedException { addCustomColors(50, 0.936); @@ -1034,7 +1034,7 @@ public void opaciteColorTest() throws InterruptedException, Throwable { throwScreenshotError(); } - @Smoke + //TODO@Smoke @Test(timeout = 60000) public void renderingAfterSortingTest() throws InterruptedException { //colors in the hue ascending order @@ -1128,4 +1128,4 @@ protected void standartCustomColorChosingPopupDismissTest() throws InterruptedEx assertTrue(colorDistance(newColor, oldColor) < 1); } -} \ No newline at end of file +} diff --git a/functional/ControlsTests/test/javafx/scene/control/test/colorpicker/TestBase.java b/functional/ControlsTests/test/javafx/scene/control/test/colorpicker/TestBase.java index 339638cf..19fe22b8 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/colorpicker/TestBase.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/colorpicker/TestBase.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -55,6 +55,7 @@ import org.jemmy.fx.ByText; import org.jemmy.fx.ByWindowType; import org.jemmy.fx.Root; +import org.jemmy.input.glass.GlassInputFactory; import org.jemmy.interfaces.Focusable; import org.jemmy.interfaces.Keyboard; import org.jemmy.interfaces.Keyboard.KeyboardButtons; @@ -88,7 +89,6 @@ public class TestBase extends UtilTestFunctions { protected final int widthInColorGrid = 12; protected final int heightInColorGrid = 10; static public Object robotAwt; - static public com.sun.glass.ui.Robot robotGlass; protected final String SAVE_BUTTON_TEXT = "Save"; protected final String CANCEL_BUTTON_TEXT = "Cancel"; protected final String USE_BUTTON_TEXT = "Use"; @@ -1025,7 +1025,9 @@ public static Color getPixelColor(final double x, final double y) { return new GetAction<Color>() { @Override public void run(Object... os) throws Exception { - int pixelColor = robotGlass.getPixelColor((int) Math.round(x), (int) Math.round(y)); + //TODO + //int pixelColor = GlassInputFactory.getRobot().getPixelColor((int) Math.round(x), (int) Math.round(y)).; + int pixelColor = 0; int red = (pixelColor >> 16) & 0xFF; int green = (pixelColor >> 8) & 0xFF; int blue = pixelColor & 0xFF; @@ -1052,6 +1054,8 @@ protected Color getColorUnderSlider() throws InterruptedException { } public static void newRobot() { + //TODO + /* if (robotGlass == null) { robotGlass = new GetAction<com.sun.glass.ui.Robot>() { @Override @@ -1073,6 +1077,8 @@ public void run(Object... os) throws Exception { } } } + + */ } /** @@ -1199,4 +1205,4 @@ Lookup getCustomColorsLookup() throws InterruptedException { public boolean isEmbedded(){ return TestUtil.isEmbedded(); } -} \ No newline at end of file +} diff --git a/functional/ControlsTests/test/javafx/scene/control/test/combobox/ComboBoxTest.java b/functional/ControlsTests/test/javafx/scene/control/test/combobox/ComboBoxTest.java index 2feda05c..bca981fd 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/combobox/ComboBoxTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/combobox/ComboBoxTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,7 +25,7 @@ package javafx.scene.control.test.combobox; import client.test.ScreenshotCheck; -import client.test.Smoke; + import java.text.Format; import java.text.MessageFormat; import java.util.ArrayList; @@ -112,7 +112,7 @@ public void editablePropertyTest() throws Throwable { throwScreenshotError(); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void showingPropertyTest() throws InterruptedException { assertEquals((new ComboBox()).showingProperty().getValue(), false); @@ -146,7 +146,7 @@ private void checkButtonForPopupShowing(KeyboardButtons button, KeyboardModifier checkPopupShowing(true); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void armedTest() { assertEquals((new ComboBox()).armedProperty().getValue(), false); @@ -178,7 +178,7 @@ public void armedTest() { checkTextFieldText(Properties.armed, "false"); } - @Smoke + //TODO@Smoke @Test(timeout = 300000)//RT-18945 public void valuePropertyTest() throws InterruptedException { assertEquals((new ComboBox()).getValue(), null); @@ -292,7 +292,7 @@ public void emptyDropDownScreenshotTest() throws InterruptedException, Throwable throwScreenshotError(); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void converterPropertyTest() throws InterruptedException { assertNotSame((new ComboBox()).getConverter(), null); @@ -348,7 +348,7 @@ public void run(Object... os) throws Exception { checkSimpleListenerValue(Properties.selectedItem, element2); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void itemsPropertyTest() throws InterruptedException { assertNotSame((new ComboBox()).getItems(), null); @@ -403,7 +403,7 @@ public void run(Object... os) throws Exception { } } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void onActionPropertyTest() { assertTrue((new ComboBox()).getOnAction() == null); @@ -438,7 +438,7 @@ public void onActionPropertyTest() { checkCounterValue(ON_ACTION_EVENT_COUNTER_ID, 8); } - @Smoke + //TODO@Smoke @Test(timeout = 300000)//RT-19227 public void selectionTest() throws InterruptedException, Exception { final int number = 10; @@ -458,7 +458,7 @@ public void selectionTest() throws InterruptedException, Exception { } } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void selection2Test() throws InterruptedException, Exception { clickDropDownButton(); @@ -483,19 +483,19 @@ public void selection2Test() throws InterruptedException, Exception { } } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void keyboardF4Tests() throws Exception { popupShowingOnKeyPressCommonTest(KeyboardButtons.F4); } - @Smoke + //TODO@Smoke @Test(timeout = 300000)//RT-18176 public void keyboardAltUpTest() throws Exception { popupShowingOnKeyPressCommonTest(KeyboardButtons.UP, KeyboardModifiers.ALT_DOWN_MASK); } - @Smoke + //TODO@Smoke @Test(timeout = 300000)//RT-18176 public void keyboardAltDownTest() throws Exception { popupShowingOnKeyPressCommonTest(KeyboardButtons.DOWN, KeyboardModifiers.ALT_DOWN_MASK); @@ -522,7 +522,7 @@ private void popupShowingOnKeyPressCommonTest(KeyboardButtons button, KeyboardMo } } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void keyboardUpDownTest() throws InterruptedException { final int number = 10; @@ -554,7 +554,7 @@ public void keyboardUpDownTest() throws InterruptedException { } } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void keyboardPopupCloseTest() throws InterruptedException { //According to spec: [Active list is open] close the active list. @@ -580,19 +580,19 @@ public void keyboardPopupCloseTest() throws InterruptedException { } } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void onEscapeNotSelectingTest() throws InterruptedException { selectOnKeyboardCommonTest(KeyboardButtons.ESCAPE); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void onEnterSelectTest() throws InterruptedException { selectOnKeyboardCommonTest(KeyboardButtons.ENTER); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void onSpaceSelectTest() throws InterruptedException { selectOnKeyboardCommonTest(KeyboardButtons.SPACE); @@ -622,7 +622,7 @@ public void keyboardAnyKeyTest() { checkSimpleListenerValue(Properties.selectedItem, "bbb"); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void mouseTest() throws InterruptedException { @@ -668,7 +668,7 @@ public void mouseTest() throws InterruptedException { } @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000)//RT-19227 public void commonNonEditableTest() throws InterruptedException, Throwable { addElements(1, 2, 3, 4, 5, 6); @@ -696,7 +696,7 @@ public void commonNonEditableTest() throws InterruptedException, Throwable { } @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void commonEditableTest() throws InterruptedException, Throwable { setPropertyByToggleClick(SettingType.BIDIRECTIONAL, Properties.editable); @@ -745,7 +745,7 @@ public void initialAndFinalSizeTest() throws Throwable { throwScreenshotError(); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void consistentAndEmptySelectionTest() { //seems, the only way to do empty selection is using keyboard.UP. @@ -775,7 +775,7 @@ public void consistentAndEmptySelectionTest() { } } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void addElementsInDropDownTest() { addElements(0, 1, 2, 3, 4, 5, 6); @@ -790,7 +790,7 @@ public void addElementsInDropDownTest() { checkSelectionState(5, 3); } - @Smoke + //TODO@Smoke @Test(timeout = 300000)//RT-18944, RT-19227 public void removeElementsFromDropDownTest() { addElements(0, 1, 2, 3, 4, 5, 6); @@ -808,7 +808,7 @@ public void removeElementsFromDropDownTest() { checkTextFieldText(Properties.value, "null"); } - @Smoke + //TODO@Smoke @Test(timeout = 300000)//RT-18972 public void editingChangeModeText() { currentSettingOption = SettingOption.MANUAL;//That is needed because otherwise test fails @@ -869,35 +869,35 @@ public void customCellAPIApplying() throws Throwable { static private final String NEW_VALUE_1 = "new value 1"; static private final String NEW_VALUE_2 = "new value 2"; - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void testOnShowingEvent() throws Throwable { testEvents(new CheckFunctor.IdCounter("SET_ON_SHOWING_COUNTER"), new CheckFunctor.NullCounter()); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void testOnShownEvent() throws Throwable { testEvents(new CheckFunctor.IdCounter("SET_ON_SHOWN_COUNTER"), new CheckFunctor.NullCounter()); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void testOnHiding() throws Throwable { testEvents(new CheckFunctor.NullCounter(), new CheckFunctor.IdCounter("SET_ON_HIDING_COUNTER")); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void testOnHidden() throws Throwable { testEvents(new CheckFunctor.NullCounter(), new CheckFunctor.IdCounter("SET_ON_HIDEN_COUNTER")); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void testEventsSequence() throws Throwable { @@ -1137,7 +1137,7 @@ public void call(int counterVal) throws Throwable { * * @throws Throwable */ - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void testOnShowingByModifyingContent() throws Throwable { @@ -1182,7 +1182,7 @@ public void run(Object... os) throws Exception { /** * Test that not editable ComboBox's getEditor() method must return null */ - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void testNotEditableGetEditorMethod() { setPropertyByToggleClick(SettingType.UNIDIRECTIONAL, Properties.editable, false); @@ -1192,7 +1192,7 @@ public void testNotEditableGetEditorMethod() { /** * Test that text entered in TextField doesn't change ComboBox's value */ - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void testInputByEditorProperty() throws Throwable { addElements("1", "2", "3", "4"); @@ -1220,7 +1220,7 @@ public void testInputByEditorProperty() throws Throwable { * Test that TextField returned by getEditor() method remains the same after * changing editable property */ - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void testEditorProperty() throws Throwable { new PropertyTest.EditorPropertyTest(testedControl).test(); @@ -1231,7 +1231,7 @@ public void testEditorProperty() throws Throwable { * property * */ - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void testEditorPropertyParent() throws Throwable { new PropertyTest.EditorParentPropertyTest(testedControl).test(); @@ -1241,7 +1241,7 @@ public void testEditorPropertyParent() throws Throwable { * Test that text entered via TextField becomes ComboBox's value when * ComboBox looses focus */ - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void textEditorPropertyCommitOnFocusLost() throws Throwable { setPropertyByToggleClick(SettingType.UNIDIRECTIONAL, Properties.editable); @@ -1267,7 +1267,7 @@ public void textEditorPropertyCommitOnFocusLost() throws Throwable { * * http://javafx-jira.kenai.com/browse/RT-24528 */ - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void testCellRenderingHeight() throws Throwable { @@ -1416,7 +1416,7 @@ public void testCellRenderingWidth() throws Throwable { * This test checks that a custom string converter fromString() method is * called only once when some value is entered in the editable ComboBox */ - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void testStringConvertersFromStringMethod() throws InterruptedException { setPropertyBySlider(SettingType.SETTER, Properties.prefWidth, 150); @@ -1437,7 +1437,7 @@ public void testStringConvertersFromStringMethod() throws InterruptedException { * Tests format string converter and checks that transformation is performed * properly */ - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void testFormatStringConverter() throws InterruptedException { setPropertyBySlider(SettingType.SETTER, Properties.prefWidth, 150); @@ -1490,7 +1490,7 @@ public void run(Object... parameters) throws Exception { * Checks that when the sorting is applied to the underlying data collection * the cells are rendered in the right order. */ - @Smoke + //TODO@Smoke @Test(timeout = 30000) public void renderingAfterSortingTest() { addElements("1", "2", "3", "4", "1", "2", "3", "4", "1", "42"); @@ -1555,7 +1555,7 @@ protected String getTextFromCell(ListCell cell) { * emptyness is shown in the popup. This test changes placeholder and * checks, that it is shown when popup is shown. */ - @Smoke + //TODO@Smoke @Test(timeout = 30000) public void emptyListDropDownPlaceholderTest() throws Throwable { placeholderTestLoop(true); diff --git a/functional/ControlsTests/test/javafx/scene/control/test/dialog/DialogTest.java b/functional/ControlsTests/test/javafx/scene/control/test/dialog/DialogTest.java index 47c16c28..f2138682 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/dialog/DialogTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/dialog/DialogTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,19 +25,17 @@ package javafx.scene.control.test.dialog; import com.sun.glass.ui.Application; -import com.sun.glass.ui.Robot; import javafx.scene.Node; import javafx.scene.Scene; import javafx.scene.control.Button; -import javafx.scene.control.ButtonBar; import javafx.scene.control.ButtonType; import javafx.scene.control.CheckBox; import javafx.scene.control.Hyperlink; import javafx.scene.control.TextField; import javafx.scene.control.ToggleButton; import javafx.scene.control.test.ControlsTestBase; -import javafx.scene.control.test.dialog.DialogApp; -import static javafx.scene.control.test.dialog.DialogApp.DialogScene.*; +import javafx.scene.input.MouseButton; +import javafx.scene.robot.Robot; import javafx.stage.StageStyle; import javafx.stage.Window; import org.jemmy.action.GetAction; @@ -48,6 +46,7 @@ import org.jemmy.fx.Root; import org.jemmy.fx.SceneDock; import org.jemmy.image.Image; +import org.jemmy.input.glass.GlassInputFactory; import org.jemmy.interfaces.Keyboard.KeyboardButtons; import org.jemmy.interfaces.Parent; import org.jemmy.resources.StringComparePolicy; @@ -60,6 +59,8 @@ import test.javaclient.shared.FilteredTestRunner; import test.javaclient.shared.TestUtil; import test.javaclient.shared.screenshots.GoldenImageManager; + +import static javafx.scene.control.test.dialog.DialogApp.DialogScene.*; /** * * @author Alexander Vorobyev @@ -87,7 +88,8 @@ public static enum InputType { @BeforeClass public static void setUpClass() throws Exception { DialogApp.main(null); - isRemote = (test.javaclient.shared.AppLauncher.getInstance().getMode() == test.javaclient.shared.AppLauncher.Mode.REMOTE); +// isRemote = (test.javaclient.shared.AppLauncher.getInstance().getMode() == test.javaclient.shared.AppLauncher.Mode.REMOTE); + isRemote = false; } @AfterClass @@ -576,11 +578,11 @@ protected void closeDialogWindowByClickingButton(String text) { protected void closeDialogWindowByClosingWindow() { Application.invokeAndWait(() -> { - final Robot robot = Application.GetApplication().createRobot(); + final Robot robot = GlassInputFactory.getRobot(); Wrap<? extends com.sun.glass.ui.Window> dialogWindow = Root.ROOT.lookup(new ByWindowType(Window.class)).lookup(Scene.class).wrap(0); robot.mouseMove(dialogWindow.getScreenBounds().x + dialogWindow.getScreenBounds().width - 2, dialogWindow.getScreenBounds().y - 20); - robot.mousePress(1); - robot.mouseRelease(1); + robot.mousePress(MouseButton.PRIMARY); + robot.mouseRelease(MouseButton.PRIMARY); }); } diff --git a/functional/ControlsTests/test/javafx/scene/control/test/fxcanvas/FXCanvasBrowserTest.java b/functional/ControlsTests/test/javafx/scene/control/test/fxcanvas/FXCanvasBrowserTest.java index 58639c79..cb1e846e 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/fxcanvas/FXCanvasBrowserTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/fxcanvas/FXCanvasBrowserTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,7 +26,7 @@ import client.test.Keywords; import client.test.ScreenshotCheck; -import client.test.Smoke; + import javafx.scene.Node; import javafx.scene.Scene; import javafx.scene.control.Label; @@ -44,13 +44,13 @@ import org.junit.BeforeClass; import org.junit.Test; import org.junit.runner.RunWith; -import org.netbeans.jemmy.JemmyProperties; import test.javaclient.shared.CanvasRunner; import test.javaclient.shared.screenshots.ScreenshotUtils; +//TODO @RunWith(CanvasRunner.class) public class FXCanvasBrowserTest extends ControlsTestBase { - +/* static final int LOADING_DELAY = 10000; static final int SEQUENTIAL_REFRESH_DELAY = 2000; @@ -75,7 +75,7 @@ public void tearDown() { } @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) @Keywords(keywords = "swt") public void browserTest() throws InterruptedException, Throwable { @@ -112,4 +112,6 @@ public void run(Object... os) throws Exception { ScreenshotUtils.checkScreenshot("FXCanvasBrowserTest", content, new Rectangle((int) content_bounds.getWidth() - 20, (int) content_bounds.getHeight() - 20)); throwScreenshotError(); } + + */ } diff --git a/functional/ControlsTests/test/javafx/scene/control/test/fxcanvas/FXCanvasScrollTest.java b/functional/ControlsTests/test/javafx/scene/control/test/fxcanvas/FXCanvasScrollTest.java index 0413aacf..6ddde23a 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/fxcanvas/FXCanvasScrollTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/fxcanvas/FXCanvasScrollTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,33 +24,13 @@ */ package javafx.scene.control.test.fxcanvas; -import client.test.Keywords; -import client.test.Smoke; -import javafx.embed.swt.FXCanvas; -import javafx.scene.Node; -import javafx.scene.Scene; import javafx.scene.control.test.ControlsTestBase; -import org.eclipse.swt.graphics.Rectangle; -import org.eclipse.swt.widgets.Shell; -import org.jemmy.Point; -import org.jemmy.control.Wrap; -import org.jemmy.fx.Root; -import org.jemmy.interfaces.Parent; -import org.jemmy.swt.Shells; -import org.junit.After; -import org.junit.AfterClass; -import static org.junit.Assert.*; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; import org.junit.runner.RunWith; -import org.netbeans.jemmy.JemmyProperties; import test.javaclient.shared.CanvasRunner; -import static test.javaclient.shared.JemmyUtils.initJemmy; @RunWith(CanvasRunner.class) public class FXCanvasScrollTest extends ControlsTestBase { - +/* final static int SHIFT = 100; static Wrap<? extends Scene> scene = null; static Parent<Node> parent = null; @@ -86,7 +66,7 @@ public void setUp() throws InterruptedException { public void tearDown() { } - @Smoke + //TODO@Smoke @Test(timeout = 300000) @Keywords(keywords = "swt") public void resizingTest() throws InterruptedException { @@ -128,4 +108,6 @@ public void run() { assertEquals(initial_scene_size.height, scene.getScreenBounds().height, 1); assertEquals(initial_scene_size.width, scene.getScreenBounds().width, 1); } -} \ No newline at end of file + + */ +} diff --git a/functional/ControlsTests/test/javafx/scene/control/test/fxcanvas/FXCanvasTest.java b/functional/ControlsTests/test/javafx/scene/control/test/fxcanvas/FXCanvasTest.java index 9325c913..709f03d1 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/fxcanvas/FXCanvasTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/fxcanvas/FXCanvasTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,20 +25,13 @@ package javafx.scene.control.test.fxcanvas; import client.test.Keywords; -import client.test.Smoke; + import client.test.ScreenshotCheck; import test.javaclient.shared.CanvasRunner; import org.junit.runner.RunWith; -import org.eclipse.swt.SWT; -import org.eclipse.swt.widgets.Event; -import org.jemmy.swt.Shells; -import org.jemmy.swt.lookup.QueueLookup; import org.jemmy.fx.ByID; -import org.eclipse.swt.graphics.Rectangle; import org.jemmy.Point; import javafx.embed.swt.FXCanvas; -import org.eclipse.swt.widgets.Scale; -import org.eclipse.swt.widgets.Shell; import org.jemmy.interfaces.Selector; import org.jemmy.action.GetAction; import org.jemmy.interfaces.Text; @@ -60,7 +53,6 @@ import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import org.netbeans.jemmy.JemmyProperties; import static java.lang.Math.*; import java.util.concurrent.atomic.AtomicInteger; import org.jemmy.timing.State; @@ -68,9 +60,10 @@ import static test.javaclient.shared.JemmyUtils.initJemmy; import test.javaclient.shared.screenshots.ScreenshotUtils; +//TODO @RunWith(CanvasRunner.class) public class FXCanvasTest extends ControlsTestBase { - +/* static Wrap<? extends Shell> frame; static Parent frameAsParent; static Wrap<? extends org.eclipse.swt.widgets.Button> menuBtn; @@ -108,7 +101,7 @@ public void tearDown() { } @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) @Keywords(keywords = "swt") public void heavyPopupTest() throws Throwable { @@ -122,7 +115,7 @@ public void menuPopupTest() throws Throwable { common(FXCanvasApp.MENU_POPUP_CONTAINER_ID, menuBtn, "SWTInteropTest-menu"); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) @Keywords(keywords = "swt") public void mainSceneTest() throws InterruptedException { @@ -151,7 +144,7 @@ public void run() { throwScreenshotError(); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) @Keywords(keywords = "swt") public void initialSizesTest() throws InterruptedException { @@ -203,7 +196,7 @@ public void run() { ScreenshotUtils.checkScreenshot("SWTInteropTest-resizing", contentPane); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) @Keywords(keywords = "swt") public void focusTest() throws InterruptedException { @@ -340,4 +333,6 @@ protected boolean doCheck(T t) { return t.getText().compareTo(text) == 0; } } + + */ } diff --git a/functional/ControlsTests/test/javafx/scene/control/test/jfxpanel/JFXPanelScrollTest.java b/functional/ControlsTests/test/javafx/scene/control/test/jfxpanel/JFXPanelScrollTest.java index f9e2adce..40d8a8e3 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/jfxpanel/JFXPanelScrollTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/jfxpanel/JFXPanelScrollTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,13 +26,12 @@ package javafx.scene.control.test.jfxpanel; import test.javaclient.shared.FilteredTestRunner; -import client.test.Smoke; + import org.junit.runner.RunWith; import java.awt.Component; import java.awt.Cursor; import java.util.concurrent.TimeUnit; import javafx.embed.swing.JFXPanel; -import org.netbeans.jemmy.operators.JComponentOperator; import org.jemmy.fx.ByID; import org.jemmy.Rectangle; import javafx.scene.Node; @@ -46,14 +45,13 @@ import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import org.netbeans.jemmy.ComponentChooser; -import org.netbeans.jemmy.JemmyProperties; -import org.netbeans.jemmy.operators.JFrameOperator; import static org.junit.Assert.*; import test.javaclient.shared.Utils; +//TODO @RunWith(FilteredTestRunner.class) public class JFXPanelScrollTest extends ControlsTestBase { + /* final static int SHIFT = 100; Wrap<? extends Scene> scene = null; @@ -96,7 +94,7 @@ public String getDescription() { public void tearDown() { } - @Smoke + //TODO@Smoke @Test(timeout=300000) public void resizingTest() throws InterruptedException { int right = frame.getWidth() - 1; @@ -166,4 +164,6 @@ private void moveMouseToTheRightBottomCorner() { } } } -} \ No newline at end of file + + */ +} diff --git a/functional/ControlsTests/test/javafx/scene/control/test/jfxpanel/JFXPanelTest.java b/functional/ControlsTests/test/javafx/scene/control/test/jfxpanel/JFXPanelTest.java index 30b06fe3..c109341a 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/jfxpanel/JFXPanelTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/jfxpanel/JFXPanelTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,55 +24,13 @@ */ package javafx.scene.control.test.jfxpanel; -import client.test.ScreenshotCheck; -import client.test.Smoke; -import org.jemmy.interfaces.Selector; -import org.netbeans.jemmy.operators.AbstractButtonOperator; -import org.jemmy.action.GetAction; -import java.awt.event.KeyEvent; -import org.jemmy.interfaces.Text; -import org.jemmy.fx.control.TextControlWrap; -import org.jemmy.fx.control.CheckBoxWrap; -import org.jemmy.interfaces.Selectable; -import org.netbeans.jemmy.operators.JToggleButtonOperator; -import org.netbeans.jemmy.operators.JButtonOperator; -import javafx.scene.control.CheckBox; -import java.awt.Component; -import javafx.embed.swing.JFXPanel; -import org.netbeans.jemmy.operators.JComponentOperator; -import org.jemmy.fx.ByID; -import javafx.scene.control.TextField; -import javafx.scene.control.Button; -import org.jemmy.Rectangle; -import javafx.scene.Node; -import javafx.scene.Scene; import javafx.scene.control.test.ControlsTestBase; -import org.jemmy.fx.Root; -import org.jemmy.control.Wrap; -import org.jemmy.interfaces.Parent; -import org.jemmy.lookup.LookupCriteria; -import org.junit.After; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; import org.junit.runner.RunWith; -import org.netbeans.jemmy.ComponentChooser; -import org.netbeans.jemmy.JemmyProperties; -import org.netbeans.jemmy.operators.JFrameOperator; -import org.netbeans.jemmy.operators.JSliderOperator; -import static java.lang.Math.*; -import javafx.application.Platform; -import org.jemmy.timing.State; -import static org.junit.Assert.*; -import org.netbeans.jemmy.QueueTool; import test.javaclient.shared.FilteredTestRunner; -import static test.javaclient.shared.JemmyUtils.initJemmy; -import test.javaclient.shared.Utils; -import test.javaclient.shared.screenshots.ScreenshotUtils; - +//TODO @RunWith(FilteredTestRunner.class) public class JFXPanelTest extends ControlsTestBase { - +/* static JFrameOperator frame; static JButtonOperator menuBtn; static JComponentOperator fxpanel; @@ -128,13 +86,13 @@ public void heavyPopupTest() throws Throwable { } @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void menuPopupTest() throws Throwable { common(JFXPanelApp.MENU_POPUP_CONTAINER_ID, menuBtn, "InteropTest-menu"); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void mainSceneTest() throws InterruptedException { checkScene(parent); @@ -149,7 +107,7 @@ public void transparencyTest() throws Throwable { throwScreenshotError(); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void initialSizesTest() throws InterruptedException { scene.waitState(new State() { @@ -184,9 +142,12 @@ public Object reached() { assertFalse(scene.getScreenBounds().getHeight() < button_rect.getHeight() + text_box_rect.getHeight()); } + */ + /** * Resizes JFXPanel via mouse. After resizing performs screenshot check */ + /* @ScreenshotCheck @Test(timeout = 300000) public void resizingTest() throws InterruptedException { @@ -246,7 +207,7 @@ public void run() { }); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void focusTest() throws InterruptedException { Wrap<? extends TextField> input = parent.lookup(TextField.class, new ByID<TextField>(JFXPanelApp.TEXT_INPUT_ID)).wrap(); @@ -340,4 +301,7 @@ protected void checkScene(Parent<Node> parent) { text.type(str); input.waitProperty(Wrap.TEXT_PROP_NAME, str); } + + */ + } diff --git a/functional/ControlsTests/test/javafx/scene/control/test/labeled/CheckBoxesTest.java b/functional/ControlsTests/test/javafx/scene/control/test/labeled/CheckBoxesTest.java index 1907cfb6..13bdf895 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/labeled/CheckBoxesTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/labeled/CheckBoxesTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,7 +25,7 @@ package javafx.scene.control.test.labeled; import client.test.ScreenshotCheck; -import client.test.Smoke; + import javafx.scene.control.test.labeleds.CheckBoxApp; import javafx.scene.control.test.labeleds.CheckBoxApp.Pages; import org.junit.BeforeClass; @@ -50,7 +50,7 @@ public class CheckBoxesTest extends ButtonsBase { * Test for specific API */ @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void buttonsTest() throws InterruptedException { testCommon(Pages.CheckBoxes.name(), null, true, true); @@ -78,4 +78,4 @@ protected String getEllipsingString() { } return CheckBoxApp.ELLIPSING_STRING_MODENA; } -} \ No newline at end of file +} diff --git a/functional/ControlsTests/test/javafx/scene/control/test/labeled/HyperliksTest.java b/functional/ControlsTests/test/javafx/scene/control/test/labeled/HyperliksTest.java index d3db31bd..eff90d3d 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/labeled/HyperliksTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/labeled/HyperliksTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,7 +25,7 @@ package javafx.scene.control.test.labeled; import client.test.ScreenshotCheck; -import client.test.Smoke; + import javafx.scene.Node; import javafx.scene.control.Hyperlink; import javafx.scene.control.test.labeleds.HyperlinkApp; @@ -59,7 +59,7 @@ public class HyperliksTest extends LabeledsBase { * Test for specific API */ @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void hyperlinkGettersTest() throws InterruptedException { testCommon(Pages.isVisited.name(), null, true, true); @@ -110,4 +110,4 @@ protected String getEllipsingString() { } return HyperlinkApp.ELLIPSING_STRING_MODENA; } -} \ No newline at end of file +} diff --git a/functional/ControlsTests/test/javafx/scene/control/test/labeled/LabeledsBase.java b/functional/ControlsTests/test/javafx/scene/control/test/labeled/LabeledsBase.java index 45ab7d95..e433647d 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/labeled/LabeledsBase.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/labeled/LabeledsBase.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,7 +25,7 @@ package javafx.scene.control.test.labeled; import client.test.ScreenshotCheck; -import client.test.Smoke; + import com.sun.javafx.scene.control.LabeledText; import javafx.collections.ObservableList; import javafx.geometry.Bounds; @@ -70,7 +70,7 @@ public void constructorsTest() throws InterruptedException { * Test for setText API */ @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void setTextTest() throws InterruptedException { testCommon(LabeledsPages.setText.name(), null, true, true); diff --git a/functional/ControlsTests/test/javafx/scene/control/test/labeled/LabelsTest.java b/functional/ControlsTests/test/javafx/scene/control/test/labeled/LabelsTest.java index b5a4c05d..38e88592 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/labeled/LabelsTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/labeled/LabelsTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,7 +25,7 @@ package javafx.scene.control.test.labeled; import client.test.ScreenshotCheck; -import client.test.Smoke; + import javafx.scene.control.test.labeleds.LabelsApp; import javafx.scene.control.test.labeleds.LabelsApp.Pages; import org.junit.BeforeClass; @@ -50,7 +50,7 @@ public class LabelsTest extends LabeledsBase { * Test for specific API */ @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void labelsTest() throws InterruptedException { testCommon(Pages.setTextFill.name(), null, true, true); @@ -71,4 +71,4 @@ protected String getName() { protected String getEllipsingString() { return LabelsApp.ELLIPSING_STRING; } -} \ No newline at end of file +} diff --git a/functional/ControlsTests/test/javafx/scene/control/test/labeled/RadioButtonsTest.java b/functional/ControlsTests/test/javafx/scene/control/test/labeled/RadioButtonsTest.java index b8d1e4a5..969c6676 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/labeled/RadioButtonsTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/labeled/RadioButtonsTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,7 +25,7 @@ package javafx.scene.control.test.labeled; import client.test.ScreenshotCheck; -import client.test.Smoke; + import javafx.scene.control.test.labeleds.RadioButtonsApp; import javafx.scene.control.test.labeleds.ToggleButtonsApp.Pages; import org.junit.BeforeClass; @@ -50,7 +50,7 @@ public class RadioButtonsTest extends ButtonsBase { * Test for specific API */ @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void buttonsTest() throws InterruptedException { testCommon(Pages.setSelected.name(), null, true, true); @@ -78,4 +78,4 @@ protected String getEllipsingString() { } return RadioButtonsApp.ELLIPSING_STRING_MODENA; } -} \ No newline at end of file +} diff --git a/functional/ControlsTests/test/javafx/scene/control/test/labeled/ToggleButtonsTest.java b/functional/ControlsTests/test/javafx/scene/control/test/labeled/ToggleButtonsTest.java index 624d0bfb..378c2e4e 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/labeled/ToggleButtonsTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/labeled/ToggleButtonsTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,7 +25,7 @@ package javafx.scene.control.test.labeled; import client.test.ScreenshotCheck; -import client.test.Smoke; + import javafx.scene.control.test.labeleds.ToggleButtonsApp; import javafx.scene.control.test.labeleds.ToggleButtonsApp.Pages; import org.junit.BeforeClass; @@ -50,7 +50,7 @@ public class ToggleButtonsTest extends ButtonsBase { * Test for specific API */ @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void buttonsTest() throws InterruptedException { testCommon(Pages.setSelected.name(), null, true, true); @@ -77,4 +77,4 @@ protected String getEllipsingString() { } return ToggleButtonsApp.ELLIPSING_STRING_MODENA; } -} \ No newline at end of file +} diff --git a/functional/ControlsTests/test/javafx/scene/control/test/manual/ChooserManual.java b/functional/ControlsTests/test/javafx/scene/control/test/manual/ChooserManual.java index f086c8fe..f7aff590 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/manual/ChooserManual.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/manual/ChooserManual.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,7 +26,7 @@ import client.test.Keywords; import client.test.RunUI; -import client.test.StopUI; +//import client.test.StopUI; import javafx.scene.control.test.chooser.AWTChooser; import javafx.scene.control.test.chooser.FXChooser; @@ -55,8 +55,8 @@ public static void startSecondJVM(Class<? extends Object> clazz, boolean redirec process = processBuilder.start(); } - @StopUI + //TODO@StopUI public static void stopUI(){ process.destroy(); } -} \ No newline at end of file +} diff --git a/functional/ControlsTests/test/javafx/scene/control/test/manual/MenuBarChildStage.java b/functional/ControlsTests/test/javafx/scene/control/test/manual/MenuBarChildStage.java index 7a780b68..6d74dbc3 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/manual/MenuBarChildStage.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/manual/MenuBarChildStage.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,14 +24,13 @@ */ package javafx.scene.control.test.manual; -import client.test.OnlyPlatformType; -import client.test.Platforms; + import client.test.RunUI; /** * @author Dmitry Zinkevich */ -@OnlyPlatformType(Platforms.MAC) +//TODO//TODO@OnlyPlatformType(Platforms.MAC) public class MenuBarChildStage { @RunUI diff --git a/functional/ControlsTests/test/javafx/scene/control/test/manual/MenuBarTwoInstancesAtOneStage.java b/functional/ControlsTests/test/javafx/scene/control/test/manual/MenuBarTwoInstancesAtOneStage.java index 384d9e4e..2722aaf7 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/manual/MenuBarTwoInstancesAtOneStage.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/manual/MenuBarTwoInstancesAtOneStage.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,14 +24,13 @@ */ package javafx.scene.control.test.manual; -import client.test.OnlyPlatformType; -import client.test.Platforms; + import client.test.RunUI; /** * @author Dmitry Zinkevich */ -@OnlyPlatformType(Platforms.MAC) +//TODO@OnlyPlatformType(Platforms.MAC) public class MenuBarTwoInstancesAtOneStage { @RunUI diff --git a/functional/ControlsTests/test/javafx/scene/control/test/manual/MenuBarTwoStages.java b/functional/ControlsTests/test/javafx/scene/control/test/manual/MenuBarTwoStages.java index 12071fd3..402ac59e 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/manual/MenuBarTwoStages.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/manual/MenuBarTwoStages.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,18 +24,18 @@ */ package javafx.scene.control.test.manual; -import client.test.OnlyPlatformType; -import client.test.Platforms; + + import client.test.RunUI; /* * @author Dmitry Zinkevich */ -@OnlyPlatformType(Platforms.MAC) +//TODO@OnlyPlatformType(Platforms.MAC) public class MenuBarTwoStages { @RunUI static public void runUI() { MenuBarAppManual.main(new String[] {"useTwoMenuBars"}); } -} \ No newline at end of file +} diff --git a/functional/ControlsTests/test/javafx/scene/control/test/mix/AccordionTest.java b/functional/ControlsTests/test/javafx/scene/control/test/mix/AccordionTest.java index 650debce..4e25e3ee 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/mix/AccordionTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/mix/AccordionTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,7 +25,7 @@ package javafx.scene.control.test.mix; import client.test.ScreenshotCheck; -import client.test.Smoke; + import java.util.Comparator; import javafx.collections.FXCollections; import javafx.collections.ObservableList; @@ -66,7 +66,7 @@ public static void runUI() { * Test for Accordion setExpandedPane API */ @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void expandedPaneTest() throws InterruptedException { testCommon(Pages.ExpandedPane.name()); @@ -104,7 +104,7 @@ public void userInputTest() throws Throwable { * Adds titled panes to the accordion in reverse order, sorts them and * checks that rendering works correctly. */ - @Smoke + //TODO@Smoke @Test(timeout = 30000) public void renderingAfterSortingTest() { @@ -186,4 +186,4 @@ public void run(Object... parameters) throws Exception { } static final int ANIMATION_DELAY = 1000; -} \ No newline at end of file +} diff --git a/functional/ControlsTests/test/javafx/scene/control/test/mix/ButtonsTest.java b/functional/ControlsTests/test/javafx/scene/control/test/mix/ButtonsTest.java index 0b4cf624..231e3308 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/mix/ButtonsTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/mix/ButtonsTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,14 +24,13 @@ */ package javafx.scene.control.test.mix; -import client.test.Smoke; + import com.oracle.jdk.sqe.cc.markup.Covers; import com.oracle.jdk.sqe.cc.markup.Covers.Level; import javafx.scene.Node; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.scene.control.test.Buttons; -import static javafx.scene.control.test.Buttons.ButtonsScene.*; import javafx.scene.control.test.ControlsTestBase; import javafx.scene.text.Text; import org.jemmy.action.GetAction; @@ -43,7 +42,6 @@ import org.jemmy.interfaces.Parent; import org.junit.After; import org.junit.AfterClass; -import static org.junit.Assert.*; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; @@ -52,6 +50,9 @@ import test.javaclient.shared.TestUtil; import test.javaclient.shared.Utils; +import static javafx.scene.control.test.Buttons.ButtonsScene.*; +import static org.junit.Assert.*; + /** * * @author shura @@ -75,7 +76,8 @@ public static enum InputType { @BeforeClass public static void setUpClass() throws Exception { Buttons.main(null); - isRemote = (test.javaclient.shared.AppLauncher.getInstance().getMode() == test.javaclient.shared.AppLauncher.Mode.REMOTE); + //isRemote = (test.javaclient.shared.AppLauncher.getInstance().getMode() == test.javaclient.shared.AppLauncher.Mode.REMOTE); + isRemote = false; } @AfterClass @@ -97,7 +99,7 @@ public void tearDown() { } - @Smoke + //TODO@Smoke @Test(timeout = 300000) @Covers(value = {"javafx.scene.control.Button.cancelButton.GET", "javafx.scene.control.Button.cancelButton.SET", "javafx.scene.control.Button.cancelButton.BIND", "javafx.scene.control.Button.cancelButton.DEFAULT"}, level = Level.FULL) public void cancelButtonTest() throws InterruptedException { @@ -150,7 +152,7 @@ public void run(Object... os) throws Exception { }.dispatch(Root.ROOT.getEnvironment())); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) @Covers(value = {"javafx.scene.control.Button.defaultButton.GET", "javafx.scene.control.Button.defaultButton.SET", "javafx.scene.control.Button.defaultButton.BIND", "javafx.scene.control.Button.defaultButton.DEFAULT"}, level = Level.FULL) public void defaultButtonTest() throws InterruptedException { @@ -204,13 +206,13 @@ public void run(Object... os) throws Exception { }.dispatch(Root.ROOT.getEnvironment())); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void bindingTestMouse() throws InterruptedException { binding(InputType.MOUSE); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void bindingTestKeyboard() throws InterruptedException { if (!isRemote) { @@ -225,7 +227,7 @@ public void bindingTestKeyboard() throws InterruptedException { } } - @Smoke + //TODO@Smoke @Covers(value = {"javafx.scene.control.Button.text.GET", "javafx.scene.control.Button.text.SET", "javafx.scene.control.Button.text.BIND", "javafx.scene.control.Button.text.DEFAULT"}, level = Level.FULL) public void binding(InputType ctrl) throws InterruptedException { String template = "pressed: "; @@ -236,13 +238,13 @@ public void binding(InputType ctrl) throws InterruptedException { } } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void buttonsTestMouse() throws InterruptedException { buttons(InputType.MOUSE); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void buttonsTestKeyboard() throws InterruptedException { if (!isRemote) { diff --git a/functional/ControlsTests/test/javafx/scene/control/test/mix/ChecksTest.java b/functional/ControlsTests/test/javafx/scene/control/test/mix/ChecksTest.java index cfc3dc67..6865e509 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/mix/ChecksTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/mix/ChecksTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,14 +24,13 @@ */ package javafx.scene.control.test.mix; -import client.test.Smoke; + import com.oracle.jdk.sqe.cc.markup.Covers; import com.oracle.jdk.sqe.cc.markup.Covers.Level; import javafx.scene.Node; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.scene.control.CheckBox; -import static javafx.scene.control.test.Buttons.ButtonsScene.*; import javafx.scene.control.test.Checks; import javafx.scene.control.test.ControlsTestBase; import javafx.scene.text.Text; @@ -46,14 +45,16 @@ import org.jemmy.interfaces.Parent; import org.junit.After; import org.junit.AfterClass; -import static org.junit.Assert.*; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; import org.junit.runner.RunWith; import test.javaclient.shared.FilteredTestRunner; import test.javaclient.shared.TestUtil; -import test.javaclient.shared.Utils; + +import static javafx.scene.control.test.Buttons.ButtonsScene.*; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; /** * @@ -77,7 +78,8 @@ public static enum ControlType { @BeforeClass public static void setUpClass() throws Exception { Checks.main(null); - isRemote = (test.javaclient.shared.AppLauncher.getInstance().getMode() == test.javaclient.shared.AppLauncher.Mode.REMOTE); +// isRemote = (test.javaclient.shared.AppLauncher.getInstance().getMode() == test.javaclient.shared.AppLauncher.Mode.REMOTE); + isRemote = false; } @AfterClass @@ -98,14 +100,14 @@ public void tearDown() { clear.mouse().click(); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void mouse() throws InterruptedException { final boolean changeExpected = true; checks(ControlType.MOUSE, changeExpected); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void keyboard() throws InterruptedException { if (!isRemote) { @@ -119,7 +121,7 @@ public void keyboard() throws InterruptedException { /* * Checks that when Enter is pressed the control will not change it's state. */ - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void keyboardNotReacting() throws InterruptedException { if (!isRemote) { @@ -130,7 +132,7 @@ public void keyboardNotReacting() throws InterruptedException { } } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void initialState() throws InterruptedException { final Wrap<? extends CheckBox> twsb = parent.lookup(CheckBox.class, new ByText<CheckBox>(TWO_STATE_CB)).wrap(); diff --git a/functional/ControlsTests/test/javafx/scene/control/test/mix/MenuBarTest.java b/functional/ControlsTests/test/javafx/scene/control/test/mix/MenuBarTest.java index 1a87b15e..8dc9866b 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/mix/MenuBarTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/mix/MenuBarTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,7 +25,7 @@ package javafx.scene.control.test.mix; import client.test.ScreenshotCheck; -import client.test.Smoke; + import java.util.Comparator; import javafx.collections.FXCollections; import javafx.collections.ObservableList; @@ -97,7 +97,7 @@ public void initialStateTest() throws InterruptedException { } @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void clearTest() throws InterruptedException { menuAsStringMenuOwner.select(MenuBarApp.MENU_STR + "0"); @@ -107,7 +107,7 @@ public void clearTest() throws InterruptedException { } @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void addItemsTest() throws InterruptedException { clearBtn.mouse().click(); @@ -157,7 +157,7 @@ public void keyboardHoverTest() throws Throwable { keyboardHoverCycle(); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void requestingFocusTest() throws Throwable { if (Utils.isMacOS()) { @@ -169,7 +169,7 @@ public void requestingFocusTest() throws Throwable { checkFocus(KeyboardButtons.ALT); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void rt18356Test() throws InterruptedException { menuAsStringMenuOwner.push(MenuBarApp.MENU_STR + "0"); @@ -187,7 +187,7 @@ public Integer reached() { * Adds menu items to the menu bar in reverse order, * sorts them and checks that rendering works correctly. */ - @Smoke + //TODO@Smoke @Test(timeout = 30000) public void renderingAfterSortingTest() { @@ -290,4 +290,4 @@ protected boolean isShown() { protected void checkShown(boolean shown) { throw new UnsupportedOperationException("Not supported yet."); } -} \ No newline at end of file +} diff --git a/functional/ControlsTests/test/javafx/scene/control/test/mix/MenuButtonTest.java b/functional/ControlsTests/test/javafx/scene/control/test/mix/MenuButtonTest.java index 0142b2a7..6bb4c6a0 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/mix/MenuButtonTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/mix/MenuButtonTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,7 +25,7 @@ package javafx.scene.control.test.mix; import client.test.ScreenshotCheck; -import client.test.Smoke; + import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; @@ -145,7 +145,7 @@ public void apiTest() throws Throwable { } @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void addTest() throws InterruptedException { Thread.sleep(300); @@ -154,7 +154,7 @@ public void addTest() throws InterruptedException { } @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void insertTest() throws InterruptedException { addPosBtn.mouse().click(); @@ -197,7 +197,7 @@ public void mouseHoverTest() throws Throwable { hoverCycle(); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void keyboardSelectionTest() throws InterruptedException { focus(); @@ -212,7 +212,7 @@ public void keyboardHoverTest() throws Throwable { keyboardHoverCycle(activationBtn, true); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void keyboardDropTest() throws Throwable { focus(); @@ -299,4 +299,4 @@ public Object reached() { } }); } -} \ No newline at end of file +} diff --git a/functional/ControlsTests/test/javafx/scene/control/test/mix/MenuItemTest.java b/functional/ControlsTests/test/javafx/scene/control/test/mix/MenuItemTest.java index 479207d8..fed42489 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/mix/MenuItemTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/mix/MenuItemTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,7 +25,7 @@ package javafx.scene.control.test.mix; import client.test.ScreenshotCheck; -import client.test.Smoke; + import com.oracle.jdk.sqe.cc.markup.Covers; import com.oracle.jdk.sqe.cc.markup.Covers.Level; import javafx.scene.Node; @@ -117,7 +117,7 @@ public void tearDown() { } @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void constructorsTest() throws InterruptedException { menuBarLookup.lookup(new MenuByText(MenuItemApp.CONSTRUCTORS_ID)).wrap().mouse().click(); @@ -171,34 +171,34 @@ public void visibleTest() throws Throwable { } @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void simpleTest() throws Throwable { checkCycle(MenuItemApp.SIMPLE_ID); } @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void radioTest() throws Throwable { checkCycle(MenuItemApp.RADIO_ID); } @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void checkTest() throws Throwable { checkCycle(MenuItemApp.CHECK_ID); } @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void nodeTest() throws Throwable { checkCycle(MenuItemApp.NODE_ID); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void shortcutsTest() throws InterruptedException { menuBarAsParent.lookup(new MenuByText(MenuItemApp.MIXED_ID)).wrap().mouse().click(); @@ -218,7 +218,7 @@ public void shortcutsTest() throws InterruptedException { lastSelected.waitProperty(Wrap.TEXT_PROP_NAME, MenuItemApp.NODE_MENU_ITEM_BOOL_ID); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void radioGroupTest() throws InterruptedException { Wrap<? extends Menu> menu = menuBarAsParent.lookup(new MenuByText(MenuItemApp.RADIO_ID)).wrap(); @@ -245,7 +245,7 @@ public void run(Object... parameters) { } } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void radioSizingTest() throws Throwable { Wrap<? extends Menu> menu = menuBarAsParent.lookup(new MenuByText(MenuItemApp.RADIO_ID)).wrap(); @@ -399,4 +399,4 @@ public boolean check(MenuItem item) { return this.item.equals(item); } } -} \ No newline at end of file +} diff --git a/functional/ControlsTests/test/javafx/scene/control/test/mix/MenuTest.java b/functional/ControlsTests/test/javafx/scene/control/test/mix/MenuTest.java index 9554df01..3bfe7eb5 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/mix/MenuTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/mix/MenuTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,7 +25,7 @@ package javafx.scene.control.test.mix; import client.test.ScreenshotCheck; -import client.test.Smoke; + import com.oracle.jdk.sqe.cc.markup.Covers; import com.oracle.jdk.sqe.cc.markup.Covers.Level; import javafx.scene.Node; @@ -113,7 +113,7 @@ public void emptyTest() throws InterruptedException { } @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) @Covers(value = {"javafx.scene.control.MenuItem.onHidden.GET", "javafx.scene.control.MenuItem.onHidden.SET", "javafx.scene.control.MenuItem.onHidden.BIND", "javafx.scene.control.MenuItem.onHiding.GET", "javafx.scene.control.MenuItem.onHiding.SET", "javafx.scene.control.MenuItem.onHiding.BIND"}, level = Level.FULL) public void apiTest() throws InterruptedException { @@ -140,7 +140,7 @@ public void addTest() throws InterruptedException { } @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void insertTest() throws InterruptedException { addPosBtn.mouse().click(); @@ -177,13 +177,13 @@ public void dropTest() throws InterruptedException { ScreenshotUtils.checkScreenshot("MenuTest-drop-outside", contentPane); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void mouseSelectionTest() throws InterruptedException { selectionCheck(); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void keyboardSelectionTest() throws InterruptedException { focus(); @@ -207,7 +207,7 @@ public void keyboardHoverTest() throws Throwable { keyboardHoverCycle(KeyboardButtons.DOWN, true); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void handlersSettersTest() throws Throwable { Wrap error = sceneAsParent.lookup(Label.class, new ByID<Label>(MenuApp.ERROR_ID)).wrap(); diff --git a/functional/ControlsTests/test/javafx/scene/control/test/mix/PopupMenuTest.java b/functional/ControlsTests/test/javafx/scene/control/test/mix/PopupMenuTest.java index ba383a63..f2b14474 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/mix/PopupMenuTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/mix/PopupMenuTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,7 +25,7 @@ package javafx.scene.control.test.mix; import client.test.ScreenshotCheck; -import client.test.Smoke; + import javafx.geometry.Side; import javafx.scene.Node; import javafx.scene.Scene; @@ -122,7 +122,7 @@ public void emptyTest() throws InterruptedException { hiding.waitProperty(TextControlWrap.SELECTED_PROP_NAME, CheckBoxWrap.State.UNCHECKED); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void apiTest() throws Throwable { show(); @@ -177,7 +177,7 @@ public void dropTest() throws InterruptedException { ScreenshotUtils.checkScreenshot("PopupMenuTest-drop", contentPane); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void mouseSelectionTest() throws InterruptedException { selectionCycle(); @@ -206,7 +206,7 @@ public void keyboardHoverTest() throws InterruptedException { } } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void onActionTest() throws InterruptedException { Wrap error = parent.lookup(Label.class, new ByID<Label>(ContextMenuApp.ERROR_ID)).wrap(); @@ -295,4 +295,4 @@ public void run(Object... parameters) { } }.dispatch(Root.ROOT.getEnvironment()); } -} \ No newline at end of file +} diff --git a/functional/ControlsTests/test/javafx/scene/control/test/mix/ProgressTest.java b/functional/ControlsTests/test/javafx/scene/control/test/mix/ProgressTest.java index 9d9a4c2b..a7b6ffda 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/mix/ProgressTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/mix/ProgressTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,7 +26,7 @@ package javafx.scene.control.test.mix; import client.test.ScreenshotCheck; -import client.test.Smoke; + import javafx.scene.control.test.ProgressApp; import javafx.scene.control.test.ProgressApp.Pages; import org.junit.BeforeClass; @@ -61,7 +61,7 @@ public void indeterminedConstructorsTest() throws InterruptedException { * Test for ProgressIndicator setProgress API */ @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void progressIndicatorsTest() throws InterruptedException { testCommon(Pages.ProgressIndicator.name(), true, true); @@ -71,7 +71,7 @@ public void progressIndicatorsTest() throws InterruptedException { * Test for ProgressBar setProgress API */ @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void progressBarTest() throws InterruptedException { testCommon(Pages.ProgressBar.name(), true, true); diff --git a/functional/ControlsTests/test/javafx/scene/control/test/mix/ScrollBarTest.java b/functional/ControlsTests/test/javafx/scene/control/test/mix/ScrollBarTest.java index 7d01a116..35ba617f 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/mix/ScrollBarTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/mix/ScrollBarTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,7 +25,7 @@ package javafx.scene.control.test.mix; import client.test.ScreenshotCheck; -import client.test.Smoke; + import javafx.scene.control.test.ScrollBarApp.Pages; import javafx.scene.control.test.scrollbar.ScrollBarApp; import org.junit.BeforeClass; @@ -92,7 +92,7 @@ public void incrementTest() throws InterruptedException { * Test for ScrollBar setValue, setMin, setMax API */ @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void positionVerticalTest() throws InterruptedException { testCommon(Pages.PositionsHorizontal.name()); @@ -102,7 +102,7 @@ public void positionVerticalTest() throws InterruptedException { * Test for ScrollBar setValue, setMin, setMax API */ @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void positionHorizontalTest() throws InterruptedException { testCommon(Pages.PositionsVertical.name()); @@ -120,4 +120,4 @@ public void visibleAmountTest() throws InterruptedException { protected void testCommon(String name) { testCommon(name, null, true, false); } -} \ No newline at end of file +} diff --git a/functional/ControlsTests/test/javafx/scene/control/test/mix/SeparatorsTest.java b/functional/ControlsTests/test/javafx/scene/control/test/mix/SeparatorsTest.java index 5e4c4495..212ee696 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/mix/SeparatorsTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/mix/SeparatorsTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,7 +25,7 @@ package javafx.scene.control.test.mix; import client.test.ScreenshotCheck; -import client.test.Smoke; + import javafx.scene.control.test.SeparatorApp; import javafx.scene.control.test.SeparatorApp.Pages; import javafx.scene.control.test.SeparatorApp.SeparatorsPages; @@ -82,7 +82,7 @@ public void setHalignmentHTest() throws InterruptedException { * Test for setValignment API of horizontal separator */ @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void setValignmentHTest() throws InterruptedException { test(Pages.HSeparator.name(), SeparatorsPages.setValignment.name()); @@ -101,7 +101,7 @@ public void isVerticalVTest() throws InterruptedException { * Test for setHalignment API of vertical separator */ @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void setHalignmentVTest() throws InterruptedException { test(Pages.VSeparator.name(), SeparatorsPages.setHalignment.name()); @@ -135,4 +135,4 @@ protected String getName() { private void testCommon(String name, boolean shoots, boolean valuable_rect) { testCommon(name, null, shoots, valuable_rect); } -} \ No newline at end of file +} diff --git a/functional/ControlsTests/test/javafx/scene/control/test/mix/SliderTest.java b/functional/ControlsTests/test/javafx/scene/control/test/mix/SliderTest.java index d46711c4..d63c7cd2 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/mix/SliderTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/mix/SliderTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,7 +25,7 @@ package javafx.scene.control.test.mix; import client.test.ScreenshotCheck; -import client.test.Smoke; + import javafx.scene.control.test.SliderApp; import javafx.scene.control.test.SliderApp.Pages; import org.junit.BeforeClass; @@ -92,7 +92,7 @@ public void minorTickCountTest() throws InterruptedException { * Test for Slider setValue, setMin, setMax API */ @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void positionVerticalTest() throws InterruptedException { testCommon(Pages.PositionsVertical.name()); @@ -102,7 +102,7 @@ public void positionVerticalTest() throws InterruptedException { * Test for Slider setValue, setMin, setMax API */ @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void positionHorizontalTest() throws InterruptedException { testCommon(Pages.PositionsHorizontal.name()); @@ -120,4 +120,4 @@ public void noSizesTest() throws InterruptedException { protected void testCommon(String name) { testCommon(name, null, true, false); } -} \ No newline at end of file +} diff --git a/functional/ControlsTests/test/javafx/scene/control/test/mix/SplitPaneTest.java b/functional/ControlsTests/test/javafx/scene/control/test/mix/SplitPaneTest.java index 5e73a137..7fd2590c 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/mix/SplitPaneTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/mix/SplitPaneTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,7 +25,7 @@ package javafx.scene.control.test.mix; import client.test.ScreenshotCheck; -import client.test.Smoke; + import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; @@ -83,7 +83,7 @@ public void orientationTest() throws InterruptedException { * Test of DividersPositions API */ @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout=300000) public void dividersPositionsTest() throws InterruptedException { testCommon(Pages.DividersPositions.name(), null, true, true); @@ -92,7 +92,7 @@ public void dividersPositionsTest() throws InterruptedException { /** * Test of ResizableWithParent API */ - @Smoke + //TODO@Smoke @Test(timeout=300000) public void resizableWithParentTest() { openPage(Pages.ResizableWithParent.name()); diff --git a/functional/ControlsTests/test/javafx/scene/control/test/mix/TitledPaneTest.java b/functional/ControlsTests/test/javafx/scene/control/test/mix/TitledPaneTest.java index 46373c6e..3dd390e8 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/mix/TitledPaneTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/mix/TitledPaneTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,7 +25,7 @@ package javafx.scene.control.test.mix; import client.test.ScreenshotCheck; -import client.test.Smoke; + import javafx.scene.Node; import javafx.scene.control.TitledPane; import javafx.scene.control.test.TitledPaneApp; @@ -108,7 +108,7 @@ public void contentTest() throws InterruptedException { * Test for TitledPane setExpanded API */ @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void expandedTest() throws InterruptedException { testCommon(Pages.Expanded.name()); @@ -123,4 +123,4 @@ public void oversizeTest() throws InterruptedException { testCommon(Pages.Oversize.name()); } static final int ANIMATION_DELAY = 1000; -} \ No newline at end of file +} diff --git a/functional/ControlsTests/test/javafx/scene/control/test/mix/TooltipTest.java b/functional/ControlsTests/test/javafx/scene/control/test/mix/TooltipTest.java index d806f680..842fe3fe 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/mix/TooltipTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/mix/TooltipTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,7 +26,7 @@ package javafx.scene.control.test.mix; import client.test.ScreenshotCheck; -import client.test.Smoke; + import com.oracle.jdk.sqe.cc.markup.Covers; import com.oracle.jdk.sqe.cc.markup.Covers.Level; import javafx.scene.Node; @@ -142,20 +142,20 @@ public void tearDown() { assertEquals("", error.getProperty(Wrap.TEXT_PROP_NAME)); } - @Smoke + //TODO@Smoke @Test(timeout=300000) @Covers(value={"javafx.scene.control.Tooltip.activated.SET", "javafx.scene.control.Tooltip.activated.GET"}, level=Level.FULL) public void enabled() throws InterruptedException { check(true); } - @Smoke + //TODO@Smoke @Test(timeout=300000) public void disabled() throws InterruptedException { check(false); } - @Smoke + //TODO@Smoke @Test(timeout=300000) public void showAPI() throws InterruptedException { for (int i = 0; i < CHECK_CYCLES_NUM; i++) { @@ -167,7 +167,7 @@ public void showAPI() throws InterruptedException { } } - @Smoke + //TODO@Smoke @Test(timeout=300000) public void autohide() throws InterruptedException { tooltipped.mouse().move(); @@ -278,4 +278,4 @@ public void run(Object... parameters) { } }.dispatch(Root.ROOT.getEnvironment()); } -} \ No newline at end of file +} diff --git a/functional/ControlsTests/test/javafx/scene/control/test/mix/TreeViewTest.java b/functional/ControlsTests/test/javafx/scene/control/test/mix/TreeViewTest.java index 61cda58e..fae5e415 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/mix/TreeViewTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/mix/TreeViewTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,9 +25,6 @@ package javafx.scene.control.test.mix; import client.test.ScreenshotCheck; -import client.test.Smoke; -import java.util.ArrayList; -import java.util.List; import javafx.application.Platform; import javafx.beans.property.ObjectProperty; import javafx.beans.property.SimpleObjectProperty; @@ -76,16 +73,20 @@ import org.jemmy.timing.State; import org.jemmy.timing.Waiter; import org.junit.After; -import static org.junit.Assert.*; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; import org.junit.runner.RunWith; -import test.javaclient.shared.AppLauncher.Mode; import test.javaclient.shared.FilteredTestRunner; import test.javaclient.shared.Utils; import test.javaclient.shared.screenshots.ScreenshotUtils; +import java.util.ArrayList; +import java.util.List; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + @RunWith(FilteredTestRunner.class) public class TreeViewTest extends ControlsTestBase { @@ -137,9 +138,9 @@ public static void setUpClass() { @Before public void setUp() { - if (test.javaclient.shared.AppLauncher.getInstance().getMode() == Mode.REMOTE) { - setJemmyComparatorByDistance(0.001f); - } +// if (test.javaclient.shared.AppLauncher.getInstance().getMode() == Mode.REMOTE) { +// setJemmyComparatorByDistance(0.001f); +// } new Waiter(Wrap.WAIT_STATE_TIMEOUT).ensureState(new State() { @Override @@ -165,7 +166,7 @@ public void initialStateTest() throws InterruptedException { } @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void sequentialOpeningTest() throws Throwable { expandAll(); @@ -288,7 +289,7 @@ public void selectionAddTest() throws Throwable { ScreenshotUtils.checkScreenshot(getTestedControlName() + "Test-add", tree); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void checkVerticalScrollBar() { final Lookup<TreeItem> lookup = expandAll(); @@ -333,7 +334,7 @@ public Object reached() { }); } - @Smoke + //TODO@Smoke @Test(timeout = 60000) public void checkHorizontalScrollBar() { if (isTreeViewTests) { @@ -367,7 +368,7 @@ public void run(Object... os) throws Exception { } } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void asteriskExpansionTest() throws InterruptedException { final TreeItem root = getRoot(); @@ -395,7 +396,7 @@ public Object reached() { }); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void selectionExpansionTest() throws InterruptedException { TreeItem root = getRoot(); @@ -408,7 +409,7 @@ public void selectionExpansionTest() throws InterruptedException { * This test checks that when tree item children modification causes branch * immediate rendering. */ - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void childrenModificationTest() throws InterruptedException { Lookup<TreeItem> lookup = expandRoot(); @@ -871,4 +872,4 @@ public String toString() { return "Looking for a visible TreeCell with the value '" + item + "'"; } } -} \ No newline at end of file +} diff --git a/functional/ControlsTests/test/javafx/scene/control/test/mixedpanes/ControlsLayoutPart1Test.java b/functional/ControlsTests/test/javafx/scene/control/test/mixedpanes/ControlsLayoutPart1Test.java index 18ca6a49..75a9f549 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/mixedpanes/ControlsLayoutPart1Test.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/mixedpanes/ControlsLayoutPart1Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,7 +25,7 @@ package javafx.scene.control.test.mixedpanes; import client.test.ScreenshotCheck; -import client.test.Smoke; + import javafx.factory.ControlsFactory; import javafx.scene.control.test.mixedpanes.ControlsLayoutPart1App.Pages; import javafx.scene.layout.Pane; @@ -58,34 +58,34 @@ public static void runUI() { } @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void VBoxTest() throws InterruptedException { pagesLoop(Pages.VBox.name()); } @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 600000) public void HBoxTest() throws InterruptedException { pagesLoop(Pages.HBox.name()); } @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void BorderTest() throws InterruptedException { pagesLoop(Pages.BorderPane.name()); } @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void GridTestPart1() throws InterruptedException { pagesLoop(Pages.GridPanePart1.name()); } @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void GridTestPart2() throws InterruptedException { pagesLoop(Pages.GridPanePart2.name()); diff --git a/functional/ControlsTests/test/javafx/scene/control/test/mixedpanes/ControlsLayoutPart2Test.java b/functional/ControlsTests/test/javafx/scene/control/test/mixedpanes/ControlsLayoutPart2Test.java index 7f9e7c96..3e519fdc 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/mixedpanes/ControlsLayoutPart2Test.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/mixedpanes/ControlsLayoutPart2Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,7 +25,7 @@ package javafx.scene.control.test.mixedpanes; import client.test.ScreenshotCheck; -import client.test.Smoke; + import javafx.factory.ControlsFactory; import org.junit.BeforeClass; import org.junit.Test; @@ -59,14 +59,14 @@ public static void runUI() { } @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void FlowPaneTest() throws InterruptedException { pagesLoop(Pages.FlowPane.name()); } @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void TilePaneTest() throws InterruptedException { pagesLoop(Pages.TilePane.name()); diff --git a/functional/ControlsTests/test/javafx/scene/control/test/mixedpanes/ControlsLayoutPart3Test.java b/functional/ControlsTests/test/javafx/scene/control/test/mixedpanes/ControlsLayoutPart3Test.java index 186be19a..b8fffa7c 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/mixedpanes/ControlsLayoutPart3Test.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/mixedpanes/ControlsLayoutPart3Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,7 +25,7 @@ package javafx.scene.control.test.mixedpanes; import client.test.ScreenshotCheck; -import client.test.Smoke; + import org.junit.BeforeClass; import org.junit.Test; import test.javaclient.shared.TestBase; @@ -59,7 +59,7 @@ public static void runUI() { /** * test layout of controls: Labels,Accordions,ListViews inside of FlowPane */ - @Smoke + //TODO@Smoke @ScreenshotCheck @Test(timeout = 300000) public void FlowPaneTest1() throws InterruptedException { @@ -70,7 +70,7 @@ public void FlowPaneTest1() throws InterruptedException { * test layout of controls: ScrollPanes,Separators,CheckBoxes inside of * FlowPane */ - @Smoke + //TODO@Smoke @ScreenshotCheck @Test(timeout = 300000) public void FlowPaneTest2() throws InterruptedException { @@ -82,7 +82,7 @@ public void FlowPaneTest2() throws InterruptedException { * Toolbars,ChoiceBoxes,SplitMenuButtons,ProgressIndicators inside of * FlowPane */ - @Smoke + //TODO@Smoke @ScreenshotCheck @Test(timeout = 300000) public void FlowPaneTest3() throws InterruptedException { @@ -93,7 +93,7 @@ public void FlowPaneTest3() throws InterruptedException { * test layout of controls: TabPanes,ScrollBars,TitledPanes,ProgressBars * inside of FlowPane */ - @Smoke + //TODO@Smoke @ScreenshotCheck @Test(timeout = 300000) public void FlowPaneTest4() throws InterruptedException { @@ -105,7 +105,7 @@ public void FlowPaneTest4() throws InterruptedException { * Hyperlinks,Sliders,PasswordBoxes,TextBoxes,RadioButtons inside of * FlowPane */ - @Smoke + //TODO@Smoke @ScreenshotCheck @Test(timeout = 300000) public void FlowPaneTest5() throws InterruptedException { @@ -115,7 +115,7 @@ public void FlowPaneTest5() throws InterruptedException { /** * test layout of controls: Labels,Accordions,ListViews inside of TilePane */ - @Smoke + //TODO@Smoke @ScreenshotCheck @Test(timeout = 300000) public void TilePaneTest1() throws InterruptedException { @@ -126,7 +126,7 @@ public void TilePaneTest1() throws InterruptedException { * test layout of controls: ScrollPanes,Separators,CheckBoxes inside of * TilePane */ - @Smoke + //TODO@Smoke @ScreenshotCheck @Test(timeout = 300000) public void TilePaneTest2() throws InterruptedException { @@ -138,7 +138,7 @@ public void TilePaneTest2() throws InterruptedException { * Toolbars,ChoiceBoxes,SplitMenuButtons,ProgressIndicators inside of * TilePane */ - @Smoke + //TODO@Smoke @ScreenshotCheck @Test(timeout = 300000) public void TilePaneTest3() throws InterruptedException { @@ -149,7 +149,7 @@ public void TilePaneTest3() throws InterruptedException { * test layout of controls: TabPanes,ScrollBars,TitledPanes,ProgressBars * inside of TilePane */ - @Smoke + //TODO@Smoke @ScreenshotCheck @Test(timeout = 300000) public void TilePaneTest4() throws InterruptedException { @@ -161,7 +161,7 @@ public void TilePaneTest4() throws InterruptedException { * Hyperlinks,Sliders,PasswordBoxes,TextBoxes,RadioButtons inside of * TilePane */ - @Smoke + //TODO@Smoke @ScreenshotCheck @Test(timeout = 300000) public void TilePaneTest5() throws InterruptedException { diff --git a/functional/ControlsTests/test/javafx/scene/control/test/mixedpanes/ControlsLayoutPart4Test.java b/functional/ControlsTests/test/javafx/scene/control/test/mixedpanes/ControlsLayoutPart4Test.java index 0fac5b0d..80ce7be2 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/mixedpanes/ControlsLayoutPart4Test.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/mixedpanes/ControlsLayoutPart4Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,7 +25,7 @@ package javafx.scene.control.test.mixedpanes; import client.test.ScreenshotCheck; -import client.test.Smoke; + import org.junit.BeforeClass; import org.junit.Test; import test.javaclient.shared.TestBase; @@ -59,7 +59,7 @@ public static void runUI() { /** * test layout of controls: Labels,Accordions,ListViews inside of VBox */ - @Smoke + //TODO@Smoke @ScreenshotCheck @Test(timeout = 300000) public void VBoxTest1() throws InterruptedException { @@ -69,7 +69,7 @@ public void VBoxTest1() throws InterruptedException { /** * test layout of controls: ScrollPanes,Separators,CheckBoxes inside of VBox */ - @Smoke + //TODO@Smoke @ScreenshotCheck @Test(timeout = 300000) public void VBoxTest2() throws InterruptedException { @@ -80,7 +80,7 @@ public void VBoxTest2() throws InterruptedException { * test layout of controls: * Toolbars,ChoiceBoxes,SplitMenuButtons,ProgressIndicators inside of VBox */ - @Smoke + //TODO@Smoke @ScreenshotCheck @Test(timeout = 300000) public void VBoxTest3() throws InterruptedException { @@ -91,7 +91,7 @@ public void VBoxTest3() throws InterruptedException { * test layout of controls: TabPanes,ScrollBars,TitledPanes,ProgressBars * inside of VBox */ - @Smoke + //TODO@Smoke @ScreenshotCheck @Test(timeout = 300000) public void VBoxTest4() throws InterruptedException { @@ -102,7 +102,7 @@ public void VBoxTest4() throws InterruptedException { * test layout of controls: * Hyperlinks,Sliders,PasswordBoxes,TextBoxes,RadioButtons inside of VBox */ - @Smoke + //TODO@Smoke @ScreenshotCheck @Test(timeout = 300000) public void VBoxTest5() throws InterruptedException { @@ -112,7 +112,7 @@ public void VBoxTest5() throws InterruptedException { /** * test layout of controls: Labels,Accordions,ListViews inside of HBox */ - @Smoke + //TODO@Smoke @ScreenshotCheck @Test(timeout = 300000) public void HBoxTest1() throws InterruptedException { @@ -122,7 +122,7 @@ public void HBoxTest1() throws InterruptedException { /** * test layout of controls: ScrollPanes,Separators,CheckBoxes inside of HBox */ - @Smoke + //TODO@Smoke @ScreenshotCheck @Test(timeout = 300000) public void HBoxTest2() throws InterruptedException { @@ -133,7 +133,7 @@ public void HBoxTest2() throws InterruptedException { * test layout of controls: * Toolbars,ChoiceBoxes,SplitMenuButtons,ProgressIndicators inside of HBox */ - @Smoke + //TODO@Smoke @ScreenshotCheck @Test(timeout = 300000) public void HBoxTest3() throws InterruptedException { @@ -144,7 +144,7 @@ public void HBoxTest3() throws InterruptedException { * test layout of controls: TabPanes,ScrollBars,TitledPanes,ProgressBars * inside of HBox */ - @Smoke + //TODO@Smoke @ScreenshotCheck @Test(timeout = 300000) public void HBoxTest4() throws InterruptedException { @@ -155,7 +155,7 @@ public void HBoxTest4() throws InterruptedException { * test layout of controls: * Hyperlinks,Sliders,PasswordBoxes,TextBoxes,RadioButtons inside of HBox */ - @Smoke + //TODO@Smoke @ScreenshotCheck @Test(timeout = 300000) public void HBoxTest5() throws InterruptedException { @@ -165,7 +165,7 @@ public void HBoxTest5() throws InterruptedException { /** * test layout of controls: Labels,Accordions,ListViews inside of BorderPane */ - @Smoke + //TODO@Smoke @ScreenshotCheck @Test(timeout = 300000) public void BorderPaneTest1() throws InterruptedException { @@ -176,7 +176,7 @@ public void BorderPaneTest1() throws InterruptedException { * test layout of controls: ScrollPanes,Separators,CheckBoxes inside of * BorderPane */ - @Smoke + //TODO@Smoke @ScreenshotCheck @Test(timeout = 300000) public void BorderPaneTest2() throws InterruptedException { @@ -188,7 +188,7 @@ public void BorderPaneTest2() throws InterruptedException { * Toolbars,ChoiceBoxes,SplitMenuButtons,ProgressIndicators inside of * BorderPane */ - @Smoke + //TODO@Smoke @ScreenshotCheck @Test(timeout = 300000) public void BorderPaneTest3() throws InterruptedException { @@ -199,7 +199,7 @@ public void BorderPaneTest3() throws InterruptedException { * test layout of controls: TabPanes,ScrollBars,TitledPanes,ProgressBars * inside of BorderPane */ - @Smoke + //TODO@Smoke @ScreenshotCheck @Test(timeout = 300000) public void BorderPaneTest4() throws InterruptedException { @@ -211,7 +211,7 @@ public void BorderPaneTest4() throws InterruptedException { * Hyperlinks,Sliders,PasswordBoxes,TextBoxes,RadioButtons inside of * BorderPane */ - @Smoke + //TODO@Smoke @ScreenshotCheck @Test(timeout = 300000) public void BorderPaneTest5() throws InterruptedException { @@ -221,7 +221,7 @@ public void BorderPaneTest5() throws InterruptedException { /** * test layout of controls: Labels,Accordions,ListViews inside of GridPane */ - @Smoke + //TODO@Smoke @ScreenshotCheck @Test(timeout = 300000) public void GridPaneTest1() throws InterruptedException { @@ -232,7 +232,7 @@ public void GridPaneTest1() throws InterruptedException { * test layout of controls: ScrollPanes,Separators,CheckBoxes inside of * GridPane */ - @Smoke + //TODO@Smoke @ScreenshotCheck @Test(timeout = 300000) public void GridPaneTest2() throws InterruptedException { @@ -244,7 +244,7 @@ public void GridPaneTest2() throws InterruptedException { * Toolbars,ChoiceBoxes,SplitMenuButtons,ProgressIndicators inside of * GridPane */ - @Smoke + //TODO@Smoke @ScreenshotCheck @Test(timeout = 300000) public void GridPaneTest3() throws InterruptedException { @@ -255,7 +255,7 @@ public void GridPaneTest3() throws InterruptedException { * test layout of controls: TabPanes,ScrollBars,TitledPanes,ProgressBars * inside of GridPane */ - @Smoke + //TODO@Smoke @ScreenshotCheck @Test(timeout = 300000) public void GridPaneTest4() throws InterruptedException { @@ -267,7 +267,7 @@ public void GridPaneTest4() throws InterruptedException { * Hyperlinks,Sliders,PasswordBoxes,TextBoxes,RadioButtons inside of * GridPane */ - @Smoke + //TODO@Smoke @ScreenshotCheck @Test(timeout = 300000) public void GridPaneTest5() throws InterruptedException { diff --git a/functional/ControlsTests/test/javafx/scene/control/test/pagination/PaginationTest.java b/functional/ControlsTests/test/javafx/scene/control/test/pagination/PaginationTest.java index 035dd0c0..3b6f74b4 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/pagination/PaginationTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/pagination/PaginationTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,7 +25,7 @@ package javafx.scene.control.test.pagination; import client.test.ScreenshotCheck; -import client.test.Smoke; + import com.oracle.jdk.sqe.cc.markup.Covers; import java.util.EnumSet; import javafx.scene.control.Pagination; @@ -44,7 +44,7 @@ @RunWith(FilteredTestRunner.class) public class PaginationTest extends TestBase { - @Smoke + //TODO@Smoke @Test(timeout = 300000) @Covers(value = {"com.sun.javafx.scene.control.Pagination.currentpageindex.BEHAVIOR", "com.sun.javafx.scene.control.Pagination.currentpageindex.GET", "com.sun.javafx.scene.control.Pagination.currentpageindex.BIND", "com.sun.javafx.scene.control.Pagination.currentpageindex.DEFAULT", "com.sun.javafx.scene.control.Pagination.currentpageindex.SET"}, level = Covers.Level.FULL) public void currentPageIndexPropertyTest() throws InterruptedException { @@ -101,7 +101,7 @@ public void currentPageIndexPropertyTest() throws InterruptedException { } } - @Smoke + //TODO@Smoke @Test(timeout = 300000) @Covers(value = {"com.sun.javafx.scene.control.Pagination.pagecount.BEHAVIOR", "com.sun.javafx.scene.control.Pagination.pagecount.GET", "com.sun.javafx.scene.control.Pagination.pagecount.BIND", "com.sun.javafx.scene.control.Pagination.pagecount.DEFAULT", "com.sun.javafx.scene.control.Pagination.pagecount.SET"}, level = Covers.Level.FULL) public void pageCountPropertyTest() throws InterruptedException { @@ -163,7 +163,7 @@ public void pageCountPropertyTest() throws InterruptedException { } } - @Smoke + //TODO@Smoke @Test(timeout = 300000) @Covers(value = {"com.sun.javafx.scene.control.Pagination.pageindicatorcount.BEHAVIOR", "com.sun.javafx.scene.control.Pagination.pageindicatorcount.GET", "com.sun.javafx.scene.control.Pagination.pageindicatorcount.BIND", "com.sun.javafx.scene.control.Pagination.pageindicatorcount.DEFAULT", "com.sun.javafx.scene.control.Pagination.pageindicatorcounts.SET"}, level = Covers.Level.FULL) public void pageIndicatorCountTest() throws InterruptedException { @@ -233,7 +233,7 @@ public void pageIndicatorCountTest() throws InterruptedException { checkCorrectPageContentShowing(false, 0); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void innerContentReceiveEventsTest() throws InterruptedException { setSize(200, 200); @@ -244,7 +244,7 @@ public void innerContentReceiveEventsTest() throws InterruptedException { checkPrintingInInnerTextField(); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) @Covers(value = {"com.sun.javafx.scene.control.Pagination.pagefactory.BEHAVIOR", "com.sun.javafx.scene.control.Pagination.pagefactory.GET", "com.sun.javafx.scene.control.Pagination.pagefactory.DEFAULT", "com.sun.javafx.scene.control.Pagination.pagefactory.SET"}, level = Covers.Level.FULL) public void factoryChangingTest() throws InterruptedException { @@ -295,7 +295,7 @@ public void factoryChangingTest() throws InterruptedException { } @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void complexScreenshot1Test() throws InterruptedException, Throwable { setNewFactory(); @@ -313,7 +313,7 @@ public void complexScreenshot1Test() throws InterruptedException, Throwable { } @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void complexScreenshot2Test() throws InterruptedException, Throwable { setBulletStyleOfPageIndicators(); @@ -326,7 +326,7 @@ public void complexScreenshot2Test() throws InterruptedException, Throwable { throwScreenshotError(); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void leftRightKeyboardTest() throws InterruptedException { setSize(200, 200); @@ -371,7 +371,7 @@ public void leftRightKeyboardTest() throws InterruptedException { checkTwoArrowsVisibility(false, true); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void complexInteractionTest() throws InterruptedException { setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.pageCount, 20); @@ -403,7 +403,7 @@ public void complexInteractionTest() throws InterruptedException { checkCorrectPageContentShowing(false, 0); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void indeterminateValueTest() throws InterruptedException { setSize(200, 200); diff --git a/functional/ControlsTests/test/javafx/scene/control/test/richtexteditor/RichTextEditorTest.java b/functional/ControlsTests/test/javafx/scene/control/test/richtexteditor/RichTextEditorTest.java index d1db57bf..63f0ae1d 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/richtexteditor/RichTextEditorTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/richtexteditor/RichTextEditorTest.java @@ -1,12 +1,12 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. */ package javafx.scene.control.test.richtexteditor; import client.test.Keywords; import client.test.ScreenshotCheck; -import client.test.Smoke; + import java.awt.Toolkit; import java.io.*; import java.net.URL; @@ -202,7 +202,7 @@ public void headingIssueTest() throws InterruptedException, IOException, Throwab throwScreenshotError(); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) @Keywords(keywords="webkit") public void setHtmlTest() throws InterruptedException, IOException { @@ -227,14 +227,14 @@ public void checkStylesTest() throws Throwable { } @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) @Keywords(keywords="webkit") public void initialStateTest() throws InterruptedException { ScreenshotUtils.checkScreenshot("RichTextEditor-initialState", contentPane); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) @Keywords(keywords="webkit") public void deletingEmptyStringTest() throws InterruptedException, IOException, Throwable { @@ -536,21 +536,21 @@ public void compositeTest() throws InterruptedException, IOException, Throwable throwScreenshotError(); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) //http://javafx-jira.kenai.com/browse/RT-20554 @Keywords(keywords="webkit") public void copyTest() throws InterruptedException, IOException, Throwable { clipboard(copy, "copy"); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) //http://javafx-jira.kenai.com/browse/RT-20554 @Keywords(keywords="webkit") public void cutTest() throws InterruptedException, IOException, Throwable { clipboard(cut, "cut"); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) //http://javafx-jira.kenai.com/browse/RT-20554 @Keywords(keywords="webkit") public void pasteTest() throws InterruptedException, IOException, Throwable { diff --git a/functional/ControlsTests/test/javafx/scene/control/test/scrollbar/ScrollBarTest.java b/functional/ControlsTests/test/javafx/scene/control/test/scrollbar/ScrollBarTest.java index c4f7cbdf..908a75d1 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/scrollbar/ScrollBarTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/scrollbar/ScrollBarTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,7 +25,7 @@ package javafx.scene.control.test.scrollbar; import client.test.ScreenshotCheck; -import client.test.Smoke; + import javafx.beans.property.DoubleProperty; import javafx.beans.property.SimpleDoubleProperty; import javafx.geometry.Orientation; @@ -51,7 +51,7 @@ @RunWith(FilteredTestRunner.class) public class ScrollBarTest extends TestBase { - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void simpleValueSettingTest() throws InterruptedException { setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.value, 70); @@ -61,7 +61,7 @@ public void simpleValueSettingTest() throws InterruptedException { checkTextFieldValue(Properties.value, 30); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void minAndMaxPropertyTest() throws InterruptedException { setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.max, -10); @@ -77,7 +77,7 @@ public void minAndMaxPropertyTest() throws InterruptedException { checkTextFieldValue(Properties.min, 50); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void visibleAmountPropertyTest() throws InterruptedException { setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.value, 50); @@ -97,7 +97,7 @@ public void visibleAmountPropertyTest() throws InterruptedException { checkTextFieldValue(Properties.value, 50); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) //RT-18223 public void blockAndUnitIncrementAndMouseAndKeyBoardTest() throws InterruptedException { setPropertyByChoiceBox(SettingType.BIDIRECTIONAL, Orientation.VERTICAL, Properties.orientation); @@ -200,7 +200,7 @@ public void blockAndUnitIncrementAndMouseAndKeyBoardTest() throws InterruptedExc } } - @Smoke + //TODO@Smoke @Test(timeout = 300000) //Test checks horizontal and vertical scrolling for horizontal and vertical scrollBar. public void scrollingTest() throws InterruptedException { //Unit increment value should determine scrolling value per 1 turn. @@ -249,7 +249,7 @@ public void scrollingTest() throws InterruptedException { checkTextFieldValue(Properties.value, 40); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void adjustValueTest() throws InterruptedException { Wrap<? extends ScrollBar> testedScrollBar = parent.lookup(ScrollBar.class, new ByID<ScrollBar>(TESTED_SCROLLBAR_ID)).wrap(); @@ -273,7 +273,7 @@ public void adjustValueTest() throws InterruptedException { checkTextFieldValue(Properties.value, 100); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void scrolling2Test() { Wrap<? extends ScrollBar> testedScrollBar = parent.lookup(ScrollBar.class, new ByID<ScrollBar>(TESTED_SCROLLBAR_ID)).wrap(); @@ -302,7 +302,7 @@ public void scrolling2Test() { assertEquals(0, c1.position(), ASSERT_CMP_PRECISION); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void iterativeWorkingTest() throws InterruptedException { setPropertyByChoiceBox(SettingType.BIDIRECTIONAL, Orientation.VERTICAL, Properties.orientation); @@ -368,7 +368,7 @@ public void iterativeWorkingTest() throws InterruptedException { } } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void focusTraversalTest() throws InterruptedException { Wrap<? extends ScrollBar> testedScrollBar = parent.lookup(ScrollBar.class, new ByID<ScrollBar>(TESTED_SCROLLBAR_ID)).wrap(); @@ -430,7 +430,7 @@ public void focusTraversalTest() throws InterruptedException { testedScrollBar.waitProperty("isFocused", false); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void bigBidirectionalComposedTest() throws InterruptedException { for (SettingType type : SettingType.values()) { @@ -468,7 +468,7 @@ public void bigBidirectionalComposedTest() throws InterruptedException { } @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void screenShotCheckingInComplexConditionsTest() throws Throwable { for (SettingType type : SettingType.values()) { @@ -497,7 +497,7 @@ public void screenShotCheckingInComplexConditionsTest() throws Throwable { throwScreenshotError(); } - @Smoke + //TODO@Smoke @Test(timeout = 300000)// RT-18220 RT-18221 public void exceptionOnNegativeValuesSettingTest() throws Exception { int exceptionsCounter = 0; @@ -565,7 +565,7 @@ public void exceptionOnNegativeValuesSettingTest() throws Exception { } } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void minGreatedThenMaxTest() { ScrollBar sb = new ScrollBar(); diff --git a/functional/ControlsTests/test/javafx/scene/control/test/slider/SliderTest.java b/functional/ControlsTests/test/javafx/scene/control/test/slider/SliderTest.java index a8e802d9..ee6ba2b9 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/slider/SliderTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/slider/SliderTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,7 +25,7 @@ package javafx.scene.control.test.slider; import client.test.ScreenshotCheck; -import client.test.Smoke; + import javafx.geometry.Orientation; import javafx.scene.control.Slider; import static javafx.scene.control.test.slider.SliderNewApp.TESTED_SLIDER_ID; @@ -44,7 +44,7 @@ import org.jemmy.input.AbstractScroll; import org.jemmy.interfaces.Keyboard.KeyboardButtons; import org.jemmy.interfaces.Keyboard.KeyboardModifiers; -import org.jemmy.interfaces.Shiftable; +import org.jemmy.fx.interfaces.Shiftable; import static org.junit.Assert.assertEquals; import org.junit.Before; import org.junit.Test; @@ -65,7 +65,7 @@ public void setUp() { scene.mouse().move(new Point(0, 0)); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void simpleValueSettingTest() throws InterruptedException { assertEquals((new Slider()).valueProperty().getValue(), 0, ASSERT_CMP_PRECISION);//initial value @@ -87,7 +87,7 @@ public void simpleValueSettingTest() throws InterruptedException { checkTextFieldValue(Properties.value, 30); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void maxPropertyTest() throws InterruptedException { assertEquals((new Slider()).maxProperty().getValue(), 100, ASSERT_CMP_PRECISION);//initial value @@ -110,7 +110,7 @@ public void maxPropertyTest() throws InterruptedException { checkTextFieldValue(Properties.value, 30); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void minPropertyTest() throws InterruptedException { assertEquals((new Slider()).minProperty().getValue(), 0, ASSERT_CMP_PRECISION);//initial value @@ -135,7 +135,7 @@ public void minPropertyTest() throws InterruptedException { checkTextFieldValue(Properties.max, 150); } - @Smoke + //TODO@Smoke @Test(timeout = 300000)//should fail. public void snapToTicksTest() throws InterruptedException { assertEquals((new Slider()).snapToTicksProperty().getValue(), false);//initial value @@ -194,7 +194,7 @@ public void snapToTicksTest() throws InterruptedException { checkTextFieldValue(Properties.value, -80); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void snapToTicksMouseTest() throws InterruptedException { setPropertyByToggleClick(SettingType.UNIDIRECTIONAL, Properties.snapToTicks); @@ -222,7 +222,7 @@ public void snapToTicksMouseTest() throws InterruptedException { checkTextFieldValue(Properties.value, 75); } - @Smoke + //TODO@Smoke @Test(timeout = 300000)//Should fail. public void valueChangingOnBidirectionalTest() throws InterruptedException { assertEquals((new Slider()).valueChangingProperty().getValue(), false); @@ -236,7 +236,7 @@ public void valueChangingOnBidirectionalTest() throws InterruptedException { checkCounterValue(VALUE_CHANGING_COUNTER, 3); } - @Smoke + //TODO@Smoke @Test(timeout = 300000)//Should fail. public void majorTickUnitTest() throws InterruptedException { assertEquals((new Slider()).majorTickUnitProperty().getValue(), 25, ASSERT_CMP_PRECISION);//initial value test @@ -276,7 +276,7 @@ public void majorTickUnitTest() throws InterruptedException { checkTextFieldValue(Properties.value, 90); } - @Smoke + //TODO@Smoke @Test(timeout = 300000)//Should fail. public void minorTickCountTest() throws InterruptedException { assertEquals((new Slider()).minorTickCountProperty().getValue(), 3, ASSERT_CMP_PRECISION);//initial value test @@ -301,7 +301,7 @@ public void minorTickCountTest() throws InterruptedException { checkTextFieldValue(Properties.value, 19); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void blockIncrementTest() throws InterruptedException { assertEquals((new Slider()).blockIncrementProperty().getValue(), 10, ASSERT_CMP_PRECISION);//initial value @@ -362,7 +362,7 @@ public void labelFormatterTest() throws InterruptedException { checkScreenshot("Slider_customLabelFomatter_2", testedControl); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void keyEventsArrowsTest() throws InterruptedException { setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefWidth, 200); @@ -403,7 +403,7 @@ public void keyEventsArrowsTest() throws InterruptedException { checkTextFieldValue(Properties.value, 50); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void keyEventsDifferentButtonsTest() throws InterruptedException { setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefWidth, 200); @@ -435,7 +435,7 @@ public void keyEventsDifferentButtonsTest() throws InterruptedException { checkTextFieldValue(Properties.value, 0); } - @Smoke + //TODO@Smoke @Test(timeout = 300000)//Should fail. public void bigBidirectionalComposedTest() throws InterruptedException { for (SettingType type : SettingType.values()) { @@ -472,7 +472,7 @@ public void bigBidirectionalComposedTest() throws InterruptedException { } } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void mouseClickingTest() throws InterruptedException { setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefWidth, 220); @@ -492,7 +492,7 @@ public void mouseClickingTest() throws InterruptedException { testClick(-25, track); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void mouseDragingTest() throws InterruptedException { setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefHeight, 200); @@ -525,7 +525,7 @@ public void mouseDragingTest() throws InterruptedException { } @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000)// should fail public void screenShotCheckingInComplexConditionsTest() throws Throwable { for (SettingType type : SettingType.values()) { @@ -553,7 +553,7 @@ public void screenShotCheckingInComplexConditionsTest() throws Throwable { throwScreenshotError(); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void adjustValueTest() throws InterruptedException { setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.blockIncrement, 50); @@ -583,7 +583,7 @@ public void adjustValueTest() throws InterruptedException { checkTextFieldValue(Properties.value, 0); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void ScrollingTest() throws InterruptedException { setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefHeight, 200); @@ -605,7 +605,7 @@ public void ScrollingTest() throws InterruptedException { } } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void iterativeWorkingTest() throws InterruptedException { setPropertyByChoiceBox(SettingType.BIDIRECTIONAL, Orientation.VERTICAL, Properties.orientation); @@ -678,7 +678,7 @@ public void iterativeWorkingTest() throws InterruptedException { } } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void focusTraversalTest() throws InterruptedException { setPropertyByChoiceBox(SettingType.BIDIRECTIONAL, Orientation.VERTICAL, Properties.orientation); @@ -735,7 +735,7 @@ public void focusTraversalTest() throws InterruptedException { * Tests, that value can be changed with dragging. */ @Test(timeout = 30000)//RT-29414 - @Smoke + //TODO@Smoke public void knobDragTest() throws InterruptedException { final int width = 200, height = 200; setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefWidth, width); @@ -766,4 +766,4 @@ public void knobDragTest() throws InterruptedException { waitKnobRelativePosition(0); } } -} \ No newline at end of file +} diff --git a/functional/ControlsTests/test/javafx/scene/control/test/tableview/LayoutTableViewTest.java b/functional/ControlsTests/test/javafx/scene/control/test/tableview/LayoutTableViewTest.java index eaf39b86..f3aa5a40 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/tableview/LayoutTableViewTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/tableview/LayoutTableViewTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,7 +25,7 @@ package javafx.scene.control.test.tableview; import client.test.ScreenshotCheck; -import client.test.Smoke; + import javafx.scene.control.test.tableview.LayoutTableViewApp.Pages; import org.junit.BeforeClass; import org.junit.Test; @@ -49,7 +49,7 @@ public static void runUI() { * Test for NNN */ @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void closableTest() throws InterruptedException { testCommon(Pages.HBox.name(), "padding"); diff --git a/functional/ControlsTests/test/javafx/scene/control/test/tableview/TableViewMultipleCellSelectionTest.java b/functional/ControlsTests/test/javafx/scene/control/test/tableview/TableViewMultipleCellSelectionTest.java index 3ec00174..5c0c1eb8 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/tableview/TableViewMultipleCellSelectionTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/tableview/TableViewMultipleCellSelectionTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,7 +24,7 @@ */ package javafx.scene.control.test.tableview; -import client.test.Smoke; + import java.util.HashSet; import java.util.Set; import javafx.scene.control.IndexedCell; @@ -43,21 +43,21 @@ */ public class TableViewMultipleCellSelectionTest extends TestBase { - @Smoke + //TODO@Smoke //@Test(timeout = 30000) //Commented out due to https://javafx-jira.kenai.com/browse/RT-33174 public void keyboardMultipleCellSelectionTest() throws Throwable { keyboardMultipleCellSelectionCycle(false); } - @Smoke + //TODO@Smoke //@Test(timeout = 30000) //Commented out due to https://javafx-jira.kenai.com/browse/RT-33174 public void keyboardMultipleCellSelectionDiscontinuousTest() throws Throwable { keyboardMultipleCellSelectionCycle(true); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void singleCellSelectionTest() throws Throwable { singleCellSelectionWrap.mouse().click(); @@ -67,7 +67,7 @@ public void singleCellSelectionTest() throws Throwable { selectionCycle(KeyboardButtons.CONTROL); } - @Smoke + //TODO@Smoke //@Test(timeout = 30000) //Commented out due to https://javafx-jira.kenai.com/browse/RT-33174 public void multipleCellSelectionTest() throws Throwable { @@ -78,7 +78,7 @@ public void multipleCellSelectionTest() throws Throwable { selectionCycle(KeyboardButtons.CONTROL); } - @Smoke + //TODO@Smoke //@Test(timeout = 60000) //Commented out due to https://javafx-jira.kenai.com/browse/RT-33174 public void keyboardMultipleCellScrollTest() throws Throwable { @@ -101,7 +101,7 @@ public void keyboardMultipleCellScrollTest() throws Throwable { * selected when one applies deselection using SHIFT + UP. Fails due to: * RT-21373 */ - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void testDeselectionNearTopBoundary() throws Throwable { enableMultipleCellSelection(); @@ -135,7 +135,7 @@ public void testDeselectionNearTopBoundary() throws Throwable { * Selects cells with SHIFT + DOWN and pushes this key combination one more * time to check that selection remains. */ - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void testDeselectionNearBottomBoundary() throws Throwable { enableMultipleCellSelection(); @@ -157,7 +157,7 @@ public void testDeselectionNearBottomBoundary() throws Throwable { * Deselects selected cell with SHIFT + LEFT and then pushes this * combination once more to check that selection remains. */ - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void testDeselectionNearLeftBoundary() { enableMultipleCellSelection(); @@ -198,7 +198,7 @@ public void testDeselectionNearLeftBoundary() { * in each direction clockwise. It is assumed that there will be 12 cells * selected which form a rectangle with 4 unselected cells in the middle. */ - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void testAreaSelection() { multipleSelectionWrap.mouse().click(); @@ -271,7 +271,7 @@ public void testAreaSelection() { * Deselects selected cell with SHIFT + RIGHT and then pushes this * combination once more to check that selection remains. */ - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void testDeselectionNearRightBoundary() { enableMultipleCellSelection(); @@ -310,7 +310,7 @@ public void testDeselectionNearRightBoundary() { /** * Test Shift + Home/End combinations. */ - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void testShiftHomeEnd() throws Throwable { KeyboardModifiers mods[] = { @@ -323,7 +323,7 @@ public void testShiftHomeEnd() throws Throwable { /** * Test Ctrl + Shift + Home/End combinations. */ - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void testCtrlShiftHomeEnd() throws Throwable { KeyboardModifiers mods[] = { @@ -337,7 +337,7 @@ public void testCtrlShiftHomeEnd() throws Throwable { /** * Test Shift + PgUp/PgDown combinations. */ - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void testShiftPgUpDown() throws Throwable { KeyboardModifiers mods[] = { @@ -350,7 +350,7 @@ public void testShiftPgUpDown() throws Throwable { /** * Test Ctrl + Shift + PgUp/PgDown combinations. */ - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void testCtrlShiftPgUpDown() throws Throwable { KeyboardModifiers mods[] = { @@ -364,7 +364,7 @@ public void testCtrlShiftPgUpDown() throws Throwable { /** * Test different sequences of Ctrl/Shift + Space combinations. */ - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void testSpaceWithModifiers() throws Throwable { enableMultipleCellSelection(); @@ -419,7 +419,7 @@ public void testSpaceWithModifiers() throws Throwable { * specification and to verify that focused cell is visible all the time. * */ - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void testKeyboardFocusModification() throws Throwable { if (!isTableTests) { @@ -552,4 +552,4 @@ protected void enableMultipleCellSelection() { selectionHelper.setMultiple(true); selectionHelper.setSingleCell(true); } -} \ No newline at end of file +} diff --git a/functional/ControlsTests/test/javafx/scene/control/test/tableview/TableViewNewTest.java b/functional/ControlsTests/test/javafx/scene/control/test/tableview/TableViewNewTest.java index 5836831a..995083ee 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/tableview/TableViewNewTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/tableview/TableViewNewTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,7 +25,7 @@ package javafx.scene.control.test.tableview; -import client.test.Smoke; + import javafx.scene.control.skin.NestedTableColumnHeader; import javafx.scene.control.skin.TableColumnHeader; import javafx.scene.control.skin.TableHeaderRow; @@ -1499,7 +1499,7 @@ public String toString() { } } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void fixedCellSizePropertyTest() throws InterruptedException { setSize(200, 200); @@ -1510,7 +1510,7 @@ public void fixedCellSizePropertyTest() throws InterruptedException { fixedCellSizePropertyTestCommon(testedControl, Properties.fixedCellSize, 24); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void fixedCellSizePropertyCSSTest() throws InterruptedException { setSize(200, 200); diff --git a/functional/ControlsTests/test/javafx/scene/control/test/tableview/TableViewTest.java b/functional/ControlsTests/test/javafx/scene/control/test/tableview/TableViewTest.java index 03e81afa..9bccc933 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/tableview/TableViewTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/tableview/TableViewTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,7 +25,7 @@ package javafx.scene.control.test.tableview; import client.test.ScreenshotCheck; -import client.test.Smoke; + import java.util.Iterator; import java.util.Map.Entry; import java.util.Set; @@ -62,13 +62,13 @@ public class TableViewTest extends TestBase { /* * removed - * @Smoke + * //TODO@Smoke @Test(timeout=300000) public void keyboardCtrlShiftPageUpPageDownTest() throws * Throwable { keyboardPageUpPageDownCycle(CTRL_DOWN_MASK_OS, * KeyboardModifiers.SHIFT_DOWN_MASK); } */ @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void insertSingleItemTest() throws Throwable { insertAt(0); @@ -77,7 +77,7 @@ public void insertSingleItemTest() throws Throwable { } @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void removeSingleItemTest() throws Throwable { removeAt(0); @@ -86,7 +86,7 @@ public void removeSingleItemTest() throws Throwable { } @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void insertSingleColumnTest() throws Throwable { insertColumnAt(0); @@ -95,7 +95,7 @@ public void insertSingleColumnTest() throws Throwable { } @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void removeSingleColumnTest() throws Throwable { removeColumnAt(0); @@ -103,7 +103,7 @@ public void removeSingleColumnTest() throws Throwable { ScreenshotUtils.checkScreenshot(getControlName() + "Test-remove-column", contentPane); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void scrollBarsTest() throws Throwable { final Lookup vScrollBar = getScrollLookup(Orientation.VERTICAL); @@ -144,7 +144,7 @@ public void scrollBarsTest() throws Throwable { * three states of sorting and all of them are checked * */ - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void columnSortTest() throws Throwable { Wrap<? extends Node> columHeader = headerWrap.as(Parent.class, Node.class).lookup(Label.class, new ByText("field 0")).wrap(); @@ -229,7 +229,7 @@ public void columnDragTest() throws Throwable { throwScreenshotError(); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void columnAutoSize() throws Throwable { final double AUTO_WIDTH = isTableTests ? 85 : 215; @@ -274,7 +274,7 @@ public Object reached() { }); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void userDataColumnTest() { ObservableList<TableColumnBase> columns; @@ -311,7 +311,7 @@ public void userDataColumnTest() { * to the underlying data collection * the cells are rendered in the right order. */ - @Smoke + //TODO@Smoke @Test(timeout=300000) public void renderingAfterSortingTest() throws Throwable { @@ -368,7 +368,7 @@ protected String getTextFromCell(TableCell cell) { assertTrue(msg, result); } - @Smoke + //TODO@Smoke @Test(timeout=300000) public void scrollToColumnIndex() { DATA_FIELDS_NUM = 64; @@ -406,7 +406,7 @@ public void scrollToColumnIndex() { * Checks that column resizing is correct * according to desired values */ - @Smoke + //TODO@Smoke @Test public void columnResizeTest() { final int columnIndex = 0; diff --git a/functional/ControlsTests/test/javafx/scene/control/test/tabpane/NewTabPaneBase.java b/functional/ControlsTests/test/javafx/scene/control/test/tabpane/NewTabPaneBase.java index dfde9012..845b6dc2 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/tabpane/NewTabPaneBase.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/tabpane/NewTabPaneBase.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -56,7 +56,7 @@ import org.jemmy.fx.ByStyleClass; import org.jemmy.fx.Root; import org.jemmy.fx.control.TabWrap; -import org.jemmy.interfaces.Close; +import org.jemmy.fx.interfaces.Close; import org.jemmy.interfaces.Keyboard; import org.jemmy.interfaces.Parent; import org.jemmy.interfaces.Selectable; diff --git a/functional/ControlsTests/test/javafx/scene/control/test/tabpane/NewTabPaneTest.java b/functional/ControlsTests/test/javafx/scene/control/test/tabpane/NewTabPaneTest.java index ceadac3b..953a1f2f 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/tabpane/NewTabPaneTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/tabpane/NewTabPaneTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,7 +24,7 @@ */ package javafx.scene.control.test.tabpane; -import client.test.Smoke; + import java.util.Comparator; import java.util.HashMap; import java.util.List; @@ -58,7 +58,7 @@ public class NewTabPaneTest extends NewTabPaneBase { /** * Disables the tab and then tries to switch to it by mouse clicking */ - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void disablePropertyBindingTest() { final int NUM_TABS = SettingType.values().length + 1; //Number of tabs @@ -117,7 +117,7 @@ public void disablePropertyBindingTest() { /** * Sets tab prop closable to 'true' and then tries to close it */ - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void closablePropertyBindingTest() { final int NUM_TABS = SettingType.values().length + 1; @@ -163,7 +163,7 @@ public void closablePropertyBindingTest() { /** * Checks API setUserData/getUserData */ - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void userDataAPITest() { final java.util.List<String> userData = new java.util.ArrayList<String>(); @@ -188,7 +188,7 @@ public void userDataAPITest() { /** * Checks API getProperties/hasProperties */ - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void propertiesAPITest() { Map<Object, Object> testedData = new HashMap<Object, Object>(); @@ -218,7 +218,7 @@ public void propertiesAPITest() { /** * Checks API hasProperties */ - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void hasPropertiesMethodTest() { populateTabPane(1); @@ -241,7 +241,7 @@ public void hasPropertiesMethodTest() { * Bug on test creation RT-27869. */ @Test(timeout = 300000) - @Smoke + //TODO@Smoke public void visualFocusScreenshotTest() throws Throwable { final String NOT_FOCUSED_TAB_SCREENSHOT_NAME = "TabPane-not_focused_tab"; final String FOCUSED_TAB_SCREENSHOT_NAME = "TabPane-focused_tab"; @@ -283,7 +283,7 @@ public void visualFocusScreenshotTest() throws Throwable { * Bug on test creation RT-27823. */ @Test(timeout = 300000) - @Smoke + //TODO@Smoke public void contentVetoTest() { final String vetoTabName = "vetoTab"; final String nonVetoTabName = "nonVetoTab"; @@ -323,7 +323,7 @@ public void contentVetoTest() { * to the underlying data collection * the tabs are rendered in the right order. */ - @Smoke + //TODO@Smoke @Test(timeout=30000) public void renderingAfterSortingTest() { final int ITEMS_COUNT = 3; @@ -387,4 +387,4 @@ public int compare(Tab o1, Tab o2) { String msg = validator.getFailureReason(); assertTrue(msg, result); } -} \ No newline at end of file +} diff --git a/functional/ControlsTests/test/javafx/scene/control/test/tabpane/TabPane2Test.java b/functional/ControlsTests/test/javafx/scene/control/test/tabpane/TabPane2Test.java index 32b583fe..1ce41827 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/tabpane/TabPane2Test.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/tabpane/TabPane2Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,7 +25,7 @@ package javafx.scene.control.test.tabpane; import client.test.ScreenshotCheck; -import client.test.Smoke; + import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; @@ -176,7 +176,7 @@ public void disableAllTest() throws Throwable { throwError(); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void disableAndClosing1Test() throws Throwable { tabPaneAsParent.lookup(Tab.class).size(); @@ -188,7 +188,7 @@ public void disableAndClosing1Test() throws Throwable { assertTrue(tryToCloseTab(wrap2)); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void disableAndSelectThroughtPopupTest() throws Throwable { disableAt(TABS_NUM - 1); @@ -196,7 +196,7 @@ public void disableAndSelectThroughtPopupTest() throws Throwable { assertFalse(getCurrentSelection() == TABS_NUM - 1); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void disableAndProgrammaticalSelectTest() throws Throwable { disableAt(1); @@ -205,7 +205,7 @@ public void disableAndProgrammaticalSelectTest() throws Throwable { assertTrue(tryToCloseTab(getTabWrapByPos(1))); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void disableAndTraverseTest() { disableAt(1); @@ -216,7 +216,7 @@ public void disableAndTraverseTest() { assertTrue(getCurrentSelection() == 0); } - @Smoke + //TODO@Smoke @Test(timeout = 30000) public void disableAtEndsAndTraverseTest() { disableAt(0); diff --git a/functional/ControlsTests/test/javafx/scene/control/test/tabpane/TabPaneTest.java b/functional/ControlsTests/test/javafx/scene/control/test/tabpane/TabPaneTest.java index 5b62b244..5eee0a58 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/tabpane/TabPaneTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/tabpane/TabPaneTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,7 +25,7 @@ package javafx.scene.control.test.tabpane; import client.test.ScreenshotCheck; -import client.test.Smoke; + import javafx.geometry.Side; import javafx.scene.control.TabPane; import javafx.scene.control.test.tabpane.TabPaneApp.Pages; @@ -66,7 +66,7 @@ public void selectionTest() throws InterruptedException { * Test for TabPane setSide API */ @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void sideTest() throws InterruptedException { testCommon(Pages.Side.name(), null, true, false, Side.values().length); @@ -112,7 +112,7 @@ public void tabMinWidthTest() throws InterruptedException { * Test for TabPane setTabClosingPolicy API */ @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void tabClosingPolicyTest() throws InterruptedException { testCommon(Pages.TabClosingPolicy.name(), null, true, false, TabPane.TabClosingPolicy.values().length); diff --git a/functional/ControlsTests/test/javafx/scene/control/test/tabpane/TabTest.java b/functional/ControlsTests/test/javafx/scene/control/test/tabpane/TabTest.java index 6af1e232..844bbd9e 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/tabpane/TabTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/tabpane/TabTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,7 +25,7 @@ package javafx.scene.control.test.tabpane; import client.test.ScreenshotCheck; -import client.test.Smoke; + import javafx.scene.control.test.tabpane.TabApp.Pages; import org.junit.BeforeClass; import org.junit.Test; @@ -45,7 +45,7 @@ public static void runUI() { /** * Test for Tab setClosable API */ - @Smoke + //TODO@Smoke @ScreenshotCheck @Test(timeout = 300000) public void closableTest() throws InterruptedException { @@ -56,7 +56,7 @@ public void closableTest() throws InterruptedException { * Test for Tab setContent API */ @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void contentTest() throws InterruptedException { testCommon(Pages.Content.name(), null, true, false, TabApp.BOOL.length); @@ -66,7 +66,7 @@ public void contentTest() throws InterruptedException { * Test for Tab setGraphic API */ @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void graphicTest() throws InterruptedException { testCommon(Pages.Graphic.name(), null, true, false, TabApp.BOOL.length); diff --git a/functional/ControlsTests/test/javafx/scene/control/test/textinput/PasswordFieldTest.java b/functional/ControlsTests/test/javafx/scene/control/test/textinput/PasswordFieldTest.java index 5bb96410..66b43925 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/textinput/PasswordFieldTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/textinput/PasswordFieldTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,7 +25,7 @@ package javafx.scene.control.test.textinput; import client.test.ScreenshotCheck; -import client.test.Smoke; + import org.junit.BeforeClass; import org.junit.Test; import org.junit.runner.RunWith; @@ -56,7 +56,7 @@ public void prefColumnCountTest() throws InterruptedException { * Test for TextField setPromptText API */ @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout=300000) public void promptTextTest() throws InterruptedException { testCommon(TextFieldApp.Pages.PromptText.name()); diff --git a/functional/ControlsTests/test/javafx/scene/control/test/textinput/TextAreaPropertiesTest.java b/functional/ControlsTests/test/javafx/scene/control/test/textinput/TextAreaPropertiesTest.java index c6154c0e..11c93e84 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/textinput/TextAreaPropertiesTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/textinput/TextAreaPropertiesTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,7 +24,7 @@ */ package javafx.scene.control.test.textinput; -import client.test.Smoke; + import java.util.EnumSet; import javafx.geometry.Orientation; import javafx.scene.Node; @@ -58,14 +58,14 @@ public void setup() throws InterruptedException { setSize(200, 70); } - @Smoke + //TODO@Smoke @Test(timeout = 300000)//RT-18852 public void scrollLeftPropertyTest() throws InterruptedException, Throwable { Assert.assertEquals((new TextArea()).scrollLeftProperty().getValue(), 0, 0); commonScrollLeftTopTest(Orientation.HORIZONTAL, TextControlTestBase.Properties.scrollleft, "ContentScrolledLeft"); } - @Smoke + //TODO@Smoke @Test(timeout = 300000)//RT-18852 public void scrollTopPropertyTest() throws InterruptedException, Throwable { Assert.assertEquals((new TextArea()).scrollTopProperty().getValue(), 0, 0); @@ -96,14 +96,14 @@ private void commonScrollLeftTopTest(Orientation orientation, TextControlTestBas throwScreenshotError(); } - @Smoke + //TODO@Smoke @Test(timeout = 300000)//RT-18856 public void prefColumnCountPropertyTest() throws InterruptedException { assertEquals((new TextArea()).prefColumnCountProperty().getValue(), 12, 0); prefColumnCountCommonTest(); } - @Smoke + //TODO@Smoke @Test(timeout = 300000)//RT-18856 public void prefRowCountPropertyTest() throws InterruptedException { int[] values = {5, 1, 0, 7, 5}; @@ -118,7 +118,7 @@ public void prefRowCountPropertyTest() throws InterruptedException { } } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void wrapTextPropertyTest() throws InterruptedException { setSize(70, 70); @@ -151,7 +151,7 @@ public void wrapTextPropertyTest() throws InterruptedException { * @throws Throwable */ @Test(timeout = 300000) - @Smoke + //TODO@Smoke public void focusedPropertyTest() throws Throwable { final String text = "some text"; setPropertyByTextField(SettingType.BIDIRECTIONAL, Properties.text, text); diff --git a/functional/ControlsTests/test/javafx/scene/control/test/textinput/TextAreaTest.java b/functional/ControlsTests/test/javafx/scene/control/test/textinput/TextAreaTest.java index 56c12ae2..45f4e366 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/textinput/TextAreaTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/textinput/TextAreaTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,7 +25,7 @@ package javafx.scene.control.test.textinput; import client.test.ScreenshotCheck; -import client.test.Smoke; + import javafx.scene.Node; import javafx.scene.control.Button; import javafx.scene.control.TextArea; @@ -71,7 +71,7 @@ public static void runUI() { * @throws Throwable */ @ScreenshotCheck - @Smoke + //TODO@Smoke @Test public void simplePromptTest() throws Throwable { testCommon(Pages.SimplePromptTest.name()); diff --git a/functional/ControlsTests/test/javafx/scene/control/test/textinput/TextAreaUndoRedoTest.java b/functional/ControlsTests/test/javafx/scene/control/test/textinput/TextAreaUndoRedoTest.java index e4605304..45838449 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/textinput/TextAreaUndoRedoTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/textinput/TextAreaUndoRedoTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,7 +24,7 @@ */ package javafx.scene.control.test.textinput; -import client.test.Smoke; + import java.util.ArrayList; import java.util.List; import javafx.scene.control.test.textinput.undo.*; @@ -51,7 +51,7 @@ public void textAreaBeforeAction() throws InterruptedException { setSize(200, 50); } - @Smoke + //TODO@Smoke @Test public void MultilineUndo() throws InterruptedException { List<Change> changes = new ArrayList<Change>(); @@ -70,7 +70,7 @@ public void MultilineUndo() throws InterruptedException { } } - @Smoke + //TODO@Smoke @Test public void DeleteLineUndo() throws InterruptedException { List<Change> changes = new ArrayList<Change>(); diff --git a/functional/ControlsTests/test/javafx/scene/control/test/textinput/TextControlCommonTests.java b/functional/ControlsTests/test/javafx/scene/control/test/textinput/TextControlCommonTests.java index d16a83cf..e99f9474 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/textinput/TextControlCommonTests.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/textinput/TextControlCommonTests.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,7 +25,7 @@ package javafx.scene.control.test.textinput; import client.test.ScreenshotCheck; -import client.test.Smoke; + import java.util.EnumSet; import javafx.scene.control.Control; import javafx.scene.control.TextArea; @@ -62,7 +62,7 @@ public void setUp() { protected abstract TextInputControl getNewControl(); @Test(timeout = 300000) - @Smoke + //TODO@Smoke public void textPropertyTest() throws InterruptedException { assertEquals(getNewControl().textProperty().getValue(), ""); String[] values = {"text1", "text2", "text3"}; @@ -79,7 +79,7 @@ public void textPropertyTest() throws InterruptedException { } @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void promptStringPropertyTest() throws Throwable { assertEquals(getNewControl().promptTextProperty().getValue(), ""); @@ -162,7 +162,7 @@ public void onActionPropertyCommonTest() { } @Test(timeout = 300000) - @Smoke + //TODO@Smoke public void editablePropertyTest() { final String text = "some text"; for (SettingType type : EnumSet.of(SettingType.BIDIRECTIONAL, SettingType.SETTER, SettingType.UNIDIRECTIONAL)) { @@ -187,7 +187,7 @@ public void editablePropertyTest() { } @Test(timeout = 300000) - @Smoke + //TODO@Smoke /** * Checks font property : all bindings, different values. Checks font of * text node inside. @@ -224,4 +224,4 @@ public void fontPropertyTest() { } restoreStylesheet(); } -} \ No newline at end of file +} diff --git a/functional/ControlsTests/test/javafx/scene/control/test/textinput/TextFieldPropertiesTest.java b/functional/ControlsTests/test/javafx/scene/control/test/textinput/TextFieldPropertiesTest.java index dd0ff804..66c19ee5 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/textinput/TextFieldPropertiesTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/textinput/TextFieldPropertiesTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,7 +24,7 @@ */ package javafx.scene.control.test.textinput; -import client.test.Smoke; + import java.util.EnumSet; import javafx.scene.control.TextField; import javafx.scene.control.test.utils.ptables.AbstractPropertyController; @@ -49,14 +49,14 @@ public static void setUpClass() throws Exception { TextFieldPropertiesApp.main(null); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void prefColumnCountPropertyTest() throws InterruptedException { assertEquals(getNewControl().prefColumnCountProperty().getValue(), 12, 0); prefColumnCountCommonTest(); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void onActionPropertyTest() { onActionPropertyCommonTest(); @@ -67,7 +67,7 @@ protected TextField getNewControl() { return new TextField(); } - @Smoke + //TODO@Smoke @Test(timeout = 300000)//RT-28547 /** * Test checks, that size of control depends (weak check) correctly on the @@ -112,4 +112,4 @@ public Object reached() { } restoreStylesheet(); } -} \ No newline at end of file +} diff --git a/functional/ControlsTests/test/javafx/scene/control/test/textinput/TextFieldTest.java b/functional/ControlsTests/test/javafx/scene/control/test/textinput/TextFieldTest.java index 14fe2c1a..72c1a4b2 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/textinput/TextFieldTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/textinput/TextFieldTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,7 +25,7 @@ package javafx.scene.control.test.textinput; import client.test.ScreenshotCheck; -import client.test.Smoke; + import javafx.scene.control.test.textinput.TextFieldApp.Pages; import org.junit.BeforeClass; import org.junit.Test; @@ -56,7 +56,7 @@ public void prefColumnCountTest() throws InterruptedException { * Test for TextField setPromptText API */ @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void promptTextTest() throws InterruptedException { testCommon(Pages.PromptText.name()); @@ -66,7 +66,7 @@ public void promptTextTest() throws InterruptedException { * Test for TextField setAlignment API */ @ScreenshotCheck - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void alignmentTest() throws InterruptedException { testCommon(Pages.Alignment.name()); diff --git a/functional/ControlsTests/test/javafx/scene/control/test/textinput/UndoRedoBaseTests.java b/functional/ControlsTests/test/javafx/scene/control/test/textinput/UndoRedoBaseTests.java index 28650aa0..3c286472 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/textinput/UndoRedoBaseTests.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/textinput/UndoRedoBaseTests.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,7 +24,7 @@ */ package javafx.scene.control.test.textinput; -import client.test.Smoke; + import java.awt.Toolkit; import java.lang.reflect.InvocationTargetException; import java.util.ArrayList; @@ -60,7 +60,7 @@ public void setUp() { dockTxt = new TextInputControlDock(testedControl); } - @Smoke + //TODO@Smoke @Test public void UndoTypedCharsReplacedSelection() throws InterruptedException { List<Change> changes = new ArrayList<Change>(); @@ -76,7 +76,7 @@ public void UndoTypedCharsReplacedSelection() throws InterruptedException { Assert.assertTrue("Test edit chain. See output", testChanges("Undo: type, select, type, undo", changes)); } - @Smoke + //TODO@Smoke @Test public void UndoPasteCharsReplacedSelection() throws InterruptedException { List<Change> changes = new ArrayList<Change>(); @@ -92,7 +92,7 @@ public void UndoPasteCharsReplacedSelection() throws InterruptedException { Assert.assertTrue("Test edit chain. See output", testChanges("Undo: type, select, type, undo", changes)); } - @Smoke + //TODO@Smoke @Test public void ZeroMoveCaretBetweenType() throws InterruptedException { List<Change> changes = new ArrayList<Change>(); @@ -110,7 +110,7 @@ public void ZeroMoveCaretBetweenType() throws InterruptedException { Assert.assertTrue("Test edit chain. See output", testChanges("Move Caret at sezo offset between type", changes)); } - @Smoke + //TODO@Smoke //@Test//Commented out, as RT-22649 is a feature. public void BackspaceSequence() throws InterruptedException { List<Change> changes = new ArrayList<Change>(); @@ -127,7 +127,7 @@ public void BackspaceSequence() throws InterruptedException { Assert.assertTrue("Test edit chain. See output", testChanges("Backspace sequence must be one transaction", changes)); } - @Smoke + //TODO@Smoke //@Test//Commented out, as RT-22649 is a feature. public void DeleteSequence() throws InterruptedException { List<Change> changes = new ArrayList<Change>(); @@ -144,7 +144,7 @@ public void DeleteSequence() throws InterruptedException { Assert.assertTrue("Test edit chain. See output", testChanges("Delete sequence must be one transaction", changes)); } - @Smoke + //TODO@Smoke //@Test//Commented out, as RT-22649 is a feature. public void DeleteAndBackspaceSequence() throws InterruptedException { List<Change> changes = new ArrayList<Change>(); @@ -162,7 +162,7 @@ public void DeleteAndBackspaceSequence() throws InterruptedException { Assert.assertTrue("Test edit chain. See output", testChanges("Delete and backspace sequence must be one transaction", changes)); } - @Smoke + //TODO@Smoke //@Test//Commented out, as RT-22966 is a feature. public void CheckCaretPositionAfterUndoDeletion() throws InterruptedException { List<Change> changes = new ArrayList<Change>(); @@ -175,7 +175,7 @@ public void CheckCaretPositionAfterUndoDeletion() throws InterruptedException { Assert.assertTrue("Test edit chain. See output", testChanges("Check caret position after undo deletion", changes)); } - @Smoke + //TODO@Smoke //@Test//Commented out, as RT-22966 is a feature. public void CheckCaretPositionAfterUndoPasteAtSelection() throws InterruptedException { List<Change> changes = new ArrayList<Change>(); @@ -189,7 +189,7 @@ public void CheckCaretPositionAfterUndoPasteAtSelection() throws InterruptedExce Assert.assertTrue("Test edit chain. See output", testChanges("Check caret position after undo paste at selection", changes)); } - @Smoke + //TODO@Smoke @Test public void RedoTest1() throws InterruptedException { List<Change> changes = new ArrayList<Change>(); @@ -210,7 +210,7 @@ public void RedoTest1() throws InterruptedException { Assert.assertTrue("Test edit chain. See output", testChanges("Redo test", changes)); } - @Smoke + //TODO@Smoke @Test public void RedoTest2() throws InterruptedException { List<Change> changes = new ArrayList<Change>(); @@ -233,7 +233,7 @@ public void RedoTest2() throws InterruptedException { Assert.assertTrue("Test edit chain. See output", testChanges("Redo test", changes)); } - @Smoke + //TODO@Smoke @Test public void TruncateUndoChain() throws InterruptedException { List<Change> changes = new ArrayList<Change>(); @@ -257,7 +257,7 @@ public void TruncateUndoChain() throws InterruptedException { Assert.assertTrue("Test edit chain. See output", testChanges("Truncate undo chain", changes)); } -// @Smoke +// //TODO@Smoke // Test // public void HugeRandomTest() throws NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, InterruptedException { // List<Change> changes = buildRandomChange(1000); diff --git a/functional/ControlsTests/test/javafx/scene/control/test/toggleradiobutton/RadioButtonEventsTest.java b/functional/ControlsTests/test/javafx/scene/control/test/toggleradiobutton/RadioButtonEventsTest.java index 6a4a2584..7d528707 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/toggleradiobutton/RadioButtonEventsTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/toggleradiobutton/RadioButtonEventsTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,7 +24,7 @@ */ package javafx.scene.control.test.toggleradiobutton; -import client.test.Smoke; + import javafx.scene.control.ToggleButton; import static javafx.scene.control.test.ToggleButtonNewApp.*; import org.jemmy.control.Wrap; @@ -44,7 +44,7 @@ @RunWith(FilteredTestRunner.class) public class RadioButtonEventsTest extends ToggleButtonTestBase { - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void simpleEventTest() throws InterruptedException, Exception { checkTwoStatesComplex(false, 0); @@ -56,7 +56,7 @@ public void simpleEventTest() throws InterruptedException, Exception { checkTwoStatesComplex(false, 2); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void eventWithBindingTest() throws InterruptedException, Exception { clickToggleButton(BINDING_SET_TOGGLE_BUTTON_ID); @@ -70,7 +70,7 @@ public void eventWithBindingTest() throws InterruptedException, Exception { checkTwoStatesComplex(false, 2); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void eventWithGroupingAndBindingTest() throws InterruptedException, Exception { clickToggleButton(BINDING_SET_TOGGLE_BUTTON_ID); @@ -85,7 +85,7 @@ public void eventWithGroupingAndBindingTest() throws InterruptedException, Excep checkTwoStatesComplex(true, 1); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void eventWithGroupingTest() throws InterruptedException, Exception { clickToggleButton(GROUPING_TOGGLE_BUTTON_ID); @@ -102,7 +102,7 @@ public void eventWithGroupingTest() throws InterruptedException, Exception { checkThreeStatesComplex(false, true, 2); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void keyBoardEventsTest() throws InterruptedException, Exception { Wrap<? extends ToggleButton> toggle1 = parent.lookup(ToggleButton.class, new ByID<ToggleButton>(TOGGLE_BUTTON_1_ID)).wrap(); diff --git a/functional/ControlsTests/test/javafx/scene/control/test/toggleradiobutton/RadioButtonFreeTest.java b/functional/ControlsTests/test/javafx/scene/control/test/toggleradiobutton/RadioButtonFreeTest.java index 09cf2cf6..c7af0bf3 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/toggleradiobutton/RadioButtonFreeTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/toggleradiobutton/RadioButtonFreeTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,7 +26,7 @@ import test.javaclient.shared.FilteredTestRunner; import org.junit.runner.RunWith; -import client.test.Smoke; + import org.junit.Test; import static javafx.scene.control.test.ToggleButtonNewApp.*; @@ -41,7 +41,7 @@ public class RadioButtonFreeTest extends ToggleButtonTestBase { * Simple test, checking pressed state and pressed state holding * and checking state of listeners by binded checkboxes. */ - @Smoke + //TODO@Smoke @Test(timeout=300000) public void simpleTogglingTest() { for (int i = 0; i < ITERATIONS; i++) { @@ -62,7 +62,7 @@ public void simpleTogglingTest() { /** * Test, verifying working under one bidirectional binding. */ - @Smoke + //TODO@Smoke @Test(timeout=300000) public void freeWithidirectionalBindingTest() { clickToggleButton(BINDING_SET_TOGGLE_BUTTON_ID); @@ -79,7 +79,7 @@ public void freeWithidirectionalBindingTest() { /** * Test, checking unidirectional setting binding. */ - @Smoke + //TODO@Smoke @Test(timeout=300000) public void freeUnidirectionalBindingTest() { clickToggleButton(BINDING_SET_TOGGLE_BUTTON_ID); diff --git a/functional/ControlsTests/test/javafx/scene/control/test/toggleradiobutton/RadioButtonGroupedTest.java b/functional/ControlsTests/test/javafx/scene/control/test/toggleradiobutton/RadioButtonGroupedTest.java index 72c25e7b..12729bb9 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/toggleradiobutton/RadioButtonGroupedTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/toggleradiobutton/RadioButtonGroupedTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,7 +26,7 @@ import test.javaclient.shared.FilteredTestRunner; import org.junit.runner.RunWith; -import client.test.Smoke; + import org.junit.Before; import org.junit.Test; import static javafx.scene.control.test.ToggleButtonNewApp.*; @@ -47,7 +47,7 @@ public void setUp() { * This simple test checks logic of working in ToggleGroup: not more than * one toggle can be selected at the same time. */ - @Smoke + //TODO@Smoke @Test(timeout=300000) public void groupSimpleTest() { for (int i = 0; i < ITERATIONS; i++) { @@ -67,7 +67,7 @@ public void groupSimpleTest() { * bidirectional binding, other is set by unidirectional binding and we don't * use ToggleButtons to set state directly - we use only binded checkboxes */ - @Smoke + //TODO@Smoke @Test(timeout=300000) //RT-17205 public void groupUnidirectionalBidirectionalBundingWithoutDirectControlTest() { clickToggleButton(BINDING_SET_TOGGLE_BUTTON_ID); @@ -94,7 +94,7 @@ public void groupUnidirectionalBidirectionalBundingWithoutDirectControlTest() { * bidirectional binding, other is set by unidirectinal binding and we try to * set state by ToggleButtons. */ - @Smoke + //TODO@Smoke @Test(timeout=300000) //RT-17205 public void groupUnidirectionalBidirectinalBindingWithDirectControlTest() { clickToggleButton(BINDING_SET_TOGGLE_BUTTON_ID); diff --git a/functional/ControlsTests/test/javafx/scene/control/test/toggleradiobutton/ToggleButtonEventsTest.java b/functional/ControlsTests/test/javafx/scene/control/test/toggleradiobutton/ToggleButtonEventsTest.java index 9012faf8..a819247b 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/toggleradiobutton/ToggleButtonEventsTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/toggleradiobutton/ToggleButtonEventsTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,7 +24,7 @@ */ package javafx.scene.control.test.toggleradiobutton; -import client.test.Smoke; + import javafx.scene.control.ToggleButton; import static javafx.scene.control.test.ToggleButtonNewApp.*; import org.jemmy.control.Wrap; @@ -50,7 +50,7 @@ public void setUp() { clickToggleButton(SETTING_CONTROL_TOGGLE_BUTTON_ID); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void simpleEventTest() throws InterruptedException, Exception { checkTwoStatesComplex(false, 0); @@ -62,7 +62,7 @@ public void simpleEventTest() throws InterruptedException, Exception { checkTwoStatesComplex(false, 2); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void eventWithBindingTest() throws InterruptedException, Exception { clickToggleButton(BINDING_SET_TOGGLE_BUTTON_ID); @@ -76,7 +76,7 @@ public void eventWithBindingTest() throws InterruptedException, Exception { checkTwoStatesComplex(false, 2); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void eventWithGroupingAndBindingTest() throws InterruptedException, Exception { clickToggleButton(BINDING_SET_TOGGLE_BUTTON_ID); @@ -91,7 +91,7 @@ public void eventWithGroupingAndBindingTest() throws InterruptedException, Excep checkTwoStatesComplex(false, 2); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void eventWithGroupingTest() throws InterruptedException, Exception { clickToggleButton(GROUPING_TOGGLE_BUTTON_ID); @@ -108,7 +108,7 @@ public void eventWithGroupingTest() throws InterruptedException, Exception { checkThreeStatesComplex(false, false, 3); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void keyBoardEventsTest() throws InterruptedException, Exception { Wrap<? extends ToggleButton> toggle1 = parent.lookup(ToggleButton.class, new ByID<ToggleButton>(TOGGLE_BUTTON_1_ID)).wrap(); diff --git a/functional/ControlsTests/test/javafx/scene/control/test/toggleradiobutton/ToggleButtonFreeTest.java b/functional/ControlsTests/test/javafx/scene/control/test/toggleradiobutton/ToggleButtonFreeTest.java index 7c58b4fe..404c6a02 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/toggleradiobutton/ToggleButtonFreeTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/toggleradiobutton/ToggleButtonFreeTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,7 +26,7 @@ import test.javaclient.shared.FilteredTestRunner; import org.junit.runner.RunWith; -import client.test.Smoke; + import org.junit.Before; import org.junit.Test; import static javafx.scene.control.test.ToggleButtonNewApp.*; @@ -47,7 +47,7 @@ public void setUp() { * Simple test, checking pressing and holding pressed state * and checking state of listening by binded checkboxes. */ - @Smoke + //TODO@Smoke @Test(timeout=300000) public void simpleTogglingTest() { for (int i = 0; i < ITERATIONS; i++) { @@ -68,7 +68,7 @@ public void simpleTogglingTest() { /** * Test, verifying working with one bidirectional binding. */ - @Smoke + //TODO@Smoke @Test(timeout=300000) public void freeWithidirectionalBindingTest() { clickToggleButton(BINDING_SET_TOGGLE_BUTTON_ID); @@ -85,7 +85,7 @@ public void freeWithidirectionalBindingTest() { /** * Test, checking unidirectional setting binding. */ - @Smoke + //TODO@Smoke @Test(timeout=300000) public void freeUnidirectionalBindingTest() { clickToggleButton(BINDING_SET_TOGGLE_BUTTON_ID); diff --git a/functional/ControlsTests/test/javafx/scene/control/test/toggleradiobutton/ToggleButtonGroupedTest.java b/functional/ControlsTests/test/javafx/scene/control/test/toggleradiobutton/ToggleButtonGroupedTest.java index 6914fdf6..8c1d8f02 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/toggleradiobutton/ToggleButtonGroupedTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/toggleradiobutton/ToggleButtonGroupedTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,7 +26,7 @@ import test.javaclient.shared.FilteredTestRunner; import org.junit.runner.RunWith; -import client.test.Smoke; + import org.junit.Test; import org.junit.Before; import static javafx.scene.control.test.ToggleButtonNewApp.*; @@ -48,7 +48,7 @@ public void setUp() { * This simple test checks logic of working in ToggleGroup: not more than * one toggle can be selected at the same time. */ - @Smoke + //TODO@Smoke @Test(timeout=300000) public void groupedSimpleTest() { for (int i = 0; i < ITERATIONS; i++) { @@ -71,7 +71,7 @@ public void groupedSimpleTest() { * bidirectional binding, other is set by unidirectional binding and we don't * use ToggleButtons to set state directly. */ - @Smoke + //TODO@Smoke @Test(timeout=300000) public void groupedUnidirectionalBidirectionalBundingWithoutDirectControlTest() { clickToggleButton(BINDING_SET_TOGGLE_BUTTON_ID); @@ -100,7 +100,7 @@ public void groupedUnidirectionalBidirectionalBundingWithoutDirectControlTest() * * Failes due to RT-17205 */ - @Smoke + //TODO@Smoke @Test(timeout=300000) public void groupUnidirectionalBidirectinalBindingWithDirectControlTest() { clickToggleButton(BINDING_SET_TOGGLE_BUTTON_ID); diff --git a/functional/ControlsTests/test/javafx/scene/control/test/treetable/TreeTableAsTableTest.java b/functional/ControlsTests/test/javafx/scene/control/test/treetable/TreeTableAsTableTest.java index 1cbfb21d..ab3a3e5f 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/treetable/TreeTableAsTableTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/treetable/TreeTableAsTableTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,7 +24,7 @@ */ package javafx.scene.control.test.treetable; -import client.test.Smoke; + import java.util.Comparator; import java.util.concurrent.atomic.AtomicBoolean; import javafx.collections.FXCollections; @@ -60,7 +60,7 @@ public class TreeTableAsTableTest extends TableViewTest { * Checks that when the sorting is applied to the underlying data collection * the cells are rendered in the right order. */ - @Smoke + //TODO@Smoke @Test(timeout = 30000) @Override public void renderingAfterSortingTest() throws Throwable { diff --git a/functional/ControlsTests/test/javafx/scene/control/test/treetable/TreeTableAsTreeTest.java b/functional/ControlsTests/test/javafx/scene/control/test/treetable/TreeTableAsTreeTest.java index 43a9dfd1..3f124f87 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/treetable/TreeTableAsTreeTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/treetable/TreeTableAsTreeTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,7 +24,7 @@ */ package javafx.scene.control.test.treetable; -import client.test.Smoke; + import java.util.Comparator; import javafx.collections.FXCollections; import javafx.collections.ObservableList; @@ -64,7 +64,7 @@ public void treeTablePreparation() { * Checks that when the sorting is applied to the underlying data collection * the cells are rendered in the right order. */ - @Smoke + //TODO@Smoke @Test(timeout = 30000) @Override public void renderingAfterSortingTest() throws Throwable { @@ -126,4 +126,4 @@ public void run(Object... parameters) throws Exception { String msg = validator.getFailureReason(); assertTrue(msg, result); } -} \ No newline at end of file +} diff --git a/functional/ControlsTests/test/javafx/scene/control/test/treetable/TreeTableMultipleSelectionTest.java b/functional/ControlsTests/test/javafx/scene/control/test/treetable/TreeTableMultipleSelectionTest.java index 36cdd07f..7dd8f611 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/treetable/TreeTableMultipleSelectionTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/treetable/TreeTableMultipleSelectionTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,7 +24,7 @@ */ package javafx.scene.control.test.treetable; -import client.test.Smoke; + import java.util.Collection; import java.util.Collections; import java.util.HashSet; @@ -76,7 +76,7 @@ public class TreeTableMultipleSelectionTest extends TableViewMultipleCellSelecti * parent is collapsed. Test checks that only the parent is selected after * collapsing. see RT-27180 for details. */ - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void testCollapse() { multipleSelectionWrap.mouse().click(); @@ -120,7 +120,7 @@ public void testCollapse() { * expanded. N.B. Point class hold cell position in a following manner: x * stands for column index and y stands for row index respectively. */ - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void testSingleLineExpantion() { multipleSelectionWrap.mouse().click(); @@ -173,7 +173,7 @@ public void testSingleLineExpantion() { * Tests behavior of selected cells when they belong to several collapsed * tree items and each is expanded. */ - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void testMultipleExpantion() { multipleSelectionWrap.mouse().click(); @@ -244,7 +244,7 @@ public void testMultipleExpantion() { * Tests selection behavior when the row which contains selected cells is * removed. */ - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void testSingleRowRemoving() { enableMultipleCellSelection(); @@ -292,7 +292,7 @@ public void testSingleRowRemoving() { * Tests selection behavior when the column which contains selected cells is * removed. */ - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void testSingleColumnRemoving() { enableMultipleCellSelection(); @@ -438,4 +438,4 @@ public boolean check(TreeTableCell control) { } }).wrap(); } -} \ No newline at end of file +} diff --git a/functional/ControlsTests/test/javafx/scene/control/test/treeview/TreeViewOnlyTest.java b/functional/ControlsTests/test/javafx/scene/control/test/treeview/TreeViewOnlyTest.java index 739b2f76..731b05d3 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/treeview/TreeViewOnlyTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/treeview/TreeViewOnlyTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,7 +24,7 @@ */ package javafx.scene.control.test.treeview; -import client.test.Smoke; + import org.junit.Test; import static javafx.scene.control.test.util.TableListCommonTests.fixedCellSizePropertyCSSTestCommon; import static javafx.scene.control.test.util.TableListCommonTests.fixedCellSizePropertyTestCommon; @@ -34,14 +34,14 @@ */ public class TreeViewOnlyTest extends TestBase { - @Smoke + //TODO@Smoke @Test(timeout = 600000) public void fixedCellSizePropertyTest() throws InterruptedException { adjustControl(); fixedCellSizePropertyTestCommon(testedControl, CommonProperties.fixedCellSize, 21); } - @Smoke + //TODO@Smoke @Test(timeout = 600000) public void fixedCellSizePropertyCSSTest() { adjustControl(); @@ -52,4 +52,4 @@ enum CommonProperties { fixedCellSize }; -} \ No newline at end of file +} diff --git a/functional/ControlsTests/test/javafx/scene/control/test/treeview/TreeViewTest.java b/functional/ControlsTests/test/javafx/scene/control/test/treeview/TreeViewTest.java index f6677d65..ba0a8f8a 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/treeview/TreeViewTest.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/treeview/TreeViewTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,7 +24,7 @@ */ package javafx.scene.control.test.treeview; -import client.test.Smoke; + import com.oracle.jdk.sqe.cc.markup.Covers; import com.oracle.jdk.sqe.cc.markup.Covers.Level; import javafx.scene.control.skin.TableHeaderRow; @@ -90,7 +90,7 @@ public class TreeViewTest extends TestBase { @Test(timeout = 600000) - @Smoke + //TODO@Smoke /* * This test checks behavior of TreeItem.nextSibling(), * TreeiTem.nextSibling(TreeItem), TreeiTem.previousSibling(), @@ -163,7 +163,7 @@ public void nextAndPreviousSiblingTest() { } @Test(timeout = 600000) - @Smoke + //TODO@Smoke /* * this test checks behavior of isLeaf property. Removes, adds content and * see, how this property is modified. @@ -204,7 +204,7 @@ public void isLeafTest() { } @Test(timeout = 600000) - @Smoke + //TODO@Smoke /* * This test checks behavior of parent property. It is readonly property. * This test make some actions over tree and checks state of this property @@ -233,7 +233,7 @@ public void parentPropertyTest() { } @Test(timeout = 600000) - @Smoke + //TODO@Smoke /* * This test create a tree : Root -> item1 -> item2 and apply * collapsing/expanding operations over it. And observe, how @@ -320,7 +320,7 @@ private void checkExpandedCollapsedCounters(int expRoot, int expItem1, int expIt } @Test(timeout = 600000) - @Smoke + //TODO@Smoke /* * This test checks ChildrenModificationEvent. This event is about changing * of size of visible subtree. This event is about adding and removing @@ -375,7 +375,7 @@ public void ChildrenModificationEventTest() { intermediateStateCheck(); } - @Smoke + //TODO@Smoke @Test(timeout = 600000) /* * Graphic modification - an event, which is propagated, when graphic @@ -421,7 +421,7 @@ protected void checkGraphicModificationEvent(int counterRoot, int counterItem1, } @Test(timeout = 600000) - @Smoke + //TODO@Smoke @Covers(value = {"TreeView.onEditStartProperty.SET", "TreeView.onEditCancelProperty.SET"}, level = Level.FULL) public void testOnEditStartCancel() throws Throwable { switchToPropertiesTab(isTreeTests ? "TreeView" : "TreeTableView"); @@ -454,7 +454,7 @@ public void testOnEditStartCancel() throws Throwable { } @Test(timeout = 600000) - @Smoke + //TODO@Smoke @Covers(value = "TreeView.onEditCommitProperty.SET", level = Level.FULL) public void testOnEditCommit() throws Throwable { switchToPropertiesTab(isTreeTests ? "TreeView" : "TreeTableView"); @@ -503,7 +503,7 @@ public String toString() { } @Test(timeout = 600000) - @Smoke + //TODO@Smoke @Covers(value = {"TreeView.onEditStartProperty.GET", "TreeView.onEditCancelProperty.GET", "TreeView.onEditCommitProperty.GET"}, level = Level.FULL) public void testOnEditOnCancelEventSequence() throws Throwable { clickButtonForTestPurpose(BTN_SET_ON_EDIT_EVENT_HANDLERS); @@ -575,7 +575,7 @@ public String toString() { } @Test(timeout = 600000) - @Smoke + //TODO@Smoke public void testOnEditOnCommitEventSequence() throws Throwable { clickButtonForTestPurpose(BTN_SET_ON_EDIT_EVENT_HANDLERS); @@ -650,7 +650,7 @@ public String toString() { assertTrue(timestampsOfEvents.get(onEditStart) <= timestampsOfEvents.get(onEditCommit)); } - @Smoke + //TODO@Smoke @Test(timeout = 600000) /* * This test checks working of scrollTo method of TreeView. Checks behavior, @@ -698,7 +698,7 @@ public void scrollToTest() throws InterruptedException { } } - @Smoke + //TODO@Smoke @Test(timeout = 600000) /** * This test checks the valueChangedEvent() of a tree item. When the value @@ -1195,7 +1195,7 @@ public void selectionCorrectnessOnExpandingCtrlATest() { * Checks that when the sorting is applied to the underlying data collection * the cells are rendered in the right order. */ - @Smoke + //TODO@Smoke @Test(timeout = 120000) public void renderingAfterSortingTest() throws Throwable { adjustControl(); diff --git a/functional/ControlsTests/test/javafx/scene/control/test/util/ClickableTrack.java b/functional/ControlsTests/test/javafx/scene/control/test/util/ClickableTrack.java index 0bf80205..4ddd2968 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/util/ClickableTrack.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/util/ClickableTrack.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,9 +27,9 @@ import org.jemmy.JemmyException; import org.jemmy.Point; -import org.jemmy.input.ScrollTrack; -import org.jemmy.interfaces.Shiftable; -import org.jemmy.interfaces.Shifter; +import org.jemmy.fx.input.ScrollTrack; +import org.jemmy.fx.interfaces.Shiftable; +import org.jemmy.fx.interfaces.Shifter; /** * The class to encapsulate calculations for performing mouse click actions over Slider, ScrollBar diff --git a/functional/ControlsTests/test/javafx/scene/control/test/util/TableListCommonTests.java b/functional/ControlsTests/test/javafx/scene/control/test/util/TableListCommonTests.java index cbe2ba3b..9fabd0e9 100644 --- a/functional/ControlsTests/test/javafx/scene/control/test/util/TableListCommonTests.java +++ b/functional/ControlsTests/test/javafx/scene/control/test/util/TableListCommonTests.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,7 +24,7 @@ */ package javafx.scene.control.test.util; -import client.test.Smoke; + import java.awt.Toolkit; import java.util.HashSet; import javafx.geometry.Orientation; @@ -101,7 +101,7 @@ public static void switchNumLockOff() { } } - @Smoke + //TODO@Smoke @Test(timeout = 300000)//Must be Ok on list. public void keyboardSequentialSingleSelectionTest() throws Throwable { adjustControl(); @@ -119,7 +119,7 @@ public void keyboardSequentialSingleSelectionTest() throws Throwable { assertTrue(testedControl.getScreenBounds().contains(getCellWrap(0, DATA_ITEMS_NUM - 1).getScreenBounds())); } - @Smoke + //TODO@Smoke @Test(timeout = 3000000) public void singleRowSelectionTest() throws Throwable { adjustControl(); @@ -128,7 +128,7 @@ public void singleRowSelectionTest() throws Throwable { selectionCycle(Utils.isMacOS() ? KeyboardButtons.META : KeyboardButtons.CONTROL); } - @Smoke + //TODO@Smoke @Test(timeout = 3000000) public void multipleRowSelectionTest() throws Throwable { adjustControl(); @@ -140,7 +140,7 @@ public void multipleRowSelectionTest() throws Throwable { } @Test - @Smoke + //TODO@Smoke public void onDiscontinuousSelectionTest() { adjustControl(); switchOnMultiple(); @@ -174,7 +174,7 @@ public void onDiscontinuousSelectionTest() { intermediateStateCheck(); } - @Smoke + //TODO@Smoke @Test(timeout = 300000)//Ok for ListView public void keyboardShiftSequentialMultipleSelectionTest() throws Throwable { adjustControl(); @@ -192,19 +192,19 @@ public void keyboardShiftSequentialMultipleSelectionTest() throws Throwable { assertTrue(testedControl.getScreenBounds().contains(getCellWrap(0, DATA_ITEMS_NUM - 1).getScreenBounds())); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void keyboardRangeMultipleSelectionTest() throws Throwable { keyboardRangeMultipleSelectionCycle(false); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void keyboardRangeMultipleSelectionDiscontinuousTest() throws Throwable { keyboardRangeMultipleSelectionCycle(true); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void keyboardShortcutsSpaceTest() throws Throwable { adjustControl(); @@ -241,7 +241,7 @@ public void keyboardShortcutsSpaceTest() throws Throwable { intermediateStateCheck(); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void keyboardCtrlATest() throws Throwable { adjustControl(); @@ -271,19 +271,19 @@ public void keyboardCtrlATest() throws Throwable { intermediateStateCheck(); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void keyboardHomeEndTest() throws Throwable { keyboardHomeEndCycle(); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void keyboardCtrlHomeEndTest() throws Throwable { keyboardHomeEndCycle(CTRL_DOWN_MASK_OS); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void keyboardShiftSpaceTest() throws Throwable { adjustControl(); @@ -328,61 +328,61 @@ public void keyboardShiftSpaceTest() throws Throwable { } } - @Smoke + //TODO@Smoke @Test(timeout = 300000)//RT-18413 public void keyboardShiftHomeEndTest() throws Throwable { keyboardHomeEndCycle(KeyboardModifiers.SHIFT_DOWN_MASK); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void keyboardCtrlShiftHomeEndTest() throws Throwable { keyboardHomeEndCycle(KeyboardModifiers.SHIFT_DOWN_MASK, CTRL_DOWN_MASK_OS); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void keyboardPageUpPageDownTest() throws Throwable { keyboardPageUpPageDownCycle(); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void keyboardCtrlPageUpPageDownTest() throws Throwable { keyboardPageUpPageDownCycle(CTRL_DOWN_MASK_OS); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void keyboardShiftPageUpPageDownTest() throws Throwable { keyboardPageUpPageDownCycle(KeyboardModifiers.SHIFT_DOWN_MASK); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void keyboardCtrlShiftPageUpPageDownTest() throws Throwable { keyboardPageUpPageDownCycle(KeyboardModifiers.SHIFT_DOWN_MASK, CTRL_DOWN_MASK_OS); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void keyboardUpDownTest() throws Throwable { keyboardUpDownCycle(); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void keyboardCtrlUpDownTest() throws Throwable { keyboardUpDownCycle(CTRL_DOWN_MASK_OS); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void keyboardShiftUpDownTest() throws Throwable { keyboardUpDownCycle(KeyboardModifiers.SHIFT_DOWN_MASK); } - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void keyboardCtrlShiftUpDownTest() throws Throwable { keyboardUpDownCycle(KeyboardModifiers.SHIFT_DOWN_MASK, CTRL_DOWN_MASK_OS); @@ -392,7 +392,7 @@ public void keyboardCtrlShiftUpDownTest() throws Throwable { * Tests selection by applying shift + left mouse click * combination on the control cells. */ - @Smoke + //TODO@Smoke @Test(timeout = 300000) public void shiftLeftMouseClick() throws Throwable { MultipleSelectionHelper tmp = null; @@ -758,4 +758,4 @@ final protected void intermediateStateCheck() { protected void doIntermediateStateCheck() { } -} \ No newline at end of file +} diff --git a/functional/ControlsTests/test/javafx/scrollEvent/ScrollEventTest.java b/functional/ControlsTests/test/javafx/scrollEvent/ScrollEventTest.java index a6653594..b2241150 100644 --- a/functional/ControlsTests/test/javafx/scrollEvent/ScrollEventTest.java +++ b/functional/ControlsTests/test/javafx/scrollEvent/ScrollEventTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,11 +24,11 @@ */ package javafx.scrollEvent; -import client.test.OnlyPlatformMethod; -import client.test.Platforms; + + import test.javaclient.shared.FilteredTestRunner; import org.junit.runner.RunWith; -import client.test.Smoke; + import org.jemmy.fx.ByID; import javafx.scene.Node; import javafx.scene.Scene; @@ -50,7 +50,7 @@ @RunWith(FilteredTestRunner.class) public class ScrollEventTest extends TestBase { - @Smoke + //TODO@Smoke @Test(timeout=300000) public void commonTest() { for (Object nf : nodeChooser.as(Selectable.class).getStates()) { @@ -62,7 +62,7 @@ public void commonTest() { } } - @Smoke + //TODO@Smoke @Test(timeout=300000) public void horizontalTest() throws InterruptedException { for (Object nf : nodeChooser.as(Selectable.class).getStates()) { @@ -84,8 +84,8 @@ public void horizontalTest() throws InterruptedException { * when different key combinations are pressed. * */ - @Smoke - @OnlyPlatformMethod(Platforms.WINDOWS) + //TODO@Smoke + //TODO@OnlyPlatformMethod(Platforms.WINDOWS) @Test(timeout=300000) public void contextMenuKeyCombinationsTestWindows() { enableContextMenuTest(); @@ -126,8 +126,8 @@ public void contextMenuKeyCombinationsTestWindows() { * when different key combinations are pressed. * */ - @Smoke - @OnlyPlatformMethod(Platforms.MAC) + //TODO@Smoke + //TODO@OnlyPlatformMethod(Platforms.MAC) @Test(timeout=300000) public void contextMenuKeyCombinationsTestMac() { enableContextMenuTest(); @@ -156,8 +156,8 @@ public void contextMenuKeyCombinationsTestMac() { * when different key combinations are pressed. * */ - @Smoke - @OnlyPlatformMethod(Platforms.UNIX) + //TODO@Smoke + //TODO@OnlyPlatformMethod(Platforms.UNIX) @Test(timeout=300000) public void contextMenuKeyCombinationsTestLinux() { enableContextMenuTest(); @@ -190,7 +190,7 @@ public void contextMenuKeyCombinationsTestLinux() { * Expected output: only one new window appears on the stage * */ - @Smoke + //TODO@Smoke @Test(timeout=300000) public void contextMenuPopupTest() { enableContextMenuTest(); diff --git a/functional/FxmlTests/.gitignore b/functional/FxmlTests/.gitignore new file mode 100644 index 00000000..378eac25 --- /dev/null +++ b/functional/FxmlTests/.gitignore @@ -0,0 +1 @@ +build diff --git a/functional/FxmlTests/build.xml b/functional/FxmlTests/build.xml index 6e47dac1..54b1dfad 100644 --- a/functional/FxmlTests/build.xml +++ b/functional/FxmlTests/build.xml @@ -1,102 +1,19 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -/* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code 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 General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ ---> -<project name="FxmlTests" default="default" basedir="."> - <description>Builds, tests, and runs the project SceneGraphTests.</description> - - <import file="../../tools/SharedTestUtilsOpen/image-utils.xml"/> - <import file="../../tools/FxTestRunner/javatest_fx.xml"/> - <import file="../../tools/FxTestRunner/run_javatest_macro.xml"/> - <import file="../../tools/FxTestRunner/plugin_support.xml"/> - - <condition property="external.output" value="${external.output}" else="${basedir}/.."> - <isset property="external.output"/> - </condition> - - <property name="image.properties" location="${basedir}/image.properties"/> - <property name="test.sources" value="test"/> - - <target name="-pre-init" unless="no.need.to.find.java.fx"> - <ant antfile="../../detect_javafx-nb.xml" inheritall="true"> - <property name="basedir" location="${basedir}/../.."/> - <property name="property.file" value="${basedir}/nbproject/private/private.properties"/> - </ant> - </target> - - <import file="nbproject/build-impl.xml"/> - - <target name="-post-clean"> - <delete dir="dist-plugin"/> - </target> - - <!-- javatest support --> - <target name="javatest" depends="compile, compile-test, run-manual"/> - <target name="run-manual" depends="init,dojavatest"/> - <target name="run-automated" depends="-post-jar, javatest-automated"/> - <target name="run-automated-nobuild" depends="init, dist-plugin, javatest-automated"/> - <target name="-post-jar" depends="compile-test, dist-plugin"/> - - <target name="check-template" unless="template"> - <fail message="template variable must be set to merge"/> - </target> - <target name="feature-coverage-merge" depends="-post-jar, check-template"> - <java classname="com.oracle.jdk.sqe.cc.markup.Merger"> - <classpath> - <pathelement location="../lib/TestMarkup.jar"/> - </classpath> - <arg line="-o"/> - <arg line="${basedir}/result.fcov"/> - <arg line="${template}"/> - <arg line="${basedir}/coverage.fcov"/> - </java> - <java classname="com.oracle.jdk.sqe.cc.markup.Report"> - <classpath> - <pathelement location="../lib/TestMarkup.jar"/> - </classpath> - <arg line="-o"/> - <arg line="${basedir}/report.html"/> - <arg line="${basedir}/result.fcov"/> - </java> - </target> - - <target name="generate-fxml-coverage" depends="compile"> - <java classname="test.fxmltests.cover.SpecParser"> - <classpath> - <pathelement location="build/classes"/> - </classpath> - <arg line="${introduction.to.fxml}"/> - </java> - <javadoc - sourcepath="test" - packagenames="test.fxmltests.functional" - doclet="test.fxmltests.cover.FxmlCoverageDoclet" - docletpath="build/classes"> - <arg value="-J-Dallasserts=asserts.txt"/> - </javadoc> - </target> - -</project> +<?xml version="1.0" encoding="UTF-8"?> +<project name="fxml.tests" default="compile"> + <basename file="${basedir}" property="."/> + <property name="rootdir" location="${basedir}/../.."/> + <property name="project.name" value="FxmlTests"/> + <import file="${basedir}/../../tools/make/build-template.xml"/> + <property name="dependencies.classpath" value="${jemmyfx-src}/build/classes${path.separator}${glass-robot-src}/build/classes${path.separator}${glass-image-src}/build/classes${path.separator}${jtreg.home}/lib/junit.jar${path.separator}${javafx.home}/lib/javafx-swt.jar${path.separator}${javafx.home}/lib/javafx.swing.jar${path.separator}${javafx.home}/lib/javafx.fxml.jar${path.separator}${shared-test-utils-src}/build/classes"/> + <target name="build-dependencies"> + <antcall target="build-other-project"> + <param name="project" value="${shared-test-utils-src}"/> + </antcall> + </target> + <target name="compile" depends="compile-src"> + <copy todir="${build.classes.dir}${file.separator}test${file.separator}fxmltests${file.separator}resources"> + <fileset dir="${src.dir}${file.separator}test${file.separator}fxmltests${file.separator}resources"/> + </copy> + </target> + <target name="build-test-dependencies"/> +</project> diff --git a/functional/FxmlTests/nbproject/build-impl.xml b/functional/FxmlTests/nbproject/build-impl.xml deleted file mode 100644 index 6ad9b27f..00000000 --- a/functional/FxmlTests/nbproject/build-impl.xml +++ /dev/null @@ -1,1407 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -*** GENERATED FROM project.xml - DO NOT EDIT *** -*** EDIT ../build.xml INSTEAD *** - -For the purpose of easier reading the script -is divided into following sections: - - - initialization - - compilation - - jar - - execution - - debugging - - javadoc - - test compilation - - test execution - - test debugging - - applet - - cleanup - - --> -<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="FxmlTests-impl"> - <fail message="Please build using Ant 1.8.0 or higher."> - <condition> - <not> - <antversion atleast="1.8.0"/> - </not> - </condition> - </fail> - <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/> - <!-- - ====================== - INITIALIZATION SECTION - ====================== - --> - <target name="-pre-init"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="-pre-init" name="-init-private"> - <property file="nbproject/private/config.properties"/> - <property file="nbproject/private/configs/${config}.properties"/> - <property file="nbproject/private/private.properties"/> - </target> - <target depends="-pre-init,-init-private" name="-init-user"> - <property file="${user.properties.file}"/> - <!-- The two properties below are usually overridden --> - <!-- by the active platform. Just a fallback. --> - <property name="default.javac.source" value="1.4"/> - <property name="default.javac.target" value="1.4"/> - </target> - <target depends="-pre-init,-init-private,-init-user" name="-init-project"> - <property file="nbproject/configs/${config}.properties"/> - <property file="nbproject/project.properties"/> - </target> - <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init"> - <property name="platform.java" value="${java.home}/bin/java"/> - <available file="${manifest.file}" property="manifest.available"/> - <condition property="splashscreen.available"> - <and> - <not> - <equals arg1="${application.splash}" arg2="" trim="true"/> - </not> - <available file="${application.splash}"/> - </and> - </condition> - <condition property="main.class.available"> - <and> - <isset property="main.class"/> - <not> - <equals arg1="${main.class}" arg2="" trim="true"/> - </not> - </and> - </condition> - <condition property="profile.available"> - <and> - <isset property="javac.profile"/> - <length length="0" string="${javac.profile}" when="greater"/> - <matches pattern="1\.[89](\..*)?" string="${javac.source}"/> - </and> - </condition> - <condition property="do.archive"> - <not> - <istrue value="${jar.archive.disabled}"/> - </not> - </condition> - <condition property="do.mkdist"> - <and> - <isset property="do.archive"/> - <isset property="libs.CopyLibs.classpath"/> - <not> - <istrue value="${mkdist.disabled}"/> - </not> - </and> - </condition> - <condition property="do.archive+manifest.available"> - <and> - <isset property="manifest.available"/> - <istrue value="${do.archive}"/> - </and> - </condition> - <condition property="do.archive+main.class.available"> - <and> - <isset property="main.class.available"/> - <istrue value="${do.archive}"/> - </and> - </condition> - <condition property="do.archive+splashscreen.available"> - <and> - <isset property="splashscreen.available"/> - <istrue value="${do.archive}"/> - </and> - </condition> - <condition property="do.archive+profile.available"> - <and> - <isset property="profile.available"/> - <istrue value="${do.archive}"/> - </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"/> - <isset property="have.tests"/> - </and> - </condition> - <condition property="no.javadoc.preview"> - <and> - <isset property="javadoc.preview"/> - <isfalse value="${javadoc.preview}"/> - </and> - </condition> - <property name="run.jvmargs" value=""/> - <property name="run.jvmargs.ide" value=""/> - <property name="javac.compilerargs" value=""/> - <property name="work.dir" value="${basedir}"/> - <condition property="no.deps"> - <and> - <istrue value="${no.dependencies}"/> - </and> - </condition> - <property name="javac.debug" value="true"/> - <property name="javadoc.preview" value="true"/> - <property name="application.args" value=""/> - <property name="source.encoding" value="${file.encoding}"/> - <property name="runtime.encoding" value="${source.encoding}"/> - <condition property="javadoc.encoding.used" value="${javadoc.encoding}"> - <and> - <isset property="javadoc.encoding"/> - <not> - <equals arg1="${javadoc.encoding}" arg2=""/> - </not> - </and> - </condition> - <property name="javadoc.encoding.used" value="${source.encoding}"/> - <property name="includes" value="**"/> - <property name="excludes" value=""/> - <property name="do.depend" value="false"/> - <condition property="do.depend.true"> - <istrue value="${do.depend}"/> - </condition> - <path id="endorsed.classpath.path" path="${endorsed.classpath}"/> - <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'"> - <and> - <isset property="endorsed.classpath"/> - <not> - <equals arg1="${endorsed.classpath}" arg2="" trim="true"/> - </not> - </and> - </condition> - <condition else="" property="javac.profile.cmd.line.arg" value="-profile ${javac.profile}"> - <isset property="profile.available"/> - </condition> - <condition else="false" property="jdkBug6558476"> - <and> - <matches pattern="1\.[56]" string="${java.specification.version}"/> - <not> - <os family="unix"/> - </not> - </and> - </condition> - <property name="javac.fork" value="${jdkBug6558476}"/> - <property name="jar.index" value="false"/> - <property name="jar.index.metainf" value="${jar.index}"/> - <property name="copylibs.rebase" value="true"/> - <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/> - <condition property="junit.available"> - <or> - <available classname="org.junit.Test" classpath="${run.test.classpath}"/> - <available classname="junit.framework.Test" classpath="${run.test.classpath}"/> - </or> - </condition> - <condition property="testng.available"> - <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/> - </condition> - <condition property="junit+testng.available"> - <and> - <istrue value="${junit.available}"/> - <istrue value="${testng.available}"/> - </and> - </condition> - <condition else="testng" property="testng.mode" value="mixed"> - <istrue value="${junit+testng.available}"/> - </condition> - <condition else="" property="testng.debug.mode" value="-mixed"> - <istrue value="${junit+testng.available}"/> - </condition> - </target> - <target name="-post-init"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check"> - <fail unless="src.dir">Must set src.dir</fail> - <fail unless="test.src.dir">Must set test.src.dir</fail> - <fail unless="build.dir">Must set build.dir</fail> - <fail unless="dist.dir">Must set dist.dir</fail> - <fail unless="build.classes.dir">Must set build.classes.dir</fail> - <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail> - <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail> - <fail unless="build.test.results.dir">Must set build.test.results.dir</fail> - <fail unless="build.classes.excludes">Must set build.classes.excludes</fail> - <fail unless="dist.jar">Must set dist.jar</fail> - </target> - <target name="-init-macrodef-property"> - <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1"> - <attribute name="name"/> - <attribute name="value"/> - <sequential> - <property name="@{name}" value="${@{value}}"/> - </sequential> - </macrodef> - </target> - <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors"> - <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${src.dir}" name="srcdir"/> - <attribute default="${build.classes.dir}" name="destdir"/> - <attribute default="${javac.classpath}" name="classpath"/> - <attribute default="${javac.processorpath}" name="processorpath"/> - <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="${javac.debug}" name="debug"/> - <attribute default="${empty.dir}" name="sourcepath"/> - <attribute default="${empty.dir}" name="gensrcdir"/> - <element name="customize" optional="true"/> - <sequential> - <property location="${build.dir}/empty" name="empty.dir"/> - <mkdir dir="${empty.dir}"/> - <mkdir dir="@{apgeneratedsrcdir}"/> - <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}"> - <src> - <dirset dir="@{gensrcdir}" erroronmissingdir="false"> - <include name="*"/> - </dirset> - </src> - <classpath> - <path path="@{classpath}"/> - </classpath> - <compilerarg line="${endorsed.classpath.cmd.line.arg}"/> - <compilerarg line="${javac.profile.cmd.line.arg}"/> - <compilerarg line="${javac.compilerargs}"/> - <compilerarg value="-processorpath"/> - <compilerarg path="@{processorpath}:${empty.dir}"/> - <compilerarg line="${ap.processors.internal}"/> - <compilerarg line="${annotation.processing.processor.options}"/> - <compilerarg value="-s"/> - <compilerarg path="@{apgeneratedsrcdir}"/> - <compilerarg line="${ap.proc.none.internal}"/> - <customize/> - </javac> - </sequential> - </macrodef> - </target> - <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal"> - <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${src.dir}" name="srcdir"/> - <attribute default="${build.classes.dir}" name="destdir"/> - <attribute default="${javac.classpath}" name="classpath"/> - <attribute default="${javac.processorpath}" name="processorpath"/> - <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="${javac.debug}" name="debug"/> - <attribute default="${empty.dir}" name="sourcepath"/> - <attribute default="${empty.dir}" name="gensrcdir"/> - <element name="customize" optional="true"/> - <sequential> - <property location="${build.dir}/empty" name="empty.dir"/> - <mkdir dir="${empty.dir}"/> - <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}"> - <src> - <dirset dir="@{gensrcdir}" erroronmissingdir="false"> - <include name="*"/> - </dirset> - </src> - <classpath> - <path path="@{classpath}"/> - </classpath> - <compilerarg line="${endorsed.classpath.cmd.line.arg}"/> - <compilerarg line="${javac.profile.cmd.line.arg}"/> - <compilerarg line="${javac.compilerargs}"/> - <customize/> - </javac> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac"> - <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${src.dir}" name="srcdir"/> - <attribute default="${build.classes.dir}" name="destdir"/> - <attribute default="${javac.classpath}" name="classpath"/> - <sequential> - <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}"> - <classpath> - <path path="@{classpath}"/> - </classpath> - </depend> - </sequential> - </macrodef> - <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${build.classes.dir}" name="destdir"/> - <sequential> - <fail unless="javac.includes">Must set javac.includes</fail> - <pathconvert pathsep="${line.separator}" property="javac.includes.binary"> - <path> - <filelist dir="@{destdir}" files="${javac.includes}"/> - </path> - <globmapper from="*.java" to="*.class"/> - </pathconvert> - <tempfile deleteonexit="true" property="javac.includesfile.binary"/> - <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/> - <delete> - <files includesfile="${javac.includesfile.binary}"/> - </delete> - <delete> - <fileset file="${javac.includesfile.binary}"/> - </delete> - </sequential> - </macrodef> - </target> - <target if="${junit.available}" name="-init-macrodef-junit-init"> - <condition else="false" property="nb.junit.batch" value="true"> - <and> - <istrue value="${junit.available}"/> - <not> - <isset property="test.method"/> - </not> - </and> - </condition> - <condition else="false" property="nb.junit.single" value="true"> - <and> - <istrue value="${junit.available}"/> - <isset property="test.method"/> - </and> - </condition> - </target> - <target name="-init-test-properties"> - <property name="test.binaryincludes" value="<nothing>"/> - <property name="test.binarytestincludes" value=""/> - <property name="test.binaryexcludes" value=""/> - </target> - <target if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}"> - <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element name="customize" optional="true"/> - <sequential> - <property name="junit.forkmode" value="perTest"/> - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> - <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/> - <syspropertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <formatter type="brief" usefile="false"/> - <formatter type="xml"/> - <jvmarg value="-ea"/> - <customize/> - </junit> - </sequential> - </macrodef> - </target> - <target depends="-init-test-properties" if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}"> - <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element name="customize" optional="true"/> - <sequential> - <property name="junit.forkmode" value="perTest"/> - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> - <batchtest todir="${build.test.results.dir}"> - <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}"> - <filename name="@{testincludes}"/> - </fileset> - <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}"> - <filename name="${test.binarytestincludes}"/> - </fileset> - </batchtest> - <syspropertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <formatter type="brief" usefile="false"/> - <formatter type="xml"/> - <jvmarg value="-ea"/> - <customize/> - </junit> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/> - <target if="${testng.available}" name="-init-macrodef-testng"> - <macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element name="customize" optional="true"/> - <sequential> - <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}"> - <isset property="test.method"/> - </condition> - <union id="test.set"> - <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}"> - <filename name="@{testincludes}"/> - </fileset> - </union> - <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/> - <testng classfilesetref="test.set" failureProperty="tests.failed" listeners="org.testng.reporters.VerboseReporter" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="FxmlTests" testname="TestNG tests" workingDir="${work.dir}"> - <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/> - <propertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </propertyset> - <customize/> - </testng> - </sequential> - </macrodef> - </target> - <target name="-init-macrodef-test-impl"> - <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element implicit="true" name="customize" optional="true"/> - <sequential> - <echo>No tests executed.</echo> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl"> - <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element implicit="true" name="customize" optional="true"/> - <sequential> - <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> - <customize/> - </j2seproject3:junit> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl"> - <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element implicit="true" name="customize" optional="true"/> - <sequential> - <j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> - <customize/> - </j2seproject3:testng> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test"> - <macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <sequential> - <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> - <customize> - <classpath> - <path path="${run.test.classpath}"/> - </classpath> - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> - <jvmarg line="${run.jvmargs}"/> - <jvmarg line="${run.jvmargs.ide}"/> - </customize> - </j2seproject3:test-impl> - </sequential> - </macrodef> - </target> - <target if="${junit.available}" name="-init-macrodef-junit-debug" unless="${nb.junit.batch}"> - <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element name="customize" optional="true"/> - <sequential> - <property name="junit.forkmode" value="perTest"/> - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> - <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/> - <syspropertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <formatter type="brief" usefile="false"/> - <formatter type="xml"/> - <jvmarg value="-ea"/> - <jvmarg line="${debug-args-line}"/> - <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> - <customize/> - </junit> - </sequential> - </macrodef> - </target> - <target depends="-init-test-properties" if="${nb.junit.batch}" name="-init-macrodef-junit-debug-batch"> - <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element name="customize" optional="true"/> - <sequential> - <property name="junit.forkmode" value="perTest"/> - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> - <batchtest todir="${build.test.results.dir}"> - <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}"> - <filename name="@{testincludes}"/> - </fileset> - <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}"> - <filename name="${test.binarytestincludes}"/> - </fileset> - </batchtest> - <syspropertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <formatter type="brief" usefile="false"/> - <formatter type="xml"/> - <jvmarg value="-ea"/> - <jvmarg line="${debug-args-line}"/> - <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> - <customize/> - </junit> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-junit-debug,-init-macrodef-junit-debug-batch" if="${junit.available}" name="-init-macrodef-junit-debug-impl"> - <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element implicit="true" name="customize" optional="true"/> - <sequential> - <j2seproject3:junit-debug excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> - <customize/> - </j2seproject3:junit-debug> - </sequential> - </macrodef> - </target> - <target if="${testng.available}" name="-init-macrodef-testng-debug"> - <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${main.class}" name="testClass"/> - <attribute default="" name="testMethod"/> - <element name="customize2" optional="true"/> - <sequential> - <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}"> - <isset property="test.method"/> - </condition> - <condition else="-suitename FxmlTests -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}"> - <matches pattern=".*\.xml" string="@{testClass}"/> - </condition> - <delete dir="${build.test.results.dir}" quiet="true"/> - <mkdir dir="${build.test.results.dir}"/> - <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}"> - <customize> - <customize2/> - <jvmarg value="-ea"/> - <arg line="${testng.debug.mode}"/> - <arg line="-d ${build.test.results.dir}"/> - <arg line="-listener org.testng.reporters.VerboseReporter"/> - <arg line="${testng.cmd.args}"/> - </customize> - </j2seproject3:debug> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl"> - <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${main.class}" name="testClass"/> - <attribute default="" name="testMethod"/> - <element implicit="true" name="customize2" optional="true"/> - <sequential> - <j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}"> - <customize2/> - </j2seproject3:testng-debug> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit"> - <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <attribute default="${main.class}" name="testClass"/> - <attribute default="" name="testMethod"/> - <sequential> - <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> - <customize> - <classpath> - <path path="${run.test.classpath}"/> - </classpath> - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> - <jvmarg line="${run.jvmargs}"/> - <jvmarg line="${run.jvmargs.ide}"/> - </customize> - </j2seproject3:test-debug-impl> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng"> - <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <attribute default="${main.class}" name="testClass"/> - <attribute default="" name="testMethod"/> - <sequential> - <j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}"> - <customize2> - <syspropertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - </customize2> - </j2seproject3:testng-debug-impl> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/> - <!-- - pre NB7.2 profiling section; consider it deprecated - --> - <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/> - <target if="profiler.info.jvmargs.agent" name="-profile-pre-init"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target if="profiler.info.jvmargs.agent" name="-profile-post-init"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile"> - <macrodef name="resolve"> - <attribute name="name"/> - <attribute name="value"/> - <sequential> - <property name="@{name}" value="${env.@{value}}"/> - </sequential> - </macrodef> - <macrodef name="profile"> - <attribute default="${main.class}" name="classname"/> - <element name="customize" optional="true"/> - <sequential> - <property environment="env"/> - <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/> - <java classname="@{classname}" dir="${profiler.info.dir}" fork="true" jvm="${profiler.info.jvm}"> - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> - <jvmarg value="${profiler.info.jvmargs.agent}"/> - <jvmarg line="${profiler.info.jvmargs}"/> - <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/> - <arg line="${application.args}"/> - <classpath> - <path path="${run.classpath}"/> - </classpath> - <syspropertyset> - <propertyref prefix="run-sys-prop."/> - <mapper from="run-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <customize/> - </java> - </sequential> - </macrodef> - </target> - <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" name="-profile-init-check"> - <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail> - <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail> - </target> - <!-- - end of pre NB7.2 profiling section - --> - <target depends="-init-debug-args" name="-init-macrodef-nbjpda"> - <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1"> - <attribute default="${main.class}" name="name"/> - <attribute default="${debug.classpath}" name="classpath"/> - <attribute default="" name="stopclassname"/> - <sequential> - <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}"> - <classpath> - <path path="@{classpath}"/> - </classpath> - </nbjpdastart> - </sequential> - </macrodef> - <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1"> - <attribute default="${build.classes.dir}" name="dir"/> - <sequential> - <nbjpdareload> - <fileset dir="@{dir}" includes="${fix.classes}"> - <include name="${fix.includes}*.class"/> - </fileset> - </nbjpdareload> - </sequential> - </macrodef> - </target> - <target name="-init-debug-args"> - <property name="version-output" value="java version "${ant.java.version}"/> - <condition property="have-jdk-older-than-1.4"> - <or> - <contains string="${version-output}" substring="java version "1.0"/> - <contains string="${version-output}" substring="java version "1.1"/> - <contains string="${version-output}" substring="java version "1.2"/> - <contains string="${version-output}" substring="java version "1.3"/> - </or> - </condition> - <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none"> - <istrue value="${have-jdk-older-than-1.4}"/> - </condition> - <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem"> - <os family="windows"/> - </condition> - <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}"> - <isset property="debug.transport"/> - </condition> - </target> - <target depends="-init-debug-args" name="-init-macrodef-debug"> - <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${main.class}" name="classname"/> - <attribute default="${debug.classpath}" name="classpath"/> - <element name="customize" optional="true"/> - <sequential> - <java classname="@{classname}" dir="${work.dir}" fork="true"> - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> - <jvmarg line="${debug-args-line}"/> - <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> - <jvmarg value="-Dfile.encoding=${runtime.encoding}"/> - <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/> - <jvmarg line="${run.jvmargs}"/> - <jvmarg line="${run.jvmargs.ide}"/> - <classpath> - <path path="@{classpath}"/> - </classpath> - <syspropertyset> - <propertyref prefix="run-sys-prop."/> - <mapper from="run-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <customize/> - </java> - </sequential> - </macrodef> - </target> - <target name="-init-macrodef-java"> - <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1"> - <attribute default="${main.class}" name="classname"/> - <attribute default="${run.classpath}" name="classpath"/> - <attribute default="jvm" name="jvm"/> - <element name="customize" optional="true"/> - <sequential> - <java classname="@{classname}" dir="${work.dir}" fork="true"> - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> - <jvmarg value="-Dfile.encoding=${runtime.encoding}"/> - <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/> - <jvmarg line="${run.jvmargs}"/> - <jvmarg line="${run.jvmargs.ide}"/> - <classpath> - <path path="@{classpath}"/> - </classpath> - <syspropertyset> - <propertyref prefix="run-sys-prop."/> - <mapper from="run-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <customize/> - </java> - </sequential> - </macrodef> - </target> - <target name="-init-macrodef-copylibs"> - <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${manifest.file}" name="manifest"/> - <element name="customize" optional="true"/> - <sequential> - <property location="${build.classes.dir}" name="build.classes.dir.resolved"/> - <pathconvert property="run.classpath.without.build.classes.dir"> - <path path="${run.classpath}"/> - <map from="${build.classes.dir.resolved}" to=""/> - </pathconvert> - <pathconvert pathsep=" " property="jar.classpath"> - <path path="${run.classpath.without.build.classes.dir}"/> - <chainedmapper> - <flattenmapper/> - <filtermapper> - <replacestring from=" " to="%20"/> - </filtermapper> - <globmapper from="*" to="lib/*"/> - </chainedmapper> - </pathconvert> - <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/> - <copylibs compress="${jar.compress}" excludeFromCopy="${copylibs.excludes}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" rebase="${copylibs.rebase}" runtimeclasspath="${run.classpath.without.build.classes.dir}"> - <fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/> - <manifest> - <attribute name="Class-Path" value="${jar.classpath}"/> - <customize/> - </manifest> - </copylibs> - </sequential> - </macrodef> - </target> - <target name="-init-presetdef-jar"> - <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1"> - <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}"> - <j2seproject1:fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/> - </jar> - </presetdef> - </target> - <target name="-init-ap-cmdline-properties"> - <property name="annotation.processing.enabled" value="true"/> - <property name="annotation.processing.processors.list" value=""/> - <property name="annotation.processing.processor.options" value=""/> - <property name="annotation.processing.run.all.processors" value="true"/> - <property name="javac.processorpath" value="${javac.classpath}"/> - <property name="javac.test.processorpath" value="${javac.test.classpath}"/> - <condition property="ap.supported.internal" value="true"> - <not> - <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/> - </not> - </condition> - </target> - <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported"> - <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}"> - <isfalse value="${annotation.processing.run.all.processors}"/> - </condition> - <condition else="" property="ap.proc.none.internal" value="-proc:none"> - <isfalse value="${annotation.processing.enabled}"/> - </condition> - </target> - <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline"> - <property name="ap.cmd.line.internal" value=""/> - </target> - <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-test,-init-macrodef-test-debug,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/> - <!-- - =================== - COMPILATION SECTION - =================== - --> - <target name="-deps-jar-init" unless="built-jar.properties"> - <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/> - <delete file="${built-jar.properties}" quiet="true"/> - </target> - <target if="already.built.jar.${basedir}" name="-warn-already-built-jar"> - <echo level="warn" message="Cycle detected: FxmlTests was already built"/> - </target> - <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps"> - <mkdir dir="${build.dir}"/> - <touch file="${built-jar.properties}" verbose="false"/> - <property file="${built-jar.properties}" prefix="already.built.jar."/> - <antcall target="-warn-already-built-jar"/> - <propertyfile file="${built-jar.properties}"> - <entry key="${basedir}" value=""/> - </propertyfile> - </target> - <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/> - <target depends="init" name="-check-automatic-build"> - <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/> - </target> - <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build"> - <antcall target="clean"/> - </target> - <target depends="init,deps-jar" name="-pre-pre-compile"> - <mkdir dir="${build.classes.dir}"/> - </target> - <target name="-pre-compile"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target if="do.depend.true" name="-compile-depend"> - <pathconvert property="build.generated.subdirs"> - <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false"> - <include name="*"/> - </dirset> - </pathconvert> - <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/> - </target> - <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile"> - <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/> - <copy todir="${build.classes.dir}"> - <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> - </copy> - </target> - <target if="has.persistence.xml" name="-copy-persistence-xml"> - <mkdir dir="${build.classes.dir}/META-INF"/> - <copy todir="${build.classes.dir}/META-INF"> - <fileset dir="${meta.inf.dir}" includes="persistence.xml orm.xml"/> - </copy> - </target> - <target name="-post-compile"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/> - <target name="-pre-compile-single"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single"> - <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail> - <j2seproject3:force-recompile/> - <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}"/> - </target> - <target name="-post-compile-single"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/> - <!-- - ==================== - JAR BUILDING SECTION - ==================== - --> - <target depends="init" name="-pre-pre-jar"> - <dirname file="${dist.jar}" property="dist.jar.dir"/> - <mkdir dir="${dist.jar.dir}"/> - </target> - <target name="-pre-jar"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init" if="do.archive" name="-do-jar-create-manifest" unless="manifest.available"> - <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/> - <touch file="${tmp.manifest.file}" verbose="false"/> - </target> - <target depends="init" if="do.archive+manifest.available" name="-do-jar-copy-manifest"> - <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/> - <copy file="${manifest.file}" tofile="${tmp.manifest.file}"/> - </target> - <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+main.class.available" name="-do-jar-set-mainclass"> - <manifest file="${tmp.manifest.file}" mode="update"> - <attribute name="Main-Class" value="${main.class}"/> - </manifest> - </target> - <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+profile.available" name="-do-jar-set-profile"> - <manifest file="${tmp.manifest.file}" mode="update"> - <attribute name="Profile" value="${javac.profile}"/> - </manifest> - </target> - <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-set-splashscreen"> - <basename file="${application.splash}" property="splashscreen.basename"/> - <mkdir dir="${build.classes.dir}/META-INF"/> - <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/> - <manifest file="${tmp.manifest.file}" mode="update"> - <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/> - </manifest> - </target> - <target depends="init,-init-macrodef-copylibs,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen" if="do.mkdist" name="-do-jar-copylibs"> - <j2seproject3:copylibs manifest="${tmp.manifest.file}"/> - <echo level="info">To run this application from the command line without Ant, try:</echo> - <property location="${dist.jar}" name="dist.jar.resolved"/> - <echo level="info">java -jar "${dist.jar.resolved}"</echo> - </target> - <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen" if="do.archive" name="-do-jar-jar" unless="do.mkdist"> - <j2seproject1:jar manifest="${tmp.manifest.file}"/> - <property location="${build.classes.dir}" name="build.classes.dir.resolved"/> - <property location="${dist.jar}" name="dist.jar.resolved"/> - <pathconvert property="run.classpath.with.dist.jar"> - <path path="${run.classpath}"/> - <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/> - </pathconvert> - <condition else="" property="jar.usage.message" value="To run this application from the command line without Ant, try:${line.separator}${platform.java} -cp ${run.classpath.with.dist.jar} ${main.class}"> - <isset property="main.class.available"/> - </condition> - <condition else="debug" property="jar.usage.level" value="info"> - <isset property="main.class.available"/> - </condition> - <echo level="${jar.usage.level}" message="${jar.usage.message}"/> - </target> - <target depends="-do-jar-copylibs" if="do.archive" name="-do-jar-delete-manifest"> - <delete> - <fileset file="${tmp.manifest.file}"/> - </delete> - </target> - <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen,-do-jar-jar,-do-jar-delete-manifest" name="-do-jar-without-libraries"/> - <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen,-do-jar-copylibs,-do-jar-delete-manifest" name="-do-jar-with-libraries"/> - <target name="-post-jar"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,compile,-pre-jar,-do-jar-without-libraries,-do-jar-with-libraries,-post-jar" name="-do-jar"/> - <target depends="init,compile,-pre-jar,-do-jar,-post-jar" description="Build JAR." name="jar"/> - <!-- - ================= - EXECUTION SECTION - ================= - --> - <target depends="init,compile" description="Run a main class." name="run"> - <j2seproject1:java> - <customize> - <arg line="${application.args}"/> - </customize> - </j2seproject1:java> - </target> - <target name="-do-not-recompile"> - <property name="javac.includes.binary" value=""/> - </target> - <target depends="init,compile-single" name="run-single"> - <fail unless="run.class">Must select one file in the IDE or set run.class</fail> - <j2seproject1:java classname="${run.class}"/> - </target> - <target depends="init,compile-test-single" name="run-test-with-main"> - <fail unless="run.class">Must select one file in the IDE or set run.class</fail> - <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/> - </target> - <!-- - ================= - DEBUGGING SECTION - ================= - --> - <target depends="init" if="netbeans.home" name="-debug-start-debugger"> - <j2seproject1:nbjpdastart name="${debug.class}"/> - </target> - <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test"> - <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/> - </target> - <target depends="init,compile" name="-debug-start-debuggee"> - <j2seproject3:debug> - <customize> - <arg line="${application.args}"/> - </customize> - </j2seproject3:debug> - </target> - <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/> - <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto"> - <j2seproject1:nbjpdastart stopclassname="${main.class}"/> - </target> - <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/> - <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single"> - <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail> - <j2seproject3:debug classname="${debug.class}"/> - </target> - <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/> - <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test"> - <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail> - <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/> - </target> - <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/> - <target depends="init" name="-pre-debug-fix"> - <fail unless="fix.includes">Must set fix.includes</fail> - <property name="javac.includes" value="${fix.includes}.java"/> - </target> - <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix"> - <j2seproject1:nbjpdareload/> - </target> - <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/> - <!-- - ================= - PROFILING SECTION - ================= - --> - <!-- - pre NB7.2 profiler integration - --> - <target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72"> - <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> - <nbprofiledirect> - <classpath> - <path path="${run.classpath}"/> - </classpath> - </nbprofiledirect> - <profile/> - </target> - <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72"> - <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail> - <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> - <nbprofiledirect> - <classpath> - <path path="${run.classpath}"/> - </classpath> - </nbprofiledirect> - <profile classname="${profile.class}"/> - </target> - <target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72"> - <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> - <nbprofiledirect> - <classpath> - <path path="${run.classpath}"/> - </classpath> - </nbprofiledirect> - <profile classname="sun.applet.AppletViewer"> - <customize> - <arg value="${applet.url}"/> - </customize> - </profile> - </target> - <target depends="profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72"> - <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> - <nbprofiledirect> - <classpath> - <path path="${run.test.classpath}"/> - </classpath> - </nbprofiledirect> - <junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true"> - <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/> - <jvmarg value="${profiler.info.jvmargs.agent}"/> - <jvmarg line="${profiler.info.jvmargs}"/> - <test name="${profile.class}"/> - <classpath> - <path path="${run.test.classpath}"/> - </classpath> - <syspropertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <formatter type="brief" usefile="false"/> - <formatter type="xml"/> - </junit> - </target> - <!-- - end of pre NB72 profiling section - --> - <target if="netbeans.home" name="-profile-check"> - <condition property="profiler.configured"> - <or> - <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/> - <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/> - </or> - </condition> - </target> - <target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent"> - <startprofiler/> - <antcall target="run"/> - </target> - <target depends="-profile-check,-profile-single-pre72" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-single" unless="profiler.info.jvmargs.agent"> - <fail unless="run.class">Must select one file in the IDE or set run.class</fail> - <startprofiler/> - <antcall target="run-single"/> - </target> - <target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/> - <target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs"> - <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail> - <startprofiler/> - <antcall target="test-single"/> - </target> - <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main"> - <fail unless="run.class">Must select one file in the IDE or set run.class</fail> - <startprofiler/> - <antcal target="run-test-with-main"/> - </target> - <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent"> - <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> - <startprofiler/> - <antcall target="run-applet"/> - </target> - <!-- - =============== - JAVADOC SECTION - =============== - --> - <target depends="init" if="have.sources" name="-javadoc-build"> - <mkdir dir="${dist.javadoc.dir}"/> - <condition else="" property="javadoc.endorsed.classpath.cmd.line.arg" value="-J${endorsed.classpath.cmd.line.arg}"> - <and> - <isset property="endorsed.classpath.cmd.line.arg"/> - <not> - <equals arg1="${endorsed.classpath.cmd.line.arg}" arg2=""/> - </not> - </and> - </condition> - <javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" 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}"> - <classpath> - <path path="${javac.classpath}"/> - </classpath> - <fileset dir="${src.dir}" excludes="*.java,${excludes}" includes="${includes}"> - <filename name="**/*.java"/> - </fileset> - <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false"> - <include name="**/*.java"/> - <exclude name="*.java"/> - </fileset> - <arg line="${javadoc.endorsed.classpath.cmd.line.arg}"/> - </javadoc> - <copy todir="${dist.javadoc.dir}"> - <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}"> - <filename name="**/doc-files/**"/> - </fileset> - <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false"> - <include name="**/doc-files/**"/> - </fileset> - </copy> - </target> - <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview"> - <nbbrowse file="${dist.javadoc.dir}/index.html"/> - </target> - <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/> - <!-- - ========================= - TEST COMPILATION SECTION - ========================= - --> - <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test"> - <mkdir dir="${build.test.classes.dir}"/> - </target> - <target name="-pre-compile-test"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target if="do.depend.true" name="-compile-test-depend"> - <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/> - </target> - <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test"> - <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" processorpath="${javac.test.processorpath}" srcdir="${test.src.dir}"/> - <copy todir="${build.test.classes.dir}"> - <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> - </copy> - </target> - <target name="-post-compile-test"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/> - <target name="-pre-compile-test-single"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single"> - <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail> - <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/> - <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" processorpath="${javac.test.processorpath}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/> - <copy todir="${build.test.classes.dir}"> - <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> - </copy> - </target> - <target name="-post-compile-test-single"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/> - <!-- - ======================= - TEST EXECUTION SECTION - ======================= - --> - <target depends="init" if="have.tests" name="-pre-test-run"> - <mkdir dir="${build.test.results.dir}"/> - </target> - <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run"> - <j2seproject3:test testincludes="**/*Test.java"/> - </target> - <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run"> - <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail> - </target> - <target depends="init" if="have.tests" name="test-report"/> - <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/> - <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/> - <target depends="init" if="have.tests" name="-pre-test-run-single"> - <mkdir dir="${build.test.results.dir}"/> - </target> - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single"> - <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail> - <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/> - </target> - <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single"> - <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail> - </target> - <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/> - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method"> - <fail unless="test.class">Must select some files in the IDE or set test.class</fail> - <fail unless="test.method">Must select some method in the IDE or set test.method</fail> - <j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/> - </target> - <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method"> - <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail> - </target> - <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method,-post-test-run-single-method" description="Run single unit test." name="test-single-method"/> - <!-- - ======================= - TEST DEBUGGING SECTION - ======================= - --> - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test"> - <fail unless="test.class">Must select one file in the IDE or set test.class</fail> - <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/> - </target> - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method"> - <fail unless="test.class">Must select one file in the IDE or set test.class</fail> - <fail unless="test.method">Must select some method in the IDE or set test.method</fail> - <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/> - </target> - <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test"> - <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/> - </target> - <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/> - <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/> - <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test"> - <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/> - </target> - <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/> - <!-- - ========================= - APPLET EXECUTION SECTION - ========================= - --> - <target depends="init,compile-single" name="run-applet"> - <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> - <j2seproject1:java classname="sun.applet.AppletViewer"> - <customize> - <arg value="${applet.url}"/> - </customize> - </j2seproject1:java> - </target> - <!-- - ========================= - APPLET DEBUGGING SECTION - ========================= - --> - <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet"> - <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> - <j2seproject3:debug classname="sun.applet.AppletViewer"> - <customize> - <arg value="${applet.url}"/> - </customize> - </j2seproject3:debug> - </target> - <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/> - <!-- - =============== - CLEANUP SECTION - =============== - --> - <target name="-deps-clean-init" unless="built-clean.properties"> - <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/> - <delete file="${built-clean.properties}" quiet="true"/> - </target> - <target if="already.built.clean.${basedir}" name="-warn-already-built-clean"> - <echo level="warn" message="Cycle detected: FxmlTests was already built"/> - </target> - <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps"> - <mkdir dir="${build.dir}"/> - <touch file="${built-clean.properties}" verbose="false"/> - <property file="${built-clean.properties}" prefix="already.built.clean."/> - <antcall target="-warn-already-built-clean"/> - <propertyfile file="${built-clean.properties}"> - <entry key="${basedir}" value=""/> - </propertyfile> - </target> - <target depends="init" name="-do-clean"> - <delete dir="${build.dir}"/> - <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/> - </target> - <target name="-post-clean"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/> - <target name="-check-call-dep"> - <property file="${call.built.properties}" prefix="already.built."/> - <condition property="should.call.dep"> - <and> - <not> - <isset property="already.built.${call.subproject}"/> - </not> - <available file="${call.script}"/> - </and> - </condition> - </target> - <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep"> - <ant antfile="${call.script}" inheritall="false" target="${call.target}"> - <propertyset> - <propertyref prefix="transfer."/> - <mapper from="transfer.*" to="*" type="glob"/> - </propertyset> - </ant> - </target> -</project> diff --git a/functional/FxmlTests/nbproject/configs/interop.properties b/functional/FxmlTests/nbproject/configs/interop.properties deleted file mode 100644 index f69317cf..00000000 --- a/functional/FxmlTests/nbproject/configs/interop.properties +++ /dev/null @@ -1 +0,0 @@ -run.jvmargs=-Djavafx.swinginteroperability=true \ No newline at end of file diff --git a/functional/FxmlTests/nbproject/configs/j2d.properties b/functional/FxmlTests/nbproject/configs/j2d.properties deleted file mode 100644 index f294a9fd..00000000 --- a/functional/FxmlTests/nbproject/configs/j2d.properties +++ /dev/null @@ -1 +0,0 @@ -run.jvmargs=-Dprism.order=sw diff --git a/functional/FxmlTests/nbproject/configs/jcov.properties b/functional/FxmlTests/nbproject/configs/jcov.properties deleted file mode 100644 index e55572aa..00000000 --- a/functional/FxmlTests/nbproject/configs/jcov.properties +++ /dev/null @@ -1,3 +0,0 @@ -run.jvmargs=-javaagent:../lib/jcov.jar=include=com.sun.javafx.*,include=com.sun.scenario.*,include=com.javafx.*,include=javafx.*,include=com.sun.mat.*,type=all,file=jcov-results/result.xml -Xcheck:jni -do.jcov=true - diff --git a/functional/FxmlTests/nbproject/configs/prism.properties b/functional/FxmlTests/nbproject/configs/prism.properties deleted file mode 100644 index b1a64dbc..00000000 --- a/functional/FxmlTests/nbproject/configs/prism.properties +++ /dev/null @@ -1 +0,0 @@ -run.jvmargs=-Dprism.order=d3d diff --git a/functional/FxmlTests/nbproject/genfiles.properties b/functional/FxmlTests/nbproject/genfiles.properties deleted file mode 100644 index 38c18b3b..00000000 --- a/functional/FxmlTests/nbproject/genfiles.properties +++ /dev/null @@ -1,8 +0,0 @@ -build.xml.data.CRC32=606db9b2 -build.xml.script.CRC32=7ac804b7 -build.xml.stylesheet.CRC32=28e38971@1.38.2.45 -# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. -# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. -nbproject/build-impl.xml.data.CRC32=45f3b363 -nbproject/build-impl.xml.script.CRC32=2c13035b -nbproject/build-impl.xml.stylesheet.CRC32=5a01deb7@1.68.1.46 diff --git a/functional/FxmlTests/nbproject/project.properties b/functional/FxmlTests/nbproject/project.properties deleted file mode 100644 index 9694872c..00000000 --- a/functional/FxmlTests/nbproject/project.properties +++ /dev/null @@ -1,109 +0,0 @@ -annotation.processing.enabled=true -annotation.processing.enabled.in.editor=false -annotation.processing.processors.list= -annotation.processing.run.all.processors=true -annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output -ant.customtasks.libs=JWSAntTasks -application.title=FxmlTests -application.vendor=sg155630 -build.classes.dir=${build.dir}/classes -build.classes.excludes=**/*.java,**/*.form -# This directory is removed when the project is cleaned: -build.dir=build -build.generated.dir=${build.dir}/generated -build.generated.sources.dir=${build.dir}/generated-sources -# Only compile against the classpath explicitly listed here: -build.sysclasspath=ignore -build.test.classes.dir=${build.dir}/test/classes -build.test.results.dir=${external.output}/${application.title}/build/test/results -file.reference.FxTestRunner.jar=../../tools/FxTestRunner/dist/FxTestRunner.jar -file.reference.GlassImage.jar=../../tools/Jemmy/GlassImage/dist/GlassImage.jar -file.reference.GlassRobot.jar=../../tools/Jemmy/GlassRobot/dist/GlassRobot.jar -file.reference.javatest.jar=../../tools/lib/javatest.jar -file.reference.jemmy.jar=../../tools/lib/jemmy.jar -file.reference.JemmyAWT.jar=../../tools/lib/JemmyAWT.jar -file.reference.JemmyAWTInput.jar=../../tools/Jemmy/jemmy_core/JemmyAWTInput.jar -file.reference.JemmyBrowser.jar=../../tools/Jemmy/jemmy_core/JemmyBrowser.jar -file.reference.JemmyCore.jar=../../tools/Jemmy/jemmy_core/JemmyCore.jar -file.reference.JemmyFX.jar=../../tools/Jemmy/JemmyFX/dist/JemmyFX.jar -file.reference.JemmyFXBrowser.jar=../../tools/Jemmy/JemmyFXBrowser/dist/JemmyFXBrowser.jar -file.reference.junit.jar=../../tools/Jemmy/jemmy_core/junit.jar -file.reference.SharedTestUtilsOpen.jar=../../tools/SharedTestUtilsOpen/dist/SharedTestUtilsOpen.jar -file.reference.TestMarkup.jar=../../tools/TestMarkup/dist/TestMarkup.jar -test-sys-prop.imageutils.outputpath=${build.test.results.dir} -file.reference.tools.jar=${java.home}/../lib/tools.jar -mkdist.disabled=false -# Uncomment to specify the preferred debugger connection transport: -#debug.transport=dt_socket -debug.classpath=\ - ${run.classpath} -debug.test.classpath=\ - ${run.test.classpath} -# This directory is removed when the project is cleaned: -dist.dir=dist -dist.jar=${dist.dir}/FxmlTests.jar -dist.javadoc.dir=${dist.dir}/javadoc -endorsed.classpath= -excludes= -includes=** -jar.archive.disabled=${jnlp.enabled} -jar.compress=false -jar.index=${jnlp.enabled} -javac.classpath=\ - ${file.reference.GlassImage.jar}:\ - ${file.reference.GlassRobot.jar}:\ - ${file.reference.JemmyAWT.jar}:\ - ${file.reference.JemmyAWTInput.jar}:\ - ${file.reference.JemmyBrowser.jar}:\ - ${file.reference.JemmyCore.jar}:\ - ${file.reference.JemmyFX.jar}:\ - ${file.reference.JemmyFXBrowser.jar}:\ - ${file.reference.SharedTestUtilsOpen.jar}:\ - ${file.reference.TestMarkup.jar}:\ - ${file.reference.javatest.jar}:\ - ${file.reference.jemmy.jar}:\ - ${file.reference.junit.jar}:\ - ${file.reference.tools.jar} -# Space-separated list of extra javac options -javac.compilerargs=-processor com.oracle.jdk.sqe.cc.markup.TestMarkupProcessor -Aresult=${basedir}/coverage.fcov -javac.deprecation=false -javac.processorpath=\ - ${javac.classpath} -javac.source=1.8 -javac.target=1.8 -javac.test.classpath=\ - ${javac.classpath}:\ - ${build.classes.dir}:\ - ${file.reference.FxTestRunner.jar} -javac.test.processorpath=\ - ${javac.test.classpath} -javadoc.additionalparam= -javadoc.author=false -javadoc.encoding=${source.encoding} -javadoc.noindex=false -javadoc.nonavbar=false -javadoc.notree=false -javadoc.private=false -javadoc.splitindex=true -javadoc.use=true -javadoc.version=false -javadoc.windowtitle= -jnlp.codebase.type=local -jnlp.descriptor=application -jnlp.enabled=false -jnlp.mixed.code=defaut -jnlp.offline-allowed=true -jnlp.signed=false -main.class= -manifest.file=manifest.mf -meta.inf.dir=${src.dir}/META-INF -platform.active=default_platform -run.classpath=\ - ${javac.classpath}:\ - ${build.classes.dir} -run.test.classpath=\ - ${javac.test.classpath}:\ - ${build.test.classes.dir} -source.encoding=UTF-8 -src.dir=src -test.src.dir=test diff --git a/functional/FxmlTests/nbproject/project.xml b/functional/FxmlTests/nbproject/project.xml deleted file mode 100644 index 50727875..00000000 --- a/functional/FxmlTests/nbproject/project.xml +++ /dev/null @@ -1,21 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project xmlns="http://www.netbeans.org/ns/project/1"> - <type>org.netbeans.modules.java.j2seproject</type> - <configuration> - <buildExtensions xmlns="http://www.netbeans.org/ns/ant-build-extender/1"> - <extension file="jnlp-impl.xml" id="jws"> - <dependency dependsOn="jnlp" target="jar"/> - </extension> - </buildExtensions> - <data xmlns="http://www.netbeans.org/ns/j2se-project/3"> - <name>FxmlTests</name> - <source-roots> - <root id="src.dir"/> - </source-roots> - <test-roots> - <root id="test.src.dir"/> - </test-roots> - </data> - <references xmlns="http://www.netbeans.org/ns/ant-project-references/1"/> - </configuration> -</project> diff --git a/functional/FxmlTests/src/test/fxmltests/app/FxmlConstantApp.java b/functional/FxmlTests/src/test/fxmltests/app/FxmlConstantApp.java index 7a5e184a..d6fe8bb9 100644 --- a/functional/FxmlTests/src/test/fxmltests/app/FxmlConstantApp.java +++ b/functional/FxmlTests/src/test/fxmltests/app/FxmlConstantApp.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -60,6 +60,7 @@ public Node drawNode() { return FXMLLoader.load(getClass().getResource(FXML_RESOURCE)); } catch (Exception exc) { + exc.printStackTrace(); return new Rectangle () { { setFill(Color.RED); @@ -81,4 +82,4 @@ protected TestNode setup() { public static void main(String[] args) { Utils.launch(FxmlConstantApp.class, args); } -} \ No newline at end of file +} diff --git a/functional/FxmlTests/src/test/fxmltests/cover/FxmlCoverageDoclet.java b/functional/FxmlTests/src/test/fxmltests/cover/FxmlCoverageDoclet.java index 8b7e6fdd..15434a2d 100644 --- a/functional/FxmlTests/src/test/fxmltests/cover/FxmlCoverageDoclet.java +++ b/functional/FxmlTests/src/test/fxmltests/cover/FxmlCoverageDoclet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,27 +24,14 @@ */ package test.fxmltests.cover; -import com.sun.javadoc.*; -import java.io.File; -import java.io.FileNotFoundException; -import java.io.FileWriter; -import java.io.IOException; -import java.net.URISyntaxException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.LinkedHashSet; -import java.util.Scanner; -import java.util.logging.Level; -import java.util.logging.Logger; - /** * * @author Aleksand Sakharuk */ +//TODO public class FxmlCoverageDoclet { - +/* public static boolean start(RootDoc root) { ClassDoc[] classes = root.classes(); @@ -166,5 +153,5 @@ public static String readFile(String relativePath) public static final String TESTABLE_ASSERT_TAG = "testableAssertId"; public static final String ALL_ASSERTS = "allasserts"; - +*/ } diff --git a/functional/FxmlTests/test/TEST.ROOT b/functional/FxmlTests/test/TEST.ROOT new file mode 100644 index 00000000..0d841c11 --- /dev/null +++ b/functional/FxmlTests/test/TEST.ROOT @@ -0,0 +1,2 @@ +TestNG.dirs = . + diff --git a/functional/FxmlTests/test/test/fxmltests/functional/ConstantsTest.java b/functional/FxmlTests/test/test/fxmltests/functional/ConstantsTest.java index 6915484f..4e11220d 100644 --- a/functional/FxmlTests/test/test/fxmltests/functional/ConstantsTest.java +++ b/functional/FxmlTests/test/test/fxmltests/functional/ConstantsTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -73,6 +73,7 @@ public void testDefaultProperty () { public void testConstantProperty () { testCommon(FxmlConstantApp.Pages.property.name(), null, false, true); Wrap<? extends Scene> sceneWrap = Root.ROOT.lookup(Scene.class).wrap(); + System.out.println("scene = " + sceneWrap.getControl()); Parent<Node> sceneParent = sceneWrap.as(Parent.class, Node.class); Wrap<? extends Rectangle> rectangle = sceneParent.lookup(Rectangle.class, new ByID<Rectangle>("rectangle")).wrap(); Assert.assertNotNull(rectangle.getControl().getFill()); diff --git a/functional/FxmlTests/test/test/fxmltests/functional/MenuDefaultValueTest.java b/functional/FxmlTests/test/test/fxmltests/functional/MenuDefaultValueTest.java index ffb3b6a9..3546c498 100644 --- a/functional/FxmlTests/test/test/fxmltests/functional/MenuDefaultValueTest.java +++ b/functional/FxmlTests/test/test/fxmltests/functional/MenuDefaultValueTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,20 +26,21 @@ import javafx.scene.Node; import javafx.scene.Scene; -import javafx.scene.control.MenuBar; import javafx.scene.control.Menu; +import javafx.scene.control.MenuBar; import javafx.scene.control.MenuItem; import org.jemmy.Point; import org.jemmy.action.GetAction; import org.jemmy.control.Wrap; import org.jemmy.fx.Root; +import org.jemmy.fx.SceneDock; import org.jemmy.input.StringMenuOwner; import org.jemmy.interfaces.Parent; import org.jemmy.lookup.LookupCriteria; import org.jemmy.timing.State; +import org.junit.Assert; import org.junit.BeforeClass; import org.junit.Test; -import org.junit.Assert; import test.fxmltests.app.MenuDefaultValue; import test.fxmltests.app.MenuDefaultValue.Pages; import test.javaclient.shared.TestBase; @@ -52,7 +53,7 @@ public class MenuDefaultValueTest extends TestBase { @BeforeClass - public static void runUI() { + public static void runUI() throws InterruptedException { Utils.launch(MenuDefaultValue.class, null); } @@ -61,6 +62,8 @@ public static void runUI() { */ @Test public void testMenu() throws InterruptedException { + //woraround for the scene activation bug + new SceneDock().mouse().click(); testCommon(Pages.menuPage.name(), null, false, true); checkMenu(); } @@ -70,6 +73,8 @@ public void testMenu() throws InterruptedException { */ @Test public void testMenuBar() throws InterruptedException { + //woraround for the scene activation bug + new SceneDock().mouse().click(); testCommon(Pages.menuBarPage.name(), null, false, true); checkMenu(); } @@ -80,6 +85,8 @@ public void testMenuBar() throws InterruptedException { */ @Test public void testMenuItemCustom() throws InterruptedException { + //woraround for the scene activation bug + new SceneDock().mouse().click(); testCommon(Pages.menuItemCustomPage.name(), null, false, true); checkMenu(); } @@ -88,7 +95,7 @@ private void checkMenu () { Wrap<? extends Scene> sceneWrap = Root.ROOT.lookup(Scene.class).wrap(); Wrap<? extends Menu> menuWrap = getMenu(sceneWrap, MenuDefaultValue.MENU_FILE_ID); expand(menuWrap); - Wrap<? extends Scene> scenePopup = Root.ROOT.lookup(Scene.class).wrap(0);//todo + Wrap<? extends Scene> scenePopup = Root.ROOT.lookup(Scene.class).wrap(1); Parent<MenuItem> menuParent = menuWrap.as(Parent.class, MenuItem.class); Assert.assertEquals(MenuDefaultValue.COUNT_MENUITEMS, menuParent.lookup().size()); for (int i=0; i < menuParent.lookup().size(); i++) { @@ -113,14 +120,12 @@ private Wrap<? extends Menu> getMenu (Wrap<? extends Scene> scene, String text) } protected Wrap lookupByMenuItem(Wrap<? extends Scene> scene, final MenuItem menu) { - final Wrap<Node> item = scene.as(Parent.class, Node.class).lookup(Node.class, new LookupCriteria<Node>() { - public boolean check(Node node) { - if (node.getProperties().get(MenuItem.class) == menu) { - return true; - } - return false; - } - }).wrap(); + final Wrap<Node> item = scene.as(Parent.class, Node.class).lookup(Node.class, (LookupCriteria<Node>) node -> { + if (node.getProperties().get(MenuItem.class) == menu) { + return true; + } + return false; + }).wrap(); return item; } diff --git a/functional/FxmlTests/test/test/fxmltests/functional/NullBuilderFactoryTest.java b/functional/FxmlTests/test/test/fxmltests/functional/NullBuilderFactoryTest.java index 2d7db82d..09f62b40 100644 --- a/functional/FxmlTests/test/test/fxmltests/functional/NullBuilderFactoryTest.java +++ b/functional/FxmlTests/test/test/fxmltests/functional/NullBuilderFactoryTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. */ package test.fxmltests.functional; @@ -15,7 +15,7 @@ */ public class NullBuilderFactoryTest { - @Test(timeout = 3000) + @Test(timeout = 10000) public void testFxmlLoaderUsingDefaultBuilderFactoryWhenSetToNull() { Utils.launch(NullBuilderFactoryApp.class, null); Utils.waitFor(() -> { diff --git a/functional/SceneGraphTests/.gitignore b/functional/SceneGraphTests/.gitignore new file mode 100644 index 00000000..378eac25 --- /dev/null +++ b/functional/SceneGraphTests/.gitignore @@ -0,0 +1 @@ +build diff --git a/functional/SceneGraphTests/SceneGraphTests.iml b/functional/SceneGraphTests/SceneGraphTests.iml new file mode 100644 index 00000000..e5d2daf8 --- /dev/null +++ b/functional/SceneGraphTests/SceneGraphTests.iml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<module type="JAVA_MODULE" version="4"> + <component name="NewModuleRootManager" inherit-compiler-output="true"> + <exclude-output /> + <content url="file://$MODULE_DIR$"> + <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" /> + <sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" /> + </content> + <orderEntry type="inheritedJdk" /> + <orderEntry type="sourceFolder" forTests="false" /> + </component> +</module> \ No newline at end of file diff --git a/functional/SceneGraphTests/build.xml b/functional/SceneGraphTests/build.xml index 4c84449f..3d6a63c5 100644 --- a/functional/SceneGraphTests/build.xml +++ b/functional/SceneGraphTests/build.xml @@ -1,67 +1,15 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -/* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code 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 General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - */ ---> -<project name="SceneGraphTests" default="default" basedir="." xmlns:fx="javafx:com.sun.javafx.tools.ant"> - <description>Builds, tests, and runs the project SceneGraphTests.</description> - <import file="nbproject/build-impl.xml"/> - <import file="../../tools/SharedTestUtilsOpen/image-utils.xml"/> - <import file="../../tools/FxTestRunner/javatest_fx.xml"/> - <import file="../../tools/FxTestRunner/run_javatest_macro.xml"/> - <import file="../../tools/FxTestRunner/plugin_support.xml"/> - - <condition property="external.output" value="${external.output}" else="${basedir}/.."> - <isset property="external.output"/> - </condition> - <condition property="javafx.home" value="${javafx.home}" else="${java.home}"> - <isset property="javafx.home"/> - </condition> - - <target name="-post-clean"> - <delete dir="dist-plugin"/> - </target> - <target name="-pre-init" unless="no.need.to.find.java.fx"> - <ant antfile="../../detect_javafx-nb.xml" inheritall="true"> - <property name="basedir" location="${basedir}/../.."/> - <property name="property.file" value="${basedir}/nbproject/private/private.properties"/> - </ant> - </target> - <property name="images.module" value="SceneGraphTests"/> - <property name="image.properties" location="${basedir}/image.properties"/> - <target name="-post-compile-test" depends="download-images" unless="fxsqe.nosvn"> - <copy todir="${build.test.classes.dir}"> - <fileset dir="${basedir}/images-svn/SceneGraphTests/resources"/> - </copy> - </target> - <target name="run-automated" depends="-post-jar, -init-project, javatest-automated"/> - <target name="run-manual" depends="-post-jar, -init-project, dojavatest"/> - - <target name="-init-project" depends="-pre-init,-init-private,-init-user"> - <property file="nbproject/configs/${config}.properties"/> - <property file="nbproject/project.properties"/> - <property name="test.sources" value="test"/> - </target> - -</project> +<?xml version="1.0" encoding="UTF-8"?> +<project name="scenegraph.tests" default="compile"> + <basename file="${basedir}" property="."/> + <property name="rootdir" location="${basedir}/../.."/> + <property name="project.name" value="SceneGraphTests"/> + <import file="${basedir}/../../tools/make/build-template.xml"/> + <property name="dependencies.classpath" value="${jemmyfx-src}/build/classes${path.separator}${glass-robot-src}/build/classes${path.separator}${glass-image-src}/build/classes${path.separator}${jemmyfx-browser-src}/build/classes${path.separator}${jtreg.home}/lib/junit.jar${path.separator}${javafx.home}/lib/javafx-swt.jar${path.separator}${javafx.home}/lib/javafx.swing.jar${path.separator}${shared-test-utils-src}/build/classes"/> + <target name="build-dependencies"> + <antcall target="build-other-project"> + <param name="project" value="${shared-test-utils-src}"/> + </antcall> + </target> + <target name="compile" depends="compile-src"/> + <target name="build-test-dependencies"/> +</project> diff --git a/functional/SceneGraphTests/nbproject/build-impl.xml b/functional/SceneGraphTests/nbproject/build-impl.xml deleted file mode 100644 index fcdee252..00000000 --- a/functional/SceneGraphTests/nbproject/build-impl.xml +++ /dev/null @@ -1,1489 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. -DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - -This code is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License version 2 only, as -published by the Free Software Foundation. Oracle designates this -particular file as subject to the "Classpath" exception as provided -by Oracle in the LICENSE file that accompanied this code. - -This code 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 General Public License -version 2 for more details (a copy is included in the LICENSE file that -accompanied this code). - -You should have received a copy of the GNU General Public License version -2 along with this work; if not, write to the Free Software Foundation, -Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - -Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -or visit www.oracle.com if you need additional information or have any -questions. ---> - -<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="SceneGraphTests-impl"> - <fail message="Please build using Ant 1.8.0 or higher."> - <condition> - <not> - <antversion atleast="1.8.0"/> - </not> - </condition> - </fail> - <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/> - <!-- - ====================== - INITIALIZATION SECTION - ====================== - --> - <target name="-pre-init"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="-pre-init" name="-init-private"> - <property file="nbproject/private/config.properties"/> - <property file="nbproject/private/configs/${config}.properties"/> - <property file="nbproject/private/private.properties"/> - </target> - <target depends="-pre-init,-init-private" name="-init-user"> - <property file="${user.properties.file}"/> - <!-- The two properties below are usually overridden --> - <!-- by the active platform. Just a fallback. --> - <property name="default.javac.source" value="1.4"/> - <property name="default.javac.target" value="1.4"/> - </target> - <target depends="-pre-init,-init-private,-init-user" name="-init-project"> - <property file="nbproject/configs/${config}.properties"/> - <property file="nbproject/project.properties"/> - </target> - <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init"> - <available file="${manifest.file}" property="manifest.available"/> - <condition property="splashscreen.available"> - <and> - <not> - <equals arg1="${application.splash}" arg2="" trim="true"/> - </not> - <available file="${application.splash}"/> - </and> - </condition> - <condition property="main.class.available"> - <and> - <isset property="main.class"/> - <not> - <equals arg1="${main.class}" arg2="" trim="true"/> - </not> - </and> - </condition> - <condition property="manifest.available+main.class"> - <and> - <isset property="manifest.available"/> - <isset property="main.class.available"/> - </and> - </condition> - <condition property="do.archive"> - <not> - <istrue value="${jar.archive.disabled}"/> - </not> - </condition> - <condition property="do.mkdist"> - <and> - <isset property="do.archive"/> - <isset property="libs.CopyLibs.classpath"/> - <not> - <istrue value="${mkdist.disabled}"/> - </not> - </and> - </condition> - <condition property="manifest.available+main.class+mkdist.available"> - <and> - <istrue value="${manifest.available+main.class}"/> - <isset property="do.mkdist"/> - </and> - </condition> - <condition property="do.archive+manifest.available"> - <and> - <isset property="manifest.available"/> - <istrue value="${do.archive}"/> - </and> - </condition> - <condition property="do.archive+main.class.available"> - <and> - <isset property="main.class.available"/> - <istrue value="${do.archive}"/> - </and> - </condition> - <condition property="do.archive+splashscreen.available"> - <and> - <isset property="splashscreen.available"/> - <istrue value="${do.archive}"/> - </and> - </condition> - <condition property="do.archive+manifest.available+main.class"> - <and> - <istrue value="${manifest.available+main.class}"/> - <istrue value="${do.archive}"/> - </and> - </condition> - <condition property="manifest.available-mkdist.available"> - <or> - <istrue value="${manifest.available}"/> - <isset property="do.mkdist"/> - </or> - </condition> - <condition property="manifest.available+main.class-mkdist.available"> - <or> - <istrue value="${manifest.available+main.class}"/> - <isset property="do.mkdist"/> - </or> - </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"/> - <isset property="have.tests"/> - </and> - </condition> - <condition property="no.javadoc.preview"> - <and> - <isset property="javadoc.preview"/> - <isfalse value="${javadoc.preview}"/> - </and> - </condition> - <property name="run.jvmargs" value=""/> - <property name="run.jvmargs.ide" value=""/> - <property name="javac.compilerargs" value=""/> - <property name="work.dir" value="${basedir}"/> - <condition property="no.deps"> - <and> - <istrue value="${no.dependencies}"/> - </and> - </condition> - <property name="javac.debug" value="true"/> - <property name="javadoc.preview" value="true"/> - <property name="application.args" value=""/> - <property name="source.encoding" value="${file.encoding}"/> - <property name="runtime.encoding" value="${source.encoding}"/> - <condition property="javadoc.encoding.used" value="${javadoc.encoding}"> - <and> - <isset property="javadoc.encoding"/> - <not> - <equals arg1="${javadoc.encoding}" arg2=""/> - </not> - </and> - </condition> - <property name="javadoc.encoding.used" value="${source.encoding}"/> - <property name="includes" value="**"/> - <property name="excludes" value=""/> - <property name="do.depend" value="false"/> - <condition property="do.depend.true"> - <istrue value="${do.depend}"/> - </condition> - <path id="endorsed.classpath.path" path="${endorsed.classpath}"/> - <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'"> - <length length="0" string="${endorsed.classpath}" when="greater"/> - </condition> - <condition else="false" property="jdkBug6558476"> - <and> - <matches pattern="1\.[56]" string="${java.specification.version}"/> - <not> - <os family="unix"/> - </not> - </and> - </condition> - <property name="javac.fork" value="${jdkBug6558476}"/> - <property name="jar.index" value="false"/> - <property name="jar.index.metainf" value="${jar.index}"/> - <property name="copylibs.rebase" value="true"/> - <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/> - <condition property="junit.available"> - <or> - <available classname="org.junit.Test" classpath="${run.test.classpath}"/> - <available classname="junit.framework.Test" classpath="${run.test.classpath}"/> - </or> - </condition> - <condition property="testng.available"> - <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/> - </condition> - <condition property="junit+testng.available"> - <and> - <istrue value="${junit.available}"/> - <istrue value="${testng.available}"/> - </and> - </condition> - <condition else="testng" property="testng.mode" value="mixed"> - <istrue value="${junit+testng.available}"/> - </condition> - <condition else="" property="testng.debug.mode" value="-mixed"> - <istrue value="${junit+testng.available}"/> - </condition> - </target> - <target name="-post-init"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check"> - <fail unless="src.dir">Must set src.dir</fail> - <fail unless="test.src.dir">Must set test.src.dir</fail> - <fail unless="build.dir">Must set build.dir</fail> - <fail unless="dist.dir">Must set dist.dir</fail> - <fail unless="build.classes.dir">Must set build.classes.dir</fail> - <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail> - <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail> - <fail unless="build.test.results.dir">Must set build.test.results.dir</fail> - <fail unless="build.classes.excludes">Must set build.classes.excludes</fail> - <fail unless="dist.jar">Must set dist.jar</fail> - </target> - <target name="-init-macrodef-property"> - <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1"> - <attribute name="name"/> - <attribute name="value"/> - <sequential> - <property name="@{name}" value="${@{value}}"/> - </sequential> - </macrodef> - </target> - <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors"> - <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${src.dir}" name="srcdir"/> - <attribute default="${build.classes.dir}" name="destdir"/> - <attribute default="${javac.classpath}" name="classpath"/> - <attribute default="${javac.processorpath}" name="processorpath"/> - <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="${javac.debug}" name="debug"/> - <attribute default="${empty.dir}" name="sourcepath"/> - <attribute default="${empty.dir}" name="gensrcdir"/> - <element name="customize" optional="true"/> - <sequential> - <property location="${build.dir}/empty" name="empty.dir"/> - <mkdir dir="${empty.dir}"/> - <mkdir dir="@{apgeneratedsrcdir}"/> - <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}"> - <src> - <dirset dir="@{gensrcdir}" erroronmissingdir="false"> - <include name="*"/> - </dirset> - </src> - <classpath> - <path path="@{classpath}"/> - </classpath> - <compilerarg line="${endorsed.classpath.cmd.line.arg}"/> - <compilerarg line="${javac.compilerargs}"/> - <compilerarg value="-processorpath"/> - <compilerarg path="@{processorpath}:${empty.dir}"/> - <compilerarg line="${ap.processors.internal}"/> - <compilerarg line="${annotation.processing.processor.options}"/> - <compilerarg value="-s"/> - <compilerarg path="@{apgeneratedsrcdir}"/> - <compilerarg line="${ap.proc.none.internal}"/> - <customize/> - </javac> - </sequential> - </macrodef> - </target> - <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal"> - <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${src.dir}" name="srcdir"/> - <attribute default="${build.classes.dir}" name="destdir"/> - <attribute default="${javac.classpath}" name="classpath"/> - <attribute default="${javac.processorpath}" name="processorpath"/> - <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="${javac.debug}" name="debug"/> - <attribute default="${empty.dir}" name="sourcepath"/> - <attribute default="${empty.dir}" name="gensrcdir"/> - <element name="customize" optional="true"/> - <sequential> - <property location="${build.dir}/empty" name="empty.dir"/> - <mkdir dir="${empty.dir}"/> - <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}"> - <src> - <dirset dir="@{gensrcdir}" erroronmissingdir="false"> - <include name="*"/> - </dirset> - </src> - <classpath> - <path path="@{classpath}"/> - </classpath> - <compilerarg line="${endorsed.classpath.cmd.line.arg}"/> - <compilerarg line="${javac.compilerargs}"/> - <customize/> - </javac> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac"> - <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${src.dir}" name="srcdir"/> - <attribute default="${build.classes.dir}" name="destdir"/> - <attribute default="${javac.classpath}" name="classpath"/> - <sequential> - <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}"> - <classpath> - <path path="@{classpath}"/> - </classpath> - </depend> - </sequential> - </macrodef> - <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${build.classes.dir}" name="destdir"/> - <sequential> - <fail unless="javac.includes">Must set javac.includes</fail> - <pathconvert pathsep="${line.separator}" property="javac.includes.binary"> - <path> - <filelist dir="@{destdir}" files="${javac.includes}"/> - </path> - <globmapper from="*.java" to="*.class"/> - </pathconvert> - <tempfile deleteonexit="true" property="javac.includesfile.binary"/> - <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/> - <delete> - <files includesfile="${javac.includesfile.binary}"/> - </delete> - <delete> - <fileset file="${javac.includesfile.binary}"/> - </delete> - </sequential> - </macrodef> - </target> - <target if="${junit.available}" name="-init-macrodef-junit-init"> - <condition else="false" property="nb.junit.batch" value="true"> - <and> - <istrue value="${junit.available}"/> - <not> - <isset property="test.method"/> - </not> - </and> - </condition> - <condition else="false" property="nb.junit.single" value="true"> - <and> - <istrue value="${junit.available}"/> - <isset property="test.method"/> - </and> - </condition> - </target> - <target if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}"> - <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element name="customize" optional="true"/> - <sequential> - <property name="junit.forkmode" value="perTest"/> - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> - <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/> - <syspropertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <formatter type="brief" usefile="false"/> - <formatter type="xml"/> - <jvmarg value="-ea"/> - <customize/> - </junit> - </sequential> - </macrodef> - </target> - <target if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}"> - <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element name="customize" optional="true"/> - <sequential> - <property name="junit.forkmode" value="perTest"/> - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> - <batchtest todir="${build.test.results.dir}"> - <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}"> - <filename name="@{testincludes}"/> - </fileset> - </batchtest> - <syspropertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <formatter type="brief" usefile="false"/> - <formatter type="xml"/> - <jvmarg value="-ea"/> - <customize/> - </junit> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/> - <target if="${testng.available}" name="-init-macrodef-testng"> - <macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element name="customize" optional="true"/> - <sequential> - <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}"> - <isset property="test.method"/> - </condition> - <union id="test.set"> - <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}"> - <filename name="@{testincludes}"/> - </fileset> - </union> - <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/> - <testng classfilesetref="test.set" failureProperty="tests.failed" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="SceneGraphTests" testname="TestNG tests" workingDir="${work.dir}"> - <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/> - <propertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </propertyset> - <customize/> - </testng> - </sequential> - </macrodef> - </target> - <target name="-init-macrodef-test-impl"> - <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element implicit="true" name="customize" optional="true"/> - <sequential> - <echo>No tests executed.</echo> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl"> - <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element implicit="true" name="customize" optional="true"/> - <sequential> - <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> - <customize/> - </j2seproject3:junit> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl"> - <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element implicit="true" name="customize" optional="true"/> - <sequential> - <j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> - <customize/> - </j2seproject3:testng> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test"> - <macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <sequential> - <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> - <customize> - <classpath> - <path path="${run.test.classpath}"/> - </classpath> - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> - <jvmarg line="${run.jvmargs}"/> - <jvmarg line="${run.jvmargs.ide}"/> - </customize> - </j2seproject3:test-impl> - </sequential> - </macrodef> - </target> - <target if="${junit.available}" name="-init-macrodef-junit-debug" unless="${nb.junit.batch}"> - <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element name="customize" optional="true"/> - <sequential> - <property name="junit.forkmode" value="perTest"/> - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> - <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/> - <syspropertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <formatter type="brief" usefile="false"/> - <formatter type="xml"/> - <jvmarg value="-ea"/> - <jvmarg line="${debug-args-line}"/> - <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> - <customize/> - </junit> - </sequential> - </macrodef> - </target> - <target if="${nb.junit.batch}" name="-init-macrodef-junit-debug-batch"> - <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element name="customize" optional="true"/> - <sequential> - <property name="junit.forkmode" value="perTest"/> - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> - <batchtest todir="${build.test.results.dir}"> - <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}"> - <filename name="@{testincludes}"/> - </fileset> - </batchtest> - <syspropertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <formatter type="brief" usefile="false"/> - <formatter type="xml"/> - <jvmarg value="-ea"/> - <jvmarg line="${debug-args-line}"/> - <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> - <customize/> - </junit> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-junit-debug,-init-macrodef-junit-debug-batch" if="${junit.available}" name="-init-macrodef-junit-debug-impl"> - <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element implicit="true" name="customize" optional="true"/> - <sequential> - <j2seproject3:junit-debug excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> - <customize/> - </j2seproject3:junit-debug> - </sequential> - </macrodef> - </target> - <target if="${testng.available}" name="-init-macrodef-testng-debug"> - <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${main.class}" name="testClass"/> - <attribute default="" name="testMethod"/> - <element name="customize2" optional="true"/> - <sequential> - <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}"> - <isset property="test.method"/> - </condition> - <condition else="-suitename SceneGraphTests -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}"> - <matches pattern=".*\.xml" string="@{testClass}"/> - </condition> - <delete dir="${build.test.results.dir}" quiet="true"/> - <mkdir dir="${build.test.results.dir}"/> - <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}"> - <customize> - <customize2/> - <jvmarg value="-ea"/> - <arg line="${testng.debug.mode}"/> - <arg line="-d ${build.test.results.dir}"/> - <arg line="-listener org.testng.reporters.VerboseReporter"/> - <arg line="${testng.cmd.args}"/> - </customize> - </j2seproject3:debug> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl"> - <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${main.class}" name="testClass"/> - <attribute default="" name="testMethod"/> - <element implicit="true" name="customize2" optional="true"/> - <sequential> - <j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}"> - <customize2/> - </j2seproject3:testng-debug> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit"> - <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <attribute default="${main.class}" name="testClass"/> - <attribute default="" name="testMethod"/> - <sequential> - <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> - <customize> - <classpath> - <path path="${run.test.classpath}"/> - </classpath> - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> - <jvmarg line="${run.jvmargs}"/> - <jvmarg line="${run.jvmargs.ide}"/> - </customize> - </j2seproject3:test-debug-impl> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng"> - <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <attribute default="${main.class}" name="testClass"/> - <attribute default="" name="testMethod"/> - <sequential> - <j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}"> - <customize2> - <syspropertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - </customize2> - </j2seproject3:testng-debug-impl> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/> - <!-- - pre NB7.2 profiling section; consider it deprecated - --> - <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/> - <target if="profiler.info.jvmargs.agent" name="-profile-pre-init"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target if="profiler.info.jvmargs.agent" name="-profile-post-init"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile"> - <macrodef name="resolve"> - <attribute name="name"/> - <attribute name="value"/> - <sequential> - <property name="@{name}" value="${env.@{value}}"/> - </sequential> - </macrodef> - <macrodef name="profile"> - <attribute default="${main.class}" name="classname"/> - <element name="customize" optional="true"/> - <sequential> - <property environment="env"/> - <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/> - <java classname="@{classname}" dir="${profiler.info.dir}" fork="true" jvm="${profiler.info.jvm}"> - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> - <jvmarg value="${profiler.info.jvmargs.agent}"/> - <jvmarg line="${profiler.info.jvmargs}"/> - <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/> - <arg line="${application.args}"/> - <classpath> - <path path="${run.classpath}"/> - </classpath> - <syspropertyset> - <propertyref prefix="run-sys-prop."/> - <mapper from="run-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <customize/> - </java> - </sequential> - </macrodef> - </target> - <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" name="-profile-init-check"> - <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail> - <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail> - </target> - <!-- - end of pre NB7.2 profiling section - --> - <target depends="-init-debug-args" name="-init-macrodef-nbjpda"> - <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1"> - <attribute default="${main.class}" name="name"/> - <attribute default="${debug.classpath}" name="classpath"/> - <attribute default="" name="stopclassname"/> - <sequential> - <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}"> - <classpath> - <path path="@{classpath}"/> - </classpath> - </nbjpdastart> - </sequential> - </macrodef> - <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1"> - <attribute default="${build.classes.dir}" name="dir"/> - <sequential> - <nbjpdareload> - <fileset dir="@{dir}" includes="${fix.classes}"> - <include name="${fix.includes}*.class"/> - </fileset> - </nbjpdareload> - </sequential> - </macrodef> - </target> - <target name="-init-debug-args"> - <property name="version-output" value="java version "${ant.java.version}"/> - <condition property="have-jdk-older-than-1.4"> - <or> - <contains string="${version-output}" substring="java version "1.0"/> - <contains string="${version-output}" substring="java version "1.1"/> - <contains string="${version-output}" substring="java version "1.2"/> - <contains string="${version-output}" substring="java version "1.3"/> - </or> - </condition> - <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none"> - <istrue value="${have-jdk-older-than-1.4}"/> - </condition> - <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem"> - <os family="windows"/> - </condition> - <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}"> - <isset property="debug.transport"/> - </condition> - </target> - <target depends="-init-debug-args" name="-init-macrodef-debug"> - <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${main.class}" name="classname"/> - <attribute default="${debug.classpath}" name="classpath"/> - <element name="customize" optional="true"/> - <sequential> - <java classname="@{classname}" dir="${work.dir}" fork="true"> - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> - <jvmarg line="${debug-args-line}"/> - <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> - <jvmarg value="-Dfile.encoding=${runtime.encoding}"/> - <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/> - <jvmarg line="${run.jvmargs}"/> - <jvmarg line="${run.jvmargs.ide}"/> - <classpath> - <path path="@{classpath}"/> - </classpath> - <syspropertyset> - <propertyref prefix="run-sys-prop."/> - <mapper from="run-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <customize/> - </java> - </sequential> - </macrodef> - </target> - <target name="-init-macrodef-java"> - <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1"> - <attribute default="${main.class}" name="classname"/> - <attribute default="${run.classpath}" name="classpath"/> - <attribute default="jvm" name="jvm"/> - <element name="customize" optional="true"/> - <sequential> - <java classname="@{classname}" dir="${work.dir}" fork="true"> - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> - <jvmarg value="-Dfile.encoding=${runtime.encoding}"/> - <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/> - <jvmarg line="${run.jvmargs}"/> - <jvmarg line="${run.jvmargs.ide}"/> - <classpath> - <path path="@{classpath}"/> - </classpath> - <syspropertyset> - <propertyref prefix="run-sys-prop."/> - <mapper from="run-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <customize/> - </java> - </sequential> - </macrodef> - </target> - <target name="-init-macrodef-copylibs"> - <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${manifest.file}" name="manifest"/> - <element name="customize" optional="true"/> - <sequential> - <property location="${build.classes.dir}" name="build.classes.dir.resolved"/> - <pathconvert property="run.classpath.without.build.classes.dir"> - <path path="${run.classpath}"/> - <map from="${build.classes.dir.resolved}" to=""/> - </pathconvert> - <pathconvert pathsep=" " property="jar.classpath"> - <path path="${run.classpath.without.build.classes.dir}"/> - <chainedmapper> - <flattenmapper/> - <filtermapper> - <replacestring from=" " to="%20"/> - </filtermapper> - <globmapper from="*" to="lib/*"/> - </chainedmapper> - </pathconvert> - <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/> - <copylibs compress="${jar.compress}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" rebase="${copylibs.rebase}" runtimeclasspath="${run.classpath.without.build.classes.dir}"> - <fileset dir="${build.classes.dir}"/> - <manifest> - <attribute name="Class-Path" value="${jar.classpath}"/> - <customize/> - </manifest> - </copylibs> - </sequential> - </macrodef> - </target> - <target name="-init-presetdef-jar"> - <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1"> - <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}"> - <j2seproject1:fileset dir="${build.classes.dir}"/> - </jar> - </presetdef> - </target> - <target name="-init-ap-cmdline-properties"> - <property name="annotation.processing.enabled" value="true"/> - <property name="annotation.processing.processors.list" value=""/> - <property name="annotation.processing.processor.options" value=""/> - <property name="annotation.processing.run.all.processors" value="true"/> - <property name="javac.processorpath" value="${javac.classpath}"/> - <property name="javac.test.processorpath" value="${javac.test.classpath}"/> - <condition property="ap.supported.internal" value="true"> - <not> - <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/> - </not> - </condition> - </target> - <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported"> - <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}"> - <isfalse value="${annotation.processing.run.all.processors}"/> - </condition> - <condition else="" property="ap.proc.none.internal" value="-proc:none"> - <isfalse value="${annotation.processing.enabled}"/> - </condition> - </target> - <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline"> - <property name="ap.cmd.line.internal" value=""/> - </target> - <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-test,-init-macrodef-test-debug,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/> - <!-- - =================== - COMPILATION SECTION - =================== - --> - <target name="-deps-jar-init" unless="built-jar.properties"> - <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/> - <delete file="${built-jar.properties}" quiet="true"/> - </target> - <target if="already.built.jar.${basedir}" name="-warn-already-built-jar"> - <echo level="warn" message="Cycle detected: SceneGraphTests was already built"/> - </target> - <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps"> - <mkdir dir="${build.dir}"/> - <touch file="${built-jar.properties}" verbose="false"/> - <property file="${built-jar.properties}" prefix="already.built.jar."/> - <antcall target="-warn-already-built-jar"/> - <propertyfile file="${built-jar.properties}"> - <entry key="${basedir}" value=""/> - </propertyfile> - <antcall target="-maybe-call-dep"> - <param name="call.built.properties" value="${built-jar.properties}"/> - <param location="${project.JemmyFX}" name="call.subproject"/> - <param location="${project.JemmyFX}/build.xml" name="call.script"/> - <param name="call.target" value="jar"/> - <param name="transfer.built-jar.properties" value="${built-jar.properties}"/> - </antcall> - <antcall target="-maybe-call-dep"> - <param name="call.built.properties" value="${built-jar.properties}"/> - <param location="${project.GlassImage}" name="call.subproject"/> - <param location="${project.GlassImage}/build.xml" name="call.script"/> - <param name="call.target" value="jar"/> - <param name="transfer.built-jar.properties" value="${built-jar.properties}"/> - </antcall> - <antcall target="-maybe-call-dep"> - <param name="call.built.properties" value="${built-jar.properties}"/> - <param location="${project.GlassRobot}" name="call.subproject"/> - <param location="${project.GlassRobot}/build.xml" name="call.script"/> - <param name="call.target" value="jar"/> - <param name="transfer.built-jar.properties" value="${built-jar.properties}"/> - </antcall> - <antcall target="-maybe-call-dep"> - <param name="call.built.properties" value="${built-jar.properties}"/> - <param location="${project.JemmyFXBrowser}" name="call.subproject"/> - <param location="${project.JemmyFXBrowser}/build.xml" name="call.script"/> - <param name="call.target" value="jar"/> - <param name="transfer.built-jar.properties" value="${built-jar.properties}"/> - </antcall> - <antcall target="-maybe-call-dep"> - <param name="call.built.properties" value="${built-jar.properties}"/> - <param location="${project.SharedTestUtils}" name="call.subproject"/> - <param location="${project.SharedTestUtils}/build.xml" name="call.script"/> - <param name="call.target" value="jar"/> - <param name="transfer.built-jar.properties" value="${built-jar.properties}"/> - </antcall> - <antcall target="-maybe-call-dep"> - <param name="call.built.properties" value="${built-jar.properties}"/> - <param location="${project.TestMarkup}" name="call.subproject"/> - <param location="${project.TestMarkup}/build.xml" name="call.script"/> - <param name="call.target" value="jar"/> - <param name="transfer.built-jar.properties" value="${built-jar.properties}"/> - </antcall> - </target> - <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/> - <target depends="init" name="-check-automatic-build"> - <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/> - </target> - <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build"> - <antcall target="clean"/> - </target> - <target depends="init,deps-jar" name="-pre-pre-compile"> - <mkdir dir="${build.classes.dir}"/> - </target> - <target name="-pre-compile"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target if="do.depend.true" name="-compile-depend"> - <pathconvert property="build.generated.subdirs"> - <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false"> - <include name="*"/> - </dirset> - </pathconvert> - <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/> - </target> - <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile"> - <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/> - <copy todir="${build.classes.dir}"> - <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> - </copy> - </target> - <target if="has.persistence.xml" name="-copy-persistence-xml"> - <mkdir dir="${build.classes.dir}/META-INF"/> - <copy todir="${build.classes.dir}/META-INF"> - <fileset dir="${meta.inf.dir}" includes="persistence.xml"/> - </copy> - </target> - <target name="-post-compile"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/> - <target name="-pre-compile-single"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single"> - <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail> - <j2seproject3:force-recompile/> - <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}"/> - </target> - <target name="-post-compile-single"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/> - <!-- - ==================== - JAR BUILDING SECTION - ==================== - --> - <target depends="init" name="-pre-pre-jar"> - <dirname file="${dist.jar}" property="dist.jar.dir"/> - <mkdir dir="${dist.jar.dir}"/> - </target> - <target name="-pre-jar"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive" name="-do-jar-without-manifest" unless="manifest.available-mkdist.available"> - <j2seproject1:jar/> - </target> - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class-mkdist.available"> - <j2seproject1:jar manifest="${manifest.file}"/> - </target> - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available+main.class" name="-do-jar-with-mainclass" 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 level="info">To run this application from the command line without Ant, try:</echo> - <property location="${build.classes.dir}" name="build.classes.dir.resolved"/> - <property location="${dist.jar}" name="dist.jar.resolved"/> - <pathconvert property="run.classpath.with.dist.jar"> - <path path="${run.classpath}"/> - <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/> - </pathconvert> - <echo level="info">java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo> - </target> - <target depends="init" if="do.archive" name="-do-jar-with-libraries-create-manifest" unless="manifest.available"> - <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/> - <touch file="${tmp.manifest.file}" verbose="false"/> - </target> - <target depends="init" if="do.archive+manifest.available" name="-do-jar-with-libraries-copy-manifest"> - <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/> - <copy file="${manifest.file}" tofile="${tmp.manifest.file}"/> - </target> - <target depends="init,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest" if="do.archive+main.class.available" name="-do-jar-with-libraries-set-main"> - <manifest file="${tmp.manifest.file}" mode="update"> - <attribute name="Main-Class" value="${main.class}"/> - </manifest> - </target> - <target depends="init,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-with-libraries-set-splashscreen"> - <basename file="${application.splash}" property="splashscreen.basename"/> - <mkdir dir="${build.classes.dir}/META-INF"/> - <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/> - <manifest file="${tmp.manifest.file}" mode="update"> - <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/> - </manifest> - </target> - <target depends="init,-init-macrodef-copylibs,compile,-pre-pre-jar,-pre-jar,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest,-do-jar-with-libraries-set-main,-do-jar-with-libraries-set-splashscreen" if="do.mkdist" name="-do-jar-with-libraries-pack"> - <j2seproject3:copylibs manifest="${tmp.manifest.file}"/> - <echo level="info">To run this application from the command line without Ant, try:</echo> - <property location="${dist.jar}" name="dist.jar.resolved"/> - <echo level="info">java -jar "${dist.jar.resolved}"</echo> - </target> - <target depends="-do-jar-with-libraries-pack" if="do.archive" name="-do-jar-with-libraries-delete-manifest"> - <delete> - <fileset file="${tmp.manifest.file}"/> - </delete> - </target> - <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest,-do-jar-with-libraries-set-main,-do-jar-with-libraries-set-splashscreen,-do-jar-with-libraries-pack,-do-jar-with-libraries-delete-manifest" name="-do-jar-with-libraries"/> - <target name="-post-jar"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target 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." name="jar"/> - <!-- - ================= - EXECUTION SECTION - ================= - --> - <target depends="init,compile" description="Run a main class." name="run"> - <j2seproject1:java> - <customize> - <arg line="${application.args}"/> - </customize> - </j2seproject1:java> - </target> - <target name="-do-not-recompile"> - <property name="javac.includes.binary" value=""/> - </target> - <target depends="init,compile-single" name="run-single"> - <fail unless="run.class">Must select one file in the IDE or set run.class</fail> - <j2seproject1:java classname="${run.class}"/> - </target> - <target depends="init,compile-test-single" name="run-test-with-main"> - <fail unless="run.class">Must select one file in the IDE or set run.class</fail> - <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/> - </target> - <!-- - ================= - DEBUGGING SECTION - ================= - --> - <target depends="init" if="netbeans.home" name="-debug-start-debugger"> - <j2seproject1:nbjpdastart name="${debug.class}"/> - </target> - <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test"> - <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/> - </target> - <target depends="init,compile" name="-debug-start-debuggee"> - <j2seproject3:debug> - <customize> - <arg line="${application.args}"/> - </customize> - </j2seproject3:debug> - </target> - <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/> - <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto"> - <j2seproject1:nbjpdastart stopclassname="${main.class}"/> - </target> - <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/> - <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single"> - <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail> - <j2seproject3:debug classname="${debug.class}"/> - </target> - <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/> - <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test"> - <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail> - <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/> - </target> - <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/> - <target depends="init" name="-pre-debug-fix"> - <fail unless="fix.includes">Must set fix.includes</fail> - <property name="javac.includes" value="${fix.includes}.java"/> - </target> - <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix"> - <j2seproject1:nbjpdareload/> - </target> - <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/> - <!-- - ================= - PROFILING SECTION - ================= - --> - <!-- - pre NB7.2 profiler integration - --> - <target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72"> - <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> - <nbprofiledirect> - <classpath> - <path path="${run.classpath}"/> - </classpath> - </nbprofiledirect> - <profile/> - </target> - <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72"> - <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail> - <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> - <nbprofiledirect> - <classpath> - <path path="${run.classpath}"/> - </classpath> - </nbprofiledirect> - <profile classname="${profile.class}"/> - </target> - <target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72"> - <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> - <nbprofiledirect> - <classpath> - <path path="${run.classpath}"/> - </classpath> - </nbprofiledirect> - <profile classname="sun.applet.AppletViewer"> - <customize> - <arg value="${applet.url}"/> - </customize> - </profile> - </target> - <target depends="profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72"> - <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> - <nbprofiledirect> - <classpath> - <path path="${run.test.classpath}"/> - </classpath> - </nbprofiledirect> - <junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true"> - <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/> - <jvmarg value="${profiler.info.jvmargs.agent}"/> - <jvmarg line="${profiler.info.jvmargs}"/> - <test name="${profile.class}"/> - <classpath> - <path path="${run.test.classpath}"/> - </classpath> - <syspropertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <formatter type="brief" usefile="false"/> - <formatter type="xml"/> - </junit> - </target> - <!-- - end of pre NB72 profiling section - --> - <target if="netbeans.home" name="-profile-check"> - <condition property="profiler.configured"> - <or> - <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/> - <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/> - </or> - </condition> - </target> - <target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent"> - <startprofiler/> - <antcall target="run"/> - </target> - <target depends="-profile-check,-profile-single-pre72" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-single" unless="profiler.info.jvmargs.agent"> - <fail unless="run.class">Must select one file in the IDE or set run.class</fail> - <startprofiler/> - <antcall target="run-single"/> - </target> - <target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/> - <target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs"> - <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail> - <startprofiler/> - <antcall target="test-single"/> - </target> - <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main"> - <fail unless="run.class">Must select one file in the IDE or set run.class</fail> - <startprofiler/> - <antcal target="run-test-with-main"/> - </target> - <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent"> - <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> - <startprofiler/> - <antcall target="run-applet"/> - </target> - <!-- - =============== - JAVADOC SECTION - =============== - --> - <target depends="init" if="have.sources" name="-javadoc-build"> - <mkdir dir="${dist.javadoc.dir}"/> - <condition else="" property="javadoc.endorsed.classpath.cmd.line.arg" value="-J${endorsed.classpath.cmd.line.arg}"> - <and> - <isset property="endorsed.classpath.cmd.line.arg"/> - <not> - <equals arg1="${endorsed.classpath.cmd.line.arg}" arg2=""/> - </not> - </and> - </condition> - <javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" 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}"> - <classpath> - <path path="${javac.classpath}"/> - </classpath> - <fileset dir="${src.dir}" excludes="*.java,${excludes}" includes="${includes}"> - <filename name="**/*.java"/> - </fileset> - <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false"> - <include name="**/*.java"/> - <exclude name="*.java"/> - </fileset> - <arg line="${javadoc.endorsed.classpath.cmd.line.arg}"/> - </javadoc> - <copy todir="${dist.javadoc.dir}"> - <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}"> - <filename name="**/doc-files/**"/> - </fileset> - <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false"> - <include name="**/doc-files/**"/> - </fileset> - </copy> - </target> - <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview"> - <nbbrowse file="${dist.javadoc.dir}/index.html"/> - </target> - <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/> - <!-- - ========================= - TEST COMPILATION SECTION - ========================= - --> - <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test"> - <mkdir dir="${build.test.classes.dir}"/> - </target> - <target name="-pre-compile-test"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target if="do.depend.true" name="-compile-test-depend"> - <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/> - </target> - <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test"> - <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" processorpath="${javac.test.processorpath}" srcdir="${test.src.dir}"/> - <copy todir="${build.test.classes.dir}"> - <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> - </copy> - </target> - <target name="-post-compile-test"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/> - <target name="-pre-compile-test-single"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single"> - <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail> - <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/> - <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" processorpath="${javac.test.processorpath}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/> - <copy todir="${build.test.classes.dir}"> - <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> - </copy> - </target> - <target name="-post-compile-test-single"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/> - <!-- - ======================= - TEST EXECUTION SECTION - ======================= - --> - <target depends="init" if="have.tests" name="-pre-test-run"> - <mkdir dir="${build.test.results.dir}"/> - </target> - <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run"> - <j2seproject3:test testincludes="**/*Test.java"/> - </target> - <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run"> - <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail> - </target> - <target depends="init" if="have.tests" name="test-report"/> - <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/> - <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/> - <target depends="init" if="have.tests" name="-pre-test-run-single"> - <mkdir dir="${build.test.results.dir}"/> - </target> - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single"> - <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail> - <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/> - </target> - <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single"> - <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail> - </target> - <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/> - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method"> - <fail unless="test.class">Must select some files in the IDE or set test.class</fail> - <fail unless="test.method">Must select some method in the IDE or set test.method</fail> - <j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/> - </target> - <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method"> - <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail> - </target> - <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method,-post-test-run-single-method" description="Run single unit test." name="test-single-method"/> - <!-- - ======================= - TEST DEBUGGING SECTION - ======================= - --> - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test"> - <fail unless="test.class">Must select one file in the IDE or set test.class</fail> - <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/> - </target> - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method"> - <fail unless="test.class">Must select one file in the IDE or set test.class</fail> - <fail unless="test.method">Must select some method in the IDE or set test.method</fail> - <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/> - </target> - <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test"> - <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/> - </target> - <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/> - <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/> - <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test"> - <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/> - </target> - <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/> - <!-- - ========================= - APPLET EXECUTION SECTION - ========================= - --> - <target depends="init,compile-single" name="run-applet"> - <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> - <j2seproject1:java classname="sun.applet.AppletViewer"> - <customize> - <arg value="${applet.url}"/> - </customize> - </j2seproject1:java> - </target> - <!-- - ========================= - APPLET DEBUGGING SECTION - ========================= - --> - <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet"> - <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> - <j2seproject3:debug classname="sun.applet.AppletViewer"> - <customize> - <arg value="${applet.url}"/> - </customize> - </j2seproject3:debug> - </target> - <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/> - <!-- - =============== - CLEANUP SECTION - =============== - --> - <target name="-deps-clean-init" unless="built-clean.properties"> - <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/> - <delete file="${built-clean.properties}" quiet="true"/> - </target> - <target if="already.built.clean.${basedir}" name="-warn-already-built-clean"> - <echo level="warn" message="Cycle detected: SceneGraphTests was already built"/> - </target> - <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps"> - <mkdir dir="${build.dir}"/> - <touch file="${built-clean.properties}" verbose="false"/> - <property file="${built-clean.properties}" prefix="already.built.clean."/> - <antcall target="-warn-already-built-clean"/> - <propertyfile file="${built-clean.properties}"> - <entry key="${basedir}" value=""/> - </propertyfile> - <antcall target="-maybe-call-dep"> - <param name="call.built.properties" value="${built-clean.properties}"/> - <param location="${project.GlassImage}" name="call.subproject"/> - <param location="${project.GlassImage}/build.xml" name="call.script"/> - <param name="call.target" value="clean"/> - <param name="transfer.built-clean.properties" value="${built-clean.properties}"/> - </antcall> - <antcall target="-maybe-call-dep"> - <param name="call.built.properties" value="${built-clean.properties}"/> - <param location="${project.GlassRobot}" name="call.subproject"/> - <param location="${project.GlassRobot}/build.xml" name="call.script"/> - <param name="call.target" value="clean"/> - <param name="transfer.built-clean.properties" value="${built-clean.properties}"/> - </antcall> - <antcall target="-maybe-call-dep"> - <param name="call.built.properties" value="${built-clean.properties}"/> - <param location="${project.JemmyFX}" name="call.subproject"/> - <param location="${project.JemmyFX}/build.xml" name="call.script"/> - <param name="call.target" value="clean"/> - <param name="transfer.built-clean.properties" value="${built-clean.properties}"/> - </antcall> - <antcall target="-maybe-call-dep"> - <param name="call.built.properties" value="${built-clean.properties}"/> - <param location="${project.JemmyFXBrowser}" name="call.subproject"/> - <param location="${project.JemmyFXBrowser}/build.xml" name="call.script"/> - <param name="call.target" value="clean"/> - <param name="transfer.built-clean.properties" value="${built-clean.properties}"/> - </antcall> - <antcall target="-maybe-call-dep"> - <param name="call.built.properties" value="${built-clean.properties}"/> - <param location="${project.SharedTestUtils}" name="call.subproject"/> - <param location="${project.SharedTestUtils}/build.xml" name="call.script"/> - <param name="call.target" value="clean"/> - <param name="transfer.built-clean.properties" value="${built-clean.properties}"/> - </antcall> - <antcall target="-maybe-call-dep"> - <param name="call.built.properties" value="${built-clean.properties}"/> - <param location="${project.TestMarkup}" name="call.subproject"/> - <param location="${project.TestMarkup}/build.xml" name="call.script"/> - <param name="call.target" value="clean"/> - <param name="transfer.built-clean.properties" value="${built-clean.properties}"/> - </antcall> - </target> - <target depends="init" name="-do-clean"> - <delete dir="${build.dir}"/> - <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/> - </target> - <target name="-post-clean"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/> - <target name="-check-call-dep"> - <property file="${call.built.properties}" prefix="already.built."/> - <condition property="should.call.dep"> - <and> - <not> - <isset property="already.built.${call.subproject}"/> - </not> - <available file="${call.script}"/> - </and> - </condition> - </target> - <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep"> - <ant antfile="${call.script}" inheritall="false" target="${call.target}"> - <propertyset> - <propertyref prefix="transfer."/> - <mapper from="transfer.*" to="*" type="glob"/> - </propertyset> - </ant> - </target> -</project> diff --git a/functional/SceneGraphTests/nbproject/configs/bind_debug.properties b/functional/SceneGraphTests/nbproject/configs/bind_debug.properties deleted file mode 100644 index 7db9cfc9..00000000 --- a/functional/SceneGraphTests/nbproject/configs/bind_debug.properties +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. Oracle designates this -# particular file as subject to the "Classpath" exception as provided -# by Oracle in the LICENSE file that accompanied this code. -# -# This code 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 General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -run.jvmargs=-Dtest.javaclient.binding.debug=true -Djavafx.toolkit=quantum diff --git a/functional/SceneGraphTests/nbproject/configs/interop.properties b/functional/SceneGraphTests/nbproject/configs/interop.properties deleted file mode 100644 index 852ee96f..00000000 --- a/functional/SceneGraphTests/nbproject/configs/interop.properties +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. Oracle designates this -# particular file as subject to the "Classpath" exception as provided -# by Oracle in the LICENSE file that accompanied this code. -# -# This code 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 General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -run.jvmargs=-Djavafx.swinginteroperability=true \ No newline at end of file diff --git a/functional/SceneGraphTests/nbproject/configs/j2d.properties b/functional/SceneGraphTests/nbproject/configs/j2d.properties deleted file mode 100644 index cb3a0a46..00000000 --- a/functional/SceneGraphTests/nbproject/configs/j2d.properties +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. Oracle designates this -# particular file as subject to the "Classpath" exception as provided -# by Oracle in the LICENSE file that accompanied this code. -# -# This code 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 General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -run.jvmargs=-Dprism.order=sw diff --git a/functional/SceneGraphTests/nbproject/configs/jcov.properties b/functional/SceneGraphTests/nbproject/configs/jcov.properties deleted file mode 100644 index 4dc6c69f..00000000 --- a/functional/SceneGraphTests/nbproject/configs/jcov.properties +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. Oracle designates this -# particular file as subject to the "Classpath" exception as provided -# by Oracle in the LICENSE file that accompanied this code. -# -# This code 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 General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -run.jvmargs=-javaagent:../lib/jcov.jar=include=com.sun.javafx.*,include=com.sun.scenario.*,include=com.javafx.*,include=javafx.*,include=com.sun.mat.*,type=all,file=jcov-results/result.xml -do.jcov=true - diff --git a/functional/SceneGraphTests/nbproject/configs/prism.properties b/functional/SceneGraphTests/nbproject/configs/prism.properties deleted file mode 100644 index 57508e04..00000000 --- a/functional/SceneGraphTests/nbproject/configs/prism.properties +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. Oracle designates this -# particular file as subject to the "Classpath" exception as provided -# by Oracle in the LICENSE file that accompanied this code. -# -# This code 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 General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -run.jvmargs=-Dprism.order=d3d diff --git a/functional/SceneGraphTests/nbproject/configs/slowmode.properties b/functional/SceneGraphTests/nbproject/configs/slowmode.properties deleted file mode 100644 index 1c6fbf57..00000000 --- a/functional/SceneGraphTests/nbproject/configs/slowmode.properties +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. Oracle designates this -# particular file as subject to the "Classpath" exception as provided -# by Oracle in the LICENSE file that accompanied this code. -# -# This code 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 General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -run.jvmargs=-Dtest.scenegraph.slowmode=true diff --git a/functional/SceneGraphTests/nbproject/configs/swing.properties b/functional/SceneGraphTests/nbproject/configs/swing.properties deleted file mode 100644 index 0d0f2758..00000000 --- a/functional/SceneGraphTests/nbproject/configs/swing.properties +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. Oracle designates this -# particular file as subject to the "Classpath" exception as provided -# by Oracle in the LICENSE file that accompanied this code. -# -# This code 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 General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -run.jvmargs=-Djavafx.toolkit=swing diff --git a/functional/SceneGraphTests/nbproject/genfiles.properties b/functional/SceneGraphTests/nbproject/genfiles.properties deleted file mode 100644 index 1cfa6b7a..00000000 --- a/functional/SceneGraphTests/nbproject/genfiles.properties +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. Oracle designates this -# particular file as subject to the "Classpath" exception as provided -# by Oracle in the LICENSE file that accompanied this code. -# -# This code 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 General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -build.xml.data.CRC32=606db9b2 -build.xml.script.CRC32=7ac804b7 -build.xml.stylesheet.CRC32=28e38971@1.38.2.45 -# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. -# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. -nbproject/build-impl.xml.data.CRC32=b1791240 -nbproject/build-impl.xml.script.CRC32=b9e638bb -nbproject/build-impl.xml.stylesheet.CRC32=5a01deb7@1.72.0.48 diff --git a/functional/SceneGraphTests/nbproject/project.properties b/functional/SceneGraphTests/nbproject/project.properties deleted file mode 100644 index 4fe57796..00000000 --- a/functional/SceneGraphTests/nbproject/project.properties +++ /dev/null @@ -1,131 +0,0 @@ -# Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. Oracle designates this -# particular file as subject to the "Classpath" exception as provided -# by Oracle in the LICENSE file that accompanied this code. -# -# This code 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 General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -annotation.processing.enabled=true -annotation.processing.enabled.in.editor=false -annotation.processing.processors.list= -annotation.processing.run.all.processors=true -annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output -ant.customtasks.libs=JWSAntTasks -application.title=SceneGraphTests -application.vendor=sg155630 -build.classes.dir=${build.dir}/classes -build.classes.excludes=**/*.java,**/*.form -# This directory is removed when the project is cleaned: -build.dir=build -build.generated.dir=${build.dir}/generated -build.generated.sources.dir=${build.dir}/generated-sources -# Only compile against the classpath explicitly listed here: -build.sysclasspath=ignore -build.test.classes.dir=${build.dir}/test/classes -build.test.results.dir=${external.output}/${application.title}/build/test/results -file.reference.JemmySupport.jar=../../tools/Jemmy/jemmy_core/JemmySupport.jar -file.reference.junit.jar=../../tools/Jemmy/jemmy_core/junit.jar -jnlp.signing= -jnlp.signing.alias= -jnlp.signing.keystore= -project.GlassImage=../../tools/Jemmy/GlassImage -project.GlassRobot=../../tools/Jemmy/GlassRobot -project.JemmyFX=../../tools/Jemmy/JemmyFX -project.JemmyFXBrowser=../../tools/Jemmy/JemmyFXBrowser -project.SharedTestUtilsOpen=../../tools/SharedTestUtilsOpen -project.TestMarkup=../../tools/TestMarkup -reference.GlassImage.jar=${project.GlassImage}/dist/GlassImage.jar -reference.GlassRobot.jar=${project.GlassRobot}/dist/GlassRobot.jar -reference.JemmyFX.jar=${project.JemmyFX}/dist/JemmyFX.jar -reference.JemmyFXBrowser.jar=${project.JemmyFXBrowser}/dist/JemmyFXBrowser.jar -reference.SharedTestUtilsOpen.jar=${project.SharedTestUtilsOpen}/dist/SharedTestUtilsOpen.jar -reference.TestMarkup.jar=${project.TestMarkup}/dist/TestMarkup.jar -test-sys-prop.imageutils.outputpath=${build.test.results.dir} -mkdist.disabled=true -# Uncomment to specify the preferred debugger connection transport: -#debug.transport=dt_socket -debug.classpath=\ - ${run.classpath} -debug.test.classpath=\ - ${run.test.classpath} -# This directory is removed when the project is cleaned: -dist.dir=dist -dist.jar=${dist.dir}/SceneGraphTests.jar -dist.javadoc.dir=${dist.dir}/javadoc -endorsed.classpath= -excludes= -file.reference.JemmyAWTInput.jar=../../tools/Jemmy/jemmy_core/JemmyAWTInput.jar -file.reference.JemmyBrowser.jar=../../tools/Jemmy/jemmy_core/JemmyBrowser.jar -file.reference.JemmyCore.jar=../../tools/Jemmy/jemmy_core/JemmyCore.jar -includes=** -jar.archive.disabled=${jnlp.enabled} -jar.compress=false -jar.index=${jnlp.enabled} -javac.classpath=\ - ${file.reference.JemmyAWTInput.jar}:\ - ${file.reference.JemmyBrowser.jar}:\ - ${file.reference.JemmyCore.jar}:\ - ${file.reference.JemmySupport.jar}:\ - ${file.reference.junit.jar}:\ - ${reference.GlassImage.jar}:\ - ${reference.GlassRobot.jar}:\ - ${reference.JemmyFX.jar}:\ - ${reference.JemmyFXBrowser.jar}:\ - ${reference.SharedTestUtilsOpen.jar}:\ - ${reference.TestMarkup.jar} -# Space-separated list of extra javac options -javac.compilerargs=-processor com.oracle.jdk.sqe.cc.markup.TestMarkupProcessor -Aresult=${basedir}/coverage.fcov -javac.deprecation=false -javac.processorpath=\ - ${javac.classpath} -javac.source=1.8 -javac.target=1.8 -javac.test.classpath=\ - ${javac.classpath}:\ - ${build.classes.dir} -javac.test.processorpath=\ - ${javac.test.classpath} -javadoc.additionalparam= -javadoc.author=false -javadoc.encoding=${source.encoding} -javadoc.noindex=false -javadoc.nonavbar=false -javadoc.notree=false -javadoc.private=false -javadoc.splitindex=true -javadoc.use=true -javadoc.version=false -javadoc.windowtitle= -jnlp.codebase.type=local -jnlp.descriptor=application -jnlp.enabled=false -jnlp.mixed.code=default -jnlp.offline-allowed=true -jnlp.signed=false -main.class=ButtonsValidator -manifest.file=manifest.mf -meta.inf.dir=${src.dir}/META-INF -platform.active=default_platform -run.classpath=\ - ${javac.classpath}:\ - ${build.classes.dir} -run.test.classpath=\ - ${javac.test.classpath}:\ - ${build.test.classes.dir} -source.encoding=UTF-8 -src.dir=src -test.src.dir=test diff --git a/functional/SceneGraphTests/nbproject/project.xml b/functional/SceneGraphTests/nbproject/project.xml deleted file mode 100644 index 1f59cacd..00000000 --- a/functional/SceneGraphTests/nbproject/project.xml +++ /dev/null @@ -1,95 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. -DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - -This code is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License version 2 only, as -published by the Free Software Foundation. Oracle designates this -particular file as subject to the "Classpath" exception as provided -by Oracle in the LICENSE file that accompanied this code. - -This code 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 General Public License -version 2 for more details (a copy is included in the LICENSE file that -accompanied this code). - -You should have received a copy of the GNU General Public License version -2 along with this work; if not, write to the Free Software Foundation, -Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - -Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -or visit www.oracle.com if you need additional information or have any -questions. ---> -<project xmlns="http://www.netbeans.org/ns/project/1"> - <type>org.netbeans.modules.java.j2seproject</type> - <configuration> - <buildExtensions xmlns="http://www.netbeans.org/ns/ant-build-extender/1"> - <extension file="jnlp-impl.xml" id="jws"> - <dependency dependsOn="jnlp" target="jar"/> - </extension> - </buildExtensions> - <data xmlns="http://www.netbeans.org/ns/j2se-project/3"> - <name>SceneGraphTests</name> - <source-roots> - <root id="src.resources.dir"/> - <root id="src.dir"/> - </source-roots> - <test-roots> - <root id="test.src.dir"/> - </test-roots> - </data> - <references xmlns="http://www.netbeans.org/ns/ant-project-references/1"> - <reference> - <foreign-project>GlassImage</foreign-project> - <artifact-type>jar</artifact-type> - <script>build.xml</script> - <target>jar</target> - <clean-target>clean</clean-target> - <id>jar</id> - </reference> - <reference> - <foreign-project>GlassRobot</foreign-project> - <artifact-type>jar</artifact-type> - <script>build.xml</script> - <target>jar</target> - <clean-target>clean</clean-target> - <id>jar</id> - </reference> - <reference> - <foreign-project>JemmyFX</foreign-project> - <artifact-type>jar</artifact-type> - <script>build.xml</script> - <target>jar</target> - <clean-target>clean</clean-target> - <id>jar</id> - </reference> - <reference> - <foreign-project>JemmyFXBrowser</foreign-project> - <artifact-type>jar</artifact-type> - <script>build.xml</script> - <target>jar</target> - <clean-target>clean</clean-target> - <id>jar</id> - </reference> - <reference> - <foreign-project>SharedTestUtilsOpen</foreign-project> - <artifact-type>jar</artifact-type> - <script>build.xml</script> - <target>jar</target> - <clean-target>clean</clean-target> - <id>jar</id> - </reference> - <reference> - <foreign-project>TestMarkup</foreign-project> - <artifact-type>jar</artifact-type> - <script>build.xml</script> - <target>jar</target> - <clean-target>clean</clean-target> - <id>jar</id> - </reference> - </references> - </configuration> -</project> diff --git a/functional/SceneGraphTests/src/test/scenegraph/app/ColorApp.java b/functional/SceneGraphTests/src/test/scenegraph/app/ColorApp.java index 42eac2e4..96ec05d1 100644 --- a/functional/SceneGraphTests/src/test/scenegraph/app/ColorApp.java +++ b/functional/SceneGraphTests/src/test/scenegraph/app/ColorApp.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,8 +23,8 @@ */ package test.scenegraph.app; -import com.oracle.jdk.sqe.cc.markup.Covers; -import com.oracle.jdk.sqe.cc.markup.Covers.Level; +//import com.oracle.jdk.sqe.cc.markup.Covers; +//import com.oracle.jdk.sqe.cc.markup.Covers.Level; import javafx.scene.Node; import javafx.scene.layout.HBox; import javafx.scene.layout.VBox; @@ -63,10 +63,12 @@ public TestNode setup() { private HBox hbUpLevel = null; -@Covers(value="javafx.scene.shape.Circle.fill", level=Level.FULL) + //TODO +//@Covers(value="javafx.scene.shape.Circle.fill", level=Level.FULL) private class ColorsPage extends TestNode { @Override -@Covers(value="javafx.scene.shape.Rectangle.fill", level=Level.MEDIUM) +//TODO +//@Covers(value="javafx.scene.shape.Rectangle.fill", level=Level.MEDIUM) public Node drawNode() { VBox vb = new VBox(); VBox vb2 = new VBox(); diff --git a/functional/SceneGraphTests/src/test/scenegraph/app/ControlEventsApp.java b/functional/SceneGraphTests/src/test/scenegraph/app/ControlEventsApp.java index 32901e05..b6000aa1 100644 --- a/functional/SceneGraphTests/src/test/scenegraph/app/ControlEventsApp.java +++ b/functional/SceneGraphTests/src/test/scenegraph/app/ControlEventsApp.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,8 +23,6 @@ */ package test.scenegraph.app; -import java.util.Arrays; -import java.util.List; import javafx.concurrent.WorkerStateEvent; import javafx.event.ActionEvent; import javafx.event.Event; @@ -54,7 +52,6 @@ import javafx.scene.control.ToggleButton; import javafx.scene.control.TreeItem; import javafx.scene.control.TreeView; -import javafx.scene.control.cell.CheckBoxTreeCell; import javafx.scene.control.cell.TextFieldListCell; import javafx.scene.control.cell.TextFieldTreeCell; import javafx.scene.input.ContextMenuEvent; @@ -68,6 +65,10 @@ import javafx.util.Callback; import javafx.util.StringConverter; import test.javaclient.shared.InteroperabilityApp; +import test.javaclient.shared.Utils; + +import java.util.Arrays; +import java.util.List; /** * @@ -88,7 +89,9 @@ protected Scene getScene() { tab.setId(c.toString()); tabPane.getTabs().add(tab); } - return new Scene(tabPane, 800, 600); + var result = new Scene(tabPane, 800, 600); + Utils.addBrowser(result); + return result; } public abstract static class AbstractControlFactory<T extends Control> { @@ -114,10 +117,11 @@ public static enum EventTypes { DRAG_EXITED_TARGET(DragEvent.DRAG_EXITED_TARGET), DRAG_OVER(DragEvent.DRAG_OVER), + //TODO // temporary removed while test method // for automated test suite is not provided // https://javafx-jira.kenai.com/browse/RT-31875 - // INPUT_METHOD_TEXT_CHANGED(InputMethodEvent.INPUT_METHOD_TEXT_CHANGED), +// INPUT_METHOD_TEXT_CHANGED(InputMethodEvent.INPUT_METHOD_TEXT_CHANGED), KEY_PRESSED(KeyEvent.KEY_PRESSED), KEY_RELEASED(KeyEvent.KEY_RELEASED), @@ -126,16 +130,18 @@ public static enum EventTypes { MOUSE_CLICKED(MouseEvent.MOUSE_CLICKED), MOUSE_DRAGGED(MouseEvent.MOUSE_DRAGGED), MOUSE_ENTERED(MouseEvent.MOUSE_ENTERED), -// MOUSE_ENTERED_TARGET(MouseEvent.MOUSE_ENTERED_TARGET), MOUSE_EXITED(MouseEvent.MOUSE_EXITED), + //TODO + //what controls can this be used on? // MOUSE_EXITED_TARGET(MouseEvent.MOUSE_EXITED_TARGET), +// MOUSE_DRAG_ENTERED_TARGET(MouseDragEvent.MOUSE_DRAG_ENTERED_TARGET), +// MOUSE_ENTERED_TARGET(MouseEvent.MOUSE_ENTERED_TARGET), +// MOUSE_DRAG_EXITED_TARGET(MouseDragEvent.MOUSE_DRAG_EXITED_TARGET), MOUSE_MOVED(MouseEvent.MOUSE_MOVED), MOUSE_PRESSED(MouseEvent.MOUSE_PRESSED), MOUSE_RELEASED(MouseEvent.MOUSE_RELEASED), MOUSE_DRAG_ENTERED(MouseDragEvent.MOUSE_DRAG_ENTERED), -// MOUSE_DRAG_ENTERED_TARGET(MouseDragEvent.MOUSE_DRAG_ENTERED_TARGET), MOUSE_DRAG_EXITED(MouseDragEvent.MOUSE_DRAG_EXITED), -// MOUSE_DRAG_EXITED_TARGET(MouseDragEvent.MOUSE_DRAG_EXITED_TARGET), MOUSE_DRAG_OVER(MouseDragEvent.MOUSE_DRAG_OVER), MOUSE_DRAG_RELEASED(MouseDragEvent.MOUSE_DRAG_RELEASED), SCROLL(ScrollEvent.SCROLL), diff --git a/functional/SceneGraphTests/src/test/scenegraph/app/ControlEventsTab.java b/functional/SceneGraphTests/src/test/scenegraph/app/ControlEventsTab.java index 857caeb8..51e00d89 100644 --- a/functional/SceneGraphTests/src/test/scenegraph/app/ControlEventsTab.java +++ b/functional/SceneGraphTests/src/test/scenegraph/app/ControlEventsTab.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,6 +24,11 @@ package test.scenegraph.app; import java.lang.reflect.Field; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Member; +import java.lang.reflect.Method; +import java.lang.reflect.Modifier; +import java.util.Arrays; import java.util.LinkedList; import java.util.List; import javafx.event.ActionEvent; @@ -56,6 +61,8 @@ import javafx.scene.layout.VBox; import test.scenegraph.app.ControlEventsApp.EventTypes; +import static java.util.stream.Collectors.joining; + /** * * @author Aleksandr Sakharuk @@ -72,8 +79,7 @@ public ControlEventsTab(String text, Control control, List<Class<?>> eventsDecla init(); } - private void init() - { + private void init() { ScrollPane sp = new ScrollPane(); final GridPane gp = new GridPane(); @@ -99,28 +105,40 @@ private void init() //List<String> fieldNames = new LinkedList<String>(); List<Object> events = new LinkedList<Object>(); - for(Class<?> eventClass: eventsDeclaringClasses) - { - for(Field field: eventClass.getDeclaredFields()) - { - //fieldNames.add(field.getName()); - try - { - if(!field.isAccessible()) - { - field.setAccessible(true); - } - if(field.getType().equals(EventType.class)) - { + for (Class<?> eventClass : eventsDeclaringClasses) { + for (Field field : eventClass.getDeclaredFields()) { + try { +// if(!field.isAccessible()) field.setAccessible(true); + if (field.getType().equals(EventType.class)) { + try { events.add(field.get(eventClass)); + } catch (IllegalAccessException e) { + //the field is not accessible + System.out.println("Field " + eventClass.getName() + "." + field.getName() + + " is not accessible"); } } - catch(Exception ex) - { - ex.printStackTrace(); + } catch (Exception ex) { + ex.printStackTrace(); + } + } + for (Method method : eventClass.getDeclaredMethods()) { + if((method.getModifiers() & Modifier.STATIC) > 0 && + method.getReturnType().equals(EventType.class)) { + try { + events.add(method.invoke(null)); + } catch (IllegalAccessException | InvocationTargetException e) { + //the method is not accessible + System.out.println("Method " + eventClass.getName() + "." + + method.getName() + "(" + + Arrays.stream(method.getParameterTypes()) + .map(Class::getName) + .collect(joining(",")) + + ") is not accessible"); } } } + } for(EventTypes et: EventTypes.values()) { diff --git a/functional/SceneGraphTests/src/test/scenegraph/app/Effects2App.java b/functional/SceneGraphTests/src/test/scenegraph/app/Effects2App.java index c901ff04..f6b208c8 100644 --- a/functional/SceneGraphTests/src/test/scenegraph/app/Effects2App.java +++ b/functional/SceneGraphTests/src/test/scenegraph/app/Effects2App.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,23 +23,30 @@ */ package test.scenegraph.app; -import java.io.IOException; -import java.net.URL; -import java.util.ArrayList; -import java.util.Enumeration; -import java.util.List; -import java.util.Timer; -import java.util.TimerTask; -import java.util.logging.Level; -import java.util.logging.Logger; -import javafx.animation.RotateTransition; -import javafx.geometry.Bounds; import javafx.scene.Group; import javafx.scene.Node; -import javafx.scene.effect.*; -import javafx.scene.effect.Light.Distant; -import javafx.scene.effect.Light.Point; -import javafx.scene.effect.Light.Spot; +import javafx.scene.effect.Blend; +import javafx.scene.effect.BlendMode; +import javafx.scene.effect.Bloom; +import javafx.scene.effect.BlurType; +import javafx.scene.effect.BoxBlur; +import javafx.scene.effect.ColorAdjust; +import javafx.scene.effect.ColorInput; +import javafx.scene.effect.DisplacementMap; +import javafx.scene.effect.DropShadow; +import javafx.scene.effect.Effect; +import javafx.scene.effect.FloatMap; +import javafx.scene.effect.GaussianBlur; +import javafx.scene.effect.Glow; +import javafx.scene.effect.ImageInput; +import javafx.scene.effect.InnerShadow; +import javafx.scene.effect.Light; +import javafx.scene.effect.Lighting; +import javafx.scene.effect.MotionBlur; +import javafx.scene.effect.PerspectiveTransform; +import javafx.scene.effect.Reflection; +import javafx.scene.effect.SepiaTone; +import javafx.scene.effect.Shadow; import javafx.scene.image.Image; import javafx.scene.layout.StackPane; import javafx.scene.layout.VBox; @@ -47,16 +54,24 @@ import javafx.scene.paint.CycleMethod; import javafx.scene.paint.LinearGradient; import javafx.scene.paint.Stop; -import javafx.scene.shape.*; +import javafx.scene.shape.Arc; +import javafx.scene.shape.ArcType; +import javafx.scene.shape.Circle; +import javafx.scene.shape.Polygon; +import javafx.scene.shape.Rectangle; +import javafx.scene.shape.StrokeType; import javafx.scene.text.Font; -import javafx.scene.text.FontWeight; import javafx.scene.text.Text; -import javafx.util.Duration; import test.javaclient.shared.BasicButtonChooserApp; import test.javaclient.shared.PageWithSlots; import test.javaclient.shared.TestNode; import test.javaclient.shared.Utils; +import java.util.ArrayList; +import java.util.List; +import java.util.Timer; +import java.util.TimerTask; + /** * * @author shubov @@ -102,7 +117,7 @@ private interface Factory { // Blend page ------------------------------------------------------------- private class slotTexturedBlendRectangle extends TestNode { private Image image = new Image( - getClass().getResourceAsStream(ImagesApp.IMAGE_BASE + "blend_texture.png")); + getClass().getResourceAsStream(ImagesApp.IMAGE_BASE + "square.png")); @Override public Node drawNode() { diff --git a/functional/SceneGraphTests/src/test/scenegraph/app/ImagesApp.java b/functional/SceneGraphTests/src/test/scenegraph/app/ImagesApp.java index ce1996dc..58b90f86 100644 --- a/functional/SceneGraphTests/src/test/scenegraph/app/ImagesApp.java +++ b/functional/SceneGraphTests/src/test/scenegraph/app/ImagesApp.java @@ -1,29 +1,29 @@ /* - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. */ package test.scenegraph.app; -import javafx.scene.canvas.Canvas; -import javafx.scene.canvas.GraphicsContext; +import javafx.geometry.Rectangle2D; import javafx.scene.Group; -import java.io.InputStream; import javafx.scene.Node; +import javafx.scene.canvas.Canvas; +import javafx.scene.canvas.GraphicsContext; import javafx.scene.effect.ImageInput; +import javafx.scene.effect.Light.Distant; import javafx.scene.effect.Lighting; import javafx.scene.effect.SepiaTone; -import javafx.scene.effect.Light.Distant; -import javafx.scene.paint.Color; -import javafx.scene.shape.Rectangle; -import javafx.geometry.Rectangle2D; -import test.javaclient.shared.TestNodeLeaf; -import test.javaclient.shared.BasicButtonChooserApp; -import test.javaclient.shared.TestNode; import javafx.scene.image.Image; import javafx.scene.image.ImageView; +import javafx.scene.paint.Color; import javafx.scene.paint.ImagePattern; +import javafx.scene.shape.Rectangle; +import test.javaclient.shared.BasicButtonChooserApp; import test.javaclient.shared.PageWithSlots; -import static test.javaclient.shared.Utils.*; +import test.javaclient.shared.TestNode; +import test.javaclient.shared.TestNodeLeaf; + +import java.io.InputStream; /** * @@ -34,7 +34,7 @@ public ImagesApp() { super(600, 400, "Images", false); } public static final String IMAGE_BASE = "/test/scenegraph/resources/"; - public static final String defaultImagePath = IMAGE_BASE + "car.png"; + public static final String defaultImagePath = IMAGE_BASE + "square.png"; @Override protected TestNode setup() { diff --git a/functional/SceneGraphTests/src/test/scenegraph/app/SimpleApp.java b/functional/SceneGraphTests/src/test/scenegraph/app/SimpleApp.java index e220837b..2af3b0ea 100644 --- a/functional/SceneGraphTests/src/test/scenegraph/app/SimpleApp.java +++ b/functional/SceneGraphTests/src/test/scenegraph/app/SimpleApp.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -51,4 +51,8 @@ public void start(Stage stage){ stage.sizeToScene(); stage.show(); } + + public static void main(String[] args) { + launch(); + } } diff --git a/functional/SceneGraphTests/src/test/scenegraph/modality/ModalityApp.java b/functional/SceneGraphTests/src/test/scenegraph/modality/ModalityApp.java index 363db3e6..2db91a2e 100644 --- a/functional/SceneGraphTests/src/test/scenegraph/modality/ModalityApp.java +++ b/functional/SceneGraphTests/src/test/scenegraph/modality/ModalityApp.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,7 +23,6 @@ */ package test.scenegraph.modality; -import java.awt.AWTException; import javafx.application.Application; import javafx.event.ActionEvent; import javafx.event.EventHandler; @@ -34,10 +33,10 @@ import javafx.scene.input.KeyEvent; import javafx.scene.layout.HBox; import javafx.scene.layout.VBox; -import javafx.stage.Modality; -import javafx.stage.Stage; import javafx.scene.paint.Color; import javafx.scene.shape.Rectangle; +import javafx.stage.Modality; +import javafx.stage.Stage; import org.jemmy.fx.Browser; import test.javaclient.shared.AppLauncher; import test.javaclient.shared.Utils; @@ -104,8 +103,8 @@ public void handle(ActionEvent t) { primaryStage = primaryStageMain; //Modality stages setup: applet mode or not. - if (AppLauncher.getInstance().getMode() == AppLauncher.Mode.REMOTE) - ModalityWindow.isApplet = true; +// if (AppLauncher.getInstance().getMode() == AppLauncher.Mode.REMOTE) +// ModalityWindow.isApplet = true; } public void initApp(){ @@ -116,6 +115,7 @@ public void initApp(){ } public static void addBrowser(Scene scene) { + //TODO scene.setOnKeyPressed(new EventHandler<KeyEvent>() { boolean browserStarted = false; @@ -124,11 +124,7 @@ public void handle(KeyEvent ke) { browserStarted = true; Utils.deferAction(new Runnable() { public void run() { - try { - Browser.runBrowser(); - } catch (AWTException ex) { - ex.printStackTrace(); - } + Browser.runBrowser(); } }); } diff --git a/functional/SceneGraphTests/test/TEST.ROOT b/functional/SceneGraphTests/test/TEST.ROOT new file mode 100644 index 00000000..0d841c11 --- /dev/null +++ b/functional/SceneGraphTests/test/TEST.ROOT @@ -0,0 +1,2 @@ +TestNG.dirs = . + diff --git a/functional/SceneGraphTests/test/test/scenegraph/binding/Readme.md b/functional/SceneGraphTests/test/test/scenegraph/binding/Readme.md new file mode 100644 index 00000000..38ae48d8 --- /dev/null +++ b/functional/SceneGraphTests/test/test/scenegraph/binding/Readme.md @@ -0,0 +1,4 @@ +Tests seem to be working, but unstable. + +Were the tests generated? If not how to make sure all the existing properties are testing? +If yes, where is the generator? \ No newline at end of file diff --git a/functional/SceneGraphTests/test/test/scenegraph/binding/Utils.java b/functional/SceneGraphTests/test/test/scenegraph/binding/Utils.java index ffee646c..28cc8a6c 100644 --- a/functional/SceneGraphTests/test/test/scenegraph/binding/Utils.java +++ b/functional/SceneGraphTests/test/test/scenegraph/binding/Utils.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -98,7 +98,7 @@ private static void generateTests(Factories factory, boolean onlyNew) { + " */\n" + " @Test\n" // TODO: biderectional binding - //+ " @Covers(value=\"%5$s.%3$s.%1$s.BIND\", level=Level.FULL)\n" + //+ " //@Covers(value=\"%5$s.%3$s.%1$s.BIND\", level=Level.FULL)\n" + " public void %1$s() {\n" + " commonTest(%4$s);\n" + " }\n\n"; @@ -115,8 +115,8 @@ private static void generateTests(Factories factory, boolean onlyNew) { + "import org.junit.BeforeClass;\n" + "import org.junit.Test;\n" + "import test.scenegraph.binding.*;\n" - + "import com.oracle.jdk.sqe.cc.markup.Covers;\n" - + "import com.oracle.jdk.sqe.cc.markup.Covers.Level;\n" + + "\n" + + "\n" + "\n" + "public class %1$sTest extends BindingTestBase {\n" + " @BeforeClass\n" diff --git a/functional/SceneGraphTests/test/test/scenegraph/binding/controls/ChoiceBoxTest.java b/functional/SceneGraphTests/test/test/scenegraph/binding/controls/ChoiceBoxTest.java index 71ec8708..864eeb63 100644 --- a/functional/SceneGraphTests/test/test/scenegraph/binding/controls/ChoiceBoxTest.java +++ b/functional/SceneGraphTests/test/test/scenegraph/binding/controls/ChoiceBoxTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,17 +23,11 @@ */ package test.scenegraph.binding.controls; -/* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - */ - - import org.junit.BeforeClass; import org.junit.Test; import test.scenegraph.binding.*; -import com.oracle.jdk.sqe.cc.markup.Covers; -import com.oracle.jdk.sqe.cc.markup.Covers.Level; + + public class ChoiceBoxTest extends BindingTestBase { @BeforeClass diff --git a/functional/SceneGraphTests/test/test/scenegraph/binding/controls/HyperlinkTest.java b/functional/SceneGraphTests/test/test/scenegraph/binding/controls/HyperlinkTest.java index e9a4b106..825c0bc0 100644 --- a/functional/SceneGraphTests/test/test/scenegraph/binding/controls/HyperlinkTest.java +++ b/functional/SceneGraphTests/test/test/scenegraph/binding/controls/HyperlinkTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,17 +23,11 @@ */ package test.scenegraph.binding.controls; -/* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - */ - - import org.junit.BeforeClass; import org.junit.Test; import test.scenegraph.binding.*; -import com.oracle.jdk.sqe.cc.markup.Covers; -import com.oracle.jdk.sqe.cc.markup.Covers.Level; + + public class HyperlinkTest extends BindingTestBase { @BeforeClass diff --git a/functional/SceneGraphTests/test/test/scenegraph/binding/controls/ListViewTest.java b/functional/SceneGraphTests/test/test/scenegraph/binding/controls/ListViewTest.java index b86425dd..9fa02836 100644 --- a/functional/SceneGraphTests/test/test/scenegraph/binding/controls/ListViewTest.java +++ b/functional/SceneGraphTests/test/test/scenegraph/binding/controls/ListViewTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,17 +23,11 @@ */ package test.scenegraph.binding.controls; -/* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - */ - - import org.junit.BeforeClass; import org.junit.Test; import test.scenegraph.binding.*; -import com.oracle.jdk.sqe.cc.markup.Covers; -import com.oracle.jdk.sqe.cc.markup.Covers.Level; + + public class ListViewTest extends BindingTestBase { @BeforeClass diff --git a/functional/SceneGraphTests/test/test/scenegraph/binding/controls/MenuBarTest.java b/functional/SceneGraphTests/test/test/scenegraph/binding/controls/MenuBarTest.java index a85e4cc8..29a853c0 100644 --- a/functional/SceneGraphTests/test/test/scenegraph/binding/controls/MenuBarTest.java +++ b/functional/SceneGraphTests/test/test/scenegraph/binding/controls/MenuBarTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,17 +23,11 @@ */ package test.scenegraph.binding.controls; -/* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - */ - - import org.junit.BeforeClass; import org.junit.Test; import test.scenegraph.binding.*; -import com.oracle.jdk.sqe.cc.markup.Covers; -import com.oracle.jdk.sqe.cc.markup.Covers.Level; + + public class MenuBarTest extends BindingTestBase { @BeforeClass diff --git a/functional/SceneGraphTests/test/test/scenegraph/binding/controls/MenuButtonTest.java b/functional/SceneGraphTests/test/test/scenegraph/binding/controls/MenuButtonTest.java index d517d54f..d81699a1 100644 --- a/functional/SceneGraphTests/test/test/scenegraph/binding/controls/MenuButtonTest.java +++ b/functional/SceneGraphTests/test/test/scenegraph/binding/controls/MenuButtonTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,17 +23,11 @@ */ package test.scenegraph.binding.controls; -/* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - */ - - import org.junit.BeforeClass; import org.junit.Test; import test.scenegraph.binding.*; -import com.oracle.jdk.sqe.cc.markup.Covers; -import com.oracle.jdk.sqe.cc.markup.Covers.Level; + + public class MenuButtonTest extends BindingTestBase { @BeforeClass diff --git a/functional/SceneGraphTests/test/test/scenegraph/binding/controls/PasswordBoxTest.java b/functional/SceneGraphTests/test/test/scenegraph/binding/controls/PasswordBoxTest.java index 530e7b03..856960f5 100644 --- a/functional/SceneGraphTests/test/test/scenegraph/binding/controls/PasswordBoxTest.java +++ b/functional/SceneGraphTests/test/test/scenegraph/binding/controls/PasswordBoxTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,17 +23,11 @@ */ package test.scenegraph.binding.controls; -/* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - */ - - import org.junit.BeforeClass; import org.junit.Test; import test.scenegraph.binding.*; -import com.oracle.jdk.sqe.cc.markup.Covers; -import com.oracle.jdk.sqe.cc.markup.Covers.Level; + + public class PasswordBoxTest extends BindingTestBase { @BeforeClass diff --git a/functional/SceneGraphTests/test/test/scenegraph/binding/controls/ProgressBarTest.java b/functional/SceneGraphTests/test/test/scenegraph/binding/controls/ProgressBarTest.java index 18beb3b8..ac428fa8 100644 --- a/functional/SceneGraphTests/test/test/scenegraph/binding/controls/ProgressBarTest.java +++ b/functional/SceneGraphTests/test/test/scenegraph/binding/controls/ProgressBarTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,17 +23,11 @@ */ package test.scenegraph.binding.controls; -/* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - */ - - import org.junit.BeforeClass; import org.junit.Test; import test.scenegraph.binding.*; -import com.oracle.jdk.sqe.cc.markup.Covers; -import com.oracle.jdk.sqe.cc.markup.Covers.Level; + + public class ProgressBarTest extends BindingTestBase { @BeforeClass diff --git a/functional/SceneGraphTests/test/test/scenegraph/binding/controls/ProgressIndicatorTest.java b/functional/SceneGraphTests/test/test/scenegraph/binding/controls/ProgressIndicatorTest.java index 8df13f62..5d550ec8 100644 --- a/functional/SceneGraphTests/test/test/scenegraph/binding/controls/ProgressIndicatorTest.java +++ b/functional/SceneGraphTests/test/test/scenegraph/binding/controls/ProgressIndicatorTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,17 +23,11 @@ */ package test.scenegraph.binding.controls; -/* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - */ - - import org.junit.BeforeClass; import org.junit.Test; import test.scenegraph.binding.*; -import com.oracle.jdk.sqe.cc.markup.Covers; -import com.oracle.jdk.sqe.cc.markup.Covers.Level; + + public class ProgressIndicatorTest extends BindingTestBase { @BeforeClass diff --git a/functional/SceneGraphTests/test/test/scenegraph/binding/controls/RadioButtonTest.java b/functional/SceneGraphTests/test/test/scenegraph/binding/controls/RadioButtonTest.java index 6c937633..3fd3dd49 100644 --- a/functional/SceneGraphTests/test/test/scenegraph/binding/controls/RadioButtonTest.java +++ b/functional/SceneGraphTests/test/test/scenegraph/binding/controls/RadioButtonTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,17 +23,11 @@ */ package test.scenegraph.binding.controls; -/* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - */ - - import org.junit.BeforeClass; import org.junit.Test; import test.scenegraph.binding.*; -import com.oracle.jdk.sqe.cc.markup.Covers; -import com.oracle.jdk.sqe.cc.markup.Covers.Level; + + public class RadioButtonTest extends BindingTestBase { @BeforeClass diff --git a/functional/SceneGraphTests/test/test/scenegraph/binding/controls/ScrollBarTest.java b/functional/SceneGraphTests/test/test/scenegraph/binding/controls/ScrollBarTest.java index b4cc9dd9..580705cc 100644 --- a/functional/SceneGraphTests/test/test/scenegraph/binding/controls/ScrollBarTest.java +++ b/functional/SceneGraphTests/test/test/scenegraph/binding/controls/ScrollBarTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,17 +23,11 @@ */ package test.scenegraph.binding.controls; -/* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - */ - - import org.junit.BeforeClass; import org.junit.Test; import test.scenegraph.binding.*; -import com.oracle.jdk.sqe.cc.markup.Covers; -import com.oracle.jdk.sqe.cc.markup.Covers.Level; + + public class ScrollBarTest extends BindingTestBase { @BeforeClass diff --git a/functional/SceneGraphTests/test/test/scenegraph/binding/controls/SeparatorTest.java b/functional/SceneGraphTests/test/test/scenegraph/binding/controls/SeparatorTest.java index cb257502..8aeb19fa 100644 --- a/functional/SceneGraphTests/test/test/scenegraph/binding/controls/SeparatorTest.java +++ b/functional/SceneGraphTests/test/test/scenegraph/binding/controls/SeparatorTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,17 +23,11 @@ */ package test.scenegraph.binding.controls; -/* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - */ - - import org.junit.BeforeClass; import org.junit.Test; import test.scenegraph.binding.*; -import com.oracle.jdk.sqe.cc.markup.Covers; -import com.oracle.jdk.sqe.cc.markup.Covers.Level; + + public class SeparatorTest extends BindingTestBase { @BeforeClass diff --git a/functional/SceneGraphTests/test/test/scenegraph/binding/controls/SliderTest.java b/functional/SceneGraphTests/test/test/scenegraph/binding/controls/SliderTest.java index a1fdb33c..7cb69db9 100644 --- a/functional/SceneGraphTests/test/test/scenegraph/binding/controls/SliderTest.java +++ b/functional/SceneGraphTests/test/test/scenegraph/binding/controls/SliderTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,17 +23,11 @@ */ package test.scenegraph.binding.controls; -/* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - */ - - import org.junit.BeforeClass; import org.junit.Test; import test.scenegraph.binding.*; -import com.oracle.jdk.sqe.cc.markup.Covers; -import com.oracle.jdk.sqe.cc.markup.Covers.Level; + + public class SliderTest extends BindingTestBase { @BeforeClass diff --git a/functional/SceneGraphTests/test/test/scenegraph/binding/controls/TextAreaTest.java b/functional/SceneGraphTests/test/test/scenegraph/binding/controls/TextAreaTest.java index ce7d4437..604cb55e 100644 --- a/functional/SceneGraphTests/test/test/scenegraph/binding/controls/TextAreaTest.java +++ b/functional/SceneGraphTests/test/test/scenegraph/binding/controls/TextAreaTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,17 +23,11 @@ */ package test.scenegraph.binding.controls; -/* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - */ - - import org.junit.BeforeClass; import org.junit.Test; import test.scenegraph.binding.*; -import com.oracle.jdk.sqe.cc.markup.Covers; -import com.oracle.jdk.sqe.cc.markup.Covers.Level; + + public class TextAreaTest extends BindingTestBase { @BeforeClass diff --git a/functional/SceneGraphTests/test/test/scenegraph/binding/controls/TextFieldTest.java b/functional/SceneGraphTests/test/test/scenegraph/binding/controls/TextFieldTest.java index 7daa7732..6c185af4 100644 --- a/functional/SceneGraphTests/test/test/scenegraph/binding/controls/TextFieldTest.java +++ b/functional/SceneGraphTests/test/test/scenegraph/binding/controls/TextFieldTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,17 +23,11 @@ */ package test.scenegraph.binding.controls; -/* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - */ - - import org.junit.BeforeClass; import org.junit.Test; import test.scenegraph.binding.*; -import com.oracle.jdk.sqe.cc.markup.Covers; -import com.oracle.jdk.sqe.cc.markup.Covers.Level; + + public class TextFieldTest extends BindingTestBase { @BeforeClass diff --git a/functional/SceneGraphTests/test/test/scenegraph/binding/controls/ToggleButtonSelectedTest.java b/functional/SceneGraphTests/test/test/scenegraph/binding/controls/ToggleButtonSelectedTest.java index 9bcc4561..9463a9ed 100644 --- a/functional/SceneGraphTests/test/test/scenegraph/binding/controls/ToggleButtonSelectedTest.java +++ b/functional/SceneGraphTests/test/test/scenegraph/binding/controls/ToggleButtonSelectedTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,17 +23,11 @@ */ package test.scenegraph.binding.controls; -/* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - */ - - import org.junit.BeforeClass; import org.junit.Test; import test.scenegraph.binding.*; -import com.oracle.jdk.sqe.cc.markup.Covers; -import com.oracle.jdk.sqe.cc.markup.Covers.Level; + + public class ToggleButtonSelectedTest extends BindingTestBase { @BeforeClass diff --git a/functional/SceneGraphTests/test/test/scenegraph/binding/controls/ToggleButtonTest.java b/functional/SceneGraphTests/test/test/scenegraph/binding/controls/ToggleButtonTest.java index 235bc7a8..8695505a 100644 --- a/functional/SceneGraphTests/test/test/scenegraph/binding/controls/ToggleButtonTest.java +++ b/functional/SceneGraphTests/test/test/scenegraph/binding/controls/ToggleButtonTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,17 +23,11 @@ */ package test.scenegraph.binding.controls; -/* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - */ - - import org.junit.BeforeClass; import org.junit.Test; import test.scenegraph.binding.*; -import com.oracle.jdk.sqe.cc.markup.Covers; -import com.oracle.jdk.sqe.cc.markup.Covers.Level; + + public class ToggleButtonTest extends BindingTestBase { @BeforeClass diff --git a/functional/SceneGraphTests/test/test/scenegraph/binding/controls/ToolBarTest.java b/functional/SceneGraphTests/test/test/scenegraph/binding/controls/ToolBarTest.java index 8844415a..6ed8ee3a 100644 --- a/functional/SceneGraphTests/test/test/scenegraph/binding/controls/ToolBarTest.java +++ b/functional/SceneGraphTests/test/test/scenegraph/binding/controls/ToolBarTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,17 +23,11 @@ */ package test.scenegraph.binding.controls; -/* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - */ - - import org.junit.BeforeClass; import org.junit.Test; import test.scenegraph.binding.*; -import com.oracle.jdk.sqe.cc.markup.Covers; -import com.oracle.jdk.sqe.cc.markup.Covers.Level; + + public class ToolBarTest extends BindingTestBase { @BeforeClass diff --git a/functional/SceneGraphTests/test/test/scenegraph/binding/controls/TreeViewTest.java b/functional/SceneGraphTests/test/test/scenegraph/binding/controls/TreeViewTest.java index 496d83cc..e22113cb 100644 --- a/functional/SceneGraphTests/test/test/scenegraph/binding/controls/TreeViewTest.java +++ b/functional/SceneGraphTests/test/test/scenegraph/binding/controls/TreeViewTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,17 +23,11 @@ */ package test.scenegraph.binding.controls; -/* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - */ - - import org.junit.BeforeClass; import org.junit.Test; import test.scenegraph.binding.*; -import com.oracle.jdk.sqe.cc.markup.Covers; -import com.oracle.jdk.sqe.cc.markup.Covers.Level; + + public class TreeViewTest extends BindingTestBase { @BeforeClass diff --git a/functional/SceneGraphTests/test/test/scenegraph/binding/controls/buttonGraphicTest.java b/functional/SceneGraphTests/test/test/scenegraph/binding/controls/buttonGraphicTest.java index bbc2e20c..39626f76 100644 --- a/functional/SceneGraphTests/test/test/scenegraph/binding/controls/buttonGraphicTest.java +++ b/functional/SceneGraphTests/test/test/scenegraph/binding/controls/buttonGraphicTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,17 +23,11 @@ */ package test.scenegraph.binding.controls; -/* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - */ - - import org.junit.BeforeClass; import org.junit.Test; import test.scenegraph.binding.*; -import com.oracle.jdk.sqe.cc.markup.Covers; -import com.oracle.jdk.sqe.cc.markup.Covers.Level; + + public class buttonGraphicTest extends BindingTestBase { @BeforeClass diff --git a/functional/SceneGraphTests/test/test/scenegraph/binding/controls/buttonTest.java b/functional/SceneGraphTests/test/test/scenegraph/binding/controls/buttonTest.java index e2854679..a2b75378 100644 --- a/functional/SceneGraphTests/test/test/scenegraph/binding/controls/buttonTest.java +++ b/functional/SceneGraphTests/test/test/scenegraph/binding/controls/buttonTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,17 +23,11 @@ */ package test.scenegraph.binding.controls; -/* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - */ - - import org.junit.BeforeClass; import org.junit.Test; import test.scenegraph.binding.*; -import com.oracle.jdk.sqe.cc.markup.Covers; -import com.oracle.jdk.sqe.cc.markup.Covers.Level; + + public class buttonTest extends BindingTestBase { @BeforeClass diff --git a/functional/SceneGraphTests/test/test/scenegraph/binding/controls/checkBoxTest.java b/functional/SceneGraphTests/test/test/scenegraph/binding/controls/checkBoxTest.java index 2a9c8aed..b96b8ae2 100644 --- a/functional/SceneGraphTests/test/test/scenegraph/binding/controls/checkBoxTest.java +++ b/functional/SceneGraphTests/test/test/scenegraph/binding/controls/checkBoxTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,17 +23,11 @@ */ package test.scenegraph.binding.controls; -/* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - */ - - import org.junit.BeforeClass; import org.junit.Test; import test.scenegraph.binding.*; -import com.oracle.jdk.sqe.cc.markup.Covers; -import com.oracle.jdk.sqe.cc.markup.Covers.Level; + + public class checkBoxTest extends BindingTestBase { @BeforeClass diff --git a/functional/SceneGraphTests/test/test/scenegraph/binding/controls/labelTest.java b/functional/SceneGraphTests/test/test/scenegraph/binding/controls/labelTest.java index c590ea21..1666365c 100644 --- a/functional/SceneGraphTests/test/test/scenegraph/binding/controls/labelTest.java +++ b/functional/SceneGraphTests/test/test/scenegraph/binding/controls/labelTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,17 +23,11 @@ */ package test.scenegraph.binding.controls; -/* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - */ - - import org.junit.BeforeClass; import org.junit.Test; import test.scenegraph.binding.*; -import com.oracle.jdk.sqe.cc.markup.Covers; -import com.oracle.jdk.sqe.cc.markup.Covers.Level; + + public class labelTest extends BindingTestBase { @BeforeClass diff --git a/functional/SceneGraphTests/test/test/scenegraph/binding/effects/BlendTest.java b/functional/SceneGraphTests/test/test/scenegraph/binding/effects/BlendTest.java index d0bdb47a..dec282e0 100644 --- a/functional/SceneGraphTests/test/test/scenegraph/binding/effects/BlendTest.java +++ b/functional/SceneGraphTests/test/test/scenegraph/binding/effects/BlendTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,17 +23,11 @@ */ package test.scenegraph.binding.effects; -/* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - */ - - import org.junit.BeforeClass; import org.junit.Test; import test.scenegraph.binding.*; -import com.oracle.jdk.sqe.cc.markup.Covers; -import com.oracle.jdk.sqe.cc.markup.Covers.Level; + + public class BlendTest extends BindingTestBase { @BeforeClass diff --git a/functional/SceneGraphTests/test/test/scenegraph/binding/effects/BloomTest.java b/functional/SceneGraphTests/test/test/scenegraph/binding/effects/BloomTest.java index 099016cf..a51d6050 100644 --- a/functional/SceneGraphTests/test/test/scenegraph/binding/effects/BloomTest.java +++ b/functional/SceneGraphTests/test/test/scenegraph/binding/effects/BloomTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,17 +23,11 @@ */ package test.scenegraph.binding.effects; -/* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - */ - - import org.junit.BeforeClass; import org.junit.Test; import test.scenegraph.binding.*; -import com.oracle.jdk.sqe.cc.markup.Covers; -import com.oracle.jdk.sqe.cc.markup.Covers.Level; + + public class BloomTest extends BindingTestBase { @BeforeClass diff --git a/functional/SceneGraphTests/test/test/scenegraph/binding/effects/BoxBlurTest.java b/functional/SceneGraphTests/test/test/scenegraph/binding/effects/BoxBlurTest.java index abe9b345..170306cf 100644 --- a/functional/SceneGraphTests/test/test/scenegraph/binding/effects/BoxBlurTest.java +++ b/functional/SceneGraphTests/test/test/scenegraph/binding/effects/BoxBlurTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,17 +23,11 @@ */ package test.scenegraph.binding.effects; -/* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - */ - - import org.junit.BeforeClass; import org.junit.Test; import test.scenegraph.binding.*; -import com.oracle.jdk.sqe.cc.markup.Covers; -import com.oracle.jdk.sqe.cc.markup.Covers.Level; + + public class BoxBlurTest extends BindingTestBase { @BeforeClass diff --git a/functional/SceneGraphTests/test/test/scenegraph/binding/effects/ColorAdjustTest.java b/functional/SceneGraphTests/test/test/scenegraph/binding/effects/ColorAdjustTest.java index 1e81dc12..5e820f0d 100644 --- a/functional/SceneGraphTests/test/test/scenegraph/binding/effects/ColorAdjustTest.java +++ b/functional/SceneGraphTests/test/test/scenegraph/binding/effects/ColorAdjustTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,17 +23,11 @@ */ package test.scenegraph.binding.effects; -/* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - */ - - import org.junit.BeforeClass; import org.junit.Test; import test.scenegraph.binding.*; -import com.oracle.jdk.sqe.cc.markup.Covers; -import com.oracle.jdk.sqe.cc.markup.Covers.Level; + + public class ColorAdjustTest extends BindingTestBase { @BeforeClass diff --git a/functional/SceneGraphTests/test/test/scenegraph/binding/effects/DisplacementMapTest.java b/functional/SceneGraphTests/test/test/scenegraph/binding/effects/DisplacementMapTest.java index 006e47b4..7d0b2c79 100644 --- a/functional/SceneGraphTests/test/test/scenegraph/binding/effects/DisplacementMapTest.java +++ b/functional/SceneGraphTests/test/test/scenegraph/binding/effects/DisplacementMapTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,17 +23,11 @@ */ package test.scenegraph.binding.effects; -/* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - */ - - import org.junit.BeforeClass; import org.junit.Test; import test.scenegraph.binding.*; -import com.oracle.jdk.sqe.cc.markup.Covers; -import com.oracle.jdk.sqe.cc.markup.Covers.Level; + + public class DisplacementMapTest extends BindingTestBase { @BeforeClass diff --git a/functional/SceneGraphTests/test/test/scenegraph/binding/effects/DropShadowTest.java b/functional/SceneGraphTests/test/test/scenegraph/binding/effects/DropShadowTest.java index c838e477..0504e915 100644 --- a/functional/SceneGraphTests/test/test/scenegraph/binding/effects/DropShadowTest.java +++ b/functional/SceneGraphTests/test/test/scenegraph/binding/effects/DropShadowTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,17 +23,11 @@ */ package test.scenegraph.binding.effects; -/* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - */ - - import org.junit.BeforeClass; import org.junit.Test; import test.scenegraph.binding.*; -import com.oracle.jdk.sqe.cc.markup.Covers; -import com.oracle.jdk.sqe.cc.markup.Covers.Level; + + public class DropShadowTest extends BindingTestBase { @BeforeClass diff --git a/functional/SceneGraphTests/test/test/scenegraph/binding/effects/FloodTest.java b/functional/SceneGraphTests/test/test/scenegraph/binding/effects/FloodTest.java index 9a9cc827..444a1785 100644 --- a/functional/SceneGraphTests/test/test/scenegraph/binding/effects/FloodTest.java +++ b/functional/SceneGraphTests/test/test/scenegraph/binding/effects/FloodTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,17 +23,11 @@ */ package test.scenegraph.binding.effects; -/* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - */ - - import org.junit.BeforeClass; import org.junit.Test; import test.scenegraph.binding.*; -import com.oracle.jdk.sqe.cc.markup.Covers; -import com.oracle.jdk.sqe.cc.markup.Covers.Level; + + public class FloodTest extends BindingTestBase { @BeforeClass diff --git a/functional/SceneGraphTests/test/test/scenegraph/binding/effects/GaussianBlurTest.java b/functional/SceneGraphTests/test/test/scenegraph/binding/effects/GaussianBlurTest.java index b4102647..30641cc6 100644 --- a/functional/SceneGraphTests/test/test/scenegraph/binding/effects/GaussianBlurTest.java +++ b/functional/SceneGraphTests/test/test/scenegraph/binding/effects/GaussianBlurTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,17 +23,11 @@ */ package test.scenegraph.binding.effects; -/* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - */ - - import org.junit.BeforeClass; import org.junit.Test; import test.scenegraph.binding.*; -import com.oracle.jdk.sqe.cc.markup.Covers; -import com.oracle.jdk.sqe.cc.markup.Covers.Level; + + public class GaussianBlurTest extends BindingTestBase { @BeforeClass diff --git a/functional/SceneGraphTests/test/test/scenegraph/binding/effects/GlowTest.java b/functional/SceneGraphTests/test/test/scenegraph/binding/effects/GlowTest.java index c92e8ef8..8051b8f4 100644 --- a/functional/SceneGraphTests/test/test/scenegraph/binding/effects/GlowTest.java +++ b/functional/SceneGraphTests/test/test/scenegraph/binding/effects/GlowTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,17 +23,11 @@ */ package test.scenegraph.binding.effects; -/* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - */ - - import org.junit.BeforeClass; import org.junit.Test; import test.scenegraph.binding.*; -import com.oracle.jdk.sqe.cc.markup.Covers; -import com.oracle.jdk.sqe.cc.markup.Covers.Level; + + public class GlowTest extends BindingTestBase { @BeforeClass diff --git a/functional/SceneGraphTests/test/test/scenegraph/binding/effects/IdentityTest.java b/functional/SceneGraphTests/test/test/scenegraph/binding/effects/IdentityTest.java index 96f5f9e9..ca8c3685 100644 --- a/functional/SceneGraphTests/test/test/scenegraph/binding/effects/IdentityTest.java +++ b/functional/SceneGraphTests/test/test/scenegraph/binding/effects/IdentityTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,17 +23,11 @@ */ package test.scenegraph.binding.effects; -/* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - */ - - import org.junit.BeforeClass; import org.junit.Test; import test.scenegraph.binding.*; -import com.oracle.jdk.sqe.cc.markup.Covers; -import com.oracle.jdk.sqe.cc.markup.Covers.Level; + + public class IdentityTest extends BindingTestBase { @BeforeClass diff --git a/functional/SceneGraphTests/test/test/scenegraph/binding/effects/InnerShadowTest.java b/functional/SceneGraphTests/test/test/scenegraph/binding/effects/InnerShadowTest.java index a9c6c01e..49ff1c87 100644 --- a/functional/SceneGraphTests/test/test/scenegraph/binding/effects/InnerShadowTest.java +++ b/functional/SceneGraphTests/test/test/scenegraph/binding/effects/InnerShadowTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,17 +23,11 @@ */ package test.scenegraph.binding.effects; -/* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - */ - - import org.junit.BeforeClass; import org.junit.Test; import test.scenegraph.binding.*; -import com.oracle.jdk.sqe.cc.markup.Covers; -import com.oracle.jdk.sqe.cc.markup.Covers.Level; + + public class InnerShadowTest extends BindingTestBase { @BeforeClass diff --git a/functional/SceneGraphTests/test/test/scenegraph/binding/effects/ReflectionTest.java b/functional/SceneGraphTests/test/test/scenegraph/binding/effects/ReflectionTest.java index bffe6122..5d529c20 100644 --- a/functional/SceneGraphTests/test/test/scenegraph/binding/effects/ReflectionTest.java +++ b/functional/SceneGraphTests/test/test/scenegraph/binding/effects/ReflectionTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,17 +23,11 @@ */ package test.scenegraph.binding.effects; -/* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - */ - - import org.junit.BeforeClass; import org.junit.Test; import test.scenegraph.binding.*; -import com.oracle.jdk.sqe.cc.markup.Covers; -import com.oracle.jdk.sqe.cc.markup.Covers.Level; + + public class ReflectionTest extends BindingTestBase { @BeforeClass diff --git a/functional/SceneGraphTests/test/test/scenegraph/binding/effects/ShadowTest.java b/functional/SceneGraphTests/test/test/scenegraph/binding/effects/ShadowTest.java index 1d9b8f45..6cf88916 100644 --- a/functional/SceneGraphTests/test/test/scenegraph/binding/effects/ShadowTest.java +++ b/functional/SceneGraphTests/test/test/scenegraph/binding/effects/ShadowTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,17 +23,11 @@ */ package test.scenegraph.binding.effects; -/* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - */ - - import org.junit.BeforeClass; import org.junit.Test; import test.scenegraph.binding.*; -import com.oracle.jdk.sqe.cc.markup.Covers; -import com.oracle.jdk.sqe.cc.markup.Covers.Level; + + public class ShadowTest extends BindingTestBase { @BeforeClass diff --git a/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/ArcTest.java b/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/ArcTest.java index 6dd367f5..95219a66 100644 --- a/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/ArcTest.java +++ b/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/ArcTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,17 +23,11 @@ */ package test.scenegraph.binding.shapes; -/* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - */ - - import org.junit.BeforeClass; import org.junit.Test; import test.scenegraph.binding.*; -import com.oracle.jdk.sqe.cc.markup.Covers; -import com.oracle.jdk.sqe.cc.markup.Covers.Level; +// +// public class ArcTest extends BindingTestBase { @BeforeClass diff --git a/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/ArcToTest.java b/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/ArcToTest.java index 9d890dfe..e3b02034 100644 --- a/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/ArcToTest.java +++ b/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/ArcToTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,17 +23,11 @@ */ package test.scenegraph.binding.shapes; -/* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - */ - - import org.junit.BeforeClass; import org.junit.Test; import test.scenegraph.binding.*; -import com.oracle.jdk.sqe.cc.markup.Covers; -import com.oracle.jdk.sqe.cc.markup.Covers.Level; + + public class ArcToTest extends BindingTestBase { @BeforeClass diff --git a/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/CircleTest.java b/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/CircleTest.java index f9bf3278..01fc3d33 100644 --- a/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/CircleTest.java +++ b/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/CircleTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,17 +23,11 @@ */ package test.scenegraph.binding.shapes; -/* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - */ - - import org.junit.BeforeClass; import org.junit.Test; import test.scenegraph.binding.*; -import com.oracle.jdk.sqe.cc.markup.Covers; -import com.oracle.jdk.sqe.cc.markup.Covers.Level; + + public class CircleTest extends BindingTestBase { @BeforeClass diff --git a/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/CubicCurveTest.java b/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/CubicCurveTest.java index a21087f6..4da79a7a 100644 --- a/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/CubicCurveTest.java +++ b/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/CubicCurveTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,17 +23,11 @@ */ package test.scenegraph.binding.shapes; -/* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - */ - - import org.junit.BeforeClass; import org.junit.Test; import test.scenegraph.binding.*; -import com.oracle.jdk.sqe.cc.markup.Covers; -import com.oracle.jdk.sqe.cc.markup.Covers.Level; +// +// public class CubicCurveTest extends BindingTestBase { @BeforeClass diff --git a/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/CubicCurveToTest.java b/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/CubicCurveToTest.java index 9ce45570..1244d2aa 100644 --- a/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/CubicCurveToTest.java +++ b/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/CubicCurveToTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,17 +23,11 @@ */ package test.scenegraph.binding.shapes; -/* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - */ - - import org.junit.BeforeClass; import org.junit.Test; import test.scenegraph.binding.*; -import com.oracle.jdk.sqe.cc.markup.Covers; -import com.oracle.jdk.sqe.cc.markup.Covers.Level; + + public class CubicCurveToTest extends BindingTestBase { @BeforeClass diff --git a/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/EllipseTest.java b/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/EllipseTest.java index 4ac2b73b..1b5c5d0d 100644 --- a/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/EllipseTest.java +++ b/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/EllipseTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,17 +23,11 @@ */ package test.scenegraph.binding.shapes; -/* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - */ - - import org.junit.BeforeClass; import org.junit.Test; import test.scenegraph.binding.*; -import com.oracle.jdk.sqe.cc.markup.Covers; -import com.oracle.jdk.sqe.cc.markup.Covers.Level; +// +// public class EllipseTest extends BindingTestBase { @BeforeClass diff --git a/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/HLineToTest.java b/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/HLineToTest.java index d47e431a..3389abd0 100644 --- a/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/HLineToTest.java +++ b/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/HLineToTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,17 +23,11 @@ */ package test.scenegraph.binding.shapes; -/* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - */ - - import org.junit.BeforeClass; import org.junit.Test; import test.scenegraph.binding.*; -import com.oracle.jdk.sqe.cc.markup.Covers; -import com.oracle.jdk.sqe.cc.markup.Covers.Level; + + public class HLineToTest extends BindingTestBase { @BeforeClass diff --git a/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/LineTest.java b/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/LineTest.java index b1c96eff..386107d0 100644 --- a/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/LineTest.java +++ b/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/LineTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,17 +23,11 @@ */ package test.scenegraph.binding.shapes; -/* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - */ - - import org.junit.BeforeClass; import org.junit.Test; import test.scenegraph.binding.*; -import com.oracle.jdk.sqe.cc.markup.Covers; -import com.oracle.jdk.sqe.cc.markup.Covers.Level; +// +// public class LineTest extends BindingTestBase { @BeforeClass diff --git a/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/LineToTest.java b/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/LineToTest.java index f160eaee..e6a457a5 100644 --- a/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/LineToTest.java +++ b/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/LineToTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,17 +23,11 @@ */ package test.scenegraph.binding.shapes; -/* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - */ - - import org.junit.BeforeClass; import org.junit.Test; import test.scenegraph.binding.*; -import com.oracle.jdk.sqe.cc.markup.Covers; -import com.oracle.jdk.sqe.cc.markup.Covers.Level; + + public class LineToTest extends BindingTestBase { @BeforeClass diff --git a/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/MoveToTest.java b/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/MoveToTest.java index e2c0487a..8b50b755 100644 --- a/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/MoveToTest.java +++ b/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/MoveToTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,17 +23,11 @@ */ package test.scenegraph.binding.shapes; -/* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - */ - - import org.junit.BeforeClass; import org.junit.Test; import test.scenegraph.binding.*; -import com.oracle.jdk.sqe.cc.markup.Covers; -import com.oracle.jdk.sqe.cc.markup.Covers.Level; + + public class MoveToTest extends BindingTestBase { @BeforeClass diff --git a/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/PathTest.java b/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/PathTest.java index bcb86e4f..00d4fb4d 100644 --- a/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/PathTest.java +++ b/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/PathTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,17 +23,11 @@ */ package test.scenegraph.binding.shapes; -/* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - */ - - import org.junit.BeforeClass; import org.junit.Test; import test.scenegraph.binding.*; -import com.oracle.jdk.sqe.cc.markup.Covers; -import com.oracle.jdk.sqe.cc.markup.Covers.Level; + + public class PathTest extends BindingTestBase { @BeforeClass diff --git a/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/PolygonTest.java b/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/PolygonTest.java index 5519e5d9..cfdf6c40 100644 --- a/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/PolygonTest.java +++ b/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/PolygonTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,17 +23,11 @@ */ package test.scenegraph.binding.shapes; -/* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - */ - - import org.junit.BeforeClass; import org.junit.Test; import test.scenegraph.binding.*; -import com.oracle.jdk.sqe.cc.markup.Covers; -import com.oracle.jdk.sqe.cc.markup.Covers.Level; + + public class PolygonTest extends BindingTestBase { @BeforeClass diff --git a/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/PolylineTest.java b/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/PolylineTest.java index a602855c..eaa226bc 100644 --- a/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/PolylineTest.java +++ b/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/PolylineTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,17 +23,11 @@ */ package test.scenegraph.binding.shapes; -/* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - */ - - import org.junit.BeforeClass; import org.junit.Test; import test.scenegraph.binding.*; -import com.oracle.jdk.sqe.cc.markup.Covers; -import com.oracle.jdk.sqe.cc.markup.Covers.Level; +// +// public class PolylineTest extends BindingTestBase { @BeforeClass diff --git a/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/QuadCurveTest.java b/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/QuadCurveTest.java index 39eadc7b..e12fef20 100644 --- a/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/QuadCurveTest.java +++ b/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/QuadCurveTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,17 +23,11 @@ */ package test.scenegraph.binding.shapes; -/* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - */ - - import org.junit.BeforeClass; import org.junit.Test; import test.scenegraph.binding.*; -import com.oracle.jdk.sqe.cc.markup.Covers; -import com.oracle.jdk.sqe.cc.markup.Covers.Level; + + public class QuadCurveTest extends BindingTestBase { @BeforeClass diff --git a/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/QuadCurveToTest.java b/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/QuadCurveToTest.java index 29318a6b..45248878 100644 --- a/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/QuadCurveToTest.java +++ b/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/QuadCurveToTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,17 +23,11 @@ */ package test.scenegraph.binding.shapes; -/* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - */ - - import org.junit.BeforeClass; import org.junit.Test; import test.scenegraph.binding.*; -import com.oracle.jdk.sqe.cc.markup.Covers; -import com.oracle.jdk.sqe.cc.markup.Covers.Level; + + public class QuadCurveToTest extends BindingTestBase { @BeforeClass diff --git a/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/RectangleTest.java b/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/RectangleTest.java index bfe03c44..017c1554 100644 --- a/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/RectangleTest.java +++ b/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/RectangleTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,17 +23,11 @@ */ package test.scenegraph.binding.shapes; -/* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - */ - - import org.junit.BeforeClass; import org.junit.Test; import test.scenegraph.binding.*; -import com.oracle.jdk.sqe.cc.markup.Covers; -import com.oracle.jdk.sqe.cc.markup.Covers.Level; + + public class RectangleTest extends BindingTestBase { @BeforeClass diff --git a/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/SVGPathTest.java b/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/SVGPathTest.java index 64e9ab28..aa6ea3f4 100644 --- a/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/SVGPathTest.java +++ b/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/SVGPathTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,17 +23,11 @@ */ package test.scenegraph.binding.shapes; -/* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - */ - - import org.junit.BeforeClass; import org.junit.Test; import test.scenegraph.binding.*; -import com.oracle.jdk.sqe.cc.markup.Covers; -import com.oracle.jdk.sqe.cc.markup.Covers.Level; +// +// public class SVGPathTest extends BindingTestBase { @BeforeClass diff --git a/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/VLineToTest.java b/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/VLineToTest.java index 3722b281..f6fd6cce 100644 --- a/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/VLineToTest.java +++ b/functional/SceneGraphTests/test/test/scenegraph/binding/shapes/VLineToTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,17 +23,11 @@ */ package test.scenegraph.binding.shapes; -/* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - */ - - import org.junit.BeforeClass; import org.junit.Test; import test.scenegraph.binding.*; -import com.oracle.jdk.sqe.cc.markup.Covers; -import com.oracle.jdk.sqe.cc.markup.Covers.Level; + + public class VLineToTest extends BindingTestBase { @BeforeClass diff --git a/functional/SceneGraphTests/test/test/scenegraph/binding/text/fontTest.java b/functional/SceneGraphTests/test/test/scenegraph/binding/text/fontTest.java index 359a583f..d934e90e 100644 --- a/functional/SceneGraphTests/test/test/scenegraph/binding/text/fontTest.java +++ b/functional/SceneGraphTests/test/test/scenegraph/binding/text/fontTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,17 +23,11 @@ */ package test.scenegraph.binding.text; -/* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - */ - - import org.junit.BeforeClass; import org.junit.Test; import test.scenegraph.binding.*; -import com.oracle.jdk.sqe.cc.markup.Covers; -import com.oracle.jdk.sqe.cc.markup.Covers.Level; + + public class fontTest extends BindingTestBase { @BeforeClass diff --git a/functional/SceneGraphTests/test/test/scenegraph/events/ColorPickerEventsTest.java b/functional/SceneGraphTests/test/test/scenegraph/events/ColorPickerEventsTest.java index 17bea7ee..4ac203d7 100644 --- a/functional/SceneGraphTests/test/test/scenegraph/events/ColorPickerEventsTest.java +++ b/functional/SceneGraphTests/test/test/scenegraph/events/ColorPickerEventsTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,7 +24,12 @@ package test.scenegraph.events; import javafx.geometry.Bounds; +import javafx.scene.control.ColorPicker; +import javafx.scene.paint.Color; import org.jemmy.Point; +import org.jemmy.fx.Root; +import org.jemmy.fx.control.ColorPickerDock; +import org.jemmy.fx.control.ColorPickerWrap; import org.jemmy.fx.control.ControlDock; import org.junit.Before; import org.junit.BeforeClass; @@ -56,7 +61,7 @@ public void before() @Override protected ControlDock findPrimeDock() { - return new ControlDock(getActiveTabDock().asParent(), + return new ColorPickerDock(getActiveTabDock().asParent(), ControlEventsApp.CONTROL_ID); } @@ -67,13 +72,7 @@ public void onAction() test(ControlEventsApp.EventTypes.ACTION, new Command() { public void invoke() { - getPrimeNodeDock().mouse().click(); - // - try { Thread.sleep(300);} catch(Exception e) {} - Bounds bounds = getPrimeNodeDock().getBoundsInLocal(); - double x = bounds.getWidth() / 2; - double y = bounds.getHeight() * 2; - getPrimeNodeDock().mouse().click(1,new Point(x, y)); + ((ColorPickerDock)getPrimeNodeDock()).asColorEditor().enter(Color.BLACK); } }); } diff --git a/functional/SceneGraphTests/test/test/scenegraph/events/EventTestCommon.java b/functional/SceneGraphTests/test/test/scenegraph/events/EventTestCommon.java index a639ff71..09a6d805 100644 --- a/functional/SceneGraphTests/test/test/scenegraph/events/EventTestCommon.java +++ b/functional/SceneGraphTests/test/test/scenegraph/events/EventTestCommon.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,10 +23,6 @@ */ package test.scenegraph.events; -import com.sun.glass.ui.Robot; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; import javafx.event.ActionEvent; import javafx.geometry.Bounds; import javafx.scene.control.RadioButton; @@ -34,7 +30,6 @@ import javafx.scene.input.KeyEvent; import javafx.scene.input.ScrollEvent; import org.jemmy.Point; -import org.jemmy.Rectangle; import org.jemmy.action.GetAction; import org.jemmy.control.Wrap; import org.jemmy.fx.NodeDock; @@ -47,16 +42,18 @@ import org.jemmy.interfaces.Mouse; import org.jemmy.lookup.LookupCriteria; import org.jemmy.timing.State; -import org.junit.Assert; import org.junit.Before; import org.junit.Test; import test.javaclient.shared.TestBase; -import test.javaclient.shared.Utils; import test.scenegraph.app.ControlEventsApp; import test.scenegraph.app.ControlEventsApp.Controls; import test.scenegraph.app.ControlEventsApp.EventTypes; import test.scenegraph.app.ControlEventsTab; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + /** * * @author Aleksandr Sakharuk, rewritten by Victor Shubov @@ -65,6 +62,12 @@ */ public abstract class EventTestCommon<T extends NodeDock> extends TestBase { + private SceneDock sceneDock; + private TabDock tabDock; + public T primeDock; + private LabeledDock eventRadio; + private Controls control; +// private EventTypes eventType; @Override @Before @@ -134,6 +137,22 @@ public void invoke() { }); } + //TODO +// @Test(timeout = 60000) +// public void onMouseEnteredTarget() { +// test(EventTypes.MOUSE_ENTERED_TARGET, new Command() { +// +// public void invoke() { +// Bounds bounds = primeDock.getBoundsInLocal(); +// double x = - ControlEventsApp.INSETS / 2; +// double y = bounds.getHeight() / 2; +// for(; (x <= bounds.getWidth() / 2) && (!gotEvent()); x++) +// { +// primeDock.mouse().move(new Point(x, y)); +// } +// } +// }); +// } // * Moves mouse inside of tested node. @Test(timeout = 60000) @@ -472,13 +491,13 @@ public void run(Object... os) throws Exception { - protected void setEventType(EventTypes eventType) - { - this.eventType = eventType; - } +// protected void setEventType(EventTypes eventType) +// { +// this.eventType = eventType; +// } // don't make it static - final private List<EventTypes> bannedEvents = new ArrayList<>(Arrays.asList( + private final List<EventTypes> bannedEvents = new ArrayList<>(Arrays.asList( EventTypes.DRAG_DONE, EventTypes.DRAG_ENTERED_TARGET, EventTypes.DRAG_ENTERED, @@ -492,8 +511,8 @@ protected void setEventType(EventTypes eventType) protected final void test(final EventTypes eventType, Command command) { selectTab(); - setEventType(eventType); - if (selectEventType()) { +// setEventType(eventType); + if (selectEventType(eventType)) { command.invoke(); waitHandler(); } @@ -523,7 +542,7 @@ public void run(Object... os) throws Exception { protected abstract T findPrimeDock(); - boolean selectEventType() { + boolean selectEventType(EventTypes eventType) { eventRadio = new LabeledDock(tabDock.asParent(), RadioButton.class, eventType.toString()); if (null != eventRadio) { @@ -591,12 +610,4 @@ protected TabDock getActiveTabDock() { return tabDock; } - - private SceneDock sceneDock; - private TabDock tabDock; - public T primeDock; - private LabeledDock eventRadio; - private Controls control; - private EventTypes eventType; - } diff --git a/functional/SceneGraphTests/test/test/scenegraph/events/Readme.md b/functional/SceneGraphTests/test/test/scenegraph/events/Readme.md new file mode 100644 index 00000000..affb55f7 --- /dev/null +++ b/functional/SceneGraphTests/test/test/scenegraph/events/Readme.md @@ -0,0 +1,3 @@ +The tests mostly work with the exception +1. TextArea - see JDK-8284113 +2. *_TARGET events. Some things work, some do not. Figure out the right way to test it. diff --git a/functional/SceneGraphTests/test/test/scenegraph/functional/graphics/Readme.md b/functional/SceneGraphTests/test/test/scenegraph/functional/graphics/Readme.md new file mode 100644 index 00000000..c10fded1 --- /dev/null +++ b/functional/SceneGraphTests/test/test/scenegraph/functional/graphics/Readme.md @@ -0,0 +1 @@ +Golden images are missing. \ No newline at end of file diff --git a/functional/SceneGraphTests/test/test/scenegraph/functional/graphics/TransformTest.java b/functional/SceneGraphTests/test/test/scenegraph/functional/graphics/TransformTest.java index c0f94687..137df1a9 100644 --- a/functional/SceneGraphTests/test/test/scenegraph/functional/graphics/TransformTest.java +++ b/functional/SceneGraphTests/test/test/scenegraph/functional/graphics/TransformTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -38,7 +38,6 @@ import javafx.scene.shape.Rectangle; import javafx.scene.text.Text; import javafx.scene.transform.*; -import javax.transaction.TransactionRequiredException; import org.jemmy.control.Wrap; import org.junit.BeforeClass; import test.scenegraph.app.TransformsApp; diff --git a/functional/SceneGraphTests/test/test/scenegraph/functional/mix/Readme.md b/functional/SceneGraphTests/test/test/scenegraph/functional/mix/Readme.md new file mode 100644 index 00000000..c9dc1507 --- /dev/null +++ b/functional/SceneGraphTests/test/test/scenegraph/functional/mix/Readme.md @@ -0,0 +1,9 @@ +A lot of golden images are missing. + +Noticed working: + * EventsTest + * DepthTestTest + * HasTransformsTest + * SceneEventHandlersTest + * SpinnerTest - does it need to go to controls? + * TimelineTest - partially \ No newline at end of file diff --git a/functional/SceneGraphTests/test/test/scenegraph/functional/mix/SceneEventHandlersTest.java b/functional/SceneGraphTests/test/test/scenegraph/functional/mix/SceneEventHandlersTest.java index 83aa80fc..0f43d6d5 100644 --- a/functional/SceneGraphTests/test/test/scenegraph/functional/mix/SceneEventHandlersTest.java +++ b/functional/SceneGraphTests/test/test/scenegraph/functional/mix/SceneEventHandlersTest.java @@ -1,10 +1,11 @@ /* - * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. */ package test.scenegraph.functional.mix; -import com.sun.glass.ui.Robot; +import javafx.scene.input.MouseButton; +import javafx.scene.robot.Robot; import java.util.ArrayList; import java.util.Arrays; import java.util.EnumMap; @@ -313,10 +314,10 @@ public void invoke() { public void testMousePressed() { if (robot == null) { - robot = new GetAction<com.sun.glass.ui.Robot>() { + robot = new GetAction<javafx.scene.robot.Robot>() { @Override public void run(Object... os) throws Exception { - setResult(com.sun.glass.ui.Application.GetApplication().createRobot()); + setResult(new Robot()); } }.dispatch(Root.ROOT.getEnvironment()); // can not beDrag sourceDrag source done in static block due to initialization problems on Mac } @@ -329,14 +330,14 @@ public void invoke() { new GetAction<Object>() { @Override public void run(Object... os) throws Exception { - robot.mousePress(1); + robot.mousePress(MouseButton.PRIMARY); } }.dispatch(Root.ROOT.getEnvironment()); try {Thread.sleep(500);}catch(Exception e){} new GetAction<Object>() { @Override public void run(Object... os) throws Exception { - robot.mouseRelease(1); + robot.mouseRelease(MouseButton.PRIMARY); } }.dispatch(Root.ROOT.getEnvironment()); try {Thread.sleep(500);}catch(Exception e){} @@ -349,10 +350,10 @@ public void run(Object... os) throws Exception { public void testMouseReleased() { if (robot == null) { - robot = new GetAction<com.sun.glass.ui.Robot>() { + robot = new GetAction<javafx.scene.robot.Robot>() { @Override public void run(Object... os) throws Exception { - setResult(com.sun.glass.ui.Application.GetApplication().createRobot()); + setResult(new Robot()); } }.dispatch(Root.ROOT.getEnvironment()); // can not beDrag sourceDrag source done in static block due to initialization problems on Mac } @@ -363,14 +364,14 @@ public void invoke() { new GetAction<Object>() { @Override public void run(Object... os) throws Exception { - robot.mousePress(1); + robot.mousePress(MouseButton.PRIMARY); } }.dispatch(Root.ROOT.getEnvironment()); try {Thread.sleep(500);}catch(Exception e){} new GetAction<Object>() { @Override public void run(Object... os) throws Exception { - robot.mouseRelease(1); + robot.mouseRelease(MouseButton.PRIMARY); } }.dispatch(Root.ROOT.getEnvironment()); try {Thread.sleep(500);}catch(Exception e){} diff --git a/functional/SceneGraphTests/test/test/scenegraph/lcd/PixelsCalc.java b/functional/SceneGraphTests/test/test/scenegraph/lcd/PixelsCalc.java index 86dbbfbd..eb776430 100644 --- a/functional/SceneGraphTests/test/test/scenegraph/lcd/PixelsCalc.java +++ b/functional/SceneGraphTests/test/test/scenegraph/lcd/PixelsCalc.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,8 +24,8 @@ package test.scenegraph.lcd; import java.awt.image.BufferedImage; -import org.jemmy.image.AWTImage; -import org.jemmy.image.GlassImage; +import org.jemmy.image.awt.AWTImage; +import org.jemmy.image.glass.GlassImage; import org.jemmy.image.Image; import org.jemmy.image.pixel.Raster; import org.jemmy.image.pixel.Raster.Component; @@ -166,4 +166,4 @@ private void checkColorComponents(int red, int green, int blue) { grayPixelsCount++; } } -} \ No newline at end of file +} diff --git a/functional/SceneGraphTests/test/test/scenegraph/lcd/transparency/TransparencyLCDTestBase.java b/functional/SceneGraphTests/test/test/scenegraph/lcd/transparency/TransparencyLCDTestBase.java index cec35e3f..0795014a 100644 --- a/functional/SceneGraphTests/test/test/scenegraph/lcd/transparency/TransparencyLCDTestBase.java +++ b/functional/SceneGraphTests/test/test/scenegraph/lcd/transparency/TransparencyLCDTestBase.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,7 +27,7 @@ import org.jemmy.fx.NodeDock; import org.jemmy.fx.SceneDock; import org.jemmy.fx.control.ControlDock; -import org.jemmy.image.GlassImage; +import org.jemmy.image.glass.GlassImage; import org.jemmy.image.Image; import org.jemmy.image.pixel.Raster; import org.jemmy.image.pixel.Raster.Component; @@ -149,10 +149,10 @@ private int getGreenFromTheMiddleOfIndicator(NodeDock indicator) { greenComponentValue = (int)(colors[idxGreen] * 0xFF); - } else if (image instanceof org.jemmy.image.AWTImage) { + } else if (image instanceof org.jemmy.image.awt.AWTImage) { - int rgb = ((org.jemmy.image.AWTImage)image).getTheImage().getRGB( - ((org.jemmy.image.AWTImage)image).getTheImage().getWidth() / 2, ((org.jemmy.image.AWTImage)image).getTheImage().getHeight() / 2); + int rgb = ((org.jemmy.image.awt.AWTImage)image).getTheImage().getRGB( + ((org.jemmy.image.awt.AWTImage)image).getTheImage().getWidth() / 2, ((org.jemmy.image.awt.AWTImage)image).getTheImage().getHeight() / 2); greenComponentValue = (rgb >> 8) & 0xFF; diff --git a/functional/SceneGraphTests/test/test/scenegraph/manual/TestText.java b/functional/SceneGraphTests/test/test/scenegraph/manual/TestText.java index 4eac47c0..38b5a298 100644 --- a/functional/SceneGraphTests/test/test/scenegraph/manual/TestText.java +++ b/functional/SceneGraphTests/test/test/scenegraph/manual/TestText.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,8 +25,8 @@ import client.test.Keywords; import client.test.RunUI; -import com.oracle.jdk.sqe.cc.markup.Covers; -import com.oracle.jdk.sqe.cc.markup.Covers.Level; + + import org.jemmy.action.AbstractExecutor; import org.jemmy.env.TestOut; import org.jemmy.fx.Root; @@ -38,7 +38,7 @@ * * @author Sergey Grinev */ -@Covers(level=Level.FULL, value="javafx.scene.Text.alignment") +//@Covers(level=Level.FULL, value="javafx.scene.Text.alignment") public class TestText extends TestBase { @RunUI diff --git a/functional/SceneGraphTests/test/test/scenegraph/resources/blend_texture.png b/functional/SceneGraphTests/test/test/scenegraph/resources/blend_texture.png new file mode 100644 index 00000000..f1736d9e Binary files /dev/null and b/functional/SceneGraphTests/test/test/scenegraph/resources/blend_texture.png differ diff --git a/functional/SceneGraphTests/test/test/scenegraph/resources/square.bmp b/functional/SceneGraphTests/test/test/scenegraph/resources/square.bmp new file mode 100644 index 00000000..b386041e Binary files /dev/null and b/functional/SceneGraphTests/test/test/scenegraph/resources/square.bmp differ diff --git a/functional/SceneGraphTests/test/test/scenegraph/resources/square.gif b/functional/SceneGraphTests/test/test/scenegraph/resources/square.gif new file mode 100644 index 00000000..5a78d8cf Binary files /dev/null and b/functional/SceneGraphTests/test/test/scenegraph/resources/square.gif differ diff --git a/functional/SceneGraphTests/test/test/scenegraph/resources/square.jpg b/functional/SceneGraphTests/test/test/scenegraph/resources/square.jpg new file mode 100644 index 00000000..fd1e5b94 Binary files /dev/null and b/functional/SceneGraphTests/test/test/scenegraph/resources/square.jpg differ diff --git a/functional/SceneGraphTests/test/test/scenegraph/resources/square.png b/functional/SceneGraphTests/test/test/scenegraph/resources/square.png new file mode 100644 index 00000000..71f28def Binary files /dev/null and b/functional/SceneGraphTests/test/test/scenegraph/resources/square.png differ diff --git a/functional/SceneGraphTests/test/test/scenegraph/scene/SceneOnOtherThreadTest.java b/functional/SceneGraphTests/test/test/scenegraph/scene/SceneOnOtherThreadTest.java index 4907baf8..f078d440 100644 --- a/functional/SceneGraphTests/test/test/scenegraph/scene/SceneOnOtherThreadTest.java +++ b/functional/SceneGraphTests/test/test/scenegraph/scene/SceneOnOtherThreadTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,14 +23,14 @@ */ package test.scenegraph.scene; -import com.sun.glass.ui.Robot; -import java.awt.Color; -import java.util.concurrent.atomic.AtomicInteger; -import javafx.application.Platform; import javafx.scene.Scene; import javafx.scene.control.Control; import javafx.scene.control.TextField; +import javafx.scene.paint.Color; +import javafx.scene.robot.Robot; import javafx.stage.Stage; +import org.jemmy.action.Action; +import org.jemmy.fx.Root; import org.jemmy.input.glass.GlassInputFactory; import org.junit.BeforeClass; import org.junit.Test; @@ -38,6 +38,8 @@ import test.javaclient.shared.Utils; import test.scenegraph.app.SimpleApp; +import java.util.concurrent.atomic.AtomicReference; + /** * @author Dmitry Ginzburg <dmitry.x.ginzburg@oracle.com> */ @@ -48,7 +50,7 @@ public static void init() { Utils.launch(SimpleApp.class, null); } - @Test(timeout = 2000) + @Test(timeout = 10000) public void testSceneCreationOnNonFxThread() throws InterruptedException { Stage stage = SimpleApp.getStage(); int centerX = (int)(stage.getX() + stage.getWidth() / 2); @@ -58,20 +60,27 @@ public void testSceneCreationOnNonFxThread() throws InterruptedException { area.setMinWidth(stage.getWidth()); area.setMinHeight(stage.getHeight()); Scene newScene = new Scene(area); - Platform.runLater(() -> { - stage.setScene(newScene); - }); - Utils.waitFor(() -> stage.getScene() == newScene); + var env = Root.ROOT.getEnvironment(); + var executor = env.getExecutor(); + executor.execute(env, true, + new Action() { + @Override + public void run(Object... objects) throws Exception { + stage.setScene(newScene); + } + }); Robot glassRobot = GlassInputFactory.getRobot(); - Utils.waitFor(() -> { - AtomicInteger color = new AtomicInteger(); - Platform.runLater(() -> { - color.set(glassRobot.getPixelColor(centerX, centerY)); - }); - while (color.get() == 0) {} - Color c = new Color(color.get(), true); - return Color.RED.equals(c); - }); + Root.ROOT.lookup().wrap().waitState(() -> { + var color = new AtomicReference<Color>(); + executor.execute(env, true, + new Action() { + @Override + public void run(Object... objects) throws Exception { + color.set(glassRobot.getPixelColor(centerX, centerY)); + } + }); + return color.get(); + }, Color.RED); } } diff --git a/functional/SceneGraphTests/test/test/scenegraph/transparency/TransparencyWindowTest.java b/functional/SceneGraphTests/test/test/scenegraph/transparency/TransparencyWindowTest.java index 732258c3..74fa33f2 100644 --- a/functional/SceneGraphTests/test/test/scenegraph/transparency/TransparencyWindowTest.java +++ b/functional/SceneGraphTests/test/test/scenegraph/transparency/TransparencyWindowTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -33,6 +33,8 @@ import org.jemmy.control.Wrap; import org.jemmy.fx.Lookups; import org.jemmy.image.*; +import org.jemmy.image.awt.AWTImage; +import org.jemmy.image.glass.GlassImage; import org.junit.BeforeClass; import org.junit.Test; import test.embedded.helpers.Configuration; @@ -126,4 +128,4 @@ private static String checkAssert(final boolean _expected, final String _msg,fin return _msg; } -} \ No newline at end of file +} diff --git a/tools/Jemmy/.gitignore b/tools/Jemmy/.gitignore new file mode 100644 index 00000000..78845709 --- /dev/null +++ b/tools/Jemmy/.gitignore @@ -0,0 +1,5 @@ +GlassImage/build/ +GlassRobot/build/ +build/ +JemmyFXBrowser/build/ +.DS_Store diff --git a/tools/Jemmy/GlassImage/build.xml b/tools/Jemmy/GlassImage/build.xml index 423dd14b..12ed3dbb 100644 --- a/tools/Jemmy/GlassImage/build.xml +++ b/tools/Jemmy/GlassImage/build.xml @@ -1,40 +1,18 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- You may freely edit this file. See commented blocks below for --> -<!-- some examples of how to customize the build. --> -<!-- (If you delete it and reopen the project it will be recreated.) --> -<!-- By default, only the Clean and Build commands use this build script. --> -<!-- Commands such as Run, Debug, and Test only use this build script if --> -<!-- the Compile on Save feature is turned off for the project. --> -<!-- You can turn off the Compile on Save (or Deploy on Save) setting --> -<!-- in the project's Project Properties dialog box.--> -<project name="GlassImage" default="default" basedir="."> - <description>Builds, tests, and runs the project GlassImage.</description> - <import file="nbproject/build-impl.xml"/> - <property file="../../../build.properties"/> - <target name="-pre-init" unless="no.need.to.find.java.fx"> - <ant antfile="../../../detect_javafx-nb.xml" inheritall="true"> - <property name="basedir" location="${basedir}/../../.."/> - <property name="property.file" value="${basedir}/nbproject/private/private.properties"/> - </ant> - </target> - <target name="-post-clean"> - <delete dir="${basedir}/target"/> +<?xml version="1.0" encoding="UTF-8"?> +<project name="glass.image" default="compile"> + <basename file="${basedir}" property="."/> + <property name="rootdir" location="${basedir}/../../.."/> + <property name="project.name" value="GlassImage"/> + <import file="${rootdir}/tools/make/build-template.xml"/> + <property name="test.dependencies.classpath" value="${jemmyfx-src}/build/classes:${glass-robot-src}/build/classes"/> + <target name="compile" depends="compile-src"/> + <target name="build-dependencies"/> + <target name="build-test-dependencies"> + <antcall target="build-other-project"> + <param name="project" value="${jemmyfx-src}"/> + </antcall> + <antcall target="build-other-project"> + <param name="project" value="${glass-robot-src}"/> + </antcall> </target> - <target name="maven" depends="jar"> - <property file="${basedir}/src/org/jemmy/image/jemmy.properties"/> - <copy file="pom-tmpl.xml" tofile="pom.xml" overwrite="true"> - <filterchain> - <replacetokens> - <token key="GlassImage.version" value="${javafx.version}.${version.minor}.${version.mini}"/> - </replacetokens> - </filterchain> - </copy> - <exec command="mvn"> - <arg value="-e"/> - <arg value="install"/> - </exec> - </target> - <target name="-post-init"> - <ant antfile="build.xml" target="get-jemmy-core" inheritall="false" inheritrefs="false" dir=".."/> - </target> -</project> +</project> diff --git a/tools/Jemmy/GlassImage/manifest.mf b/tools/Jemmy/GlassImage/manifest.mf deleted file mode 100644 index 1574df4a..00000000 --- a/tools/Jemmy/GlassImage/manifest.mf +++ /dev/null @@ -1,3 +0,0 @@ -Manifest-Version: 1.0 -X-COMMENT: Main-Class will be added automatically by build - diff --git a/tools/Jemmy/GlassImage/nbproject/build-impl.xml b/tools/Jemmy/GlassImage/nbproject/build-impl.xml deleted file mode 100644 index 475014c3..00000000 --- a/tools/Jemmy/GlassImage/nbproject/build-impl.xml +++ /dev/null @@ -1,1414 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -*** GENERATED FROM project.xml - DO NOT EDIT *** -*** EDIT ../build.xml INSTEAD *** - -For the purpose of easier reading the script -is divided into following sections: - - - initialization - - compilation - - jar - - execution - - debugging - - javadoc - - test compilation - - test execution - - test debugging - - applet - - cleanup - - --> -<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="GlassImage-impl"> - <fail message="Please build using Ant 1.8.0 or higher."> - <condition> - <not> - <antversion atleast="1.8.0"/> - </not> - </condition> - </fail> - <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/> - <!-- - ====================== - INITIALIZATION SECTION - ====================== - --> - <target name="-pre-init"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="-pre-init" name="-init-private"> - <property file="nbproject/private/config.properties"/> - <property file="nbproject/private/configs/${config}.properties"/> - <property file="nbproject/private/private.properties"/> - </target> - <target depends="-pre-init,-init-private" name="-init-user"> - <property file="${user.properties.file}"/> - <!-- The two properties below are usually overridden --> - <!-- by the active platform. Just a fallback. --> - <property name="default.javac.source" value="1.4"/> - <property name="default.javac.target" value="1.4"/> - </target> - <target depends="-pre-init,-init-private,-init-user" name="-init-project"> - <property file="nbproject/configs/${config}.properties"/> - <property file="nbproject/project.properties"/> - </target> - <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init"> - <available file="${manifest.file}" property="manifest.available"/> - <condition property="splashscreen.available"> - <and> - <not> - <equals arg1="${application.splash}" arg2="" trim="true"/> - </not> - <available file="${application.splash}"/> - </and> - </condition> - <condition property="main.class.available"> - <and> - <isset property="main.class"/> - <not> - <equals arg1="${main.class}" arg2="" trim="true"/> - </not> - </and> - </condition> - <condition property="manifest.available+main.class"> - <and> - <isset property="manifest.available"/> - <isset property="main.class.available"/> - </and> - </condition> - <condition property="do.archive"> - <not> - <istrue value="${jar.archive.disabled}"/> - </not> - </condition> - <condition property="do.mkdist"> - <and> - <isset property="do.archive"/> - <isset property="libs.CopyLibs.classpath"/> - <not> - <istrue value="${mkdist.disabled}"/> - </not> - </and> - </condition> - <condition property="manifest.available+main.class+mkdist.available"> - <and> - <istrue value="${manifest.available+main.class}"/> - <isset property="do.mkdist"/> - </and> - </condition> - <condition property="do.archive+manifest.available"> - <and> - <isset property="manifest.available"/> - <istrue value="${do.archive}"/> - </and> - </condition> - <condition property="do.archive+main.class.available"> - <and> - <isset property="main.class.available"/> - <istrue value="${do.archive}"/> - </and> - </condition> - <condition property="do.archive+splashscreen.available"> - <and> - <isset property="splashscreen.available"/> - <istrue value="${do.archive}"/> - </and> - </condition> - <condition property="do.archive+manifest.available+main.class"> - <and> - <istrue value="${manifest.available+main.class}"/> - <istrue value="${do.archive}"/> - </and> - </condition> - <condition property="manifest.available-mkdist.available"> - <or> - <istrue value="${manifest.available}"/> - <isset property="do.mkdist"/> - </or> - </condition> - <condition property="manifest.available+main.class-mkdist.available"> - <or> - <istrue value="${manifest.available+main.class}"/> - <isset property="do.mkdist"/> - </or> - </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"/> - <isset property="have.tests"/> - </and> - </condition> - <condition property="no.javadoc.preview"> - <and> - <isset property="javadoc.preview"/> - <isfalse value="${javadoc.preview}"/> - </and> - </condition> - <property name="run.jvmargs" value=""/> - <property name="run.jvmargs.ide" value=""/> - <property name="javac.compilerargs" value=""/> - <property name="work.dir" value="${basedir}"/> - <condition property="no.deps"> - <and> - <istrue value="${no.dependencies}"/> - </and> - </condition> - <property name="javac.debug" value="true"/> - <property name="javadoc.preview" value="true"/> - <property name="application.args" value=""/> - <property name="source.encoding" value="${file.encoding}"/> - <property name="runtime.encoding" value="${source.encoding}"/> - <condition property="javadoc.encoding.used" value="${javadoc.encoding}"> - <and> - <isset property="javadoc.encoding"/> - <not> - <equals arg1="${javadoc.encoding}" arg2=""/> - </not> - </and> - </condition> - <property name="javadoc.encoding.used" value="${source.encoding}"/> - <property name="includes" value="**"/> - <property name="excludes" value=""/> - <property name="do.depend" value="false"/> - <condition property="do.depend.true"> - <istrue value="${do.depend}"/> - </condition> - <path id="endorsed.classpath.path" path="${endorsed.classpath}"/> - <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'"> - <length length="0" string="${endorsed.classpath}" when="greater"/> - </condition> - <condition else="false" property="jdkBug6558476"> - <and> - <matches pattern="1\.[56]" string="${java.specification.version}"/> - <not> - <os family="unix"/> - </not> - </and> - </condition> - <property name="javac.fork" value="${jdkBug6558476}"/> - <property name="jar.index" value="false"/> - <property name="jar.index.metainf" value="${jar.index}"/> - <property name="copylibs.rebase" value="true"/> - <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/> - <condition property="junit.available"> - <or> - <available classname="org.junit.Test" classpath="${run.test.classpath}"/> - <available classname="junit.framework.Test" classpath="${run.test.classpath}"/> - </or> - </condition> - <condition property="testng.available"> - <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/> - </condition> - <condition property="junit+testng.available"> - <and> - <istrue value="${junit.available}"/> - <istrue value="${testng.available}"/> - </and> - </condition> - <condition else="testng" property="testng.mode" value="mixed"> - <istrue value="${junit+testng.available}"/> - </condition> - <condition else="" property="testng.debug.mode" value="-mixed"> - <istrue value="${junit+testng.available}"/> - </condition> - </target> - <target name="-post-init"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check"> - <fail unless="src.dir">Must set src.dir</fail> - <fail unless="test.src.dir">Must set test.src.dir</fail> - <fail unless="build.dir">Must set build.dir</fail> - <fail unless="dist.dir">Must set dist.dir</fail> - <fail unless="build.classes.dir">Must set build.classes.dir</fail> - <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail> - <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail> - <fail unless="build.test.results.dir">Must set build.test.results.dir</fail> - <fail unless="build.classes.excludes">Must set build.classes.excludes</fail> - <fail unless="dist.jar">Must set dist.jar</fail> - </target> - <target name="-init-macrodef-property"> - <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1"> - <attribute name="name"/> - <attribute name="value"/> - <sequential> - <property name="@{name}" value="${@{value}}"/> - </sequential> - </macrodef> - </target> - <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors"> - <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${src.dir}" name="srcdir"/> - <attribute default="${build.classes.dir}" name="destdir"/> - <attribute default="${javac.classpath}" name="classpath"/> - <attribute default="${javac.processorpath}" name="processorpath"/> - <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="${javac.debug}" name="debug"/> - <attribute default="${empty.dir}" name="sourcepath"/> - <attribute default="${empty.dir}" name="gensrcdir"/> - <element name="customize" optional="true"/> - <sequential> - <property location="${build.dir}/empty" name="empty.dir"/> - <mkdir dir="${empty.dir}"/> - <mkdir dir="@{apgeneratedsrcdir}"/> - <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}"> - <src> - <dirset dir="@{gensrcdir}" erroronmissingdir="false"> - <include name="*"/> - </dirset> - </src> - <classpath> - <path path="@{classpath}"/> - </classpath> - <compilerarg line="${endorsed.classpath.cmd.line.arg}"/> - <compilerarg line="${javac.compilerargs}"/> - <compilerarg value="-processorpath"/> - <compilerarg path="@{processorpath}:${empty.dir}"/> - <compilerarg line="${ap.processors.internal}"/> - <compilerarg line="${annotation.processing.processor.options}"/> - <compilerarg value="-s"/> - <compilerarg path="@{apgeneratedsrcdir}"/> - <compilerarg line="${ap.proc.none.internal}"/> - <customize/> - </javac> - </sequential> - </macrodef> - </target> - <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal"> - <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${src.dir}" name="srcdir"/> - <attribute default="${build.classes.dir}" name="destdir"/> - <attribute default="${javac.classpath}" name="classpath"/> - <attribute default="${javac.processorpath}" name="processorpath"/> - <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="${javac.debug}" name="debug"/> - <attribute default="${empty.dir}" name="sourcepath"/> - <attribute default="${empty.dir}" name="gensrcdir"/> - <element name="customize" optional="true"/> - <sequential> - <property location="${build.dir}/empty" name="empty.dir"/> - <mkdir dir="${empty.dir}"/> - <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}"> - <src> - <dirset dir="@{gensrcdir}" erroronmissingdir="false"> - <include name="*"/> - </dirset> - </src> - <classpath> - <path path="@{classpath}"/> - </classpath> - <compilerarg line="${endorsed.classpath.cmd.line.arg}"/> - <compilerarg line="${javac.compilerargs}"/> - <customize/> - </javac> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac"> - <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${src.dir}" name="srcdir"/> - <attribute default="${build.classes.dir}" name="destdir"/> - <attribute default="${javac.classpath}" name="classpath"/> - <sequential> - <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}"> - <classpath> - <path path="@{classpath}"/> - </classpath> - </depend> - </sequential> - </macrodef> - <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${build.classes.dir}" name="destdir"/> - <sequential> - <fail unless="javac.includes">Must set javac.includes</fail> - <pathconvert pathsep="${line.separator}" property="javac.includes.binary"> - <path> - <filelist dir="@{destdir}" files="${javac.includes}"/> - </path> - <globmapper from="*.java" to="*.class"/> - </pathconvert> - <tempfile deleteonexit="true" property="javac.includesfile.binary"/> - <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/> - <delete> - <files includesfile="${javac.includesfile.binary}"/> - </delete> - <delete> - <fileset file="${javac.includesfile.binary}"/> - </delete> - </sequential> - </macrodef> - </target> - <target if="${junit.available}" name="-init-macrodef-junit-init"> - <condition else="false" property="nb.junit.batch" value="true"> - <and> - <istrue value="${junit.available}"/> - <not> - <isset property="test.method"/> - </not> - </and> - </condition> - <condition else="false" property="nb.junit.single" value="true"> - <and> - <istrue value="${junit.available}"/> - <isset property="test.method"/> - </and> - </condition> - </target> - <target if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}"> - <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element name="customize" optional="true"/> - <sequential> - <property name="junit.forkmode" value="perTest"/> - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> - <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/> - <syspropertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <formatter type="brief" usefile="false"/> - <formatter type="xml"/> - <jvmarg value="-ea"/> - <customize/> - </junit> - </sequential> - </macrodef> - </target> - <target if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}"> - <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element name="customize" optional="true"/> - <sequential> - <property name="junit.forkmode" value="perTest"/> - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> - <batchtest todir="${build.test.results.dir}"> - <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}"> - <filename name="@{testincludes}"/> - </fileset> - </batchtest> - <syspropertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <formatter type="brief" usefile="false"/> - <formatter type="xml"/> - <jvmarg value="-ea"/> - <customize/> - </junit> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/> - <target if="${testng.available}" name="-init-macrodef-testng"> - <macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element name="customize" optional="true"/> - <sequential> - <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}"> - <isset property="test.method"/> - </condition> - <union id="test.set"> - <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}"> - <filename name="@{testincludes}"/> - </fileset> - </union> - <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/> - <testng classfilesetref="test.set" failureProperty="tests.failed" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="GlassImage" testname="TestNG tests" workingDir="${work.dir}"> - <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/> - <propertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </propertyset> - <customize/> - </testng> - </sequential> - </macrodef> - </target> - <target name="-init-macrodef-test-impl"> - <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element implicit="true" name="customize" optional="true"/> - <sequential> - <echo>No tests executed.</echo> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl"> - <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element implicit="true" name="customize" optional="true"/> - <sequential> - <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> - <customize/> - </j2seproject3:junit> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl"> - <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element implicit="true" name="customize" optional="true"/> - <sequential> - <j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> - <customize/> - </j2seproject3:testng> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test"> - <macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <sequential> - <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> - <customize> - <classpath> - <path path="${run.test.classpath}"/> - </classpath> - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> - <jvmarg line="${run.jvmargs}"/> - <jvmarg line="${run.jvmargs.ide}"/> - </customize> - </j2seproject3:test-impl> - </sequential> - </macrodef> - </target> - <target if="${junit.available}" name="-init-macrodef-junit-debug" unless="${nb.junit.batch}"> - <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element name="customize" optional="true"/> - <sequential> - <property name="junit.forkmode" value="perTest"/> - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> - <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/> - <syspropertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <formatter type="brief" usefile="false"/> - <formatter type="xml"/> - <jvmarg value="-ea"/> - <jvmarg line="${debug-args-line}"/> - <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> - <customize/> - </junit> - </sequential> - </macrodef> - </target> - <target if="${nb.junit.batch}" name="-init-macrodef-junit-debug-batch"> - <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element name="customize" optional="true"/> - <sequential> - <property name="junit.forkmode" value="perTest"/> - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> - <batchtest todir="${build.test.results.dir}"> - <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}"> - <filename name="@{testincludes}"/> - </fileset> - </batchtest> - <syspropertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <formatter type="brief" usefile="false"/> - <formatter type="xml"/> - <jvmarg value="-ea"/> - <jvmarg line="${debug-args-line}"/> - <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> - <customize/> - </junit> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-junit-debug,-init-macrodef-junit-debug-batch" if="${junit.available}" name="-init-macrodef-junit-debug-impl"> - <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element implicit="true" name="customize" optional="true"/> - <sequential> - <j2seproject3:junit-debug excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> - <customize/> - </j2seproject3:junit-debug> - </sequential> - </macrodef> - </target> - <target if="${testng.available}" name="-init-macrodef-testng-debug"> - <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${main.class}" name="testClass"/> - <attribute default="" name="testMethod"/> - <element name="customize2" optional="true"/> - <sequential> - <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}"> - <isset property="test.method"/> - </condition> - <condition else="-suitename GlassImage -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}"> - <matches pattern=".*\.xml" string="@{testClass}"/> - </condition> - <delete dir="${build.test.results.dir}" quiet="true"/> - <mkdir dir="${build.test.results.dir}"/> - <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}"> - <customize> - <customize2/> - <jvmarg value="-ea"/> - <arg line="${testng.debug.mode}"/> - <arg line="-d ${build.test.results.dir}"/> - <arg line="-listener org.testng.reporters.VerboseReporter"/> - <arg line="${testng.cmd.args}"/> - </customize> - </j2seproject3:debug> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl"> - <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${main.class}" name="testClass"/> - <attribute default="" name="testMethod"/> - <element implicit="true" name="customize2" optional="true"/> - <sequential> - <j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}"> - <customize2/> - </j2seproject3:testng-debug> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit"> - <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <attribute default="${main.class}" name="testClass"/> - <attribute default="" name="testMethod"/> - <sequential> - <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> - <customize> - <classpath> - <path path="${run.test.classpath}"/> - </classpath> - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> - <jvmarg line="${run.jvmargs}"/> - <jvmarg line="${run.jvmargs.ide}"/> - </customize> - </j2seproject3:test-debug-impl> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng"> - <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <attribute default="${main.class}" name="testClass"/> - <attribute default="" name="testMethod"/> - <sequential> - <j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}"> - <customize2> - <syspropertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - </customize2> - </j2seproject3:testng-debug-impl> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/> - <!-- - pre NB7.2 profiling section; consider it deprecated - --> - <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/> - <target if="profiler.info.jvmargs.agent" name="-profile-pre-init"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target if="profiler.info.jvmargs.agent" name="-profile-post-init"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile"> - <macrodef name="resolve"> - <attribute name="name"/> - <attribute name="value"/> - <sequential> - <property name="@{name}" value="${env.@{value}}"/> - </sequential> - </macrodef> - <macrodef name="profile"> - <attribute default="${main.class}" name="classname"/> - <element name="customize" optional="true"/> - <sequential> - <property environment="env"/> - <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/> - <java classname="@{classname}" dir="${profiler.info.dir}" fork="true" jvm="${profiler.info.jvm}"> - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> - <jvmarg value="${profiler.info.jvmargs.agent}"/> - <jvmarg line="${profiler.info.jvmargs}"/> - <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/> - <arg line="${application.args}"/> - <classpath> - <path path="${run.classpath}"/> - </classpath> - <syspropertyset> - <propertyref prefix="run-sys-prop."/> - <mapper from="run-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <customize/> - </java> - </sequential> - </macrodef> - </target> - <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" name="-profile-init-check"> - <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail> - <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail> - </target> - <!-- - end of pre NB7.2 profiling section - --> - <target depends="-init-debug-args" name="-init-macrodef-nbjpda"> - <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1"> - <attribute default="${main.class}" name="name"/> - <attribute default="${debug.classpath}" name="classpath"/> - <attribute default="" name="stopclassname"/> - <sequential> - <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}"> - <classpath> - <path path="@{classpath}"/> - </classpath> - </nbjpdastart> - </sequential> - </macrodef> - <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1"> - <attribute default="${build.classes.dir}" name="dir"/> - <sequential> - <nbjpdareload> - <fileset dir="@{dir}" includes="${fix.classes}"> - <include name="${fix.includes}*.class"/> - </fileset> - </nbjpdareload> - </sequential> - </macrodef> - </target> - <target name="-init-debug-args"> - <property name="version-output" value="java version "${ant.java.version}"/> - <condition property="have-jdk-older-than-1.4"> - <or> - <contains string="${version-output}" substring="java version "1.0"/> - <contains string="${version-output}" substring="java version "1.1"/> - <contains string="${version-output}" substring="java version "1.2"/> - <contains string="${version-output}" substring="java version "1.3"/> - </or> - </condition> - <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none"> - <istrue value="${have-jdk-older-than-1.4}"/> - </condition> - <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem"> - <os family="windows"/> - </condition> - <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}"> - <isset property="debug.transport"/> - </condition> - </target> - <target depends="-init-debug-args" name="-init-macrodef-debug"> - <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${main.class}" name="classname"/> - <attribute default="${debug.classpath}" name="classpath"/> - <element name="customize" optional="true"/> - <sequential> - <java classname="@{classname}" dir="${work.dir}" fork="true"> - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> - <jvmarg line="${debug-args-line}"/> - <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> - <jvmarg value="-Dfile.encoding=${runtime.encoding}"/> - <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/> - <jvmarg line="${run.jvmargs}"/> - <jvmarg line="${run.jvmargs.ide}"/> - <classpath> - <path path="@{classpath}"/> - </classpath> - <syspropertyset> - <propertyref prefix="run-sys-prop."/> - <mapper from="run-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <customize/> - </java> - </sequential> - </macrodef> - </target> - <target name="-init-macrodef-java"> - <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1"> - <attribute default="${main.class}" name="classname"/> - <attribute default="${run.classpath}" name="classpath"/> - <attribute default="jvm" name="jvm"/> - <element name="customize" optional="true"/> - <sequential> - <java classname="@{classname}" dir="${work.dir}" fork="true"> - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> - <jvmarg value="-Dfile.encoding=${runtime.encoding}"/> - <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/> - <jvmarg line="${run.jvmargs}"/> - <jvmarg line="${run.jvmargs.ide}"/> - <classpath> - <path path="@{classpath}"/> - </classpath> - <syspropertyset> - <propertyref prefix="run-sys-prop."/> - <mapper from="run-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <customize/> - </java> - </sequential> - </macrodef> - </target> - <target name="-init-macrodef-copylibs"> - <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${manifest.file}" name="manifest"/> - <element name="customize" optional="true"/> - <sequential> - <property location="${build.classes.dir}" name="build.classes.dir.resolved"/> - <pathconvert property="run.classpath.without.build.classes.dir"> - <path path="${run.classpath}"/> - <map from="${build.classes.dir.resolved}" to=""/> - </pathconvert> - <pathconvert pathsep=" " property="jar.classpath"> - <path path="${run.classpath.without.build.classes.dir}"/> - <chainedmapper> - <flattenmapper/> - <filtermapper> - <replacestring from=" " to="%20"/> - </filtermapper> - <globmapper from="*" to="lib/*"/> - </chainedmapper> - </pathconvert> - <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/> - <copylibs compress="${jar.compress}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" rebase="${copylibs.rebase}" runtimeclasspath="${run.classpath.without.build.classes.dir}"> - <fileset dir="${build.classes.dir}"/> - <manifest> - <attribute name="Class-Path" value="${jar.classpath}"/> - <customize/> - </manifest> - </copylibs> - </sequential> - </macrodef> - </target> - <target name="-init-presetdef-jar"> - <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1"> - <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}"> - <j2seproject1:fileset dir="${build.classes.dir}"/> - </jar> - </presetdef> - </target> - <target name="-init-ap-cmdline-properties"> - <property name="annotation.processing.enabled" value="true"/> - <property name="annotation.processing.processors.list" value=""/> - <property name="annotation.processing.processor.options" value=""/> - <property name="annotation.processing.run.all.processors" value="true"/> - <property name="javac.processorpath" value="${javac.classpath}"/> - <property name="javac.test.processorpath" value="${javac.test.classpath}"/> - <condition property="ap.supported.internal" value="true"> - <not> - <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/> - </not> - </condition> - </target> - <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported"> - <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}"> - <isfalse value="${annotation.processing.run.all.processors}"/> - </condition> - <condition else="" property="ap.proc.none.internal" value="-proc:none"> - <isfalse value="${annotation.processing.enabled}"/> - </condition> - </target> - <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline"> - <property name="ap.cmd.line.internal" value=""/> - </target> - <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-test,-init-macrodef-test-debug,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/> - <!-- - =================== - COMPILATION SECTION - =================== - --> - <target name="-deps-jar-init" unless="built-jar.properties"> - <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/> - <delete file="${built-jar.properties}" quiet="true"/> - </target> - <target if="already.built.jar.${basedir}" name="-warn-already-built-jar"> - <echo level="warn" message="Cycle detected: GlassImage was already built"/> - </target> - <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps"> - <mkdir dir="${build.dir}"/> - <touch file="${built-jar.properties}" verbose="false"/> - <property file="${built-jar.properties}" prefix="already.built.jar."/> - <antcall target="-warn-already-built-jar"/> - <propertyfile file="${built-jar.properties}"> - <entry key="${basedir}" value=""/> - </propertyfile> - <antcall target="-maybe-call-dep"> - <param name="call.built.properties" value="${built-jar.properties}"/> - <param location="${project.GlassRobot}" name="call.subproject"/> - <param location="${project.GlassRobot}/build.xml" name="call.script"/> - <param name="call.target" value="jar"/> - <param name="transfer.built-jar.properties" value="${built-jar.properties}"/> - </antcall> - </target> - <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/> - <target depends="init" name="-check-automatic-build"> - <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/> - </target> - <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build"> - <antcall target="clean"/> - </target> - <target depends="init,deps-jar" name="-pre-pre-compile"> - <mkdir dir="${build.classes.dir}"/> - </target> - <target name="-pre-compile"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target if="do.depend.true" name="-compile-depend"> - <pathconvert property="build.generated.subdirs"> - <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false"> - <include name="*"/> - </dirset> - </pathconvert> - <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/> - </target> - <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile"> - <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/> - <copy todir="${build.classes.dir}"> - <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> - </copy> - </target> - <target if="has.persistence.xml" name="-copy-persistence-xml"> - <mkdir dir="${build.classes.dir}/META-INF"/> - <copy todir="${build.classes.dir}/META-INF"> - <fileset dir="${meta.inf.dir}" includes="persistence.xml"/> - </copy> - </target> - <target name="-post-compile"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/> - <target name="-pre-compile-single"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single"> - <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail> - <j2seproject3:force-recompile/> - <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}"/> - </target> - <target name="-post-compile-single"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/> - <!-- - ==================== - JAR BUILDING SECTION - ==================== - --> - <target depends="init" name="-pre-pre-jar"> - <dirname file="${dist.jar}" property="dist.jar.dir"/> - <mkdir dir="${dist.jar.dir}"/> - </target> - <target name="-pre-jar"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive" name="-do-jar-without-manifest" unless="manifest.available-mkdist.available"> - <j2seproject1:jar/> - </target> - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class-mkdist.available"> - <j2seproject1:jar manifest="${manifest.file}"/> - </target> - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available+main.class" name="-do-jar-with-mainclass" 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 level="info">To run this application from the command line without Ant, try:</echo> - <property location="${build.classes.dir}" name="build.classes.dir.resolved"/> - <property location="${dist.jar}" name="dist.jar.resolved"/> - <pathconvert property="run.classpath.with.dist.jar"> - <path path="${run.classpath}"/> - <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/> - </pathconvert> - <echo level="info">java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo> - </target> - <target depends="init" if="do.archive" name="-do-jar-with-libraries-create-manifest" unless="manifest.available"> - <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/> - <touch file="${tmp.manifest.file}" verbose="false"/> - </target> - <target depends="init" if="do.archive+manifest.available" name="-do-jar-with-libraries-copy-manifest"> - <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/> - <copy file="${manifest.file}" tofile="${tmp.manifest.file}"/> - </target> - <target depends="init,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest" if="do.archive+main.class.available" name="-do-jar-with-libraries-set-main"> - <manifest file="${tmp.manifest.file}" mode="update"> - <attribute name="Main-Class" value="${main.class}"/> - </manifest> - </target> - <target depends="init,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-with-libraries-set-splashscreen"> - <basename file="${application.splash}" property="splashscreen.basename"/> - <mkdir dir="${build.classes.dir}/META-INF"/> - <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/> - <manifest file="${tmp.manifest.file}" mode="update"> - <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/> - </manifest> - </target> - <target depends="init,-init-macrodef-copylibs,compile,-pre-pre-jar,-pre-jar,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest,-do-jar-with-libraries-set-main,-do-jar-with-libraries-set-splashscreen" if="do.mkdist" name="-do-jar-with-libraries-pack"> - <j2seproject3:copylibs manifest="${tmp.manifest.file}"/> - <echo level="info">To run this application from the command line without Ant, try:</echo> - <property location="${dist.jar}" name="dist.jar.resolved"/> - <echo level="info">java -jar "${dist.jar.resolved}"</echo> - </target> - <target depends="-do-jar-with-libraries-pack" if="do.archive" name="-do-jar-with-libraries-delete-manifest"> - <delete> - <fileset file="${tmp.manifest.file}"/> - </delete> - </target> - <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest,-do-jar-with-libraries-set-main,-do-jar-with-libraries-set-splashscreen,-do-jar-with-libraries-pack,-do-jar-with-libraries-delete-manifest" name="-do-jar-with-libraries"/> - <target name="-post-jar"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target 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." name="jar"/> - <!-- - ================= - EXECUTION SECTION - ================= - --> - <target depends="init,compile" description="Run a main class." name="run"> - <j2seproject1:java> - <customize> - <arg line="${application.args}"/> - </customize> - </j2seproject1:java> - </target> - <target name="-do-not-recompile"> - <property name="javac.includes.binary" value=""/> - </target> - <target depends="init,compile-single" name="run-single"> - <fail unless="run.class">Must select one file in the IDE or set run.class</fail> - <j2seproject1:java classname="${run.class}"/> - </target> - <target depends="init,compile-test-single" name="run-test-with-main"> - <fail unless="run.class">Must select one file in the IDE or set run.class</fail> - <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/> - </target> - <!-- - ================= - DEBUGGING SECTION - ================= - --> - <target depends="init" if="netbeans.home" name="-debug-start-debugger"> - <j2seproject1:nbjpdastart name="${debug.class}"/> - </target> - <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test"> - <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/> - </target> - <target depends="init,compile" name="-debug-start-debuggee"> - <j2seproject3:debug> - <customize> - <arg line="${application.args}"/> - </customize> - </j2seproject3:debug> - </target> - <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/> - <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto"> - <j2seproject1:nbjpdastart stopclassname="${main.class}"/> - </target> - <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/> - <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single"> - <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail> - <j2seproject3:debug classname="${debug.class}"/> - </target> - <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/> - <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test"> - <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail> - <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/> - </target> - <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/> - <target depends="init" name="-pre-debug-fix"> - <fail unless="fix.includes">Must set fix.includes</fail> - <property name="javac.includes" value="${fix.includes}.java"/> - </target> - <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix"> - <j2seproject1:nbjpdareload/> - </target> - <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/> - <!-- - ================= - PROFILING SECTION - ================= - --> - <!-- - pre NB7.2 profiler integration - --> - <target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72"> - <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> - <nbprofiledirect> - <classpath> - <path path="${run.classpath}"/> - </classpath> - </nbprofiledirect> - <profile/> - </target> - <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72"> - <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail> - <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> - <nbprofiledirect> - <classpath> - <path path="${run.classpath}"/> - </classpath> - </nbprofiledirect> - <profile classname="${profile.class}"/> - </target> - <target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72"> - <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> - <nbprofiledirect> - <classpath> - <path path="${run.classpath}"/> - </classpath> - </nbprofiledirect> - <profile classname="sun.applet.AppletViewer"> - <customize> - <arg value="${applet.url}"/> - </customize> - </profile> - </target> - <target depends="profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72"> - <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> - <nbprofiledirect> - <classpath> - <path path="${run.test.classpath}"/> - </classpath> - </nbprofiledirect> - <junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true"> - <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/> - <jvmarg value="${profiler.info.jvmargs.agent}"/> - <jvmarg line="${profiler.info.jvmargs}"/> - <test name="${profile.class}"/> - <classpath> - <path path="${run.test.classpath}"/> - </classpath> - <syspropertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <formatter type="brief" usefile="false"/> - <formatter type="xml"/> - </junit> - </target> - <!-- - end of pre NB72 profiling section - --> - <target if="netbeans.home" name="-profile-check"> - <condition property="profiler.configured"> - <or> - <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/> - <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/> - </or> - </condition> - </target> - <target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent"> - <startprofiler/> - <antcall target="run"/> - </target> - <target depends="-profile-check,-profile-single-pre72" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-single" unless="profiler.info.jvmargs.agent"> - <fail unless="run.class">Must select one file in the IDE or set run.class</fail> - <startprofiler/> - <antcall target="run-single"/> - </target> - <target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/> - <target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs"> - <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail> - <startprofiler/> - <antcall target="test-single"/> - </target> - <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main"> - <fail unless="run.class">Must select one file in the IDE or set run.class</fail> - <startprofiler/> - <antcal target="run-test-with-main"/> - </target> - <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent"> - <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> - <startprofiler/> - <antcall target="run-applet"/> - </target> - <!-- - =============== - JAVADOC SECTION - =============== - --> - <target depends="init" if="have.sources" name="-javadoc-build"> - <mkdir dir="${dist.javadoc.dir}"/> - <condition else="" property="javadoc.endorsed.classpath.cmd.line.arg" value="-J${endorsed.classpath.cmd.line.arg}"> - <and> - <isset property="endorsed.classpath.cmd.line.arg"/> - <not> - <equals arg1="${endorsed.classpath.cmd.line.arg}" arg2=""/> - </not> - </and> - </condition> - <javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" 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}"> - <classpath> - <path path="${javac.classpath}"/> - </classpath> - <fileset dir="${src.dir}" excludes="*.java,${excludes}" includes="${includes}"> - <filename name="**/*.java"/> - </fileset> - <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false"> - <include name="**/*.java"/> - <exclude name="*.java"/> - </fileset> - <arg line="${javadoc.endorsed.classpath.cmd.line.arg}"/> - </javadoc> - <copy todir="${dist.javadoc.dir}"> - <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}"> - <filename name="**/doc-files/**"/> - </fileset> - <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false"> - <include name="**/doc-files/**"/> - </fileset> - </copy> - </target> - <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview"> - <nbbrowse file="${dist.javadoc.dir}/index.html"/> - </target> - <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/> - <!-- - ========================= - TEST COMPILATION SECTION - ========================= - --> - <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test"> - <mkdir dir="${build.test.classes.dir}"/> - </target> - <target name="-pre-compile-test"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target if="do.depend.true" name="-compile-test-depend"> - <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/> - </target> - <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test"> - <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" processorpath="${javac.test.processorpath}" srcdir="${test.src.dir}"/> - <copy todir="${build.test.classes.dir}"> - <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> - </copy> - </target> - <target name="-post-compile-test"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/> - <target name="-pre-compile-test-single"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single"> - <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail> - <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/> - <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" processorpath="${javac.test.processorpath}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/> - <copy todir="${build.test.classes.dir}"> - <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> - </copy> - </target> - <target name="-post-compile-test-single"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/> - <!-- - ======================= - TEST EXECUTION SECTION - ======================= - --> - <target depends="init" if="have.tests" name="-pre-test-run"> - <mkdir dir="${build.test.results.dir}"/> - </target> - <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run"> - <j2seproject3:test testincludes="**/*Test.java"/> - </target> - <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run"> - <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail> - </target> - <target depends="init" if="have.tests" name="test-report"/> - <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/> - <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/> - <target depends="init" if="have.tests" name="-pre-test-run-single"> - <mkdir dir="${build.test.results.dir}"/> - </target> - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single"> - <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail> - <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/> - </target> - <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single"> - <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail> - </target> - <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/> - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method"> - <fail unless="test.class">Must select some files in the IDE or set test.class</fail> - <fail unless="test.method">Must select some method in the IDE or set test.method</fail> - <j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/> - </target> - <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method"> - <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail> - </target> - <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method,-post-test-run-single-method" description="Run single unit test." name="test-single-method"/> - <!-- - ======================= - TEST DEBUGGING SECTION - ======================= - --> - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test"> - <fail unless="test.class">Must select one file in the IDE or set test.class</fail> - <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/> - </target> - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method"> - <fail unless="test.class">Must select one file in the IDE or set test.class</fail> - <fail unless="test.method">Must select some method in the IDE or set test.method</fail> - <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/> - </target> - <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test"> - <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/> - </target> - <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/> - <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/> - <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test"> - <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/> - </target> - <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/> - <!-- - ========================= - APPLET EXECUTION SECTION - ========================= - --> - <target depends="init,compile-single" name="run-applet"> - <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> - <j2seproject1:java classname="sun.applet.AppletViewer"> - <customize> - <arg value="${applet.url}"/> - </customize> - </j2seproject1:java> - </target> - <!-- - ========================= - APPLET DEBUGGING SECTION - ========================= - --> - <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet"> - <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> - <j2seproject3:debug classname="sun.applet.AppletViewer"> - <customize> - <arg value="${applet.url}"/> - </customize> - </j2seproject3:debug> - </target> - <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/> - <!-- - =============== - CLEANUP SECTION - =============== - --> - <target name="-deps-clean-init" unless="built-clean.properties"> - <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/> - <delete file="${built-clean.properties}" quiet="true"/> - </target> - <target if="already.built.clean.${basedir}" name="-warn-already-built-clean"> - <echo level="warn" message="Cycle detected: GlassImage was already built"/> - </target> - <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps"> - <mkdir dir="${build.dir}"/> - <touch file="${built-clean.properties}" verbose="false"/> - <property file="${built-clean.properties}" prefix="already.built.clean."/> - <antcall target="-warn-already-built-clean"/> - <propertyfile file="${built-clean.properties}"> - <entry key="${basedir}" value=""/> - </propertyfile> - <antcall target="-maybe-call-dep"> - <param name="call.built.properties" value="${built-clean.properties}"/> - <param location="${project.GlassRobot}" name="call.subproject"/> - <param location="${project.GlassRobot}/build.xml" name="call.script"/> - <param name="call.target" value="clean"/> - <param name="transfer.built-clean.properties" value="${built-clean.properties}"/> - </antcall> - </target> - <target depends="init" name="-do-clean"> - <delete dir="${build.dir}"/> - <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/> - </target> - <target name="-post-clean"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/> - <target name="-check-call-dep"> - <property file="${call.built.properties}" prefix="already.built."/> - <condition property="should.call.dep"> - <and> - <not> - <isset property="already.built.${call.subproject}"/> - </not> - <available file="${call.script}"/> - </and> - </condition> - </target> - <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep"> - <ant antfile="${call.script}" inheritall="false" target="${call.target}"> - <propertyset> - <propertyref prefix="transfer."/> - <mapper from="transfer.*" to="*" type="glob"/> - </propertyset> - </ant> - </target> -</project> diff --git a/tools/Jemmy/GlassImage/nbproject/genfiles.properties b/tools/Jemmy/GlassImage/nbproject/genfiles.properties deleted file mode 100644 index ab975b07..00000000 --- a/tools/Jemmy/GlassImage/nbproject/genfiles.properties +++ /dev/null @@ -1,8 +0,0 @@ -build.xml.data.CRC32=dec1ee67 -build.xml.script.CRC32=ed823dc0 -build.xml.stylesheet.CRC32=28e38971@1.50.3.46 -# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. -# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. -nbproject/build-impl.xml.data.CRC32=dec1ee67 -nbproject/build-impl.xml.script.CRC32=988b39af -nbproject/build-impl.xml.stylesheet.CRC32=5a01deb7@1.68.1.46 diff --git a/tools/Jemmy/GlassImage/nbproject/project.properties b/tools/Jemmy/GlassImage/nbproject/project.properties deleted file mode 100644 index 5d22c2d6..00000000 --- a/tools/Jemmy/GlassImage/nbproject/project.properties +++ /dev/null @@ -1,95 +0,0 @@ -annotation.processing.enabled=true -annotation.processing.enabled.in.editor=false -annotation.processing.processors.list= -annotation.processing.run.all.processors=true -annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output -application.title=GlassImage -application.vendor=shura -build.classes.dir=${build.dir}/classes -build.classes.excludes=**/*.java,**/*.form -# This directory is removed when the project is cleaned: -build.dir=build -build.generated.dir=${build.dir}/generated -build.generated.sources.dir=${build.dir}/generated-sources -# Only compile against the classpath explicitly listed here: -build.sysclasspath=ignore -build.test.classes.dir=${build.dir}/test/classes -build.test.results.dir=${build.dir}/test/results -# Uncomment to specify the preferred debugger connection transport: -#debug.transport=dt_socket -debug.classpath=\ - ${run.classpath} -debug.test.classpath=\ - ${run.test.classpath} -# This directory is removed when the project is cleaned: -dist.dir=dist -dist.jar=${dist.dir}/GlassImage.jar -dist.javadoc.dir=${dist.dir}/javadoc -endorsed.classpath= -excludes= -file.reference.JemmyCore.jar=../jemmy_core/JemmyCore.jar -file.reference.JemmyFX.jar=../JemmyFX/dist/JemmyFX.jar -file.reference.junit.jar=../jemmy_core/junit.jar -includes=** -jar.archive.disabled=${jnlp.enabled} -jar.compress=false -file.reference.jfxrt.jar=${javafx.rt}/lib/ext/jfxrt.jar -jar.index=${jnlp.enabled} -javac.classpath=\ - ${file.reference.JemmyCore.jar}:\ - ${file.reference.jfxrt.jar} -# Space-separated list of extra javac options -javac.compilerargs= -javac.deprecation=false -javac.processorpath=\ - ${javac.classpath} -javac.source=1.6 -javac.target=1.6 -javac.test.classpath=\ - ${javac.classpath}:\ - ${build.classes.dir}:\ - ${reference.GlassRobot.jar}:\ - ${file.reference.junit.jar}:\ - ${file.reference.JemmyFX.jar} -javac.test.processorpath=\ - ${javac.test.classpath} -javadoc.additionalparam= -javadoc.author=false -javadoc.encoding=${source.encoding} -javadoc.noindex=false -javadoc.nonavbar=false -javadoc.notree=false -javadoc.private=false -javadoc.splitindex=true -javadoc.use=true -javadoc.version=false -javadoc.windowtitle= -jnlp.codebase.type=no.codebase -jnlp.descriptor=application -jnlp.enabled=false -jnlp.mixed.code=default -jnlp.offline-allowed=false -jnlp.signed=false -jnlp.signing= -jnlp.signing.alias= -jnlp.signing.keystore= -main.class=org.jemmy.image.GlassImageCapturer -manifest.file=manifest.mf -meta.inf.dir=${src.dir}/META-INF -mkdist.disabled=true -platform.active=default_platform -project.GlassRobot=../GlassRobot -reference.GlassRobot.jar=${project.GlassRobot}/dist/GlassRobot.jar -run.classpath=\ - ${javac.classpath}:\ - ${build.classes.dir} -# 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.test.classpath=\ - ${javac.test.classpath}:\ - ${build.test.classes.dir} -source.encoding=UTF-8 -src.dir=src -test.src.dir=test diff --git a/tools/Jemmy/GlassImage/nbproject/project.xml b/tools/Jemmy/GlassImage/nbproject/project.xml deleted file mode 100644 index 49f47a9f..00000000 --- a/tools/Jemmy/GlassImage/nbproject/project.xml +++ /dev/null @@ -1,25 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<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/3"> - <name>GlassImage</name> - <source-roots> - <root id="src.dir"/> - </source-roots> - <test-roots> - <root id="test.src.dir"/> - </test-roots> - </data> - <references xmlns="http://www.netbeans.org/ns/ant-project-references/1"> - <reference> - <foreign-project>GlassRobot</foreign-project> - <artifact-type>jar</artifact-type> - <script>build.xml</script> - <target>jar</target> - <clean-target>clean</clean-target> - <id>jar</id> - </reference> - </references> - </configuration> -</project> diff --git a/tools/Jemmy/GlassImage/src/org/jemmy/image/GlassImage.java b/tools/Jemmy/GlassImage/src/org/jemmy/image/GlassImage.java deleted file mode 100644 index 81849130..00000000 --- a/tools/Jemmy/GlassImage/src/org/jemmy/image/GlassImage.java +++ /dev/null @@ -1,211 +0,0 @@ -/* - * To change this template, choose Tools | Templates - * and open the template in the editor. - */ -package org.jemmy.image; - -import org.jemmy.image.pixel.PNGFileImageStore; -import com.sun.glass.ui.Application; -import com.sun.glass.ui.Pixels; -import java.nio.ByteBuffer; -import java.util.concurrent.atomic.AtomicReference; -import org.jemmy.Dimension; -import org.jemmy.JemmyException; -import org.jemmy.env.Environment; -import org.jemmy.image.pixel.PixelImageComparator; -import org.jemmy.image.pixel.WriteableRaster; - -/* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code 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 General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ -public class GlassImage implements Image, WriteableRaster { - - static { - Environment.getEnvironment().setPropertyIfNotSet(ImageComparator.class, - new GlassPixelImageComparator(Environment.getEnvironment())); - Environment.getEnvironment().setPropertyIfNotSet(ImageStore.class, new PNGFileImageStore()); - try { - Class.forName(PixelImageComparator.class.getName()); - } catch(ClassNotFoundException e) {} - } - - private final Pixels image; - private final ByteBuffer data; - private final Component[] supported; - private int bytesPerPixel; - private int bytesPerComponent; - private double maxColorComponent; - private final Dimension size; - private boolean ignoreAlpha = true; - private final Environment env; - - public GlassImage(Environment env, Pixels data) { - this.image = data; - switch (Pixels.getNativeFormat()) { - case Pixels.Format.BYTE_BGRA_PRE: - supported = new Component[]{Component.BLUE, Component.GREEN, Component.RED, Component.ALPHA}; - break; - case Pixels.Format.BYTE_ARGB: - supported = new Component[]{Component.ALPHA, Component.RED, Component.GREEN, Component.BLUE}; - break; - default: - throw new IllegalArgumentException("Unknown image format: " + Pixels.getNativeFormat()); - } - bytesPerPixel = data.getBytesPerComponent(); //yeah, well ... - bytesPerComponent = bytesPerPixel / supported.length; - maxColorComponent = Math.pow(2, bytesPerComponent * 8) - 1; - this.data = getInitialData(); - size = getInitialSize(); - this.env = env; - } - - GlassImage(GlassImage orig) { - this(orig, orig.size); - } - - GlassImage(GlassImage orig, Dimension size) { - this.image = Application.GetApplication().createPixels(size.width, size.height, - ByteBuffer.allocate(size.width * size.height * 4)); //same logic as in Pixels - supported = orig.supported; - bytesPerPixel = orig.bytesPerPixel; - bytesPerComponent = orig.bytesPerComponent; - maxColorComponent = orig.maxColorComponent; - data = getInitialData(); - this.size = size; - env = Environment.getEnvironment(); - } - - GlassImage(int width, int height, int bytesPerPixel, Component... comps) { - this.image = Application.GetApplication().createPixels(width, height, - ByteBuffer.allocate(width * height * bytesPerPixel)); - supported = comps; - this.bytesPerPixel = bytesPerPixel; - bytesPerComponent = bytesPerPixel / supported.length; - maxColorComponent = Math.pow(2, bytesPerComponent * 8) - 1; - data = getInitialData(); - size = getInitialSize(); - env = Environment.getEnvironment(); - } - - GlassImage(int width, int height) { - this(width, height, 4, Component.BLUE, Component.GREEN, Component.RED, Component.ALPHA); - } - - @Override - public Dimension getSize() { - return size; - } - - public Pixels getImage() { - return image; - } - - public ByteBuffer getData() { - return data; - } - - private Dimension getInitialSize() { - final AtomicReference<Dimension> sizeRef = new AtomicReference<Dimension>(); - Application.invokeAndWait(new Runnable() { - - @Override - public void run() { - sizeRef.set(new Dimension(image.getWidth(), image.getHeight())); - } - }); - return sizeRef.get(); - } - - private ByteBuffer getInitialData() { - final AtomicReference<ByteBuffer> dataRef = new AtomicReference<ByteBuffer>(); - Application.invokeAndWait(new Runnable() { - - @Override - public void run() { - dataRef.set(image.asByteBuffer()); - } - }); - return dataRef.get(); - } - - private int getBufferOffset(int x, int y) { - return y * size.width * bytesPerPixel + x * bytesPerPixel; - } - - private void setNumber(int position, int componentIndex, long value) { - position += bytesPerComponent * componentIndex; - for (int i = bytesPerComponent - 1; i >= 0; i--) { - long mask = 0xFF << (8 * i); - getData().put(position + i, (byte) ((value & mask) >> (8 * i))); - } - } - - private long getNumber(int position, int componentIndex) { - long res = 0; - position += bytesPerComponent * componentIndex; - for (int i = 0; i < bytesPerComponent; i++) { - res = (res << 8) | (getData().get(position + i) & 0xFF); - } - return res; - } - - @Override - public void setColors(int x, int y, double[] colors) { - int pixelOffset = getBufferOffset(x, y); - for (int i = 0; i < getSupported().length; i++) { - setNumber(pixelOffset, i, (long) (colors[i] * maxColorComponent)); - } - } - - @Override - public void getColors(int x, int y, double[] colors) { - int pixelOffset = getBufferOffset(x, y); - for (int i = 0; i < getSupported().length; i++) { - if (ignoreAlpha && getSupported()[i] == Component.ALPHA) { - colors[i] = 1; - } else { - colors[i] = ((double) getNumber(pixelOffset, i)) / maxColorComponent; - } - } - } - - @Override - public Image compareTo(Image image) { - return env.getProperty(ImageComparator.class).compare(image, this); - } - - @Override - public void save(String string) { - try { - env.getProperty(ImageStore.class).save(this, string); - } catch (Exception ex) { - throw new JemmyException("Unable to save image", ex); - } - } - - @Override - public Component[] getSupported() { - return supported; - } -} diff --git a/tools/Jemmy/GlassImage/src/org/jemmy/image/ClasspathGlassImageLoader.java b/tools/Jemmy/GlassImage/src/org/jemmy/image/glass/ClasspathGlassImageLoader.java similarity index 95% rename from tools/Jemmy/GlassImage/src/org/jemmy/image/ClasspathGlassImageLoader.java rename to tools/Jemmy/GlassImage/src/org/jemmy/image/glass/ClasspathGlassImageLoader.java index c2bab5d1..a6854382 100644 --- a/tools/Jemmy/GlassImage/src/org/jemmy/image/ClasspathGlassImageLoader.java +++ b/tools/Jemmy/GlassImage/src/org/jemmy/image/glass/ClasspathGlassImageLoader.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -22,7 +22,7 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ -package org.jemmy.image; +package org.jemmy.image.glass; import java.io.InputStream; diff --git a/tools/Jemmy/GlassImage/src/org/jemmy/image/FileGlassImageLoader.java b/tools/Jemmy/GlassImage/src/org/jemmy/image/glass/FileGlassImageLoader.java similarity index 95% rename from tools/Jemmy/GlassImage/src/org/jemmy/image/FileGlassImageLoader.java rename to tools/Jemmy/GlassImage/src/org/jemmy/image/glass/FileGlassImageLoader.java index f3e60610..d83f9962 100644 --- a/tools/Jemmy/GlassImage/src/org/jemmy/image/FileGlassImageLoader.java +++ b/tools/Jemmy/GlassImage/src/org/jemmy/image/glass/FileGlassImageLoader.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -22,7 +22,7 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ -package org.jemmy.image; +package org.jemmy.image.glass; import java.io.File; import java.io.FileInputStream; diff --git a/tools/Jemmy/GlassImage/src/org/jemmy/image/glass/GlassImage.java b/tools/Jemmy/GlassImage/src/org/jemmy/image/glass/GlassImage.java new file mode 100644 index 00000000..74889ab6 --- /dev/null +++ b/tools/Jemmy/GlassImage/src/org/jemmy/image/glass/GlassImage.java @@ -0,0 +1,185 @@ +/* + * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code 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 General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + */ +package org.jemmy.image.glass; + +import javafx.scene.image.PixelReader; +import javafx.scene.image.PixelWriter; +import javafx.scene.image.WritableImage; +import javafx.scene.paint.Color; +import org.jemmy.Point; +import org.jemmy.image.Image; +import org.jemmy.image.ImageComparator; +import org.jemmy.image.ImageStore; +import org.jemmy.image.pixel.PNGFileImageStore; +import com.sun.glass.ui.Application; +import com.sun.glass.ui.Pixels; + +import java.util.concurrent.atomic.AtomicReference; +import org.jemmy.Dimension; +import org.jemmy.JemmyException; +import org.jemmy.env.Environment; +import org.jemmy.image.pixel.PixelImageComparator; +import org.jemmy.image.pixel.WriteableRaster; + +import static java.lang.Math.min; + +public class GlassImage implements Image, WriteableRaster { + + static { + Environment.getEnvironment().setPropertyIfNotSet(ImageComparator.class, + new GlassPixelImageComparator(Environment.getEnvironment())); + Environment.getEnvironment().setPropertyIfNotSet(ImageStore.class, new PNGFileImageStore()); + try { + Class.forName(PixelImageComparator.class.getName()); + } catch(ClassNotFoundException e) {} + } + + private final WritableImage image; + private final PixelReader reader; + private final PixelWriter writer; + private final Component[] supported; + private final Dimension size; + private boolean ignoreAlpha = true; + private final Environment env; + + public GlassImage(Environment environment, WritableImage capture) { + this.env = environment; + this.image = capture; + reader = capture.getPixelReader(); + writer = capture.getPixelWriter(); + supported = new Component[]{Component.RED, Component.GREEN, Component.BLUE, Component.ALPHA}; + size = new Dimension(capture.getWidth(), capture.getHeight()); + } + + +// public GlassImage(Environment env, Pixels data) { +// this.image = data; +// switch (Pixels.getNativeFormat()) { +// case Pixels.Format.BYTE_BGRA_PRE: +// supported = new Component[]{Component.BLUE, Component.GREEN, Component.RED, Component.ALPHA}; +// break; +// case Pixels.Format.BYTE_ARGB: +// supported = new Component[]{Component.ALPHA, Component.RED, Component.GREEN, Component.BLUE}; +// break; +// default: +// throw new IllegalArgumentException("Unknown image format: " + Pixels.getNativeFormat()); +// } +// bytesPerPixel = data.getBytesPerComponent(); //yeah, well ... +// bytesPerComponent = bytesPerPixel / supported.length; +// maxColorComponent = Math.pow(2, bytesPerComponent * 8) - 1; +// this.data = getInitialData(); +// size = getInitialSize(); +// this.env = env; +// } + +// GlassImage(GlassImage orig) { +// this(orig, orig.size); +// } + + GlassImage(GlassImage orig, Point start, Dimension size) { + this(orig.env, new WritableImage(size.width, size.height)); + double[] colors = new double[supported.length]; + for (int i = 0; i < min(start.x + size.width, orig.getSize().width); i++) { + for (int j = 0; j < min(start.y + size.height, orig.size.height); j++) { + getColors(i + start.x, j + start.y, colors); + setColors(i, j, colors); + } + } + } + +// GlassImage(int width, int height, int bytesPerPixel, Component... comps) { +// this.image = Application.GetApplication().createPixels(width, height, +// ByteBuffer.allocate(width * height * bytesPerPixel)); +// supported = comps; +// this.bytesPerPixel = bytesPerPixel; +// bytesPerComponent = bytesPerPixel / supported.length; +// maxColorComponent = Math.pow(2, bytesPerComponent * 8) - 1; +// data = getInitialData(); +// size = getInitialSize(); +// env = Environment.getEnvironment(); +// } + + GlassImage(Environment env, Dimension size) { + this(env, new WritableImage(size.width, size.height)); + } + + @Override + public Dimension getSize() { + return size; + } + + public PixelReader getReader() { + return reader; + } + + public WritableImage getImage() { + return image; + } + + private Dimension getInitialSize() { + final AtomicReference<Dimension> sizeRef = new AtomicReference<Dimension>(); + Application.invokeAndWait(new Runnable() { + + @Override + public void run() { + sizeRef.set(new Dimension(image.getWidth(), image.getHeight())); + } + }); + return sizeRef.get(); + } + + @Override + public void setColors(int x, int y, double[] colors) { + var color = new Color(colors[0], colors[1], colors[2], colors[3]); + writer.setColor(x, y, color); + } + + @Override + public void getColors(int x, int y, double[] colors) { + var color = reader.getColor(x, y); + colors[0] = color.getRed(); + colors[1] = color.getGreen(); + colors[2] = color.getBlue(); + colors[3] = color.getOpacity(); + } + + @Override + public Image compareTo(Image image) { + return env.getProperty(ImageComparator.class).compare(image, this); + } + + @Override + public void save(String string) { + try { + env.getProperty(ImageStore.class).save(this, string); + } catch (Exception ex) { + throw new JemmyException("Unable to save image", ex); + } + } + + @Override + public Component[] getSupported() { + return supported; + } +} diff --git a/tools/Jemmy/GlassImage/src/org/jemmy/image/GlassImageCapturer.java b/tools/Jemmy/GlassImage/src/org/jemmy/image/glass/GlassImageCapturer.java similarity index 69% rename from tools/Jemmy/GlassImage/src/org/jemmy/image/GlassImageCapturer.java rename to tools/Jemmy/GlassImage/src/org/jemmy/image/glass/GlassImageCapturer.java index 38ad3718..b912dcf3 100644 --- a/tools/Jemmy/GlassImage/src/org/jemmy/image/GlassImageCapturer.java +++ b/tools/Jemmy/GlassImage/src/org/jemmy/image/glass/GlassImageCapturer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -22,24 +22,25 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ -package org.jemmy.image; +package org.jemmy.image.glass; import com.sun.glass.ui.Application; -import com.sun.glass.ui.Robot; +import com.sun.glass.ui.GlassRobot; import org.jemmy.Rectangle; import org.jemmy.action.GetAction; import org.jemmy.control.Wrap; import org.jemmy.env.Environment; import org.jemmy.env.Timeout; +import org.jemmy.image.ImageCapturer; import org.jemmy.timing.State; /** * * @author shura */ -public class GlassImageCapturer implements ImageCapturer{ +public class GlassImageCapturer implements ImageCapturer { public static final Timeout WAIT_FACTORY = new Timeout("wait.for.robot.init", 60000); - private static Robot robot; + private static GlassRobot robot; private static Environment env = null; static { @@ -51,6 +52,10 @@ public class GlassImageCapturer implements ImageCapturer{ } } + { + env = Environment.getEnvironment(); + } + public static void setInitEnvironment(Environment e) { env = e; } @@ -58,31 +63,41 @@ public static void setInitEnvironment(Environment e) { @Override public GlassImage capture(final Wrap<?> wrap, final Rectangle rctngl) { final Rectangle rect = wrap.getScreenBounds(); - return new GetAction<GlassImage>() { + //TODO + var result = new GetAction<GlassImage>() { @Override public void run(Object... os) throws Exception { setResult(new GlassImage(wrap.getEnvironment(), - getRobot(). - getScreenCapture(rect.x + rctngl.x, rect.y + rctngl.y, rctngl.width, rctngl.height))); + getRobot() + .getScreenCapture(null, + (double)(rect.x + rctngl.x), + (double)(rect.y + rctngl.y), + (double)rctngl.width, (double)rctngl.height, + true))); + +// new GlassImage(wrap.getEnvironment(), +// getRobot(). +// getScreenCapture(null, rect.x + rctngl.x, rect.y + rctngl.y, rctngl.width, rctngl.height, true))); } }.dispatch(wrap.getEnvironment()); + return result; } - public static Robot getRobot() { + public static GlassRobot getRobot() { if (robot == null) { - robot = Environment.getEnvironment().getWaiter(WAIT_FACTORY).ensureState(new State<Robot>() { - + robot = Environment.getEnvironment().getWaiter(WAIT_FACTORY).ensureState(new State<>() { @Override - public Robot reached() { + public GlassRobot reached() { try { - return new GetAction<Robot>() { + return new GetAction<GlassRobot>() { @Override public void run(Object... os) throws Exception { setResult(Application.GetApplication().createRobot()); } }.dispatch(env); } catch (Exception e) { + e.printStackTrace(); return null; } } diff --git a/tools/Jemmy/GlassImage/src/org/jemmy/image/GlassImageLoader.java b/tools/Jemmy/GlassImage/src/org/jemmy/image/glass/GlassImageLoader.java similarity index 91% rename from tools/Jemmy/GlassImage/src/org/jemmy/image/GlassImageLoader.java rename to tools/Jemmy/GlassImage/src/org/jemmy/image/glass/GlassImageLoader.java index b521b023..bd2363de 100644 --- a/tools/Jemmy/GlassImage/src/org/jemmy/image/GlassImageLoader.java +++ b/tools/Jemmy/GlassImage/src/org/jemmy/image/glass/GlassImageLoader.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -22,11 +22,13 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ -package org.jemmy.image; +package org.jemmy.image.glass; import java.io.IOException; import java.io.InputStream; import org.jemmy.JemmyException; +import org.jemmy.image.Image; +import org.jemmy.image.ImageLoader; /** * diff --git a/tools/Jemmy/GlassImage/src/org/jemmy/image/GlassPixelImageComparator.java b/tools/Jemmy/GlassImage/src/org/jemmy/image/glass/GlassPixelImageComparator.java similarity index 90% rename from tools/Jemmy/GlassImage/src/org/jemmy/image/GlassPixelImageComparator.java rename to tools/Jemmy/GlassImage/src/org/jemmy/image/glass/GlassPixelImageComparator.java index 43321e1b..059c547f 100644 --- a/tools/Jemmy/GlassImage/src/org/jemmy/image/GlassPixelImageComparator.java +++ b/tools/Jemmy/GlassImage/src/org/jemmy/image/glass/GlassPixelImageComparator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -22,10 +22,12 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ -package org.jemmy.image; +package org.jemmy.image.glass; import org.jemmy.Dimension; +import org.jemmy.Point; import org.jemmy.env.Environment; +import org.jemmy.image.Image; import org.jemmy.image.pixel.PixelImageComparator; import org.jemmy.image.pixel.Raster; import org.jemmy.image.pixel.RasterComparator; @@ -59,7 +61,7 @@ protected Raster toRaster(Image image) { protected WriteableRaster createDiffRaster(Raster raster0, Raster raster1) { Dimension size0 = raster0.getSize(); Dimension size1 = raster1.getSize(); - return new GlassImage((GlassImage)raster0, new Dimension( + return new GlassImage((GlassImage)raster0, new Point(0, 0), new Dimension( Math.max(size0.width, size1.width), Math.max(size0.height, size1.height) )); diff --git a/tools/Jemmy/GlassImage/src/org/jemmy/image/PNGLoader.java b/tools/Jemmy/GlassImage/src/org/jemmy/image/glass/PNGLoader.java similarity index 89% rename from tools/Jemmy/GlassImage/src/org/jemmy/image/PNGLoader.java rename to tools/Jemmy/GlassImage/src/org/jemmy/image/glass/PNGLoader.java index 44d43715..a0f50708 100644 --- a/tools/Jemmy/GlassImage/src/org/jemmy/image/PNGLoader.java +++ b/tools/Jemmy/GlassImage/src/org/jemmy/image/glass/PNGLoader.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -22,10 +22,13 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ -package org.jemmy.image; +package org.jemmy.image.glass; import java.io.IOException; import java.io.InputStream; + +import org.jemmy.Dimension; +import org.jemmy.env.Environment; import org.jemmy.image.pixel.Raster; import org.jemmy.image.pixel.WriteableRaster; @@ -66,7 +69,7 @@ public GlassImage decode(boolean closeStream) throws IOException { @Override protected WriteableRaster createRaster(int width, int height) { - return new GlassImage(width, height, 4, Raster.Component.BLUE, Raster.Component.GREEN, Raster.Component.RED, Raster.Component.ALPHA); + return new GlassImage(Environment.getEnvironment(), new Dimension(width, height)); } } diff --git a/tools/Jemmy/GlassImage/src/org/jemmy/image/PNGSaver.java b/tools/Jemmy/GlassImage/src/org/jemmy/image/glass/PNGSaver.java similarity index 95% rename from tools/Jemmy/GlassImage/src/org/jemmy/image/PNGSaver.java rename to tools/Jemmy/GlassImage/src/org/jemmy/image/glass/PNGSaver.java index 5e0f8a1f..9498a6cb 100644 --- a/tools/Jemmy/GlassImage/src/org/jemmy/image/PNGSaver.java +++ b/tools/Jemmy/GlassImage/src/org/jemmy/image/glass/PNGSaver.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -22,7 +22,7 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ -package org.jemmy.image; +package org.jemmy.image.glass; import java.io.*; diff --git a/tools/Jemmy/GlassImage/test/TEST.ROOT b/tools/Jemmy/GlassImage/test/TEST.ROOT new file mode 100644 index 00000000..0d841c11 --- /dev/null +++ b/tools/Jemmy/GlassImage/test/TEST.ROOT @@ -0,0 +1,2 @@ +TestNG.dirs = . + diff --git a/tools/Jemmy/GlassImage/test/org/jemmy/image/EnvTest.java b/tools/Jemmy/GlassImage/test/org/jemmy/image/EnvTest.java index 4018ae1b..4ce73c71 100644 --- a/tools/Jemmy/GlassImage/test/org/jemmy/image/EnvTest.java +++ b/tools/Jemmy/GlassImage/test/org/jemmy/image/EnvTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,6 +25,8 @@ package org.jemmy.image; import org.jemmy.env.Environment; +import org.jemmy.image.glass.GlassImageCapturer; +import org.jemmy.image.glass.GlassPixelImageComparator; import org.jemmy.image.pixel.PixelEqualityRasterComparator; import org.jemmy.image.pixel.RasterComparator; import org.junit.*; @@ -41,6 +43,7 @@ public EnvTest() { @Test public void testRaster() { +System.out.println("TEST!"); Environment.getEnvironment().setProperty(RasterComparator.class, new PixelEqualityRasterComparator(1)); Environment.getEnvironment().setProperty(ImageCapturer.class, new GlassImageCapturer()); ImageComparator comp = Environment.getEnvironment().getProperty(ImageComparator.class); diff --git a/tools/Jemmy/GlassImage/test/org/jemmy/image/InitTest.java b/tools/Jemmy/GlassImage/test/org/jemmy/image/InitTest.java index f2a4fda8..b308aa28 100644 --- a/tools/Jemmy/GlassImage/test/org/jemmy/image/InitTest.java +++ b/tools/Jemmy/GlassImage/test/org/jemmy/image/InitTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,12 +25,25 @@ package org.jemmy.image; import java.io.IOException; + +import com.sun.glass.ui.Application; import org.jemmy.Rectangle; +import org.jemmy.action.ActionExecutor; +import org.jemmy.action.GetAction; import org.jemmy.env.Environment; +import org.jemmy.env.Timeout; +import org.jemmy.fx.QueueExecutor; +import org.jemmy.fx.Root; +import org.jemmy.image.glass.GlassImage; +import org.jemmy.image.glass.GlassImageCapturer; +import org.jemmy.image.glass.GlassPixelImageComparator; import org.jemmy.image.pixel.MaxDistanceComparator; +import org.jemmy.image.pixel.PixelEqualityRasterComparator; import org.jemmy.operators.Screen; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; + +import org.jemmy.timing.Waiter; import org.junit.BeforeClass; import org.junit.Test; @@ -46,11 +59,21 @@ public InitTest() { @BeforeClass public static void setup() throws InterruptedException, IOException { TestApp.main(null); + var env = Environment.getEnvironment(); + env.setProperty(ActionExecutor.class, QueueExecutor.EXECUTOR); + env.setProperty(ImageCapturer.class, new GlassImageCapturer()); + env.setProperty(ImageComparator.class, new GlassPixelImageComparator(env)); + new Waiter(new Timeout("APP_START", 100000)) + .ensureState(() -> new GetAction<>() { + @Override + public void run(Object... os) { + setResult(Application.GetApplication()); + } + }.dispatch(env)); } @Test public void testImage() { - Environment.getEnvironment().setProperty(ImageCapturer.class, new GlassImageCapturer()); Image i = new TestScreen().getScreenImage(); assertTrue(i instanceof GlassImage); assertNull(i.compareTo(i)); @@ -58,10 +81,9 @@ public void testImage() { @Test public void testComparator() { - Environment.getEnvironment().setProperty(ImageCapturer.class, new GlassImageCapturer()); ImageComparator comp = Environment.getEnvironment().getProperty(ImageComparator.class); assertTrue(comp instanceof GlassPixelImageComparator); - assertTrue(((GlassPixelImageComparator)comp).getRasterComparator() instanceof MaxDistanceComparator); + assertTrue(((GlassPixelImageComparator)comp).getRasterComparator() instanceof PixelEqualityRasterComparator); } class TestScreen extends Screen { diff --git a/tools/Jemmy/GlassImage/test/org/jemmy/image/SaveLoadTest.java b/tools/Jemmy/GlassImage/test/org/jemmy/image/SaveLoadTest.java index ba43c612..5351e26c 100644 --- a/tools/Jemmy/GlassImage/test/org/jemmy/image/SaveLoadTest.java +++ b/tools/Jemmy/GlassImage/test/org/jemmy/image/SaveLoadTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,12 +25,25 @@ package org.jemmy.image; import java.io.*; + +import com.sun.glass.ui.Application; import org.jemmy.Rectangle; +import org.jemmy.action.ActionExecutor; +import org.jemmy.action.GetAction; import org.jemmy.control.Wrap; import org.jemmy.env.Environment; +import org.jemmy.env.Timeout; +import org.jemmy.fx.QueueExecutor; import org.jemmy.fx.SceneDock; +import org.jemmy.image.glass.GlassImage; +import org.jemmy.image.glass.GlassImageCapturer; +import org.jemmy.image.glass.GlassPixelImageComparator; +import org.jemmy.image.glass.PNGLoader; +import org.jemmy.image.pixel.PNGSaver; import org.jemmy.operators.ScreenRectangle; import static org.junit.Assert.assertNull; + +import org.jemmy.timing.Waiter; import org.junit.*; /** @@ -45,6 +58,17 @@ public SaveLoadTest() { @BeforeClass public static void setUpClass() throws Exception { TestApp.main(null); + var env = Environment.getEnvironment(); + env.setProperty(ActionExecutor.class, QueueExecutor.EXECUTOR); + env.setProperty(ImageCapturer.class, new GlassImageCapturer()); + env.setProperty(ImageComparator.class, new GlassPixelImageComparator(env)); + new Waiter(new Timeout("APP_START", 100000)) + .ensureState(() -> new GetAction<>() { + @Override + public void run(Object... os) { + setResult(Application.GetApplication()); + } + }.dispatch(env)); } @AfterClass @@ -65,6 +89,7 @@ public void hello() throws FileNotFoundException, IOException { Wrap<?> wrap = new ScreenRectangle(Environment.getEnvironment(), new Rectangle(0, 0, 220, 220)); GlassImage img = new GlassImageCapturer().capture(wrap, new Rectangle(0, 0, 200, 200)); File imgFile = new File(System.getProperty("user.dir") + File.separator + "out.png"); + System.out.println(imgFile); new PNGSaver(new FileOutputStream(imgFile), PNGSaver.COLOR_MODE).encode(img); GlassImage loaded = new PNGLoader(new FileInputStream(imgFile)).decode(); new PNGSaver(new FileOutputStream(new File(System.getProperty("user.dir") + File.separator + "loaded.png")), PNGSaver.COLOR_MODE).encode(loaded); diff --git a/tools/Jemmy/GlassImage/test/org/jemmy/image/Test1.java b/tools/Jemmy/GlassImage/test/org/jemmy/image/Test1.java index 0ae2c1ee..c27eabaa 100644 --- a/tools/Jemmy/GlassImage/test/org/jemmy/image/Test1.java +++ b/tools/Jemmy/GlassImage/test/org/jemmy/image/Test1.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -37,7 +37,11 @@ import org.jemmy.Rectangle; import org.jemmy.control.Wrap; import org.jemmy.env.Environment; +import org.jemmy.image.glass.GlassImage; +import org.jemmy.image.glass.GlassImageCapturer; import org.jemmy.image.pixel.PNGFileImageStore; +import org.jemmy.image.pixel.PNGSaver; +import org.jemmy.operators.Screen; import org.jemmy.operators.ScreenRectangle; /** @@ -66,19 +70,6 @@ public void run() { GlassImage img1 = new GlassImageCapturer().capture(wrap, new Rectangle(20, 20, 200, 200)); img1.save("actual.png"); img1.compareTo(img).save("diff.png"); -// Pixels img = GlassImageCapturer.getRobot().getScreenCapture(45, 45, 10, 10); -// System.out.println(img.getWidth() + "," + img.getHeight()); -// ByteBuffer bb = img.asByteBuffer(); -// System.out.println(img.getBytesPerComponent()); -// System.out.println(bb.capacity()); -// for (int i = 0; i < 10; i++) { -// for (int j = 0; j < 10; j++) { -// for (int k = 0; k < img.getBytesPerComponent(); k++) { -// System.out.print(" " + Integer.toHexString(bb.get())); -// } -// System.out.println(); -// } -// } } @Override diff --git a/tools/Jemmy/GlassRobot/.gitignore b/tools/Jemmy/GlassRobot/.gitignore new file mode 100644 index 00000000..e43b0f98 --- /dev/null +++ b/tools/Jemmy/GlassRobot/.gitignore @@ -0,0 +1 @@ +.DS_Store diff --git a/tools/Jemmy/GlassRobot/build.xml b/tools/Jemmy/GlassRobot/build.xml index 3897192a..de87ab66 100644 --- a/tools/Jemmy/GlassRobot/build.xml +++ b/tools/Jemmy/GlassRobot/build.xml @@ -1,40 +1,18 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- You may freely edit this file. See commented blocks below for --> -<!-- some examples of how to customize the build. --> -<!-- (If you delete it and reopen the project it will be recreated.) --> -<!-- By default, only the Clean and Build commands use this build script. --> -<!-- Commands such as Run, Debug, and Test only use this build script if --> -<!-- the Compile on Save feature is turned off for the project. --> -<!-- You can turn off the Compile on Save (or Deploy on Save) setting --> -<!-- in the project's Project Properties dialog box.--> -<project name="GlassRobot" default="default" basedir="."> - <description>Builds, tests, and runs the project GlassRobot.</description> - <import file="nbproject/build-impl.xml"/> - <property file="../../../build.properties"/> - <target name="-pre-init" unless="no.need.to.find.java.fx"> - <ant antfile="../../../detect_javafx-nb.xml" inheritall="true"> - <property name="basedir" location="${basedir}/../../.."/> - <property name="property.file" value="${basedir}/nbproject/private/private.properties"/> - </ant> - </target> - <target name="-post-init"> - <ant antfile="build.xml" target="get-jemmy-core" inheritall="false" inheritrefs="false" dir=".."/> - </target> - <target name="-post-clean"> - <delete dir="${basedir}/target"/> +<?xml version="1.0" encoding="UTF-8"?> +<project name="glass.robot" default="compile"> + <basename file="${basedir}" property="."/> + <property name="rootdir" location="${basedir}/../../.."/> + <property name="project.name" value="GlassRobot"/> + <import file="${rootdir}/tools/make/build-template.xml"/> + <property name="test.dependencies.classpath" value="${jemmyfx-src}/build/classes:${glass-image-src}/build/classes"/> + <target name="build-dependencies"/> + <target name="compile" depends="compile-src"/> + <target name="build-test-dependencies"> + <antcall target="build-other-project"> + <param name="project" value="${jemmyfx-src}"/> + </antcall> + <antcall target="build-other-project"> + <param name="project" value="${glass-image-src}"/> + </antcall> </target> - <target name="maven" depends="jar"> - <property file="${basedir}/src/org/jemmy/input/glass/jemmy.properties"/> - <copy file="pom-tmpl.xml" tofile="pom.xml" overwrite="true"> - <filterchain> - <replacetokens> - <token key="GlassRobot.version" value="${javafx.version}.${version.minor}.${version.mini}"/> - </replacetokens> - </filterchain> - </copy> - <exec command="mvn"> - <arg value="-e"/> - <arg value="install"/> - </exec> - </target> -</project> +</project> diff --git a/tools/Jemmy/GlassRobot/manifest.mf b/tools/Jemmy/GlassRobot/manifest.mf deleted file mode 100644 index 1574df4a..00000000 --- a/tools/Jemmy/GlassRobot/manifest.mf +++ /dev/null @@ -1,3 +0,0 @@ -Manifest-Version: 1.0 -X-COMMENT: Main-Class will be added automatically by build - diff --git a/tools/Jemmy/GlassRobot/nbproject/build-impl.xml b/tools/Jemmy/GlassRobot/nbproject/build-impl.xml deleted file mode 100644 index a8b02e3c..00000000 --- a/tools/Jemmy/GlassRobot/nbproject/build-impl.xml +++ /dev/null @@ -1,1400 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -*** GENERATED FROM project.xml - DO NOT EDIT *** -*** EDIT ../build.xml INSTEAD *** - -For the purpose of easier reading the script -is divided into following sections: - - - initialization - - compilation - - jar - - execution - - debugging - - javadoc - - test compilation - - test execution - - test debugging - - applet - - cleanup - - --> -<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="GlassRobot-impl"> - <fail message="Please build using Ant 1.8.0 or higher."> - <condition> - <not> - <antversion atleast="1.8.0"/> - </not> - </condition> - </fail> - <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/> - <!-- - ====================== - INITIALIZATION SECTION - ====================== - --> - <target name="-pre-init"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="-pre-init" name="-init-private"> - <property file="nbproject/private/config.properties"/> - <property file="nbproject/private/configs/${config}.properties"/> - <property file="nbproject/private/private.properties"/> - </target> - <target depends="-pre-init,-init-private" name="-init-user"> - <property file="${user.properties.file}"/> - <!-- The two properties below are usually overridden --> - <!-- by the active platform. Just a fallback. --> - <property name="default.javac.source" value="1.4"/> - <property name="default.javac.target" value="1.4"/> - </target> - <target depends="-pre-init,-init-private,-init-user" name="-init-project"> - <property file="nbproject/configs/${config}.properties"/> - <property file="nbproject/project.properties"/> - </target> - <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init"> - <available file="${manifest.file}" property="manifest.available"/> - <condition property="splashscreen.available"> - <and> - <not> - <equals arg1="${application.splash}" arg2="" trim="true"/> - </not> - <available file="${application.splash}"/> - </and> - </condition> - <condition property="main.class.available"> - <and> - <isset property="main.class"/> - <not> - <equals arg1="${main.class}" arg2="" trim="true"/> - </not> - </and> - </condition> - <condition property="manifest.available+main.class"> - <and> - <isset property="manifest.available"/> - <isset property="main.class.available"/> - </and> - </condition> - <condition property="do.archive"> - <not> - <istrue value="${jar.archive.disabled}"/> - </not> - </condition> - <condition property="do.mkdist"> - <and> - <isset property="do.archive"/> - <isset property="libs.CopyLibs.classpath"/> - <not> - <istrue value="${mkdist.disabled}"/> - </not> - </and> - </condition> - <condition property="manifest.available+main.class+mkdist.available"> - <and> - <istrue value="${manifest.available+main.class}"/> - <isset property="do.mkdist"/> - </and> - </condition> - <condition property="do.archive+manifest.available"> - <and> - <isset property="manifest.available"/> - <istrue value="${do.archive}"/> - </and> - </condition> - <condition property="do.archive+main.class.available"> - <and> - <isset property="main.class.available"/> - <istrue value="${do.archive}"/> - </and> - </condition> - <condition property="do.archive+splashscreen.available"> - <and> - <isset property="splashscreen.available"/> - <istrue value="${do.archive}"/> - </and> - </condition> - <condition property="do.archive+manifest.available+main.class"> - <and> - <istrue value="${manifest.available+main.class}"/> - <istrue value="${do.archive}"/> - </and> - </condition> - <condition property="manifest.available-mkdist.available"> - <or> - <istrue value="${manifest.available}"/> - <isset property="do.mkdist"/> - </or> - </condition> - <condition property="manifest.available+main.class-mkdist.available"> - <or> - <istrue value="${manifest.available+main.class}"/> - <isset property="do.mkdist"/> - </or> - </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"/> - <isset property="have.tests"/> - </and> - </condition> - <condition property="no.javadoc.preview"> - <and> - <isset property="javadoc.preview"/> - <isfalse value="${javadoc.preview}"/> - </and> - </condition> - <property name="run.jvmargs" value=""/> - <property name="run.jvmargs.ide" value=""/> - <property name="javac.compilerargs" value=""/> - <property name="work.dir" value="${basedir}"/> - <condition property="no.deps"> - <and> - <istrue value="${no.dependencies}"/> - </and> - </condition> - <property name="javac.debug" value="true"/> - <property name="javadoc.preview" value="true"/> - <property name="application.args" value=""/> - <property name="source.encoding" value="${file.encoding}"/> - <property name="runtime.encoding" value="${source.encoding}"/> - <condition property="javadoc.encoding.used" value="${javadoc.encoding}"> - <and> - <isset property="javadoc.encoding"/> - <not> - <equals arg1="${javadoc.encoding}" arg2=""/> - </not> - </and> - </condition> - <property name="javadoc.encoding.used" value="${source.encoding}"/> - <property name="includes" value="**"/> - <property name="excludes" value=""/> - <property name="do.depend" value="false"/> - <condition property="do.depend.true"> - <istrue value="${do.depend}"/> - </condition> - <path id="endorsed.classpath.path" path="${endorsed.classpath}"/> - <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'"> - <length length="0" string="${endorsed.classpath}" when="greater"/> - </condition> - <condition else="false" property="jdkBug6558476"> - <and> - <matches pattern="1\.[56]" string="${java.specification.version}"/> - <not> - <os family="unix"/> - </not> - </and> - </condition> - <property name="javac.fork" value="${jdkBug6558476}"/> - <property name="jar.index" value="false"/> - <property name="jar.index.metainf" value="${jar.index}"/> - <property name="copylibs.rebase" value="true"/> - <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/> - <condition property="junit.available"> - <or> - <available classname="org.junit.Test" classpath="${run.test.classpath}"/> - <available classname="junit.framework.Test" classpath="${run.test.classpath}"/> - </or> - </condition> - <condition property="testng.available"> - <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/> - </condition> - <condition property="junit+testng.available"> - <and> - <istrue value="${junit.available}"/> - <istrue value="${testng.available}"/> - </and> - </condition> - <condition else="testng" property="testng.mode" value="mixed"> - <istrue value="${junit+testng.available}"/> - </condition> - <condition else="" property="testng.debug.mode" value="-mixed"> - <istrue value="${junit+testng.available}"/> - </condition> - </target> - <target name="-post-init"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check"> - <fail unless="src.dir">Must set src.dir</fail> - <fail unless="test.src.dir">Must set test.src.dir</fail> - <fail unless="build.dir">Must set build.dir</fail> - <fail unless="dist.dir">Must set dist.dir</fail> - <fail unless="build.classes.dir">Must set build.classes.dir</fail> - <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail> - <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail> - <fail unless="build.test.results.dir">Must set build.test.results.dir</fail> - <fail unless="build.classes.excludes">Must set build.classes.excludes</fail> - <fail unless="dist.jar">Must set dist.jar</fail> - </target> - <target name="-init-macrodef-property"> - <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1"> - <attribute name="name"/> - <attribute name="value"/> - <sequential> - <property name="@{name}" value="${@{value}}"/> - </sequential> - </macrodef> - </target> - <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors"> - <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${src.dir}" name="srcdir"/> - <attribute default="${build.classes.dir}" name="destdir"/> - <attribute default="${javac.classpath}" name="classpath"/> - <attribute default="${javac.processorpath}" name="processorpath"/> - <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="${javac.debug}" name="debug"/> - <attribute default="${empty.dir}" name="sourcepath"/> - <attribute default="${empty.dir}" name="gensrcdir"/> - <element name="customize" optional="true"/> - <sequential> - <property location="${build.dir}/empty" name="empty.dir"/> - <mkdir dir="${empty.dir}"/> - <mkdir dir="@{apgeneratedsrcdir}"/> - <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}"> - <src> - <dirset dir="@{gensrcdir}" erroronmissingdir="false"> - <include name="*"/> - </dirset> - </src> - <classpath> - <path path="@{classpath}"/> - </classpath> - <compilerarg line="${endorsed.classpath.cmd.line.arg}"/> - <compilerarg line="${javac.compilerargs}"/> - <compilerarg value="-processorpath"/> - <compilerarg path="@{processorpath}:${empty.dir}"/> - <compilerarg line="${ap.processors.internal}"/> - <compilerarg line="${annotation.processing.processor.options}"/> - <compilerarg value="-s"/> - <compilerarg path="@{apgeneratedsrcdir}"/> - <compilerarg line="${ap.proc.none.internal}"/> - <customize/> - </javac> - </sequential> - </macrodef> - </target> - <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal"> - <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${src.dir}" name="srcdir"/> - <attribute default="${build.classes.dir}" name="destdir"/> - <attribute default="${javac.classpath}" name="classpath"/> - <attribute default="${javac.processorpath}" name="processorpath"/> - <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="${javac.debug}" name="debug"/> - <attribute default="${empty.dir}" name="sourcepath"/> - <attribute default="${empty.dir}" name="gensrcdir"/> - <element name="customize" optional="true"/> - <sequential> - <property location="${build.dir}/empty" name="empty.dir"/> - <mkdir dir="${empty.dir}"/> - <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}"> - <src> - <dirset dir="@{gensrcdir}" erroronmissingdir="false"> - <include name="*"/> - </dirset> - </src> - <classpath> - <path path="@{classpath}"/> - </classpath> - <compilerarg line="${endorsed.classpath.cmd.line.arg}"/> - <compilerarg line="${javac.compilerargs}"/> - <customize/> - </javac> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac"> - <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${src.dir}" name="srcdir"/> - <attribute default="${build.classes.dir}" name="destdir"/> - <attribute default="${javac.classpath}" name="classpath"/> - <sequential> - <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}"> - <classpath> - <path path="@{classpath}"/> - </classpath> - </depend> - </sequential> - </macrodef> - <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${build.classes.dir}" name="destdir"/> - <sequential> - <fail unless="javac.includes">Must set javac.includes</fail> - <pathconvert pathsep="${line.separator}" property="javac.includes.binary"> - <path> - <filelist dir="@{destdir}" files="${javac.includes}"/> - </path> - <globmapper from="*.java" to="*.class"/> - </pathconvert> - <tempfile deleteonexit="true" property="javac.includesfile.binary"/> - <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/> - <delete> - <files includesfile="${javac.includesfile.binary}"/> - </delete> - <delete> - <fileset file="${javac.includesfile.binary}"/> - </delete> - </sequential> - </macrodef> - </target> - <target if="${junit.available}" name="-init-macrodef-junit-init"> - <condition else="false" property="nb.junit.batch" value="true"> - <and> - <istrue value="${junit.available}"/> - <not> - <isset property="test.method"/> - </not> - </and> - </condition> - <condition else="false" property="nb.junit.single" value="true"> - <and> - <istrue value="${junit.available}"/> - <isset property="test.method"/> - </and> - </condition> - </target> - <target if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}"> - <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element name="customize" optional="true"/> - <sequential> - <property name="junit.forkmode" value="perTest"/> - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> - <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/> - <syspropertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <formatter type="brief" usefile="false"/> - <formatter type="xml"/> - <jvmarg value="-ea"/> - <customize/> - </junit> - </sequential> - </macrodef> - </target> - <target if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}"> - <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element name="customize" optional="true"/> - <sequential> - <property name="junit.forkmode" value="perTest"/> - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> - <batchtest todir="${build.test.results.dir}"> - <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}"> - <filename name="@{testincludes}"/> - </fileset> - </batchtest> - <syspropertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <formatter type="brief" usefile="false"/> - <formatter type="xml"/> - <jvmarg value="-ea"/> - <customize/> - </junit> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/> - <target if="${testng.available}" name="-init-macrodef-testng"> - <macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element name="customize" optional="true"/> - <sequential> - <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}"> - <isset property="test.method"/> - </condition> - <union id="test.set"> - <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}"> - <filename name="@{testincludes}"/> - </fileset> - </union> - <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/> - <testng classfilesetref="test.set" failureProperty="tests.failed" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="GlassRobot" testname="TestNG tests" workingDir="${work.dir}"> - <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/> - <propertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </propertyset> - <customize/> - </testng> - </sequential> - </macrodef> - </target> - <target name="-init-macrodef-test-impl"> - <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element implicit="true" name="customize" optional="true"/> - <sequential> - <echo>No tests executed.</echo> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl"> - <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element implicit="true" name="customize" optional="true"/> - <sequential> - <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> - <customize/> - </j2seproject3:junit> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl"> - <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element implicit="true" name="customize" optional="true"/> - <sequential> - <j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> - <customize/> - </j2seproject3:testng> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test"> - <macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <sequential> - <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> - <customize> - <classpath> - <path path="${run.test.classpath}"/> - </classpath> - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> - <jvmarg line="${run.jvmargs}"/> - <jvmarg line="${run.jvmargs.ide}"/> - </customize> - </j2seproject3:test-impl> - </sequential> - </macrodef> - </target> - <target if="${junit.available}" name="-init-macrodef-junit-debug" unless="${nb.junit.batch}"> - <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element name="customize" optional="true"/> - <sequential> - <property name="junit.forkmode" value="perTest"/> - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> - <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/> - <syspropertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <formatter type="brief" usefile="false"/> - <formatter type="xml"/> - <jvmarg value="-ea"/> - <jvmarg line="${debug-args-line}"/> - <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> - <customize/> - </junit> - </sequential> - </macrodef> - </target> - <target if="${nb.junit.batch}" name="-init-macrodef-junit-debug-batch"> - <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element name="customize" optional="true"/> - <sequential> - <property name="junit.forkmode" value="perTest"/> - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> - <batchtest todir="${build.test.results.dir}"> - <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}"> - <filename name="@{testincludes}"/> - </fileset> - </batchtest> - <syspropertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <formatter type="brief" usefile="false"/> - <formatter type="xml"/> - <jvmarg value="-ea"/> - <jvmarg line="${debug-args-line}"/> - <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> - <customize/> - </junit> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-junit-debug,-init-macrodef-junit-debug-batch" if="${junit.available}" name="-init-macrodef-junit-debug-impl"> - <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element implicit="true" name="customize" optional="true"/> - <sequential> - <j2seproject3:junit-debug excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> - <customize/> - </j2seproject3:junit-debug> - </sequential> - </macrodef> - </target> - <target if="${testng.available}" name="-init-macrodef-testng-debug"> - <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${main.class}" name="testClass"/> - <attribute default="" name="testMethod"/> - <element name="customize2" optional="true"/> - <sequential> - <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}"> - <isset property="test.method"/> - </condition> - <condition else="-suitename GlassRobot -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}"> - <matches pattern=".*\.xml" string="@{testClass}"/> - </condition> - <delete dir="${build.test.results.dir}" quiet="true"/> - <mkdir dir="${build.test.results.dir}"/> - <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}"> - <customize> - <customize2/> - <jvmarg value="-ea"/> - <arg line="${testng.debug.mode}"/> - <arg line="-d ${build.test.results.dir}"/> - <arg line="-listener org.testng.reporters.VerboseReporter"/> - <arg line="${testng.cmd.args}"/> - </customize> - </j2seproject3:debug> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl"> - <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${main.class}" name="testClass"/> - <attribute default="" name="testMethod"/> - <element implicit="true" name="customize2" optional="true"/> - <sequential> - <j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}"> - <customize2/> - </j2seproject3:testng-debug> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit"> - <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <attribute default="${main.class}" name="testClass"/> - <attribute default="" name="testMethod"/> - <sequential> - <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> - <customize> - <classpath> - <path path="${run.test.classpath}"/> - </classpath> - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> - <jvmarg line="${run.jvmargs}"/> - <jvmarg line="${run.jvmargs.ide}"/> - </customize> - </j2seproject3:test-debug-impl> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng"> - <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <attribute default="${main.class}" name="testClass"/> - <attribute default="" name="testMethod"/> - <sequential> - <j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}"> - <customize2> - <syspropertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - </customize2> - </j2seproject3:testng-debug-impl> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/> - <!-- - pre NB7.2 profiling section; consider it deprecated - --> - <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/> - <target if="profiler.info.jvmargs.agent" name="-profile-pre-init"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target if="profiler.info.jvmargs.agent" name="-profile-post-init"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile"> - <macrodef name="resolve"> - <attribute name="name"/> - <attribute name="value"/> - <sequential> - <property name="@{name}" value="${env.@{value}}"/> - </sequential> - </macrodef> - <macrodef name="profile"> - <attribute default="${main.class}" name="classname"/> - <element name="customize" optional="true"/> - <sequential> - <property environment="env"/> - <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/> - <java classname="@{classname}" dir="${profiler.info.dir}" fork="true" jvm="${profiler.info.jvm}"> - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> - <jvmarg value="${profiler.info.jvmargs.agent}"/> - <jvmarg line="${profiler.info.jvmargs}"/> - <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/> - <arg line="${application.args}"/> - <classpath> - <path path="${run.classpath}"/> - </classpath> - <syspropertyset> - <propertyref prefix="run-sys-prop."/> - <mapper from="run-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <customize/> - </java> - </sequential> - </macrodef> - </target> - <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" name="-profile-init-check"> - <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail> - <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail> - </target> - <!-- - end of pre NB7.2 profiling section - --> - <target depends="-init-debug-args" name="-init-macrodef-nbjpda"> - <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1"> - <attribute default="${main.class}" name="name"/> - <attribute default="${debug.classpath}" name="classpath"/> - <attribute default="" name="stopclassname"/> - <sequential> - <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}"> - <classpath> - <path path="@{classpath}"/> - </classpath> - </nbjpdastart> - </sequential> - </macrodef> - <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1"> - <attribute default="${build.classes.dir}" name="dir"/> - <sequential> - <nbjpdareload> - <fileset dir="@{dir}" includes="${fix.classes}"> - <include name="${fix.includes}*.class"/> - </fileset> - </nbjpdareload> - </sequential> - </macrodef> - </target> - <target name="-init-debug-args"> - <property name="version-output" value="java version "${ant.java.version}"/> - <condition property="have-jdk-older-than-1.4"> - <or> - <contains string="${version-output}" substring="java version "1.0"/> - <contains string="${version-output}" substring="java version "1.1"/> - <contains string="${version-output}" substring="java version "1.2"/> - <contains string="${version-output}" substring="java version "1.3"/> - </or> - </condition> - <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none"> - <istrue value="${have-jdk-older-than-1.4}"/> - </condition> - <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem"> - <os family="windows"/> - </condition> - <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}"> - <isset property="debug.transport"/> - </condition> - </target> - <target depends="-init-debug-args" name="-init-macrodef-debug"> - <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${main.class}" name="classname"/> - <attribute default="${debug.classpath}" name="classpath"/> - <element name="customize" optional="true"/> - <sequential> - <java classname="@{classname}" dir="${work.dir}" fork="true"> - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> - <jvmarg line="${debug-args-line}"/> - <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> - <jvmarg value="-Dfile.encoding=${runtime.encoding}"/> - <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/> - <jvmarg line="${run.jvmargs}"/> - <jvmarg line="${run.jvmargs.ide}"/> - <classpath> - <path path="@{classpath}"/> - </classpath> - <syspropertyset> - <propertyref prefix="run-sys-prop."/> - <mapper from="run-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <customize/> - </java> - </sequential> - </macrodef> - </target> - <target name="-init-macrodef-java"> - <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1"> - <attribute default="${main.class}" name="classname"/> - <attribute default="${run.classpath}" name="classpath"/> - <attribute default="jvm" name="jvm"/> - <element name="customize" optional="true"/> - <sequential> - <java classname="@{classname}" dir="${work.dir}" fork="true"> - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> - <jvmarg value="-Dfile.encoding=${runtime.encoding}"/> - <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/> - <jvmarg line="${run.jvmargs}"/> - <jvmarg line="${run.jvmargs.ide}"/> - <classpath> - <path path="@{classpath}"/> - </classpath> - <syspropertyset> - <propertyref prefix="run-sys-prop."/> - <mapper from="run-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <customize/> - </java> - </sequential> - </macrodef> - </target> - <target name="-init-macrodef-copylibs"> - <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${manifest.file}" name="manifest"/> - <element name="customize" optional="true"/> - <sequential> - <property location="${build.classes.dir}" name="build.classes.dir.resolved"/> - <pathconvert property="run.classpath.without.build.classes.dir"> - <path path="${run.classpath}"/> - <map from="${build.classes.dir.resolved}" to=""/> - </pathconvert> - <pathconvert pathsep=" " property="jar.classpath"> - <path path="${run.classpath.without.build.classes.dir}"/> - <chainedmapper> - <flattenmapper/> - <filtermapper> - <replacestring from=" " to="%20"/> - </filtermapper> - <globmapper from="*" to="lib/*"/> - </chainedmapper> - </pathconvert> - <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/> - <copylibs compress="${jar.compress}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" rebase="${copylibs.rebase}" runtimeclasspath="${run.classpath.without.build.classes.dir}"> - <fileset dir="${build.classes.dir}"/> - <manifest> - <attribute name="Class-Path" value="${jar.classpath}"/> - <customize/> - </manifest> - </copylibs> - </sequential> - </macrodef> - </target> - <target name="-init-presetdef-jar"> - <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1"> - <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}"> - <j2seproject1:fileset dir="${build.classes.dir}"/> - </jar> - </presetdef> - </target> - <target name="-init-ap-cmdline-properties"> - <property name="annotation.processing.enabled" value="true"/> - <property name="annotation.processing.processors.list" value=""/> - <property name="annotation.processing.processor.options" value=""/> - <property name="annotation.processing.run.all.processors" value="true"/> - <property name="javac.processorpath" value="${javac.classpath}"/> - <property name="javac.test.processorpath" value="${javac.test.classpath}"/> - <condition property="ap.supported.internal" value="true"> - <not> - <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/> - </not> - </condition> - </target> - <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported"> - <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}"> - <isfalse value="${annotation.processing.run.all.processors}"/> - </condition> - <condition else="" property="ap.proc.none.internal" value="-proc:none"> - <isfalse value="${annotation.processing.enabled}"/> - </condition> - </target> - <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline"> - <property name="ap.cmd.line.internal" value=""/> - </target> - <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-test,-init-macrodef-test-debug,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/> - <!-- - =================== - COMPILATION SECTION - =================== - --> - <target name="-deps-jar-init" unless="built-jar.properties"> - <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/> - <delete file="${built-jar.properties}" quiet="true"/> - </target> - <target if="already.built.jar.${basedir}" name="-warn-already-built-jar"> - <echo level="warn" message="Cycle detected: GlassRobot was already built"/> - </target> - <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps"> - <mkdir dir="${build.dir}"/> - <touch file="${built-jar.properties}" verbose="false"/> - <property file="${built-jar.properties}" prefix="already.built.jar."/> - <antcall target="-warn-already-built-jar"/> - <propertyfile file="${built-jar.properties}"> - <entry key="${basedir}" value=""/> - </propertyfile> - </target> - <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/> - <target depends="init" name="-check-automatic-build"> - <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/> - </target> - <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build"> - <antcall target="clean"/> - </target> - <target depends="init,deps-jar" name="-pre-pre-compile"> - <mkdir dir="${build.classes.dir}"/> - </target> - <target name="-pre-compile"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target if="do.depend.true" name="-compile-depend"> - <pathconvert property="build.generated.subdirs"> - <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false"> - <include name="*"/> - </dirset> - </pathconvert> - <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/> - </target> - <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile"> - <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/> - <copy todir="${build.classes.dir}"> - <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> - </copy> - </target> - <target if="has.persistence.xml" name="-copy-persistence-xml"> - <mkdir dir="${build.classes.dir}/META-INF"/> - <copy todir="${build.classes.dir}/META-INF"> - <fileset dir="${meta.inf.dir}" includes="persistence.xml"/> - </copy> - </target> - <target name="-post-compile"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/> - <target name="-pre-compile-single"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single"> - <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail> - <j2seproject3:force-recompile/> - <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}"/> - </target> - <target name="-post-compile-single"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/> - <!-- - ==================== - JAR BUILDING SECTION - ==================== - --> - <target depends="init" name="-pre-pre-jar"> - <dirname file="${dist.jar}" property="dist.jar.dir"/> - <mkdir dir="${dist.jar.dir}"/> - </target> - <target name="-pre-jar"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive" name="-do-jar-without-manifest" unless="manifest.available-mkdist.available"> - <j2seproject1:jar/> - </target> - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class-mkdist.available"> - <j2seproject1:jar manifest="${manifest.file}"/> - </target> - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available+main.class" name="-do-jar-with-mainclass" 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 level="info">To run this application from the command line without Ant, try:</echo> - <property location="${build.classes.dir}" name="build.classes.dir.resolved"/> - <property location="${dist.jar}" name="dist.jar.resolved"/> - <pathconvert property="run.classpath.with.dist.jar"> - <path path="${run.classpath}"/> - <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/> - </pathconvert> - <echo level="info">java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo> - </target> - <target depends="init" if="do.archive" name="-do-jar-with-libraries-create-manifest" unless="manifest.available"> - <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/> - <touch file="${tmp.manifest.file}" verbose="false"/> - </target> - <target depends="init" if="do.archive+manifest.available" name="-do-jar-with-libraries-copy-manifest"> - <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/> - <copy file="${manifest.file}" tofile="${tmp.manifest.file}"/> - </target> - <target depends="init,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest" if="do.archive+main.class.available" name="-do-jar-with-libraries-set-main"> - <manifest file="${tmp.manifest.file}" mode="update"> - <attribute name="Main-Class" value="${main.class}"/> - </manifest> - </target> - <target depends="init,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-with-libraries-set-splashscreen"> - <basename file="${application.splash}" property="splashscreen.basename"/> - <mkdir dir="${build.classes.dir}/META-INF"/> - <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/> - <manifest file="${tmp.manifest.file}" mode="update"> - <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/> - </manifest> - </target> - <target depends="init,-init-macrodef-copylibs,compile,-pre-pre-jar,-pre-jar,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest,-do-jar-with-libraries-set-main,-do-jar-with-libraries-set-splashscreen" if="do.mkdist" name="-do-jar-with-libraries-pack"> - <j2seproject3:copylibs manifest="${tmp.manifest.file}"/> - <echo level="info">To run this application from the command line without Ant, try:</echo> - <property location="${dist.jar}" name="dist.jar.resolved"/> - <echo level="info">java -jar "${dist.jar.resolved}"</echo> - </target> - <target depends="-do-jar-with-libraries-pack" if="do.archive" name="-do-jar-with-libraries-delete-manifest"> - <delete> - <fileset file="${tmp.manifest.file}"/> - </delete> - </target> - <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest,-do-jar-with-libraries-set-main,-do-jar-with-libraries-set-splashscreen,-do-jar-with-libraries-pack,-do-jar-with-libraries-delete-manifest" name="-do-jar-with-libraries"/> - <target name="-post-jar"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target 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." name="jar"/> - <!-- - ================= - EXECUTION SECTION - ================= - --> - <target depends="init,compile" description="Run a main class." name="run"> - <j2seproject1:java> - <customize> - <arg line="${application.args}"/> - </customize> - </j2seproject1:java> - </target> - <target name="-do-not-recompile"> - <property name="javac.includes.binary" value=""/> - </target> - <target depends="init,compile-single" name="run-single"> - <fail unless="run.class">Must select one file in the IDE or set run.class</fail> - <j2seproject1:java classname="${run.class}"/> - </target> - <target depends="init,compile-test-single" name="run-test-with-main"> - <fail unless="run.class">Must select one file in the IDE or set run.class</fail> - <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/> - </target> - <!-- - ================= - DEBUGGING SECTION - ================= - --> - <target depends="init" if="netbeans.home" name="-debug-start-debugger"> - <j2seproject1:nbjpdastart name="${debug.class}"/> - </target> - <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test"> - <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/> - </target> - <target depends="init,compile" name="-debug-start-debuggee"> - <j2seproject3:debug> - <customize> - <arg line="${application.args}"/> - </customize> - </j2seproject3:debug> - </target> - <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/> - <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto"> - <j2seproject1:nbjpdastart stopclassname="${main.class}"/> - </target> - <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/> - <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single"> - <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail> - <j2seproject3:debug classname="${debug.class}"/> - </target> - <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/> - <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test"> - <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail> - <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/> - </target> - <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/> - <target depends="init" name="-pre-debug-fix"> - <fail unless="fix.includes">Must set fix.includes</fail> - <property name="javac.includes" value="${fix.includes}.java"/> - </target> - <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix"> - <j2seproject1:nbjpdareload/> - </target> - <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/> - <!-- - ================= - PROFILING SECTION - ================= - --> - <!-- - pre NB7.2 profiler integration - --> - <target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72"> - <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> - <nbprofiledirect> - <classpath> - <path path="${run.classpath}"/> - </classpath> - </nbprofiledirect> - <profile/> - </target> - <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72"> - <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail> - <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> - <nbprofiledirect> - <classpath> - <path path="${run.classpath}"/> - </classpath> - </nbprofiledirect> - <profile classname="${profile.class}"/> - </target> - <target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72"> - <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> - <nbprofiledirect> - <classpath> - <path path="${run.classpath}"/> - </classpath> - </nbprofiledirect> - <profile classname="sun.applet.AppletViewer"> - <customize> - <arg value="${applet.url}"/> - </customize> - </profile> - </target> - <target depends="profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72"> - <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> - <nbprofiledirect> - <classpath> - <path path="${run.test.classpath}"/> - </classpath> - </nbprofiledirect> - <junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true"> - <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/> - <jvmarg value="${profiler.info.jvmargs.agent}"/> - <jvmarg line="${profiler.info.jvmargs}"/> - <test name="${profile.class}"/> - <classpath> - <path path="${run.test.classpath}"/> - </classpath> - <syspropertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <formatter type="brief" usefile="false"/> - <formatter type="xml"/> - </junit> - </target> - <!-- - end of pre NB72 profiling section - --> - <target if="netbeans.home" name="-profile-check"> - <condition property="profiler.configured"> - <or> - <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/> - <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/> - </or> - </condition> - </target> - <target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent"> - <startprofiler/> - <antcall target="run"/> - </target> - <target depends="-profile-check,-profile-single-pre72" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-single" unless="profiler.info.jvmargs.agent"> - <fail unless="run.class">Must select one file in the IDE or set run.class</fail> - <startprofiler/> - <antcall target="run-single"/> - </target> - <target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/> - <target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs"> - <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail> - <startprofiler/> - <antcall target="test-single"/> - </target> - <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main"> - <fail unless="run.class">Must select one file in the IDE or set run.class</fail> - <startprofiler/> - <antcal target="run-test-with-main"/> - </target> - <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent"> - <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> - <startprofiler/> - <antcall target="run-applet"/> - </target> - <!-- - =============== - JAVADOC SECTION - =============== - --> - <target depends="init" if="have.sources" name="-javadoc-build"> - <mkdir dir="${dist.javadoc.dir}"/> - <condition else="" property="javadoc.endorsed.classpath.cmd.line.arg" value="-J${endorsed.classpath.cmd.line.arg}"> - <and> - <isset property="endorsed.classpath.cmd.line.arg"/> - <not> - <equals arg1="${endorsed.classpath.cmd.line.arg}" arg2=""/> - </not> - </and> - </condition> - <javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" 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}"> - <classpath> - <path path="${javac.classpath}"/> - </classpath> - <fileset dir="${src.dir}" excludes="*.java,${excludes}" includes="${includes}"> - <filename name="**/*.java"/> - </fileset> - <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false"> - <include name="**/*.java"/> - <exclude name="*.java"/> - </fileset> - <arg line="${javadoc.endorsed.classpath.cmd.line.arg}"/> - </javadoc> - <copy todir="${dist.javadoc.dir}"> - <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}"> - <filename name="**/doc-files/**"/> - </fileset> - <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false"> - <include name="**/doc-files/**"/> - </fileset> - </copy> - </target> - <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview"> - <nbbrowse file="${dist.javadoc.dir}/index.html"/> - </target> - <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/> - <!-- - ========================= - TEST COMPILATION SECTION - ========================= - --> - <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test"> - <mkdir dir="${build.test.classes.dir}"/> - </target> - <target name="-pre-compile-test"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target if="do.depend.true" name="-compile-test-depend"> - <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/> - </target> - <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test"> - <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" processorpath="${javac.test.processorpath}" srcdir="${test.src.dir}"/> - <copy todir="${build.test.classes.dir}"> - <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> - </copy> - </target> - <target name="-post-compile-test"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/> - <target name="-pre-compile-test-single"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single"> - <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail> - <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/> - <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" processorpath="${javac.test.processorpath}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/> - <copy todir="${build.test.classes.dir}"> - <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> - </copy> - </target> - <target name="-post-compile-test-single"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/> - <!-- - ======================= - TEST EXECUTION SECTION - ======================= - --> - <target depends="init" if="have.tests" name="-pre-test-run"> - <mkdir dir="${build.test.results.dir}"/> - </target> - <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run"> - <j2seproject3:test testincludes="**/*Test.java"/> - </target> - <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run"> - <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail> - </target> - <target depends="init" if="have.tests" name="test-report"/> - <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/> - <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/> - <target depends="init" if="have.tests" name="-pre-test-run-single"> - <mkdir dir="${build.test.results.dir}"/> - </target> - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single"> - <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail> - <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/> - </target> - <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single"> - <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail> - </target> - <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/> - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method"> - <fail unless="test.class">Must select some files in the IDE or set test.class</fail> - <fail unless="test.method">Must select some method in the IDE or set test.method</fail> - <j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/> - </target> - <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method"> - <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail> - </target> - <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method,-post-test-run-single-method" description="Run single unit test." name="test-single-method"/> - <!-- - ======================= - TEST DEBUGGING SECTION - ======================= - --> - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test"> - <fail unless="test.class">Must select one file in the IDE or set test.class</fail> - <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/> - </target> - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method"> - <fail unless="test.class">Must select one file in the IDE or set test.class</fail> - <fail unless="test.method">Must select some method in the IDE or set test.method</fail> - <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/> - </target> - <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test"> - <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/> - </target> - <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/> - <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/> - <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test"> - <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/> - </target> - <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/> - <!-- - ========================= - APPLET EXECUTION SECTION - ========================= - --> - <target depends="init,compile-single" name="run-applet"> - <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> - <j2seproject1:java classname="sun.applet.AppletViewer"> - <customize> - <arg value="${applet.url}"/> - </customize> - </j2seproject1:java> - </target> - <!-- - ========================= - APPLET DEBUGGING SECTION - ========================= - --> - <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet"> - <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> - <j2seproject3:debug classname="sun.applet.AppletViewer"> - <customize> - <arg value="${applet.url}"/> - </customize> - </j2seproject3:debug> - </target> - <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/> - <!-- - =============== - CLEANUP SECTION - =============== - --> - <target name="-deps-clean-init" unless="built-clean.properties"> - <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/> - <delete file="${built-clean.properties}" quiet="true"/> - </target> - <target if="already.built.clean.${basedir}" name="-warn-already-built-clean"> - <echo level="warn" message="Cycle detected: GlassRobot was already built"/> - </target> - <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps"> - <mkdir dir="${build.dir}"/> - <touch file="${built-clean.properties}" verbose="false"/> - <property file="${built-clean.properties}" prefix="already.built.clean."/> - <antcall target="-warn-already-built-clean"/> - <propertyfile file="${built-clean.properties}"> - <entry key="${basedir}" value=""/> - </propertyfile> - </target> - <target depends="init" name="-do-clean"> - <delete dir="${build.dir}"/> - <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/> - </target> - <target name="-post-clean"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/> - <target name="-check-call-dep"> - <property file="${call.built.properties}" prefix="already.built."/> - <condition property="should.call.dep"> - <and> - <not> - <isset property="already.built.${call.subproject}"/> - </not> - <available file="${call.script}"/> - </and> - </condition> - </target> - <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep"> - <ant antfile="${call.script}" inheritall="false" target="${call.target}"> - <propertyset> - <propertyref prefix="transfer."/> - <mapper from="transfer.*" to="*" type="glob"/> - </propertyset> - </ant> - </target> -</project> diff --git a/tools/Jemmy/GlassRobot/nbproject/genfiles.properties b/tools/Jemmy/GlassRobot/nbproject/genfiles.properties deleted file mode 100644 index 8d2f63b2..00000000 --- a/tools/Jemmy/GlassRobot/nbproject/genfiles.properties +++ /dev/null @@ -1,8 +0,0 @@ -build.xml.data.CRC32=d72982f2 -build.xml.script.CRC32=8edfb5c9 -build.xml.stylesheet.CRC32=28e38971@1.50.1.46 -# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. -# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. -nbproject/build-impl.xml.data.CRC32=d72982f2 -nbproject/build-impl.xml.script.CRC32=c4241cd0 -nbproject/build-impl.xml.stylesheet.CRC32=5a01deb7@1.68.1.46 diff --git a/tools/Jemmy/GlassRobot/nbproject/project.properties b/tools/Jemmy/GlassRobot/nbproject/project.properties deleted file mode 100644 index ce5f24b1..00000000 --- a/tools/Jemmy/GlassRobot/nbproject/project.properties +++ /dev/null @@ -1,90 +0,0 @@ -annotation.processing.enabled=true -annotation.processing.enabled.in.editor=false -annotation.processing.processors.list= -annotation.processing.run.all.processors=true -annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output -application.title=GlassRobot -application.vendor=shura -build.classes.dir=${build.dir}/classes -build.classes.excludes=**/*.java,**/*.form -# This directory is removed when the project is cleaned: -build.dir=build -build.generated.dir=${build.dir}/generated -build.generated.sources.dir=${build.dir}/generated-sources -# Only compile against the classpath explicitly listed here: -build.sysclasspath=ignore -build.test.classes.dir=${build.dir}/test/classes -build.test.results.dir=${build.dir}/test/results -# Uncomment to specify the preferred debugger connection transport: -#debug.transport=dt_socket -debug.classpath=\ - ${run.classpath} -debug.test.classpath=\ - ${run.test.classpath} -# This directory is removed when the project is cleaned: -dist.dir=dist -dist.jar=${dist.dir}/GlassRobot.jar -dist.javadoc.dir=${dist.dir}/javadoc -endorsed.classpath= -excludes= -file.reference.build-classes=../JemmyFX/build/classes -file.reference.JemmyCore.jar=../jemmy_core/JemmyCore.jar -file.reference.junit.jar=../jemmy_core/junit.jar -includes=** -jar.archive.disabled=${jnlp.enabled} -jar.compress=false -file.reference.jfxrt.jar=${javafx.rt}/lib/ext/jfxrt.jar -jar.index=${jnlp.enabled} -javac.classpath=\ - ${file.reference.JemmyCore.jar}:\ - ${file.reference.jfxrt.jar} -# Space-separated list of extra javac options -javac.compilerargs= -javac.deprecation=false -javac.processorpath=\ - ${javac.classpath} -javac.source=1.8 -javac.target=1.8 -javac.test.classpath=\ - ${javac.classpath}:\ - ${build.classes.dir}:\ - ${file.reference.build-classes}:\ - ${file.reference.junit.jar} -javac.test.processorpath=\ - ${javac.test.classpath} -javadoc.additionalparam= -javadoc.author=false -javadoc.encoding=${source.encoding} -javadoc.noindex=false -javadoc.nonavbar=false -javadoc.notree=false -javadoc.private=false -javadoc.splitindex=true -javadoc.use=true -javadoc.version=false -javadoc.windowtitle= -jnlp.codebase.type=no.codebase -jnlp.descriptor=application -jnlp.enabled=false -jnlp.mixed.code=default -jnlp.offline-allowed=false -jnlp.signed=false -jnlp.signing= -jnlp.signing.alias= -jnlp.signing.keystore= -meta.inf.dir=${src.dir}/META-INF -mkdist.disabled=true -platform.active=default_platform -run.classpath=\ - ${javac.classpath}:\ - ${build.classes.dir} -# 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.test.classpath=\ - ${javac.test.classpath}:\ - ${build.test.classes.dir} -source.encoding=UTF-8 -src.dir=src -test.src.dir=test diff --git a/tools/Jemmy/GlassRobot/nbproject/project.xml b/tools/Jemmy/GlassRobot/nbproject/project.xml deleted file mode 100644 index 7be81bc1..00000000 --- a/tools/Jemmy/GlassRobot/nbproject/project.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<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/3"> - <name>GlassRobot</name> - <source-roots> - <root id="src.dir"/> - </source-roots> - <test-roots> - <root id="test.src.dir"/> - </test-roots> - </data> - <references xmlns="http://www.netbeans.org/ns/ant-project-references/1"/> - </configuration> -</project> diff --git a/tools/Jemmy/GlassRobot/src/org/jemmy/input/glass/DefaultGlassInputMap.java b/tools/Jemmy/GlassRobot/src/org/jemmy/input/glass/DefaultGlassInputMap.java index 1c1bab6b..a96a5153 100644 --- a/tools/Jemmy/GlassRobot/src/org/jemmy/input/glass/DefaultGlassInputMap.java +++ b/tools/Jemmy/GlassRobot/src/org/jemmy/input/glass/DefaultGlassInputMap.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,10 +24,12 @@ */ package org.jemmy.input.glass; -import com.sun.glass.events.KeyEvent; -import com.sun.glass.ui.Robot; +import com.sun.glass.ui.GlassRobot; import java.util.HashMap; import java.util.Map; + +import javafx.scene.input.KeyCode; +import javafx.scene.input.MouseButton; import org.jemmy.interfaces.Keyboard; import org.jemmy.interfaces.Keyboard.KeyboardButton; import org.jemmy.interfaces.Modifier; @@ -39,135 +41,134 @@ */ public class DefaultGlassInputMap implements GlassInputMap { - private final static Map<Keyboard.KeyboardButton, Integer> keys = new HashMap<Keyboard.KeyboardButton, Integer>(); - private final static Map<Modifier, Integer> modifiers = new HashMap<Modifier, Integer>(); - private final static Map<Mouse.MouseButton, Integer> buttons = new HashMap<Mouse.MouseButton, Integer>(); + private final static Map<Keyboard.KeyboardButton, KeyCode> keys = new HashMap<>(); + private final static Map<Modifier, KeyCode> modifiers = new HashMap<>(); + private final static Map<Mouse.MouseButton, MouseButton> buttons = new HashMap<>(); static { - keys.put(Keyboard.KeyboardButtons.CAPS_LOCK, KeyEvent.VK_CAPS_LOCK); - keys.put(Keyboard.KeyboardButtons.ESCAPE, KeyEvent.VK_ESCAPE); - keys.put(Keyboard.KeyboardButtons.F1, KeyEvent.VK_F1); - keys.put(Keyboard.KeyboardButtons.F2, KeyEvent.VK_F2); - keys.put(Keyboard.KeyboardButtons.F3, KeyEvent.VK_F3); - keys.put(Keyboard.KeyboardButtons.F4, KeyEvent.VK_F4); - keys.put(Keyboard.KeyboardButtons.F5, KeyEvent.VK_F5); - keys.put(Keyboard.KeyboardButtons.F6, KeyEvent.VK_F6); - keys.put(Keyboard.KeyboardButtons.F7, KeyEvent.VK_F7); - keys.put(Keyboard.KeyboardButtons.F8, KeyEvent.VK_F8); - keys.put(Keyboard.KeyboardButtons.F9, KeyEvent.VK_F9); - keys.put(Keyboard.KeyboardButtons.F10, KeyEvent.VK_F10); - keys.put(Keyboard.KeyboardButtons.F11, KeyEvent.VK_F11); - keys.put(Keyboard.KeyboardButtons.F12, KeyEvent.VK_F12); - keys.put(Keyboard.KeyboardButtons.PRINTSCREEN, KeyEvent.VK_PRINTSCREEN); - keys.put(Keyboard.KeyboardButtons.SCROLL_LOCK, KeyEvent.VK_SCROLL_LOCK); - keys.put(Keyboard.KeyboardButtons.PAUSE, KeyEvent.VK_PAUSE); - keys.put(Keyboard.KeyboardButtons.BACK_QUOTE, KeyEvent.VK_BACK_QUOTE); - keys.put(Keyboard.KeyboardButtons.D1, KeyEvent.VK_1); - keys.put(Keyboard.KeyboardButtons.D2, KeyEvent.VK_2); - keys.put(Keyboard.KeyboardButtons.D3, KeyEvent.VK_3); - keys.put(Keyboard.KeyboardButtons.D4, KeyEvent.VK_4); - keys.put(Keyboard.KeyboardButtons.D5, KeyEvent.VK_5); - keys.put(Keyboard.KeyboardButtons.D6, KeyEvent.VK_6); - keys.put(Keyboard.KeyboardButtons.D7, KeyEvent.VK_7); - keys.put(Keyboard.KeyboardButtons.D8, KeyEvent.VK_8); - keys.put(Keyboard.KeyboardButtons.D9, KeyEvent.VK_9); - keys.put(Keyboard.KeyboardButtons.D0, KeyEvent.VK_0); - keys.put(Keyboard.KeyboardButtons.MINUS, KeyEvent.VK_MINUS); - keys.put(Keyboard.KeyboardButtons.EQUALS, KeyEvent.VK_EQUALS); - keys.put(Keyboard.KeyboardButtons.BACK_SLASH, KeyEvent.VK_BACK_SLASH); - keys.put(Keyboard.KeyboardButtons.BACK_SPACE, KeyEvent.VK_BACKSPACE); - keys.put(Keyboard.KeyboardButtons.INSERT, KeyEvent.VK_INSERT); - keys.put(Keyboard.KeyboardButtons.HOME, KeyEvent.VK_HOME); - keys.put(Keyboard.KeyboardButtons.PAGE_UP, KeyEvent.VK_PAGE_UP); - keys.put(Keyboard.KeyboardButtons.NUM_LOCK, KeyEvent.VK_NUM_LOCK); - keys.put(Keyboard.KeyboardButtons.DIVIDE, KeyEvent.VK_DIVIDE); - keys.put(Keyboard.KeyboardButtons.MULTIPLY, KeyEvent.VK_MULTIPLY); - keys.put(Keyboard.KeyboardButtons.SUBTRACT, KeyEvent.VK_SUBTRACT); - keys.put(Keyboard.KeyboardButtons.TAB, KeyEvent.VK_TAB); - keys.put(Keyboard.KeyboardButtons.Q, KeyEvent.VK_Q); - keys.put(Keyboard.KeyboardButtons.W, KeyEvent.VK_W); - keys.put(Keyboard.KeyboardButtons.E, KeyEvent.VK_E); - keys.put(Keyboard.KeyboardButtons.R, KeyEvent.VK_R); - keys.put(Keyboard.KeyboardButtons.T, KeyEvent.VK_T); - keys.put(Keyboard.KeyboardButtons.Y, KeyEvent.VK_Y); - keys.put(Keyboard.KeyboardButtons.U, KeyEvent.VK_U); - keys.put(Keyboard.KeyboardButtons.I, KeyEvent.VK_I); - keys.put(Keyboard.KeyboardButtons.O, KeyEvent.VK_O); - keys.put(Keyboard.KeyboardButtons.P, KeyEvent.VK_P); - keys.put(Keyboard.KeyboardButtons.OPEN_BRACKET, KeyEvent.VK_OPEN_BRACKET); - keys.put(Keyboard.KeyboardButtons.CLOSE_BRACKET, KeyEvent.VK_CLOSE_BRACKET); - keys.put(Keyboard.KeyboardButtons.DELETE, KeyEvent.VK_DELETE); - keys.put(Keyboard.KeyboardButtons.END, KeyEvent.VK_END); - keys.put(Keyboard.KeyboardButtons.PAGE_DOWN, KeyEvent.VK_PAGE_DOWN); - keys.put(Keyboard.KeyboardButtons.NUMPAD7, KeyEvent.VK_NUMPAD7); - keys.put(Keyboard.KeyboardButtons.NUMPAD8, KeyEvent.VK_NUMPAD8); - keys.put(Keyboard.KeyboardButtons.NUMPAD9, KeyEvent.VK_NUMPAD9); - keys.put(Keyboard.KeyboardButtons.ADD, KeyEvent.VK_ADD); - keys.put(Keyboard.KeyboardButtons.CAPS_LOCK, KeyEvent.VK_CAPS_LOCK); - keys.put(Keyboard.KeyboardButtons.A, KeyEvent.VK_A); - keys.put(Keyboard.KeyboardButtons.S, KeyEvent.VK_S); - keys.put(Keyboard.KeyboardButtons.D, KeyEvent.VK_D); - keys.put(Keyboard.KeyboardButtons.F, KeyEvent.VK_F); - keys.put(Keyboard.KeyboardButtons.G, KeyEvent.VK_G); - keys.put(Keyboard.KeyboardButtons.H, KeyEvent.VK_H); - keys.put(Keyboard.KeyboardButtons.J, KeyEvent.VK_J); - keys.put(Keyboard.KeyboardButtons.K, KeyEvent.VK_K); - keys.put(Keyboard.KeyboardButtons.L, KeyEvent.VK_L); - keys.put(Keyboard.KeyboardButtons.SEMICOLON, KeyEvent.VK_SEMICOLON); - keys.put(Keyboard.KeyboardButtons.QUOTE, KeyEvent.VK_QUOTE); - keys.put(Keyboard.KeyboardButtons.ENTER, KeyEvent.VK_ENTER); - keys.put(Keyboard.KeyboardButtons.NUMPAD4, KeyEvent.VK_NUMPAD4); - keys.put(Keyboard.KeyboardButtons.NUMPAD5, KeyEvent.VK_NUMPAD5); - keys.put(Keyboard.KeyboardButtons.NUMPAD6, KeyEvent.VK_NUMPAD6); - keys.put(Keyboard.KeyboardButtons.Z, KeyEvent.VK_Z); - keys.put(Keyboard.KeyboardButtons.X, KeyEvent.VK_X); - keys.put(Keyboard.KeyboardButtons.C, KeyEvent.VK_C); - keys.put(Keyboard.KeyboardButtons.V, KeyEvent.VK_V); - keys.put(Keyboard.KeyboardButtons.B, KeyEvent.VK_B); - keys.put(Keyboard.KeyboardButtons.N, KeyEvent.VK_N); - keys.put(Keyboard.KeyboardButtons.M, KeyEvent.VK_M); - keys.put(Keyboard.KeyboardButtons.COMMA, KeyEvent.VK_COMMA); - keys.put(Keyboard.KeyboardButtons.PERIOD, KeyEvent.VK_PERIOD); - keys.put(Keyboard.KeyboardButtons.SLASH, KeyEvent.VK_SLASH); - keys.put(Keyboard.KeyboardButtons.UP, KeyEvent.VK_UP); - keys.put(Keyboard.KeyboardButtons.NUMPAD1, KeyEvent.VK_NUMPAD1); - keys.put(Keyboard.KeyboardButtons.NUMPAD2, KeyEvent.VK_NUMPAD2); - keys.put(Keyboard.KeyboardButtons.NUMPAD3, KeyEvent.VK_NUMPAD3); - keys.put(Keyboard.KeyboardButtons.SPACE, KeyEvent.VK_SPACE); - keys.put(Keyboard.KeyboardButtons.LEFT, KeyEvent.VK_LEFT); - keys.put(Keyboard.KeyboardButtons.DOWN, KeyEvent.VK_DOWN); - keys.put(Keyboard.KeyboardButtons.RIGHT, KeyEvent.VK_RIGHT); - keys.put(Keyboard.KeyboardButtons.NUMPAD0, KeyEvent.VK_NUMPAD0); - keys.put(Keyboard.KeyboardButtons.DECIMAL, KeyEvent.VK_DECIMAL); - keys.put(Keyboard.KeyboardButtons.ALT, KeyEvent.VK_ALT); - keys.put(Keyboard.KeyboardButtons.CONTROL, KeyEvent.VK_CONTROL); - keys.put(Keyboard.KeyboardButtons.META, KeyEvent.VK_COMMAND); - keys.put(Keyboard.KeyboardButtons.SHIFT, KeyEvent.VK_SHIFT); + keys.put(Keyboard.KeyboardButtons.CAPS_LOCK, KeyCode.CAPS); + keys.put(Keyboard.KeyboardButtons.ESCAPE, KeyCode.ESCAPE); + keys.put(Keyboard.KeyboardButtons.F1, KeyCode.F1); + keys.put(Keyboard.KeyboardButtons.F2, KeyCode.F2); + keys.put(Keyboard.KeyboardButtons.F3, KeyCode.F3); + keys.put(Keyboard.KeyboardButtons.F4, KeyCode.F4); + keys.put(Keyboard.KeyboardButtons.F5, KeyCode.F5); + keys.put(Keyboard.KeyboardButtons.F6, KeyCode.F6); + keys.put(Keyboard.KeyboardButtons.F7, KeyCode.F7); + keys.put(Keyboard.KeyboardButtons.F8, KeyCode.F8); + keys.put(Keyboard.KeyboardButtons.F9, KeyCode.F9); + keys.put(Keyboard.KeyboardButtons.F10, KeyCode.F10); + keys.put(Keyboard.KeyboardButtons.F11, KeyCode.F11); + keys.put(Keyboard.KeyboardButtons.F12, KeyCode.F12); + keys.put(Keyboard.KeyboardButtons.PRINTSCREEN, KeyCode.PRINTSCREEN); + keys.put(Keyboard.KeyboardButtons.SCROLL_LOCK, KeyCode.SCROLL_LOCK); + keys.put(Keyboard.KeyboardButtons.PAUSE, KeyCode.PAUSE); + keys.put(Keyboard.KeyboardButtons.BACK_QUOTE, KeyCode.BACK_QUOTE); + keys.put(Keyboard.KeyboardButtons.D1, KeyCode.DIGIT1); + keys.put(Keyboard.KeyboardButtons.D2, KeyCode.DIGIT2); + keys.put(Keyboard.KeyboardButtons.D3, KeyCode.DIGIT3); + keys.put(Keyboard.KeyboardButtons.D4, KeyCode.DIGIT4); + keys.put(Keyboard.KeyboardButtons.D5, KeyCode.DIGIT5); + keys.put(Keyboard.KeyboardButtons.D6, KeyCode.DIGIT6); + keys.put(Keyboard.KeyboardButtons.D7, KeyCode.DIGIT7); + keys.put(Keyboard.KeyboardButtons.D8, KeyCode.DIGIT8); + keys.put(Keyboard.KeyboardButtons.D9, KeyCode.DIGIT9); + keys.put(Keyboard.KeyboardButtons.D0, KeyCode.DIGIT0); + keys.put(Keyboard.KeyboardButtons.MINUS, KeyCode.MINUS); + keys.put(Keyboard.KeyboardButtons.EQUALS, KeyCode.EQUALS); + keys.put(Keyboard.KeyboardButtons.BACK_SLASH, KeyCode.BACK_SLASH); + keys.put(Keyboard.KeyboardButtons.BACK_SPACE, KeyCode.BACK_SPACE); + keys.put(Keyboard.KeyboardButtons.INSERT, KeyCode.INSERT); + keys.put(Keyboard.KeyboardButtons.HOME, KeyCode.HOME); + keys.put(Keyboard.KeyboardButtons.PAGE_UP, KeyCode.PAGE_UP); + keys.put(Keyboard.KeyboardButtons.NUM_LOCK, KeyCode.NUM_LOCK); + keys.put(Keyboard.KeyboardButtons.DIVIDE, KeyCode.DIVIDE); + keys.put(Keyboard.KeyboardButtons.MULTIPLY, KeyCode.MULTIPLY); + keys.put(Keyboard.KeyboardButtons.SUBTRACT, KeyCode.SUBTRACT); + keys.put(Keyboard.KeyboardButtons.TAB, KeyCode.TAB); + keys.put(Keyboard.KeyboardButtons.Q, KeyCode.Q); + keys.put(Keyboard.KeyboardButtons.W, KeyCode.W); + keys.put(Keyboard.KeyboardButtons.E, KeyCode.E); + keys.put(Keyboard.KeyboardButtons.R, KeyCode.R); + keys.put(Keyboard.KeyboardButtons.T, KeyCode.T); + keys.put(Keyboard.KeyboardButtons.Y, KeyCode.Y); + keys.put(Keyboard.KeyboardButtons.U, KeyCode.U); + keys.put(Keyboard.KeyboardButtons.I, KeyCode.I); + keys.put(Keyboard.KeyboardButtons.O, KeyCode.O); + keys.put(Keyboard.KeyboardButtons.P, KeyCode.P); + keys.put(Keyboard.KeyboardButtons.OPEN_BRACKET, KeyCode.OPEN_BRACKET); + keys.put(Keyboard.KeyboardButtons.CLOSE_BRACKET, KeyCode.CLOSE_BRACKET); + keys.put(Keyboard.KeyboardButtons.DELETE, KeyCode.DELETE); + keys.put(Keyboard.KeyboardButtons.END, KeyCode.END); + keys.put(Keyboard.KeyboardButtons.PAGE_DOWN, KeyCode.PAGE_DOWN); + keys.put(Keyboard.KeyboardButtons.NUMPAD7, KeyCode.NUMPAD7); + keys.put(Keyboard.KeyboardButtons.NUMPAD8, KeyCode.NUMPAD8); + keys.put(Keyboard.KeyboardButtons.NUMPAD9, KeyCode.NUMPAD9); + keys.put(Keyboard.KeyboardButtons.ADD, KeyCode.ADD); + keys.put(Keyboard.KeyboardButtons.A, KeyCode.A); + keys.put(Keyboard.KeyboardButtons.S, KeyCode.S); + keys.put(Keyboard.KeyboardButtons.D, KeyCode.D); + keys.put(Keyboard.KeyboardButtons.F, KeyCode.F); + keys.put(Keyboard.KeyboardButtons.G, KeyCode.G); + keys.put(Keyboard.KeyboardButtons.H, KeyCode.H); + keys.put(Keyboard.KeyboardButtons.J, KeyCode.J); + keys.put(Keyboard.KeyboardButtons.K, KeyCode.K); + keys.put(Keyboard.KeyboardButtons.L, KeyCode.L); + keys.put(Keyboard.KeyboardButtons.SEMICOLON, KeyCode.SEMICOLON); + keys.put(Keyboard.KeyboardButtons.QUOTE, KeyCode.QUOTE); + keys.put(Keyboard.KeyboardButtons.ENTER, KeyCode.ENTER); + keys.put(Keyboard.KeyboardButtons.NUMPAD4, KeyCode.NUMPAD4); + keys.put(Keyboard.KeyboardButtons.NUMPAD5, KeyCode.NUMPAD5); + keys.put(Keyboard.KeyboardButtons.NUMPAD6, KeyCode.NUMPAD6); + keys.put(Keyboard.KeyboardButtons.Z, KeyCode.Z); + keys.put(Keyboard.KeyboardButtons.X, KeyCode.X); + keys.put(Keyboard.KeyboardButtons.C, KeyCode.C); + keys.put(Keyboard.KeyboardButtons.V, KeyCode.V); + keys.put(Keyboard.KeyboardButtons.B, KeyCode.B); + keys.put(Keyboard.KeyboardButtons.N, KeyCode.N); + keys.put(Keyboard.KeyboardButtons.M, KeyCode.M); + keys.put(Keyboard.KeyboardButtons.COMMA, KeyCode.COMMA); + keys.put(Keyboard.KeyboardButtons.PERIOD, KeyCode.PERIOD); + keys.put(Keyboard.KeyboardButtons.SLASH, KeyCode.SLASH); + keys.put(Keyboard.KeyboardButtons.UP, KeyCode.UP); + keys.put(Keyboard.KeyboardButtons.NUMPAD1, KeyCode.NUMPAD1); + keys.put(Keyboard.KeyboardButtons.NUMPAD2, KeyCode.NUMPAD2); + keys.put(Keyboard.KeyboardButtons.NUMPAD3, KeyCode.NUMPAD3); + keys.put(Keyboard.KeyboardButtons.SPACE, KeyCode.SPACE); + keys.put(Keyboard.KeyboardButtons.LEFT, KeyCode.LEFT); + keys.put(Keyboard.KeyboardButtons.DOWN, KeyCode.DOWN); + keys.put(Keyboard.KeyboardButtons.RIGHT, KeyCode.RIGHT); + keys.put(Keyboard.KeyboardButtons.NUMPAD0, KeyCode.NUMPAD0); + keys.put(Keyboard.KeyboardButtons.DECIMAL, KeyCode.DECIMAL); + keys.put(Keyboard.KeyboardButtons.ALT, KeyCode.ALT); + keys.put(Keyboard.KeyboardButtons.CONTROL, KeyCode.CONTROL); + keys.put(Keyboard.KeyboardButtons.META, KeyCode.COMMAND); + keys.put(Keyboard.KeyboardButtons.SHIFT, KeyCode.SHIFT); //modifiers - modifiers.put(Keyboard.KeyboardModifiers.ALT_DOWN_MASK, KeyEvent.VK_ALT); - modifiers.put(Keyboard.KeyboardModifiers.CTRL_DOWN_MASK, KeyEvent.VK_CONTROL); - modifiers.put(Keyboard.KeyboardModifiers.META_DOWN_MASK, KeyEvent.VK_COMMAND); - modifiers.put(Keyboard.KeyboardModifiers.SHIFT_DOWN_MASK, KeyEvent.VK_SHIFT); + modifiers.put(Keyboard.KeyboardModifiers.ALT_DOWN_MASK, KeyCode.ALT); + modifiers.put(Keyboard.KeyboardModifiers.CTRL_DOWN_MASK, KeyCode.CONTROL); + modifiers.put(Keyboard.KeyboardModifiers.META_DOWN_MASK, KeyCode.COMMAND); + modifiers.put(Keyboard.KeyboardModifiers.SHIFT_DOWN_MASK, KeyCode.SHIFT); //buttons - buttons.put(Mouse.MouseButtons.BUTTON1, Robot.MOUSE_LEFT_BTN); - buttons.put(Mouse.MouseButtons.BUTTON2, Robot.MOUSE_MIDDLE_BTN); - buttons.put(Mouse.MouseButtons.BUTTON3, Robot.MOUSE_RIGHT_BTN); + buttons.put(Mouse.MouseButtons.BUTTON1, MouseButton.PRIMARY); + buttons.put(Mouse.MouseButtons.BUTTON2, MouseButton.SECONDARY); + buttons.put(Mouse.MouseButtons.BUTTON3, MouseButton.MIDDLE); } @Override - public int key(KeyboardButton button) { + public KeyCode key(KeyboardButton button) { return keys.get(button); } @Override - public int mouseButton(Mouse.MouseButton button) { + public MouseButton mouseButton(Mouse.MouseButton button) { return buttons.get(button); } @Override - public int modifier(Modifier button) { + public KeyCode modifier(Modifier button) { return modifiers.get(button); } } diff --git a/tools/Jemmy/GlassRobot/src/org/jemmy/input/glass/GlassInputFactory.java b/tools/Jemmy/GlassRobot/src/org/jemmy/input/glass/GlassInputFactory.java index 1b65b213..f411c304 100644 --- a/tools/Jemmy/GlassRobot/src/org/jemmy/input/glass/GlassInputFactory.java +++ b/tools/Jemmy/GlassRobot/src/org/jemmy/input/glass/GlassInputFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,8 +24,8 @@ */ package org.jemmy.input.glass; -import com.sun.glass.ui.Application; -import com.sun.glass.ui.Robot; +import javafx.application.Platform; +import javafx.scene.robot.Robot; import org.jemmy.action.Action; import org.jemmy.action.GetAction; import org.jemmy.control.Wrap; @@ -36,28 +36,32 @@ import org.jemmy.interfaces.*; import org.jemmy.timing.State; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.TimeUnit; + public class GlassInputFactory implements ControlInterfaceFactory { - public static final Timeout MCLICK = new Timeout("mouse.click", 30); + public static final Timeout ROBOT_OPERATION = new Timeout("robot.operation", 1000); public static final Timeout WAIT_FACTORY = new Timeout("wait.glass.robot", 10000); - private static Robot robot = null; + private static volatile Robot robot = null; private static Environment env = null; public static final String ROBOT_MOUSE_SMOOTHNESS_PROPERTY = "glass.robot.mouse.smoothness"; public static final String ROBOT_MOUSE_STEP_DELAY_PROPERTY = "glass.robot.mouse.step_delay"; static { - Environment.getEnvironment().initTimeout(Keyboard.PUSH); - Environment.getEnvironment().initTimeout(Mouse.CLICK); - Environment.getEnvironment().initTimeout(MCLICK); - Environment.getEnvironment().initTimeout(WAIT_FACTORY); - Environment.getEnvironment().setBindingMap(new DefaultCharBindingMap()); - Environment.getEnvironment().setPropertyIfNotSet( + Environment env = Environment.getEnvironment(); + env.initTimeout(Keyboard.PUSH); + env.initTimeout(Mouse.CLICK); + env.initTimeout(WAIT_FACTORY); + env.initTimeout(ROBOT_OPERATION); + env.setBindingMap(new DefaultCharBindingMap()); + env.setPropertyIfNotSet( GlassInputFactory.ROBOT_MOUSE_SMOOTHNESS_PROPERTY, - new Integer(Integer.MAX_VALUE).toString()); - Environment.getEnvironment().setPropertyIfNotSet( + Integer.toString(Integer.MAX_VALUE).toString()); + env.setPropertyIfNotSet( GlassInputFactory.ROBOT_MOUSE_STEP_DELAY_PROPERTY, - new Integer(10).toString()); + Integer.toString(10)); } GlassInputMap map; @@ -92,7 +96,7 @@ public Robot reached() { return new GetAction<Robot>() { @Override public void run(Object... os) throws Exception { - setResult(Application.GetApplication().createRobot()); + setResult(new Robot()); } }.dispatch(env); } catch (Exception e) { @@ -132,6 +136,15 @@ public static int getMouseSmoothness() { return GlassMouse.getMouseSmoothness(); } + public static void invokeAndWait(Environment env, Runnable r) throws InterruptedException { + var latch = new CountDownLatch(1); + Platform.runLater(() -> { + r.run(); + latch.countDown(); + }); + latch.await(env.getTimeout(ROBOT_OPERATION).getValue(), TimeUnit.MILLISECONDS); + } + @SuppressWarnings("unchecked") @Override public <INTERFACE extends ControlInterface> INTERFACE create(Wrap<?> control, Class<INTERFACE> interfaceClass) { @@ -152,15 +165,15 @@ public <TYPE, INTERFACE extends TypeControlInterface<TYPE>> INTERFACE create(Wra return null; } - void pressModifier(Button button) { - getRobot().keyPress(map.modifier((KeyboardModifier) button)); + void pressModifier(Button button, Environment env) throws InterruptedException { + invokeAndWait(env, () -> getRobot().keyPress(map.modifier((KeyboardModifier) button))); } - void releaseModifier(Button button) { - getRobot().keyRelease(map.modifier((KeyboardModifier) button)); + void releaseModifier(Button button, Environment env) throws InterruptedException { + invokeAndWait(env, () -> getRobot().keyRelease(map.modifier((KeyboardModifier) button))); } - void runAction(Wrap<?> control, Action action, boolean detached) { + void dispatchAction(Wrap<?> control, Action action, boolean detached) { if (detached) { control.getEnvironment().getExecutor().executeDetached(control.getEnvironment(), true, action); } else { @@ -168,6 +181,14 @@ void runAction(Wrap<?> control, Action action, boolean detached) { } } + void runAction(Wrap<?> control, Action action, boolean detached) { + if (detached) { + control.getEnvironment().getExecutor().executeDetached(control.getEnvironment(), false, action); + } else { + control.getEnvironment().getExecutor().execute(control.getEnvironment(), false, action); + } + } + String getModifiersString(Modifier... modifiers) { StringBuilder res = new StringBuilder(); for (Modifier m : modifiers) { @@ -178,4 +199,5 @@ String getModifiersString(Modifier... modifiers) { } return res.toString(); } + } diff --git a/tools/Jemmy/GlassRobot/src/org/jemmy/input/glass/GlassInputMap.java b/tools/Jemmy/GlassRobot/src/org/jemmy/input/glass/GlassInputMap.java index 4b088458..e900beec 100644 --- a/tools/Jemmy/GlassRobot/src/org/jemmy/input/glass/GlassInputMap.java +++ b/tools/Jemmy/GlassRobot/src/org/jemmy/input/glass/GlassInputMap.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,6 +24,8 @@ */ package org.jemmy.input.glass; +import javafx.scene.input.KeyCode; +import javafx.scene.input.MouseButton; import org.jemmy.interfaces.Keyboard; import org.jemmy.interfaces.Modifier; import org.jemmy.interfaces.Mouse; @@ -33,7 +35,7 @@ * @author shura */ public interface GlassInputMap { - public int key(Keyboard.KeyboardButton button); - public int mouseButton(Mouse.MouseButton button); - public int modifier(Modifier button); + public KeyCode key(Keyboard.KeyboardButton button); + public MouseButton mouseButton(Mouse.MouseButton button); + public KeyCode modifier(Modifier button); } diff --git a/tools/Jemmy/GlassRobot/src/org/jemmy/input/glass/GlassKeyboard.java b/tools/Jemmy/GlassRobot/src/org/jemmy/input/glass/GlassKeyboard.java index 9674dcdc..406a3abc 100644 --- a/tools/Jemmy/GlassRobot/src/org/jemmy/input/glass/GlassKeyboard.java +++ b/tools/Jemmy/GlassRobot/src/org/jemmy/input/glass/GlassKeyboard.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -31,6 +31,9 @@ import org.jemmy.interfaces.Keyboard; import org.jemmy.interfaces.Modifier; +import static org.jemmy.input.glass.GlassInputFactory.invokeAndWait; +import static org.jemmy.input.glass.GlassInputFactory.getRobot; + /** * * @author shura @@ -59,11 +62,12 @@ private void doPressKey(final KeyboardButton key, final Modifier... modifiers) { factory.runAction(control, new Action() { @Override - public void run(Object... parameters) { + public void run(Object... parameters) throws InterruptedException { for (Modifier m : modifiers) { - factory.pressModifier(m); + factory.pressModifier(m, control.getEnvironment()); } - GlassInputFactory.getRobot().keyPress(factory.map.key(key)); + invokeAndWait(control.getEnvironment(), + () -> getRobot().keyPress(factory.map.key(key))); } @Override @@ -87,10 +91,11 @@ private void doReleaseKey(final KeyboardButton key, final Modifier... modifiers) factory.runAction(control, new Action() { @Override - public void run(Object... parameters) { - GlassInputFactory.getRobot().keyRelease(factory.map.key(key)); + public void run(Object... parameters) throws InterruptedException { + invokeAndWait(control.getEnvironment(), + () -> getRobot().keyRelease(factory.map.key(key))); for (Modifier m : modifiers) { - factory.releaseModifier(m); + factory.releaseModifier(m, control.getEnvironment()); } } @@ -108,15 +113,17 @@ private void doPushKey(final Timeout pushTime, final KeyboardButton key, final M factory.runAction(control, new Action() { @Override - public void run(Object... parameters) { + public void run(Object... parameters) throws InterruptedException { for (Modifier m : modifiers) { - factory.pressModifier(m); + factory.pressModifier(m, control.getEnvironment()); } - GlassInputFactory.getRobot().keyPress(factory.map.key(key)); + invokeAndWait(control.getEnvironment(), + () -> getRobot().keyPress(factory.map.key(key))); pushTime.sleep(); - GlassInputFactory.getRobot().keyRelease(factory.map.key(key)); + invokeAndWait(control.getEnvironment(), + () -> getRobot().keyRelease(factory.map.key(key))); for (Modifier m : modifiers) { - factory.releaseModifier(m); + factory.releaseModifier(m, control.getEnvironment()); } } diff --git a/tools/Jemmy/GlassRobot/src/org/jemmy/input/glass/GlassMouse.java b/tools/Jemmy/GlassRobot/src/org/jemmy/input/glass/GlassMouse.java index dc6c9cc5..778b98fc 100644 --- a/tools/Jemmy/GlassRobot/src/org/jemmy/input/glass/GlassMouse.java +++ b/tools/Jemmy/GlassRobot/src/org/jemmy/input/glass/GlassMouse.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -33,6 +33,9 @@ import org.jemmy.interfaces.Mouse; import org.jemmy.interfaces.Showable; +import static org.jemmy.input.glass.GlassInputFactory.invokeAndWait; +import static org.jemmy.input.glass.GlassInputFactory.getRobot; + /** * * @author shura @@ -74,11 +77,12 @@ private void doPress(final MouseButton button, final Modifier... modifiers) { factory.runAction(control, new Action() { @Override - public void run(Object... parameters) { + public void run(Object... parameters) throws InterruptedException { for (Modifier m : modifiers) { - factory.pressModifier(m); + factory.pressModifier(m, control.getEnvironment()); } - GlassInputFactory.getRobot().mousePress(factory.map.mouseButton(button)); + invokeAndWait(control.getEnvironment(), + () -> getRobot().mousePress(factory.map.mouseButton(button))); } @Override @@ -107,10 +111,11 @@ private void doRelease(final MouseButton button, final Modifier... modifiers) { factory.runAction(control, new Action() { @Override - public void run(Object... parameters) { - GlassInputFactory.getRobot().mouseRelease(factory.map.mouseButton(button)); + public void run(Object... parameters) throws InterruptedException { + invokeAndWait(control.getEnvironment(), + () -> getRobot().mouseRelease(factory.map.mouseButton(button))); for (Modifier m : modifiers) { - factory.releaseModifier(m); + factory.releaseModifier(m, control.getEnvironment()); } } @@ -140,7 +145,7 @@ private void doMove(final Point p) { factory.runAction(control, new Action() { @Override - public void run(Object... parameters) { + public void run(Object... parameters) throws InterruptedException { double targetX = control.getScreenBounds().x + p.x; double targetY = control.getScreenBounds().y + p.y; if (haveOldPos && (oldX != targetX || oldY != targetY)) { @@ -157,13 +162,15 @@ public void run(Object... parameters) { || Math.round(currY) != Math.round(targetY)) { currX += vx; currY += vy; - GlassInputFactory.getRobot().mouseMove((int) currX, (int) currY); + double[] coord = {currX, currY}; + invokeAndWait(control.getEnvironment(), + () -> getRobot().mouseMove((int) coord[0], (int) coord[1])); new Timeout(GlassInputFactory.ROBOT_MOUSE_STEP_DELAY_PROPERTY, delay).sleep(); } } - GlassInputFactory.getRobot().mouseMove((int)targetX, (int)targetY); -// new Timeout(GlassInputFactory.ROBOT_MOUSE_STEP_DELAY_PROPERTY, delay).sleep(); + invokeAndWait(control.getEnvironment(), + () -> getRobot().mouseMove((int)targetX, (int)targetY)); haveOldPos = true; oldX = targetX; oldY = targetY; @@ -213,18 +220,20 @@ private void doClick(final int count, final Point p, final MouseButton button, f factory.runAction(control, new Action() { @Override - public void run(Object... parameters) { + public void run(Object... parameters) throws InterruptedException { for (Modifier m : modifiers) { - factory.pressModifier(m); + factory.pressModifier(m, control.getEnvironment()); } move((p != null) ? p : control.getClickPoint()); for (int i = 1; i <= count; i++) { - GlassInputFactory.getRobot().mousePress(factory.map.mouseButton(button)); + invokeAndWait(control.getEnvironment(), () -> + getRobot().mousePress(factory.map.mouseButton(button))); control.getEnvironment().getTimeout(Mouse.CLICK).sleep(); - GlassInputFactory.getRobot().mouseRelease(factory.map.mouseButton(button)); + invokeAndWait(control.getEnvironment(), () -> + getRobot().mouseRelease(factory.map.mouseButton(button))); } for (Modifier m : modifiers) { - factory.releaseModifier(m); + factory.releaseModifier(m, control.getEnvironment()); } } @@ -266,12 +275,13 @@ public void run(Object... os) throws Exception { control.as(Showable.class).shower().show(); } for (Modifier m : modifiers) { - factory.pressModifier(m); + factory.pressModifier(m, control.getEnvironment()); } move((p != null) ? p : control.getClickPoint()); - GlassInputFactory.getRobot().mouseWheel(amount); + invokeAndWait(control.getEnvironment(), + () ->getRobot().mouseWheel(amount)); for (Modifier m : modifiers) { - factory.releaseModifier(m); + factory.releaseModifier(m, control.getEnvironment()); } } }, detached); diff --git a/tools/Jemmy/GlassRobot/test/TEST.ROOT b/tools/Jemmy/GlassRobot/test/TEST.ROOT new file mode 100644 index 00000000..0d841c11 --- /dev/null +++ b/tools/Jemmy/GlassRobot/test/TEST.ROOT @@ -0,0 +1,2 @@ +TestNG.dirs = . + diff --git a/tools/Jemmy/GlassRobot/test/org/jemmy/input/glass/KeyboardTest.java b/tools/Jemmy/GlassRobot/test/org/jemmy/input/glass/KeyboardTest.java index ddd62737..706cbf07 100644 --- a/tools/Jemmy/GlassRobot/test/org/jemmy/input/glass/KeyboardTest.java +++ b/tools/Jemmy/GlassRobot/test/org/jemmy/input/glass/KeyboardTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -88,7 +88,7 @@ public void push() { @Test public void type() { - txt.asSelectionText().type("New text."); + txt.asSelectionText(). type("New text."); log.checkEvent(PUSHED, KeyboardInputApp.SHIFT, "N"); log.checkEvent(TYPED, "e"); log.checkLines(16); diff --git a/tools/Jemmy/GlassRobot/test/org/jemmy/input/glass/MouseTest.java b/tools/Jemmy/GlassRobot/test/org/jemmy/input/glass/MouseTest.java index 539dc969..d8072726 100644 --- a/tools/Jemmy/GlassRobot/test/org/jemmy/input/glass/MouseTest.java +++ b/tools/Jemmy/GlassRobot/test/org/jemmy/input/glass/MouseTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -132,8 +132,8 @@ public void dnd2() { } @Test public void wheel() throws InterruptedException { - txt.mouse().turnWheel(-5); - log.checkEvent(MouseInputApp.SCROLL, coords(0, 200)); + txt.mouse().turnWheel(5); + log.checkEvent(MouseInputApp.SCROLL, coords(0, 5)); txt.mouse().turnWheel(new Point(10, 10), 5); String coords = coords(10, 10); log.checkEvent(MouseInputApp.MOVED, coords, NONE, "0"); diff --git a/tools/Jemmy/JemmyFX/build.xml b/tools/Jemmy/JemmyFX/build.xml index af518cab..3e982665 100644 --- a/tools/Jemmy/JemmyFX/build.xml +++ b/tools/Jemmy/JemmyFX/build.xml @@ -1,152 +1,89 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- -Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. -DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - -This code is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License version 2 only, as -published by the Free Software Foundation. Oracle designates this -particular file as subject to the "Classpath" exception as provided -by Oracle in the LICENSE file that accompanied this code. - -This code 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 General Public License -version 2 for more details (a copy is included in the LICENSE file that -accompanied this code). - -You should have received a copy of the GNU General Public License version -2 along with this work; if not, write to the Free Software Foundation, -Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - -Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -or visit www.oracle.com if you need additional information or have any -questions. ---> -<project name="JemmyFX" default="default" basedir="."> - <description>Builds, tests, and runs the project JemmyJC.</description> - <import file="nbproject/build-impl.xml"/> - - <property name="jemmy.lib.dir" location="../jemmy_core"/> - <property name="test.includes" value="**/*Sample.java"/> - <property name="javac.includes" value="${test.includes}"/> - <property name="docks.dir" location="docks"/> - <target name="jar-full" depends="jar"> - <property name="jar.name" location="${basedir}/dist/JemmyJCFull.jar"/> - <jar destfile="${jar.name}" filesetmanifest="merge"> - <zipgroupfileset file="${reference.JemmyCore.jar}"/> - <zipgroupfileset file="${reference.JemmyAWTInput.jar}"/> - <zipgroupfileset file="${reference.GlassImage.jar}"/> - <zipgroupfileset file="${reference.GlassRobot.jar}"/> - <zipgroupfileset file="${dist.jar}"/> - </jar> +<project name="jemmyfx" default="compile"> + <basename file="${basedir}" property="."/> + <property name="rootdir" location="${basedir}/../../.."/> + <property name="project.name" value="GlassImage"/> + <import file="${rootdir}/tools/make/build-template.xml"/> + <property name="dependencies.classpath" value="${glass-robot-src}/build/classes${path.separator}${glass-image-src}/build/classes"/> + <property name="gen.src.dir" location="${build.dir}/gen"/> + <property name="src.samples.dir" location="${basedir}/samples"/> + <property name="build.samples.dir" location="${build.dir}/samples"/> + <property name="test.dependencies.classpath" value="${jemmyfx-browser-src}/build/classes${path.separator}${build.samples.dir}"/> + <property name="sample.list" location="${build.dir}/sample.list"/> + <property environment="env"/> + <target name="build-dependencies"> + <antcall target="build-other-project"> + <param name="project" value="${glass-image-src}"/> + </antcall> + <antcall target="build-other-project"> + <param name="project" value="${glass-robot-src}"/> + </antcall> </target> - <target name="yes-profile" if="jemmy.fx.profile"> - <property file="${jemmy.fx.profile}"/> - </target> - <target name="no-profile" unless="jemmy.fx.profile"> - <property name="profile.includes" value="**"/> - <property name="profile.excludes" value=""/> - </target> - <target name="read-profile" depends="no-profile,yes-profile"/> - <target name="disable-libs"> - <property name="no.need.to.find.java.fx" value="yes"/> - <property name="no.need.to.copy.jemmy.libs" value="yes"/> - </target> - <target name="-post-clean"> - <delete dir="${docks.dir}" failonerror="false"/> - <delete dir="${basedir}/target"/> - </target> - <target name="-pre-init" unless="no.need.to.find.java.fx"> - <ant antfile="../../../detect_javafx-nb.xml" inheritall="true"> - <property name="basedir" location="${basedir}/../../.."/> - <property name="property.file" value="${basedir}/nbproject/private/private.properties"/> - </ant> - </target> - <target name="-post-init"> - <ant antfile="build.xml" target="get-jemmy-core" inheritall="false" inheritrefs="false" dir=".."/> - </target> - <target name="-pre-compile"> - <delete file="${basedir}/build/classes/org/jemmy/fx/jemmy.properties" failonerror="false"/> - <mkdir dir="${docks.dir}"/> - </target> - <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend, read-profile" if="have.sources" name="-do-compile"> - <echo message="Compiling ${profile.includes} but not ${profile.excludes}"/> - <mkdir dir="${src.docks.dir}"/> - <condition property="__addExports1" value="" else="--add-exports javafx.graphics/com.sun.javafx.tk=ALL-UNNAMED --add-exports javafx.controls/com.sun.javafx.scene.control.skin=ALL-UNNAMED"> - <isset property="noAddExports" /> - </condition> - <javac sourcepath="" srcdir="${src.dir}" destdir="${build.classes.dir}" classpath="${javac.classpath}" includes="${profile.includes}" excludes="${profile.excludes}"> + <target name="compile" depends="init,build-dependencies"> + <mkdir dir="${build.classes.dir}"/> + <mkdir dir="${gen.src.dir}"/> + <javac destdir="${build.classes.dir}" debug="on" includeantruntime="false"> + <classpath> + <path refid="jemmyfx.classpath"/> + <pathelement path="${dependencies.classpath}"/> + </classpath> + <src> + <pathelement path="${src.dir}"/> + </src> <compilerarg value="-processor"/> - <compilerarg value="org.jemmy.support.Proccessor"/> + <compilerarg value="org.jemmy.support.Processor"/> <compilerarg value="-Aactions=docks,dump"/> <compilerarg value="-s"/> - <compilerarg value="${basedir}/${src.docks.dir}"/> - <compilerarg line="${__addExports1}"/> + <compilerarg value="${gen.src.dir}"/> </javac> - <copy todir="${build.classes.dir}"> - <fileset dir="${src.docks.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> - <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> - </copy> - </target> - <target name="-post-compile"> - <javac srcdir="${docks.dir}" destdir="${build.classes.dir}" classpath="${javac.classpath}"/> - <echo message="Copying prop file"/> - <copy file="src/org/jemmy/fx/jemmy.properties" tofile="${basedir}/build/classes/org/jemmy/fx/jemmy.properties"/> - <tstamp/> - <echo message="build=${DSTAMP}${TSTAMP}" file="${basedir}/build/classes/org/jemmy/fx/jemmy.properties" append="true"/> + <javac srcdir="${gen.src.dir}" destdir="${build.classes.dir}" debug="on" includeantruntime="false"> + <classpath> + <path refid="jemmyfx.classpath"/> + <pathelement location="${build.classes.dir}"/> + <pathelement path="${dependencies.classpath}"/> + </classpath> + </javac> + <copy file="${gen.src.dir}/support.xml" todir="${build.classes.dir}"/> </target> - <target depends="test-single" name="test"/> - <target name="warn-no-core-sources" unless="jemmy.core.source"> - <echo> -No Jemmy core sources! -Sources are available from jemmy.java.net. -Specify the location by jemmy.core.source variable. - </echo> + <target name="build-test-dependencies" depends="compile"> + <mkdir dir="${build.samples.dir}"/> + <javac destdir="${build.samples.dir}" debug="on" includeantruntime="false"> + <classpath> + <path refid="jemmyfx.classpath"/> + <pathelement path="${dependencies.classpath}"/> + <pathelement location="${build.classes.dir}"/> + <pathelement location="${jtreg.home}/lib/junit.jar"/> + </classpath> + <src> + <pathelement path="${src.samples.dir}"/> + </src> + </javac> + <antcall target="build-other-project"> + <param name="project" value="${jemmyfx-browser-src}"/> + </antcall> </target> - <target name="inform-core-sources" if="jemmy.core.source"> - <echo> -Taking JemmyCore sources from ${jemmy.core.source}/core/JemmyCore. - </echo> + <target name="find-samples" unless="samples"> + <fileset id="sampleset" dir="${src.samples.dir}"> + <include name="**/*Sample.java" /> + </fileset> + <pathconvert pathsep="${line.separator}" property="samplelist" refid="sampleset"> + <globmapper from="${src.samples.dir}/*" to="*"/> + </pathconvert> + <echo file="${sample.list}">${samplelist}</echo> + <property name="samples" value="@${sample.list}"/> </target> - <target name="maven" depends="jar"> - <ant antfile="build.xml" dir="${project.GlassRobot}" target="maven"/> - <property file="${project.GlassRobot}/src/org/jemmy/input/glass/jemmy.properties" prefix="robot"/> - <ant antfile="build.xml" dir="${project.GlassImage}" target="maven"/> - <property file="${project.GlassImage}/src/org/jemmy/image/jemmy.properties" prefix="image"/> - <property file="${basedir}/src/org/jemmy/fx/jemmy.properties" prefix="fx"/> - <copy file="pom-tmpl.xml" tofile="pom.xml" overwrite="true"> - <filterchain> - <replacetokens> - <token key="GlassRobot.version" value="${robot.javafx.version}.${robot.version.minor}.${robot.version.mini}"/> - <token key="GlassImage.version" value="${image.javafx.version}.${image.version.minor}.${image.version.mini}"/> - <token key="JemmyFX.version" value="${fx.javafx.version}.${fx.version.minor}.${fx.version.mini}"/> - </replacetokens> - </filterchain> - </copy> - <exec command="mvn"> - <arg value="-e"/> - <arg value="install"/> + <target name="samples" depends="build-test-dependencies,compile-test,find-samples"> + <property name="jemmyfx.classpath.prop" refid="jemmyfx.classpath"/> + <exec executable="${env.SHELL}"> + <arg value="${jtreg.home}/bin/jtreg"/> + <arg value="-cpa:${build.classes.dir}${path.separator}${dependencies.classpath}${path.separator}${test.dependencies.classpath}${path.separator}${jemmyfx.classpath.prop}${path.separator}${jtreg.home}/lib/junit.jar"/> + <arg value="-w:${test.workdir}"/> + <arg value="-r:${test.report}"/> + <arg value="-conc:1"/> + <arg value="-ovm"/> + <arg value="-v:default"/> + <arg value="-dir:samples"/> + <arg value="${samples}"/> </exec> </target> - <target name="javadoc" depends="init, compile, -post-compile, warn-no-core-sources, inform-core-sources"> - <echo message="${jemmy.core.source}"/> - <path id="javadoc.source.path.ref"> - <pathelement path="${src.dir}"/> - <pathelement path="${docks.dir}"/> - <pathelement path="${jemmy.core.source}/core/JemmyCore/src"/> - </path> - <property name="javadoc.src.path" refid="javadoc.source.path.ref"/> - <property name="javadoc.classpath" value="${javac.classpath}"/> - <javadoc charset="UTF-8" destdir="${dist.javadoc.dir}" access="public"> - <classpath> - <path path="${javadoc.classpath}"/> - </classpath> - <sourcepath> - <path path="${javadoc.src.path}"/> - </sourcepath> - </javadoc> - <copydir src="${test.samples.dir}" dest="${dist.javadoc.dir}"/> - <zip basedir="${dist.javadoc.dir}" file="${dist.dir}/JemmyFX.zip"/> - </target> </project> diff --git a/tools/Jemmy/JemmyFX/detect_javafx.xml b/tools/Jemmy/JemmyFX/detect_javafx.xml deleted file mode 100644 index 876e955b..00000000 --- a/tools/Jemmy/JemmyFX/detect_javafx.xml +++ /dev/null @@ -1,18 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project default="find-javafx"> - <property name="properties" value="${basedir}/nbproject/private/private.properties"/> - <target name="write-javafx-to-nb"> - <mkdir dir="${basedir}/nbproject/private" /> - <touch file="${properties}"/> - <propertyfile file="${properties}"> - <entry key="javafx.rt" value="${javafx.rt}"/> - </propertyfile> - </target> - <target name="detect-javafx-in-root" unless="javafx.detected"> - <ant antfile="../../../detect_javafx.xml" target="find-javafx" inheritall="true"/> - <property file="../../../build.properties"/> - </target> - <target name="find-javafx" depends="detect-javafx-in-root, write-javafx-to-nb"> - <echo message="Building with JavaFX from ${javafx.rt}"/> - </target> -</project> diff --git a/tools/Jemmy/JemmyFX/graphics.profile b/tools/Jemmy/JemmyFX/graphics.profile deleted file mode 100644 index 65128ffa..00000000 --- a/tools/Jemmy/JemmyFX/graphics.profile +++ /dev/null @@ -1,2 +0,0 @@ -profile.excludes=org/jemmy/fx/control/**,org/jemmy/fx/NodeWrapper.java -profile.includes=** diff --git a/tools/Jemmy/JemmyFX/nbproject/build-impl.xml b/tools/Jemmy/JemmyFX/nbproject/build-impl.xml deleted file mode 100644 index 4040fcb4..00000000 --- a/tools/Jemmy/JemmyFX/nbproject/build-impl.xml +++ /dev/null @@ -1,1471 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -*** GENERATED FROM project.xml - DO NOT EDIT *** -*** EDIT ../build.xml INSTEAD *** - -For the purpose of easier reading the script -is divided into following sections: - - - initialization - - compilation - - jar - - execution - - debugging - - javadoc - - test compilation - - test execution - - test debugging - - applet - - cleanup - - --> -<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="JemmyFX-impl"> - <fail message="Please build using Ant 1.8.0 or higher."> - <condition> - <not> - <antversion atleast="1.8.0"/> - </not> - </condition> - </fail> - <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/> - <!-- - ====================== - INITIALIZATION SECTION - ====================== - --> - <target name="-pre-init"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="-pre-init" name="-init-private"> - <property file="nbproject/private/config.properties"/> - <property file="nbproject/private/configs/${config}.properties"/> - <property file="nbproject/private/private.properties"/> - </target> - <target depends="-pre-init,-init-private" name="-init-user"> - <property file="${user.properties.file}"/> - <!-- The two properties below are usually overridden --> - <!-- by the active platform. Just a fallback. --> - <property name="default.javac.source" value="1.4"/> - <property name="default.javac.target" value="1.4"/> - </target> - <target depends="-pre-init,-init-private,-init-user" name="-init-project"> - <property file="nbproject/configs/${config}.properties"/> - <property file="nbproject/project.properties"/> - </target> - <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init"> - <property name="platform.java" value="${java.home}/bin/java"/> - <available file="${manifest.file}" property="manifest.available"/> - <condition property="splashscreen.available"> - <and> - <not> - <equals arg1="${application.splash}" arg2="" trim="true"/> - </not> - <available file="${application.splash}"/> - </and> - </condition> - <condition property="main.class.available"> - <and> - <isset property="main.class"/> - <not> - <equals arg1="${main.class}" arg2="" trim="true"/> - </not> - </and> - </condition> - <condition property="profile.available"> - <and> - <isset property="javac.profile"/> - <length length="0" string="${javac.profile}" when="greater"/> - <matches pattern="1\.[89](\..*)?" string="${javac.source}"/> - </and> - </condition> - <condition property="do.archive"> - <not> - <istrue value="${jar.archive.disabled}"/> - </not> - </condition> - <condition property="do.mkdist"> - <and> - <isset property="do.archive"/> - <isset property="libs.CopyLibs.classpath"/> - <not> - <istrue value="${mkdist.disabled}"/> - </not> - </and> - </condition> - <condition property="do.archive+manifest.available"> - <and> - <isset property="manifest.available"/> - <istrue value="${do.archive}"/> - </and> - </condition> - <condition property="do.archive+main.class.available"> - <and> - <isset property="main.class.available"/> - <istrue value="${do.archive}"/> - </and> - </condition> - <condition property="do.archive+splashscreen.available"> - <and> - <isset property="splashscreen.available"/> - <istrue value="${do.archive}"/> - </and> - </condition> - <condition property="do.archive+profile.available"> - <and> - <isset property="profile.available"/> - <istrue value="${do.archive}"/> - </and> - </condition> - <condition property="have.tests"> - <or> - <available file="${test.samples.dir}"/> - <available file="${test.src.dir}"/> - </or> - </condition> - <condition property="have.sources"> - <or> - <available file="${src.docks.dir}"/> - <available file="${src.dir}"/> - </or> - </condition> - <condition property="netbeans.home+have.tests"> - <and> - <isset property="netbeans.home"/> - <isset property="have.tests"/> - </and> - </condition> - <condition property="no.javadoc.preview"> - <and> - <isset property="javadoc.preview"/> - <isfalse value="${javadoc.preview}"/> - </and> - </condition> - <property name="run.jvmargs" value=""/> - <property name="run.jvmargs.ide" value=""/> - <property name="javac.compilerargs" value=""/> - <property name="work.dir" value="${basedir}"/> - <condition property="no.deps"> - <and> - <istrue value="${no.dependencies}"/> - </and> - </condition> - <property name="javac.debug" value="true"/> - <property name="javadoc.preview" value="true"/> - <property name="application.args" value=""/> - <property name="source.encoding" value="${file.encoding}"/> - <property name="runtime.encoding" value="${source.encoding}"/> - <condition property="javadoc.encoding.used" value="${javadoc.encoding}"> - <and> - <isset property="javadoc.encoding"/> - <not> - <equals arg1="${javadoc.encoding}" arg2=""/> - </not> - </and> - </condition> - <property name="javadoc.encoding.used" value="${source.encoding}"/> - <property name="includes" value="**"/> - <property name="excludes" value=""/> - <property name="do.depend" value="false"/> - <condition property="do.depend.true"> - <istrue value="${do.depend}"/> - </condition> - <path id="endorsed.classpath.path" path="${endorsed.classpath}"/> - <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'"> - <and> - <isset property="endorsed.classpath"/> - <not> - <equals arg1="${endorsed.classpath}" arg2="" trim="true"/> - </not> - </and> - </condition> - <condition else="" property="javac.profile.cmd.line.arg" value="-profile ${javac.profile}"> - <isset property="profile.available"/> - </condition> - <condition else="false" property="jdkBug6558476"> - <and> - <matches pattern="1\.[56]" string="${java.specification.version}"/> - <not> - <os family="unix"/> - </not> - </and> - </condition> - <property name="javac.fork" value="${jdkBug6558476}"/> - <property name="jar.index" value="false"/> - <property name="jar.index.metainf" value="${jar.index}"/> - <property name="copylibs.rebase" value="true"/> - <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/> - <condition property="junit.available"> - <or> - <available classname="org.junit.Test" classpath="${run.test.classpath}"/> - <available classname="junit.framework.Test" classpath="${run.test.classpath}"/> - </or> - </condition> - <condition property="testng.available"> - <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/> - </condition> - <condition property="junit+testng.available"> - <and> - <istrue value="${junit.available}"/> - <istrue value="${testng.available}"/> - </and> - </condition> - <condition else="testng" property="testng.mode" value="mixed"> - <istrue value="${junit+testng.available}"/> - </condition> - <condition else="" property="testng.debug.mode" value="-mixed"> - <istrue value="${junit+testng.available}"/> - </condition> - </target> - <target name="-post-init"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check"> - <fail unless="src.docks.dir">Must set src.docks.dir</fail> - <fail unless="src.dir">Must set src.dir</fail> - <fail unless="test.samples.dir">Must set test.samples.dir</fail> - <fail unless="test.src.dir">Must set test.src.dir</fail> - <fail unless="build.dir">Must set build.dir</fail> - <fail unless="dist.dir">Must set dist.dir</fail> - <fail unless="build.classes.dir">Must set build.classes.dir</fail> - <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail> - <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail> - <fail unless="build.test.results.dir">Must set build.test.results.dir</fail> - <fail unless="build.classes.excludes">Must set build.classes.excludes</fail> - <fail unless="dist.jar">Must set dist.jar</fail> - </target> - <target name="-init-macrodef-property"> - <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1"> - <attribute name="name"/> - <attribute name="value"/> - <sequential> - <property name="@{name}" value="${@{value}}"/> - </sequential> - </macrodef> - </target> - <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors"> - <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${src.docks.dir}:${src.dir}" name="srcdir"/> - <attribute default="${build.classes.dir}" name="destdir"/> - <attribute default="${javac.classpath}" name="classpath"/> - <attribute default="${javac.processorpath}" name="processorpath"/> - <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="${javac.debug}" name="debug"/> - <attribute default="${empty.dir}" name="sourcepath"/> - <attribute default="${empty.dir}" name="gensrcdir"/> - <element name="customize" optional="true"/> - <sequential> - <property location="${build.dir}/empty" name="empty.dir"/> - <mkdir dir="${empty.dir}"/> - <mkdir dir="@{apgeneratedsrcdir}"/> - <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}"> - <src> - <dirset dir="@{gensrcdir}" erroronmissingdir="false"> - <include name="*"/> - </dirset> - </src> - <classpath> - <path path="@{classpath}"/> - </classpath> - <compilerarg line="${endorsed.classpath.cmd.line.arg}"/> - <compilerarg line="${javac.profile.cmd.line.arg}"/> - <compilerarg line="${javac.compilerargs}"/> - <compilerarg value="-processorpath"/> - <compilerarg path="@{processorpath}:${empty.dir}"/> - <compilerarg line="${ap.processors.internal}"/> - <compilerarg line="${annotation.processing.processor.options}"/> - <compilerarg value="-s"/> - <compilerarg path="@{apgeneratedsrcdir}"/> - <compilerarg line="${ap.proc.none.internal}"/> - <customize/> - </javac> - </sequential> - </macrodef> - </target> - <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal"> - <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${src.docks.dir}:${src.dir}" name="srcdir"/> - <attribute default="${build.classes.dir}" name="destdir"/> - <attribute default="${javac.classpath}" name="classpath"/> - <attribute default="${javac.processorpath}" name="processorpath"/> - <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="${javac.debug}" name="debug"/> - <attribute default="${empty.dir}" name="sourcepath"/> - <attribute default="${empty.dir}" name="gensrcdir"/> - <element name="customize" optional="true"/> - <sequential> - <property location="${build.dir}/empty" name="empty.dir"/> - <mkdir dir="${empty.dir}"/> - <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}"> - <src> - <dirset dir="@{gensrcdir}" erroronmissingdir="false"> - <include name="*"/> - </dirset> - </src> - <classpath> - <path path="@{classpath}"/> - </classpath> - <compilerarg line="${endorsed.classpath.cmd.line.arg}"/> - <compilerarg line="${javac.profile.cmd.line.arg}"/> - <compilerarg line="${javac.compilerargs}"/> - <customize/> - </javac> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac"> - <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${src.docks.dir}:${src.dir}" name="srcdir"/> - <attribute default="${build.classes.dir}" name="destdir"/> - <attribute default="${javac.classpath}" name="classpath"/> - <sequential> - <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}"> - <classpath> - <path path="@{classpath}"/> - </classpath> - </depend> - </sequential> - </macrodef> - <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${build.classes.dir}" name="destdir"/> - <sequential> - <fail unless="javac.includes">Must set javac.includes</fail> - <pathconvert pathsep="${line.separator}" property="javac.includes.binary"> - <path> - <filelist dir="@{destdir}" files="${javac.includes}"/> - </path> - <globmapper from="*.java" to="*.class"/> - </pathconvert> - <tempfile deleteonexit="true" property="javac.includesfile.binary"/> - <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/> - <delete> - <files includesfile="${javac.includesfile.binary}"/> - </delete> - <delete> - <fileset file="${javac.includesfile.binary}"/> - </delete> - </sequential> - </macrodef> - </target> - <target if="${junit.available}" name="-init-macrodef-junit-init"> - <condition else="false" property="nb.junit.batch" value="true"> - <and> - <istrue value="${junit.available}"/> - <not> - <isset property="test.method"/> - </not> - </and> - </condition> - <condition else="false" property="nb.junit.single" value="true"> - <and> - <istrue value="${junit.available}"/> - <isset property="test.method"/> - </and> - </condition> - </target> - <target name="-init-test-properties"> - <property name="test.binaryincludes" value="<nothing>"/> - <property name="test.binarytestincludes" value=""/> - <property name="test.binaryexcludes" value=""/> - </target> - <target if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}"> - <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element name="customize" optional="true"/> - <sequential> - <property name="junit.forkmode" value="perTest"/> - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> - <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/> - <syspropertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <formatter type="brief" usefile="false"/> - <formatter type="xml"/> - <jvmarg value="-ea"/> - <customize/> - </junit> - </sequential> - </macrodef> - </target> - <target depends="-init-test-properties" if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}"> - <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element name="customize" optional="true"/> - <sequential> - <property name="junit.forkmode" value="perTest"/> - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> - <batchtest todir="${build.test.results.dir}"> - <fileset dir="${test.samples.dir}" excludes="@{excludes},${excludes}" includes="@{includes}"> - <filename name="@{testincludes}"/> - </fileset> - <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}"> - <filename name="@{testincludes}"/> - </fileset> - <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}"> - <filename name="${test.binarytestincludes}"/> - </fileset> - </batchtest> - <syspropertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <formatter type="brief" usefile="false"/> - <formatter type="xml"/> - <jvmarg value="-ea"/> - <customize/> - </junit> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/> - <target if="${testng.available}" name="-init-macrodef-testng"> - <macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element name="customize" optional="true"/> - <sequential> - <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}"> - <isset property="test.method"/> - </condition> - <union id="test.set"> - <fileset dir="${test.samples.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}"> - <filename name="@{testincludes}"/> - </fileset> - <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}"> - <filename name="@{testincludes}"/> - </fileset> - </union> - <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/> - <testng classfilesetref="test.set" failureProperty="tests.failed" listeners="org.testng.reporters.VerboseReporter" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="JemmyFX" testname="TestNG tests" workingDir="${work.dir}"> - <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/> - <propertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </propertyset> - <customize/> - </testng> - </sequential> - </macrodef> - </target> - <target name="-init-macrodef-test-impl"> - <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element implicit="true" name="customize" optional="true"/> - <sequential> - <echo>No tests executed.</echo> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl"> - <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element implicit="true" name="customize" optional="true"/> - <sequential> - <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> - <customize/> - </j2seproject3:junit> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl"> - <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element implicit="true" name="customize" optional="true"/> - <sequential> - <j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> - <customize/> - </j2seproject3:testng> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test"> - <macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <sequential> - <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> - <customize> - <classpath> - <path path="${run.test.classpath}"/> - </classpath> - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> - <jvmarg line="${run.jvmargs}"/> - <jvmarg line="${run.jvmargs.ide}"/> - </customize> - </j2seproject3:test-impl> - </sequential> - </macrodef> - </target> - <target if="${junit.available}" name="-init-macrodef-junit-debug" unless="${nb.junit.batch}"> - <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element name="customize" optional="true"/> - <sequential> - <property name="junit.forkmode" value="perTest"/> - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> - <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/> - <syspropertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <formatter type="brief" usefile="false"/> - <formatter type="xml"/> - <jvmarg value="-ea"/> - <jvmarg line="${debug-args-line}"/> - <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> - <customize/> - </junit> - </sequential> - </macrodef> - </target> - <target depends="-init-test-properties" if="${nb.junit.batch}" name="-init-macrodef-junit-debug-batch"> - <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element name="customize" optional="true"/> - <sequential> - <property name="junit.forkmode" value="perTest"/> - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> - <batchtest todir="${build.test.results.dir}"> - <fileset dir="${test.samples.dir}" excludes="@{excludes},${excludes}" includes="@{includes}"> - <filename name="@{testincludes}"/> - </fileset> - <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}"> - <filename name="@{testincludes}"/> - </fileset> - <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}"> - <filename name="${test.binarytestincludes}"/> - </fileset> - </batchtest> - <syspropertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <formatter type="brief" usefile="false"/> - <formatter type="xml"/> - <jvmarg value="-ea"/> - <jvmarg line="${debug-args-line}"/> - <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> - <customize/> - </junit> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-junit-debug,-init-macrodef-junit-debug-batch" if="${junit.available}" name="-init-macrodef-junit-debug-impl"> - <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element implicit="true" name="customize" optional="true"/> - <sequential> - <j2seproject3:junit-debug excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> - <customize/> - </j2seproject3:junit-debug> - </sequential> - </macrodef> - </target> - <target if="${testng.available}" name="-init-macrodef-testng-debug"> - <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${main.class}" name="testClass"/> - <attribute default="" name="testMethod"/> - <element name="customize2" optional="true"/> - <sequential> - <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}"> - <isset property="test.method"/> - </condition> - <condition else="-suitename JemmyFX -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}"> - <matches pattern=".*\.xml" string="@{testClass}"/> - </condition> - <delete dir="${build.test.results.dir}" quiet="true"/> - <mkdir dir="${build.test.results.dir}"/> - <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}"> - <customize> - <customize2/> - <jvmarg value="-ea"/> - <arg line="${testng.debug.mode}"/> - <arg line="-d ${build.test.results.dir}"/> - <arg line="-listener org.testng.reporters.VerboseReporter"/> - <arg line="${testng.cmd.args}"/> - </customize> - </j2seproject3:debug> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl"> - <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${main.class}" name="testClass"/> - <attribute default="" name="testMethod"/> - <element implicit="true" name="customize2" optional="true"/> - <sequential> - <j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}"> - <customize2/> - </j2seproject3:testng-debug> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit"> - <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <attribute default="${main.class}" name="testClass"/> - <attribute default="" name="testMethod"/> - <sequential> - <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> - <customize> - <classpath> - <path path="${run.test.classpath}"/> - </classpath> - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> - <jvmarg line="${run.jvmargs}"/> - <jvmarg line="${run.jvmargs.ide}"/> - </customize> - </j2seproject3:test-debug-impl> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng"> - <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <attribute default="${main.class}" name="testClass"/> - <attribute default="" name="testMethod"/> - <sequential> - <j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}"> - <customize2> - <syspropertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - </customize2> - </j2seproject3:testng-debug-impl> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/> - <!-- - pre NB7.2 profiling section; consider it deprecated - --> - <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/> - <target if="profiler.info.jvmargs.agent" name="-profile-pre-init"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target if="profiler.info.jvmargs.agent" name="-profile-post-init"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile"> - <macrodef name="resolve"> - <attribute name="name"/> - <attribute name="value"/> - <sequential> - <property name="@{name}" value="${env.@{value}}"/> - </sequential> - </macrodef> - <macrodef name="profile"> - <attribute default="${main.class}" name="classname"/> - <element name="customize" optional="true"/> - <sequential> - <property environment="env"/> - <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/> - <java classname="@{classname}" dir="${profiler.info.dir}" fork="true" jvm="${profiler.info.jvm}"> - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> - <jvmarg value="${profiler.info.jvmargs.agent}"/> - <jvmarg line="${profiler.info.jvmargs}"/> - <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/> - <arg line="${application.args}"/> - <classpath> - <path path="${run.classpath}"/> - </classpath> - <syspropertyset> - <propertyref prefix="run-sys-prop."/> - <mapper from="run-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <customize/> - </java> - </sequential> - </macrodef> - </target> - <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" name="-profile-init-check"> - <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail> - <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail> - </target> - <!-- - end of pre NB7.2 profiling section - --> - <target depends="-init-debug-args" name="-init-macrodef-nbjpda"> - <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1"> - <attribute default="${main.class}" name="name"/> - <attribute default="${debug.classpath}" name="classpath"/> - <attribute default="" name="stopclassname"/> - <sequential> - <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}"> - <classpath> - <path path="@{classpath}"/> - </classpath> - </nbjpdastart> - </sequential> - </macrodef> - <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1"> - <attribute default="${build.classes.dir}" name="dir"/> - <sequential> - <nbjpdareload> - <fileset dir="@{dir}" includes="${fix.classes}"> - <include name="${fix.includes}*.class"/> - </fileset> - </nbjpdareload> - </sequential> - </macrodef> - </target> - <target name="-init-debug-args"> - <property name="version-output" value="java version "${ant.java.version}"/> - <condition property="have-jdk-older-than-1.4"> - <or> - <contains string="${version-output}" substring="java version "1.0"/> - <contains string="${version-output}" substring="java version "1.1"/> - <contains string="${version-output}" substring="java version "1.2"/> - <contains string="${version-output}" substring="java version "1.3"/> - </or> - </condition> - <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none"> - <istrue value="${have-jdk-older-than-1.4}"/> - </condition> - <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem"> - <os family="windows"/> - </condition> - <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}"> - <isset property="debug.transport"/> - </condition> - </target> - <target depends="-init-debug-args" name="-init-macrodef-debug"> - <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${main.class}" name="classname"/> - <attribute default="${debug.classpath}" name="classpath"/> - <element name="customize" optional="true"/> - <sequential> - <java classname="@{classname}" dir="${work.dir}" fork="true"> - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> - <jvmarg line="${debug-args-line}"/> - <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> - <jvmarg value="-Dfile.encoding=${runtime.encoding}"/> - <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/> - <jvmarg line="${run.jvmargs}"/> - <jvmarg line="${run.jvmargs.ide}"/> - <classpath> - <path path="@{classpath}"/> - </classpath> - <syspropertyset> - <propertyref prefix="run-sys-prop."/> - <mapper from="run-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <customize/> - </java> - </sequential> - </macrodef> - </target> - <target name="-init-macrodef-java"> - <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1"> - <attribute default="${main.class}" name="classname"/> - <attribute default="${run.classpath}" name="classpath"/> - <attribute default="jvm" name="jvm"/> - <element name="customize" optional="true"/> - <sequential> - <java classname="@{classname}" dir="${work.dir}" fork="true"> - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> - <jvmarg value="-Dfile.encoding=${runtime.encoding}"/> - <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/> - <jvmarg line="${run.jvmargs}"/> - <jvmarg line="${run.jvmargs.ide}"/> - <classpath> - <path path="@{classpath}"/> - </classpath> - <syspropertyset> - <propertyref prefix="run-sys-prop."/> - <mapper from="run-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <customize/> - </java> - </sequential> - </macrodef> - </target> - <target name="-init-macrodef-copylibs"> - <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${manifest.file}" name="manifest"/> - <element name="customize" optional="true"/> - <sequential> - <property location="${build.classes.dir}" name="build.classes.dir.resolved"/> - <pathconvert property="run.classpath.without.build.classes.dir"> - <path path="${run.classpath}"/> - <map from="${build.classes.dir.resolved}" to=""/> - </pathconvert> - <pathconvert pathsep=" " property="jar.classpath"> - <path path="${run.classpath.without.build.classes.dir}"/> - <chainedmapper> - <flattenmapper/> - <filtermapper> - <replacestring from=" " to="%20"/> - </filtermapper> - <globmapper from="*" to="lib/*"/> - </chainedmapper> - </pathconvert> - <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/> - <copylibs compress="${jar.compress}" excludeFromCopy="${copylibs.excludes}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" rebase="${copylibs.rebase}" runtimeclasspath="${run.classpath.without.build.classes.dir}"> - <fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/> - <manifest> - <attribute name="Class-Path" value="${jar.classpath}"/> - <customize/> - </manifest> - </copylibs> - </sequential> - </macrodef> - </target> - <target name="-init-presetdef-jar"> - <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1"> - <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}"> - <j2seproject1:fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/> - </jar> - </presetdef> - </target> - <target name="-init-ap-cmdline-properties"> - <property name="annotation.processing.enabled" value="true"/> - <property name="annotation.processing.processors.list" value=""/> - <property name="annotation.processing.processor.options" value=""/> - <property name="annotation.processing.run.all.processors" value="true"/> - <property name="javac.processorpath" value="${javac.classpath}"/> - <property name="javac.test.processorpath" value="${javac.test.classpath}"/> - <condition property="ap.supported.internal" value="true"> - <not> - <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/> - </not> - </condition> - </target> - <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported"> - <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}"> - <isfalse value="${annotation.processing.run.all.processors}"/> - </condition> - <condition else="" property="ap.proc.none.internal" value="-proc:none"> - <isfalse value="${annotation.processing.enabled}"/> - </condition> - </target> - <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline"> - <property name="ap.cmd.line.internal" value=""/> - </target> - <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-test,-init-macrodef-test-debug,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/> - <!-- - =================== - COMPILATION SECTION - =================== - --> - <target name="-deps-jar-init" unless="built-jar.properties"> - <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/> - <delete file="${built-jar.properties}" quiet="true"/> - </target> - <target if="already.built.jar.${basedir}" name="-warn-already-built-jar"> - <echo level="warn" message="Cycle detected: JemmyFX was already built"/> - </target> - <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps"> - <mkdir dir="${build.dir}"/> - <touch file="${built-jar.properties}" verbose="false"/> - <property file="${built-jar.properties}" prefix="already.built.jar."/> - <antcall target="-warn-already-built-jar"/> - <propertyfile file="${built-jar.properties}"> - <entry key="${basedir}" value=""/> - </propertyfile> - <antcall target="-maybe-call-dep"> - <param name="call.built.properties" value="${built-jar.properties}"/> - <param location="${project.GlassImage}" name="call.subproject"/> - <param location="${project.GlassImage}/build.xml" name="call.script"/> - <param name="call.target" value="jar"/> - <param name="transfer.built-jar.properties" value="${built-jar.properties}"/> - </antcall> - <antcall target="-maybe-call-dep"> - <param name="call.built.properties" value="${built-jar.properties}"/> - <param location="${project.GlassRobot}" name="call.subproject"/> - <param location="${project.GlassRobot}/build.xml" name="call.script"/> - <param name="call.target" value="jar"/> - <param name="transfer.built-jar.properties" value="${built-jar.properties}"/> - </antcall> - <antcall target="-maybe-call-dep"> - <param name="call.built.properties" value="${built-jar.properties}"/> - <param location="${project.JemmyCore}" name="call.subproject"/> - <param location="${project.JemmyCore}/build.xml" name="call.script"/> - <param name="call.target" value="jar"/> - <param name="transfer.built-jar.properties" value="${built-jar.properties}"/> - </antcall> - </target> - <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/> - <target depends="init" name="-check-automatic-build"> - <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/> - </target> - <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build"> - <antcall target="clean"/> - </target> - <target depends="init,deps-jar" name="-pre-pre-compile"> - <mkdir dir="${build.classes.dir}"/> - </target> - <target name="-pre-compile"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target if="do.depend.true" name="-compile-depend"> - <pathconvert property="build.generated.subdirs"> - <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false"> - <include name="*"/> - </dirset> - </pathconvert> - <j2seproject3:depend srcdir="${src.docks.dir}:${src.dir}:${build.generated.subdirs}"/> - </target> - <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile"> - <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/> - <copy todir="${build.classes.dir}"> - <fileset dir="${src.docks.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> - <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> - </copy> - </target> - <target if="has.persistence.xml" name="-copy-persistence-xml"> - <mkdir dir="${build.classes.dir}/META-INF"/> - <copy todir="${build.classes.dir}/META-INF"> - <fileset dir="${meta.inf.dir}" includes="persistence.xml orm.xml"/> - </copy> - </target> - <target name="-post-compile"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/> - <target name="-pre-compile-single"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single"> - <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail> - <j2seproject3:force-recompile/> - <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.docks.dir}:${src.dir}"/> - </target> - <target name="-post-compile-single"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/> - <!-- - ==================== - JAR BUILDING SECTION - ==================== - --> - <target depends="init" name="-pre-pre-jar"> - <dirname file="${dist.jar}" property="dist.jar.dir"/> - <mkdir dir="${dist.jar.dir}"/> - </target> - <target name="-pre-jar"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init" if="do.archive" name="-do-jar-create-manifest" unless="manifest.available"> - <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/> - <touch file="${tmp.manifest.file}" verbose="false"/> - </target> - <target depends="init" if="do.archive+manifest.available" name="-do-jar-copy-manifest"> - <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/> - <copy file="${manifest.file}" tofile="${tmp.manifest.file}"/> - </target> - <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+main.class.available" name="-do-jar-set-mainclass"> - <manifest file="${tmp.manifest.file}" mode="update"> - <attribute name="Main-Class" value="${main.class}"/> - </manifest> - </target> - <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+profile.available" name="-do-jar-set-profile"> - <manifest file="${tmp.manifest.file}" mode="update"> - <attribute name="Profile" value="${javac.profile}"/> - </manifest> - </target> - <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-set-splashscreen"> - <basename file="${application.splash}" property="splashscreen.basename"/> - <mkdir dir="${build.classes.dir}/META-INF"/> - <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/> - <manifest file="${tmp.manifest.file}" mode="update"> - <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/> - </manifest> - </target> - <target depends="init,-init-macrodef-copylibs,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen" if="do.mkdist" name="-do-jar-copylibs"> - <j2seproject3:copylibs manifest="${tmp.manifest.file}"/> - <echo level="info">To run this application from the command line without Ant, try:</echo> - <property location="${dist.jar}" name="dist.jar.resolved"/> - <echo level="info">java -jar "${dist.jar.resolved}"</echo> - </target> - <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen" if="do.archive" name="-do-jar-jar" unless="do.mkdist"> - <j2seproject1:jar manifest="${tmp.manifest.file}"/> - <property location="${build.classes.dir}" name="build.classes.dir.resolved"/> - <property location="${dist.jar}" name="dist.jar.resolved"/> - <pathconvert property="run.classpath.with.dist.jar"> - <path path="${run.classpath}"/> - <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/> - </pathconvert> - <condition else="" property="jar.usage.message" value="To run this application from the command line without Ant, try:${line.separator}${platform.java} -cp ${run.classpath.with.dist.jar} ${main.class}"> - <isset property="main.class.available"/> - </condition> - <condition else="debug" property="jar.usage.level" value="info"> - <isset property="main.class.available"/> - </condition> - <echo level="${jar.usage.level}" message="${jar.usage.message}"/> - </target> - <target depends="-do-jar-copylibs" if="do.archive" name="-do-jar-delete-manifest"> - <delete> - <fileset file="${tmp.manifest.file}"/> - </delete> - </target> - <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen,-do-jar-jar,-do-jar-delete-manifest" name="-do-jar-without-libraries"/> - <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen,-do-jar-copylibs,-do-jar-delete-manifest" name="-do-jar-with-libraries"/> - <target name="-post-jar"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,compile,-pre-jar,-do-jar-without-libraries,-do-jar-with-libraries,-post-jar" name="-do-jar"/> - <target depends="init,compile,-pre-jar,-do-jar,-post-jar" description="Build JAR." name="jar"/> - <!-- - ================= - EXECUTION SECTION - ================= - --> - <target depends="init,compile" description="Run a main class." name="run"> - <j2seproject1:java> - <customize> - <arg line="${application.args}"/> - </customize> - </j2seproject1:java> - </target> - <target name="-do-not-recompile"> - <property name="javac.includes.binary" value=""/> - </target> - <target depends="init,compile-single" name="run-single"> - <fail unless="run.class">Must select one file in the IDE or set run.class</fail> - <j2seproject1:java classname="${run.class}"/> - </target> - <target depends="init,compile-test-single" name="run-test-with-main"> - <fail unless="run.class">Must select one file in the IDE or set run.class</fail> - <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/> - </target> - <!-- - ================= - DEBUGGING SECTION - ================= - --> - <target depends="init" if="netbeans.home" name="-debug-start-debugger"> - <j2seproject1:nbjpdastart name="${debug.class}"/> - </target> - <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test"> - <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/> - </target> - <target depends="init,compile" name="-debug-start-debuggee"> - <j2seproject3:debug> - <customize> - <arg line="${application.args}"/> - </customize> - </j2seproject3:debug> - </target> - <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/> - <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto"> - <j2seproject1:nbjpdastart stopclassname="${main.class}"/> - </target> - <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/> - <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single"> - <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail> - <j2seproject3:debug classname="${debug.class}"/> - </target> - <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/> - <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test"> - <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail> - <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/> - </target> - <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/> - <target depends="init" name="-pre-debug-fix"> - <fail unless="fix.includes">Must set fix.includes</fail> - <property name="javac.includes" value="${fix.includes}.java"/> - </target> - <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix"> - <j2seproject1:nbjpdareload/> - </target> - <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/> - <!-- - ================= - PROFILING SECTION - ================= - --> - <!-- - pre NB7.2 profiler integration - --> - <target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72"> - <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> - <nbprofiledirect> - <classpath> - <path path="${run.classpath}"/> - </classpath> - </nbprofiledirect> - <profile/> - </target> - <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72"> - <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail> - <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> - <nbprofiledirect> - <classpath> - <path path="${run.classpath}"/> - </classpath> - </nbprofiledirect> - <profile classname="${profile.class}"/> - </target> - <target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72"> - <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> - <nbprofiledirect> - <classpath> - <path path="${run.classpath}"/> - </classpath> - </nbprofiledirect> - <profile classname="sun.applet.AppletViewer"> - <customize> - <arg value="${applet.url}"/> - </customize> - </profile> - </target> - <target depends="profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72"> - <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> - <nbprofiledirect> - <classpath> - <path path="${run.test.classpath}"/> - </classpath> - </nbprofiledirect> - <junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true"> - <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/> - <jvmarg value="${profiler.info.jvmargs.agent}"/> - <jvmarg line="${profiler.info.jvmargs}"/> - <test name="${profile.class}"/> - <classpath> - <path path="${run.test.classpath}"/> - </classpath> - <syspropertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <formatter type="brief" usefile="false"/> - <formatter type="xml"/> - </junit> - </target> - <!-- - end of pre NB72 profiling section - --> - <target if="netbeans.home" name="-profile-check"> - <condition property="profiler.configured"> - <or> - <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/> - <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/> - </or> - </condition> - </target> - <target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent"> - <startprofiler/> - <antcall target="run"/> - </target> - <target depends="-profile-check,-profile-single-pre72" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-single" unless="profiler.info.jvmargs.agent"> - <fail unless="run.class">Must select one file in the IDE or set run.class</fail> - <startprofiler/> - <antcall target="run-single"/> - </target> - <target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/> - <target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs"> - <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail> - <startprofiler/> - <antcall target="test-single"/> - </target> - <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main"> - <fail unless="run.class">Must select one file in the IDE or set run.class</fail> - <startprofiler/> - <antcal target="run-test-with-main"/> - </target> - <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent"> - <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> - <startprofiler/> - <antcall target="run-applet"/> - </target> - <!-- - =============== - JAVADOC SECTION - =============== - --> - <target depends="init" if="have.sources" name="-javadoc-build"> - <mkdir dir="${dist.javadoc.dir}"/> - <condition else="" property="javadoc.endorsed.classpath.cmd.line.arg" value="-J${endorsed.classpath.cmd.line.arg}"> - <and> - <isset property="endorsed.classpath.cmd.line.arg"/> - <not> - <equals arg1="${endorsed.classpath.cmd.line.arg}" arg2=""/> - </not> - </and> - </condition> - <javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" 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}"> - <classpath> - <path path="${javac.classpath}"/> - </classpath> - <fileset dir="${src.docks.dir}" excludes="*.java,${excludes}" includes="${includes}"> - <filename name="**/*.java"/> - </fileset> - <fileset dir="${src.dir}" excludes="*.java,${excludes}" includes="${includes}"> - <filename name="**/*.java"/> - </fileset> - <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false"> - <include name="**/*.java"/> - <exclude name="*.java"/> - </fileset> - <arg line="${javadoc.endorsed.classpath.cmd.line.arg}"/> - </javadoc> - <copy todir="${dist.javadoc.dir}"> - <fileset dir="${src.docks.dir}" excludes="${excludes}" includes="${includes}"> - <filename name="**/doc-files/**"/> - </fileset> - <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}"> - <filename name="**/doc-files/**"/> - </fileset> - <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false"> - <include name="**/doc-files/**"/> - </fileset> - </copy> - </target> - <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview"> - <nbbrowse file="${dist.javadoc.dir}/index.html"/> - </target> - <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/> - <!-- - ========================= - TEST COMPILATION SECTION - ========================= - --> - <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test"> - <mkdir dir="${build.test.classes.dir}"/> - </target> - <target name="-pre-compile-test"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target if="do.depend.true" name="-compile-test-depend"> - <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.samples.dir}:${test.src.dir}"/> - </target> - <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test"> - <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" processorpath="${javac.test.processorpath}" srcdir="${test.samples.dir}:${test.src.dir}"/> - <copy todir="${build.test.classes.dir}"> - <fileset dir="${test.samples.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> - <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> - </copy> - </target> - <target name="-post-compile-test"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/> - <target name="-pre-compile-test-single"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single"> - <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail> - <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/> - <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" processorpath="${javac.test.processorpath}" sourcepath="${test.samples.dir}:${test.src.dir}" srcdir="${test.samples.dir}:${test.src.dir}"/> - <copy todir="${build.test.classes.dir}"> - <fileset dir="${test.samples.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> - <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> - </copy> - </target> - <target name="-post-compile-test-single"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/> - <!-- - ======================= - TEST EXECUTION SECTION - ======================= - --> - <target depends="init" if="have.tests" name="-pre-test-run"> - <mkdir dir="${build.test.results.dir}"/> - </target> - <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run"> - <j2seproject3:test testincludes="**/*Test.java"/> - </target> - <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run"> - <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail> - </target> - <target depends="init" if="have.tests" name="test-report"/> - <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/> - <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/> - <target depends="init" if="have.tests" name="-pre-test-run-single"> - <mkdir dir="${build.test.results.dir}"/> - </target> - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single"> - <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail> - <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/> - </target> - <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single"> - <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail> - </target> - <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/> - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method"> - <fail unless="test.class">Must select some files in the IDE or set test.class</fail> - <fail unless="test.method">Must select some method in the IDE or set test.method</fail> - <j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/> - </target> - <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method"> - <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail> - </target> - <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method,-post-test-run-single-method" description="Run single unit test." name="test-single-method"/> - <!-- - ======================= - TEST DEBUGGING SECTION - ======================= - --> - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test"> - <fail unless="test.class">Must select one file in the IDE or set test.class</fail> - <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/> - </target> - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method"> - <fail unless="test.class">Must select one file in the IDE or set test.class</fail> - <fail unless="test.method">Must select some method in the IDE or set test.method</fail> - <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/> - </target> - <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test"> - <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/> - </target> - <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/> - <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/> - <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test"> - <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/> - </target> - <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/> - <!-- - ========================= - APPLET EXECUTION SECTION - ========================= - --> - <target depends="init,compile-single" name="run-applet"> - <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> - <j2seproject1:java classname="sun.applet.AppletViewer"> - <customize> - <arg value="${applet.url}"/> - </customize> - </j2seproject1:java> - </target> - <!-- - ========================= - APPLET DEBUGGING SECTION - ========================= - --> - <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet"> - <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> - <j2seproject3:debug classname="sun.applet.AppletViewer"> - <customize> - <arg value="${applet.url}"/> - </customize> - </j2seproject3:debug> - </target> - <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/> - <!-- - =============== - CLEANUP SECTION - =============== - --> - <target name="-deps-clean-init" unless="built-clean.properties"> - <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/> - <delete file="${built-clean.properties}" quiet="true"/> - </target> - <target if="already.built.clean.${basedir}" name="-warn-already-built-clean"> - <echo level="warn" message="Cycle detected: JemmyFX was already built"/> - </target> - <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps"> - <mkdir dir="${build.dir}"/> - <touch file="${built-clean.properties}" verbose="false"/> - <property file="${built-clean.properties}" prefix="already.built.clean."/> - <antcall target="-warn-already-built-clean"/> - <propertyfile file="${built-clean.properties}"> - <entry key="${basedir}" value=""/> - </propertyfile> - <antcall target="-maybe-call-dep"> - <param name="call.built.properties" value="${built-clean.properties}"/> - <param location="${project.GlassImage}" name="call.subproject"/> - <param location="${project.GlassImage}/build.xml" name="call.script"/> - <param name="call.target" value="clean"/> - <param name="transfer.built-clean.properties" value="${built-clean.properties}"/> - </antcall> - <antcall target="-maybe-call-dep"> - <param name="call.built.properties" value="${built-clean.properties}"/> - <param location="${project.GlassRobot}" name="call.subproject"/> - <param location="${project.GlassRobot}/build.xml" name="call.script"/> - <param name="call.target" value="clean"/> - <param name="transfer.built-clean.properties" value="${built-clean.properties}"/> - </antcall> - <antcall target="-maybe-call-dep"> - <param name="call.built.properties" value="${built-clean.properties}"/> - <param location="${project.JemmyCore}" name="call.subproject"/> - <param location="${project.JemmyCore}/build.xml" name="call.script"/> - <param name="call.target" value="clean"/> - <param name="transfer.built-clean.properties" value="${built-clean.properties}"/> - </antcall> - </target> - <target depends="init" name="-do-clean"> - <delete dir="${build.dir}"/> - <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/> - </target> - <target name="-post-clean"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/> - <target name="-check-call-dep"> - <property file="${call.built.properties}" prefix="already.built."/> - <condition property="should.call.dep"> - <and> - <not> - <isset property="already.built.${call.subproject}"/> - </not> - <available file="${call.script}"/> - </and> - </condition> - </target> - <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep"> - <ant antfile="${call.script}" inheritall="false" target="${call.target}"> - <propertyset> - <propertyref prefix="transfer."/> - <mapper from="transfer.*" to="*" type="glob"/> - </propertyset> - </ant> - </target> -</project> diff --git a/tools/Jemmy/JemmyFX/nbproject/genfiles.properties b/tools/Jemmy/JemmyFX/nbproject/genfiles.properties deleted file mode 100644 index 122091a6..00000000 --- a/tools/Jemmy/JemmyFX/nbproject/genfiles.properties +++ /dev/null @@ -1,8 +0,0 @@ -build.xml.data.CRC32=4c8c9288 -build.xml.script.CRC32=74ab4eb1 -build.xml.stylesheet.CRC32=28e38971@1.38.2.45 -# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. -# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. -nbproject/build-impl.xml.data.CRC32=1d9181c0 -nbproject/build-impl.xml.script.CRC32=c2c3032b -nbproject/build-impl.xml.stylesheet.CRC32=5a01deb7@1.68.1.46 diff --git a/tools/Jemmy/JemmyFX/nbproject/project.properties b/tools/Jemmy/JemmyFX/nbproject/project.properties deleted file mode 100644 index 1efce084..00000000 --- a/tools/Jemmy/JemmyFX/nbproject/project.properties +++ /dev/null @@ -1,99 +0,0 @@ -annotation.processing.enabled=true -annotation.processing.enabled.in.editor=false -annotation.processing.processors.list= -annotation.processing.run.all.processors=true -application.title=JemmyFX -application.vendor=shura -build.classes.dir=${build.dir}/classes -build.classes.excludes=**/*.java,**/*.form -# This directory is removed when the project is cleaned: -build.dir=build -build.generated.dir=${build.dir}/generated -build.generated.sources.dir=${build.dir}/generated-sources -# Only compile against the classpath explicitly listed here: -build.sysclasspath=ignore -build.test.classes.dir=${build.dir}/test/classes -build.test.results.dir=${build.dir}/test/results -# Uncomment to specify the preferred debugger connection transport: -#debug.transport=dt_socket -debug.classpath=\ - ${run.classpath} -debug.test.classpath=\ - ${run.test.classpath} -# This directory is removed when the project is cleaned: -dist.dir=dist -dist.jar=${dist.dir}/JemmyFX.jar -dist.javadoc.dir=${dist.dir}/javadoc -endorsed.classpath= -excludes= -file.reference.jemmy.jar=../jemmy_core/jemmy.jar -file.reference.JemmyAWT.jar=../jemmy_core/JemmyAWT.jar -file.reference.JemmyAWTInput.jar=../jemmy_core/JemmyAWTInput.jar -file.reference.JemmyBrowser.jar=../jemmy_core/JemmyBrowser.jar -file.reference.JemmyCore.jar=../jemmy_core/JemmyCore.jar -file.reference.JemmySupport.jar=../jemmy_core/JemmySupport.jar -file.reference.jfxrt.jar=${javafx.rt}/lib/ext/jfxrt.jar -file.reference.junit.jar=../jemmy_core/junit.jar -includes=** -jar.archive.disabled=${jnlp.enabled} -jar.compress=false -jar.index=${jnlp.enabled} -javac.classpath=\ - ${file.reference.JemmyAWTInput.jar}:\ - ${file.reference.JemmyCore.jar}:\ - ${file.reference.JemmySupport.jar}:\ - ${file.reference.jfxrt.jar}:\ - ${file.reference.junit.jar}:\ - ${reference.GlassImage.jar}:\ - ${reference.GlassRobot.jar} -# Space-separated list of extra javac options -javac.compilerargs=-processor org.jemmy.support.Proccessor -Aactions=docks,dump -s ${basedir}/docks -javac.deprecation=false -javac.processorpath=\ - ${javac.classpath} -javac.source=1.8 -javac.target=1.8 -javac.test.classpath=\ - ${javac.classpath}:\ - ${build.classes.dir}:\ - ${file.reference.JemmyBrowser.jar} -javadoc.additionalparam= -javadoc.author=false -javadoc.encoding=${source.encoding} -javadoc.noindex=false -javadoc.nonavbar=false -javadoc.notree=false -javadoc.private=false -javadoc.splitindex=true -javadoc.use=true -javadoc.version=false -javadoc.windowtitle= -jnlp.codebase.type=no.codebase -jnlp.descriptor=application -jnlp.enabled=false -jnlp.mixed.code=default -jnlp.offline-allowed=false -jnlp.signed=false -jnlp.signing= -jnlp.signing.alias= -jnlp.signing.keystore= -main.class=org.jemmy.fx.Version -manifest.file=manifest.mf -meta.inf.dir=${src.dir}/META-INF -platform.active=default_platform -project.GlassImage=../GlassImage -project.GlassRobot=../GlassRobot -reference.GlassImage.jar=${project.GlassImage}/dist/GlassImage.jar -reference.GlassRobot.jar=${project.GlassRobot}/dist/GlassRobot.jar -run.classpath=\ - ${javac.classpath}:\ - ${build.classes.dir} -run.test.classpath=\ - ${javac.test.classpath}:\ - ${build.test.classes.dir} -source.encoding=UTF-8 -src.dir=src -src.docks.dir=docks -test.samples.dir=samples -test.src.dir=test -mkdist.disabled=true diff --git a/tools/Jemmy/JemmyFX/nbproject/project.xml b/tools/Jemmy/JemmyFX/nbproject/project.xml deleted file mode 100644 index 614e1262..00000000 --- a/tools/Jemmy/JemmyFX/nbproject/project.xml +++ /dev/null @@ -1,35 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<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/3"> - <name>JemmyFX</name> - <source-roots> - <root id="src.docks.dir" name="Generated"/> - <root id="src.dir"/> - </source-roots> - <test-roots> - <root id="test.samples.dir"/> - <root id="test.src.dir" name="test"/> - </test-roots> - </data> - <references xmlns="http://www.netbeans.org/ns/ant-project-references/1"> - <reference> - <foreign-project>GlassImage</foreign-project> - <artifact-type>jar</artifact-type> - <script>build.xml</script> - <target>jar</target> - <clean-target>clean</clean-target> - <id>jar</id> - </reference> - <reference> - <foreign-project>GlassRobot</foreign-project> - <artifact-type>jar</artifact-type> - <script>build.xml</script> - <target>jar</target> - <clean-target>clean</clean-target> - <id>jar</id> - </reference> - </references> - </configuration> -</project> diff --git a/tools/Jemmy/JemmyFX/noweb.profile b/tools/Jemmy/JemmyFX/noweb.profile deleted file mode 100644 index e80dc542..00000000 --- a/tools/Jemmy/JemmyFX/noweb.profile +++ /dev/null @@ -1,2 +0,0 @@ -profile.excludes=org/jemmy/fx/control/Web*.java,org/jemmy/fx/NodeWrapper.java -profile.includes=** diff --git a/tools/Jemmy/JemmyFX/samples/TEST.ROOT b/tools/Jemmy/JemmyFX/samples/TEST.ROOT new file mode 100644 index 00000000..0d841c11 --- /dev/null +++ b/tools/Jemmy/JemmyFX/samples/TEST.ROOT @@ -0,0 +1,2 @@ +TestNG.dirs = . + diff --git a/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/SampleBase.java b/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/SampleBase.java index 6777a6de..a9bf7581 100644 --- a/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/SampleBase.java +++ b/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/SampleBase.java @@ -2,7 +2,7 @@ import javafx.application.Application; import org.jemmy.fx.AppExecutor; -import org.jemmy.input.AWTRobotInputFactory; +import org.jemmy.input.awt.AWTRobotInputFactory; /** diff --git a/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/accordion/AccordionApp.java b/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/accordion/AccordionApp.java index 77e1f99b..106d5be1 100644 --- a/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/accordion/AccordionApp.java +++ b/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/accordion/AccordionApp.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,7 +29,9 @@ import javafx.scene.Scene; import javafx.scene.control.Accordion; import javafx.scene.control.Button; -import javafx.scene.control.LabelBuilder; +//TODO +//import javafx.scene.control.LabelBuilder; +import javafx.scene.control.Label; import javafx.scene.control.TitledPane; import javafx.scene.layout.VBox; import javafx.stage.Stage; @@ -65,8 +67,9 @@ public void start(Stage stage) throws Exception { Scene scene = new Scene(box); - accordion.getPanes().add(new TitledPane("First pane", LabelBuilder.create().text("First pane's content").minHeight(200).build())); - accordion.getPanes().add(new TitledPane("Second pane", LabelBuilder.create().text("Second pane's content").minHeight(200).build())); + //TODO + accordion.getPanes().add(new TitledPane("First pane", new Label("First pane's content"))); + accordion.getPanes().add(new TitledPane("Second pane", new Label("Second pane's content"))); box.getChildren().add(accordion); @@ -79,6 +82,8 @@ public void start(Stage stage) throws Exception { stage.setWidth(300); stage.setHeight(300); + stage.setAlwaysOnTop(true); + stage.show(); reset(); diff --git a/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/accordion/AccordionSample.java b/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/accordion/AccordionSample.java index a7eb7a89..a4128f9f 100644 --- a/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/accordion/AccordionSample.java +++ b/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/accordion/AccordionSample.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -34,12 +34,14 @@ import org.jemmy.interfaces.Selector; import org.jemmy.resources.StringComparePolicy; import org.jemmy.samples.SampleBase; +import org.junit.AfterClass; import org.junit.Assert; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; public class AccordionSample extends SampleBase { + static SceneDock scene; @BeforeClass diff --git a/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/buttons/ButtonsApp.java b/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/buttons/ButtonsApp.java index 89616aa9..02d622f6 100644 --- a/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/buttons/ButtonsApp.java +++ b/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/buttons/ButtonsApp.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -82,6 +82,7 @@ public void start(Stage stage) throws Exception { content.getChildren().addAll(btn, twoState, triState, radios, toggles); content.getChildren().add(status); stage.setScene(new Scene(content)); + stage.setAlwaysOnTop(true); stage.show(); } diff --git a/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/buttons/ButtonsSample.java b/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/buttons/ButtonsSample.java index 3ca36664..95afce4e 100644 --- a/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/buttons/ButtonsSample.java +++ b/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/buttons/ButtonsSample.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,7 +27,6 @@ import javafx.scene.control.Button; import javafx.scene.control.CheckBox; import org.jemmy.control.Wrap; -import org.jemmy.fx.AppExecutor; import org.jemmy.fx.SceneDock; import org.jemmy.fx.control.CheckBoxDock; import org.jemmy.fx.control.CheckBoxWrap; @@ -35,10 +34,11 @@ import org.jemmy.fx.control.ToggleButtonDock; import org.jemmy.resources.StringComparePolicy; import org.jemmy.samples.SampleBase; -import static org.junit.Assert.assertEquals; import org.junit.BeforeClass; import org.junit.Test; +import static org.junit.Assert.assertEquals; + /** * How to use buttons: buttons, check boxes, radio buttons. * @author shura @@ -52,6 +52,8 @@ public class ButtonsSample extends SampleBase { public static void startApp() throws InterruptedException { startApp(ButtonsApp.class); scene = new SceneDock(); + //workaround for JDK-8257835 + scene.mouse().click(); status = new LabeledDock(scene.asParent(), "status"); } diff --git a/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/colorpicker/ColorPickerApp.java b/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/colorpicker/ColorPickerApp.java index 26999e9b..1ff5212b 100644 --- a/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/colorpicker/ColorPickerApp.java +++ b/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/colorpicker/ColorPickerApp.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -67,6 +67,8 @@ public void start(Stage stage) throws Exception { stage.setWidth(300); stage.setHeight(300); + stage.setAlwaysOnTop(true); + stage.show(); } } diff --git a/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/colorpicker/ColorPickerSample.java b/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/colorpicker/ColorPickerSample.java index 44082bf6..1e7e38a9 100644 --- a/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/colorpicker/ColorPickerSample.java +++ b/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/colorpicker/ColorPickerSample.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,6 +26,7 @@ package org.jemmy.samples.colorpicker; import javafx.scene.paint.Color; +import org.jemmy.Point; import org.jemmy.fx.SceneDock; import org.jemmy.fx.control.ColorPickerDock; import org.jemmy.samples.SampleBase; @@ -45,6 +46,10 @@ public static void launch() throws InterruptedException { // Obtaining a Dock for scene scene = new SceneDock(); + //workaround for JDK-8257835 + scene.mouse().click(1, + new Point(scene.wrap().getScreenBounds().width - 1, scene.wrap().getScreenBounds().height - 1)); + // Looking up for ColorPicker. The best option is to do that by id. picker = new ColorPickerDock(scene.asParent(), "picker id"); } diff --git a/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/combobox/ComboBoxApp.java b/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/combobox/ComboBoxApp.java index 66aae4e4..769a77df 100644 --- a/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/combobox/ComboBoxApp.java +++ b/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/combobox/ComboBoxApp.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -102,6 +102,7 @@ public Record fromString(String string) { stage.setTitle("ComboBoxApp"); stage.setScene(scene); + stage.setAlwaysOnTop(true); stage.show(); } diff --git a/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/combobox/ComboBoxSample.java b/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/combobox/ComboBoxSample.java index 99e858b6..d35f1845 100644 --- a/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/combobox/ComboBoxSample.java +++ b/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/combobox/ComboBoxSample.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,6 +25,7 @@ package org.jemmy.samples.combobox; +import org.jemmy.Point; import org.jemmy.action.FutureAction; import org.jemmy.fx.SceneDock; import org.jemmy.fx.control.ChoiceBoxDock; @@ -43,6 +44,7 @@ */ //@Ignore("https://javafx-jira.kenai.com/browse/RT-29551") public class ComboBoxSample extends SampleBase { + private static SceneDock scene; private static ComboBoxDock comboBox1; private static ComboBoxDock comboBox2; @@ -57,6 +59,9 @@ public static void launch() throws InterruptedException { // Obtaining a Dock for scene scene = new SceneDock(); + //workaround for JDK-8257835 + scene.mouse().click(1, new Point(0, 0)); + /** * Looking up for Combo and Choice boxes. The best option is to do that * by id. diff --git a/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/explorer/E2ESample.java b/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/explorer/E2ESample.java index 9ce59409..7fc4e2fd 100644 --- a/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/explorer/E2ESample.java +++ b/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/explorer/E2ESample.java @@ -5,14 +5,22 @@ package org.jemmy.samples.explorer; import java.io.File; +import java.nio.file.Path; +import java.nio.file.Paths; + import org.jemmy.control.Wrap; +import org.jemmy.fx.Root; import org.jemmy.fx.control.ComboBoxDock; import org.jemmy.fx.control.LabeledDock; import org.jemmy.fx.control.ListItemDock; import org.jemmy.fx.control.TextInputControlDock; import static org.jemmy.interfaces.Keyboard.KeyboardButtons.*; + +import org.jemmy.interfaces.Keyboard; import org.jemmy.lookup.LookupCriteria; import static org.jemmy.resources.StringComparePolicy.*; + +import org.jemmy.operators.Screen; import org.junit.Ignore; import org.junit.Test; @@ -23,39 +31,38 @@ * * @author shura */ -@Ignore("https://javafx-jira.kenai.com/browse/RT-29551") public class E2ESample extends ExplorerSampleBase { @Test - public void hello() throws InterruptedException { - //save original location for the purpose of returning back - //there is only one text filed - final TextInputControlDock address = new TextInputControlDock(scene.asParent()); - String location = address.getText(); - - //go to the end of the location line and add "/build/test" - //Hit enter afterwards - address.asSelectionText().to(address.getText().length()); - address.type(File.separator + "build" - + File.separator + "test"); + public void upAndDown() throws InterruptedException { + TextInputControlDock address = new TextInputControlDock(scene.asParent()); + File location = new File(address.getText()); + + //go up by cutting the part after last slash + address.asSelectionText().select(File.separator + location.getName() + "$"); + address.keyboard().pushKey(DELETE); address.keyboard().pushKey(ENTER); - //there is supposed to be the "result" subdir which, in turn, - //contains log of this test execution - new ListItemDock(list.asList(), cntrl -> cntrl.toString().endsWith("results")).mouse().click(2); + //go down by clicking in the list + new ListItemDock(list.asList(), i -> { + return i.equals(location); + }).mouse().click(2); - //now let's get back to JavaFX project, where we started by selecting - //"JavaFX" in the ChoiseBox - new ComboBoxDock(scene.asParent()).asSelectable().selector(). - select(new File(location)); + //go up by "back" button + new LabeledDock(scene.asParent(), "back_btn").mouse().click(); + address.wrap().waitProperty(Wrap.TEXT_PROP_NAME, location.getParent().toString()); - //make sure we got back by checking the location field - address.wrap().waitProperty(Wrap.TEXT_PROP_NAME, location); + //go down by typing into the address field + address.mouse().click(); + address.asSelectionText().to(address.getText().length()); + address.type(File.separator + location.getName()); + address.keyboard().pushKey(ENTER); - //go back to "explorer" folder. Find the button by id, for a change - new LabeledDock(scene.asParent(), "back_btn").mouse().click(); + //go up by selecting in the combobox + var combo = new ComboBoxDock(scene.asParent()); + combo.asSelectable().selector().select(location.getParentFile()); - //select the test itself - new ListItemDock(list.asList(), "E2ESample.xml", SUBSTRING).mouse().click(1); + //test by finding in the list + list.asSelectable().selector().select(location); } } diff --git a/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/explorer/Explorer.java b/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/explorer/Explorer.java index f03880eb..b316925c 100644 --- a/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/explorer/Explorer.java +++ b/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/explorer/Explorer.java @@ -6,6 +6,7 @@ import javafx.application.Application; import javafx.collections.FXCollections; +import javafx.event.Event; import javafx.scene.Scene; import javafx.scene.control.*; import javafx.scene.input.KeyCode; @@ -58,7 +59,7 @@ public void start(Stage stage) throws Exception { parents.setConverter(new StringConverter<File>() { @Override public String toString(File t) { - return t.getName(); + return (t != null) ? t.getName() : "null"; } @Override @@ -67,6 +68,12 @@ public File fromString(String string) { } }); location = new TextField(); + location.setOnKeyPressed(t -> { + System.out.println("pressed " + t.getCode()); + }); + location.setOnKeyReleased(t -> { + System.out.println("released " + t.getCode()); + }); location.setOnKeyPressed(t -> { if (t.getCode() == KeyCode.ENTER) { File entered = new File(location.getText()); @@ -97,6 +104,7 @@ public File fromString(String string) { } } }); + fileView.setId("file-view"); content.setCenter(fileView); updateCombo(new File(System.getProperty("user.dir"))); Scene res = new Scene(content); @@ -104,6 +112,7 @@ public File fromString(String string) { stage.setTitle("Demo file browser"); stage.setWidth(600); stage.setHeight(500); + stage.setAlwaysOnTop(true); stage.show(); } @@ -127,7 +136,7 @@ private void refresh(File current) { } public static void main(String[] args) { - launch(); + launch(args); } private void showError(String name) { diff --git a/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/explorer/ExplorerSampleBase.java b/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/explorer/ExplorerSampleBase.java index ca239878..5c347b3a 100644 --- a/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/explorer/ExplorerSampleBase.java +++ b/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/explorer/ExplorerSampleBase.java @@ -4,8 +4,10 @@ */ package org.jemmy.samples.explorer; +import org.jemmy.fx.Root; import org.jemmy.fx.SceneDock; import org.jemmy.fx.control.ListViewDock; +import org.jemmy.input.glass.GlassInputFactory; import org.jemmy.samples.SampleBase; import org.junit.After; import org.junit.AfterClass; @@ -24,8 +26,11 @@ public class ExplorerSampleBase extends SampleBase { @BeforeClass public static void setUpClass() throws InterruptedException { startApp(Explorer.class); + Root.ROOT.getEnvironment().setInputFactory(new GlassInputFactory()); scene = new SceneDock(); - list = new ListViewDock(scene.asParent()); + + + list = new ListViewDock(scene.asParent(), "file-view"); } @AfterClass diff --git a/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/images/ImagesSample.java b/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/images/ImagesSample.java index 6a60ca3f..3d705412 100644 --- a/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/images/ImagesSample.java +++ b/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/images/ImagesSample.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -32,23 +32,24 @@ import org.jemmy.fx.SceneDock; import org.jemmy.fx.control.LabeledDock; import org.jemmy.fx.control.ToggleButtonDock; -import org.jemmy.image.AWTImage; -import org.jemmy.image.BufferedImageComparator; -import org.jemmy.image.GlassImage; -import org.jemmy.image.GlassPixelImageComparator; import org.jemmy.image.Image; +import org.jemmy.image.awt.AWTImage; +import org.jemmy.image.awt.BufferedImageComparator; +import org.jemmy.image.glass.GlassImage; +import org.jemmy.image.glass.GlassPixelImageComparator; import org.jemmy.image.pixel.AverageDistanceComparator; import org.jemmy.image.pixel.MaxDistanceComparator; import org.jemmy.image.pixel.PixelEqualityRasterComparator; import org.jemmy.image.pixel.PixelImageComparator; import org.jemmy.image.pixel.RasterComparator; -import static org.jemmy.resources.StringComparePolicy.*; import org.jemmy.samples.SampleBase; -import org.jemmy.samples.buttons.*; +import org.jemmy.samples.buttons.ButtonsApp; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import static org.junit.Assert.*; + +import static org.jemmy.resources.StringComparePolicy.EXACT; +import static org.junit.Assert.assertNull; /** * How to use images to check state of a Node. @@ -100,10 +101,9 @@ public void lookup() throws InterruptedException { * Compare using default comparator. */ @Test - public void defaultComparator() { + public void exactComparator() { //let's use comparison logic, which is //comparing all pixels for equality. - //this is, also, a default comparator Environment.getEnvironment().setProperty(RasterComparator.class, new PixelEqualityRasterComparator(0)); //since the UI is in original state, images should be the same button.mouse().click(); @@ -193,11 +193,10 @@ public void useColorDistanceComparator() { radio.waitImage(RADIO_PNG, "distance.0." + RADIO_RES_PNG, "distance.0." + RADIO_DIFF_PNG); //now use maximum (over all pixels) distance - Environment.getEnvironment().setProperty(RasterComparator.class, new MaxDistanceComparator(.3)); + Environment.getEnvironment().setProperty(RasterComparator.class, new MaxDistanceComparator(.1)); //let's click on the radio and compare //should not be as some color are too far away radio.mouse().click(); - button.mouse().click(); BEFORE_DIFF_TIMEOUT.sleep(); try { radio.waitImage(RADIO_PNG, "distance.1." + RADIO_RES_PNG, "distance.1." + RADIO_DIFF_PNG); diff --git a/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/input/InputApp.java b/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/input/InputApp.java index 875c9238..7d6a9f2c 100644 --- a/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/input/InputApp.java +++ b/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/input/InputApp.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -311,6 +311,8 @@ public void handle(ActionEvent t) { stage.setY(200); + stage.setAlwaysOnTop(true); + stage.show(); } diff --git a/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/input/InputSampleBase.java b/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/input/InputSampleBase.java index 4396e04a..b2973733 100644 --- a/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/input/InputSampleBase.java +++ b/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/input/InputSampleBase.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -33,6 +33,7 @@ import javafx.scene.input.MouseEvent; import javafx.scene.paint.Color; import javafx.scene.shape.Rectangle; +import org.jemmy.Point; import org.jemmy.control.Wrap; import org.jemmy.fx.NodeDock; import org.jemmy.fx.Root; @@ -56,6 +57,11 @@ public class InputSampleBase extends SampleBase { public static void before() throws InterruptedException { startApp(InputApp.class); scene = new SceneDock(); + + //workaround for JDK-8257835 + scene.mouse().click(1, + new Point(scene.wrap().getScreenBounds().width - 1, scene.wrap().getScreenBounds().height - 1)); + redTarget = new NodeDock(scene.asParent(), Rectangle.class, new TargetCriteria(Color.RED)); blueTarget = new NodeDock(scene.asParent(), Rectangle.class, new TargetCriteria(Color.BLUE)); new NodeDock(scene.asParent(), Button.class).mouse().click(); @@ -95,7 +101,10 @@ protected void checkMouseEvent(final Color color, final EventType type, final Mo && ((Rectangle) e.getSource()).getFill().equals(color) && ((MouseEvent) e).getButton().equals(btn) && ((MouseEvent) e).getX() == x - && ((MouseEvent) e).getY() == y + //TODO + //missing the point by .5 pixels!!! +// && ((MouseEvent) e).getY() == y + && Math.abs(((MouseEvent) e).getY() - (float)y) < 1 && ((MouseEvent) e).getClickCount() == times) { return true; } diff --git a/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/input/KeyboardSample.java b/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/input/KeyboardSample.java index 46287605..70baa7ad 100644 --- a/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/input/KeyboardSample.java +++ b/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/input/KeyboardSample.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,6 +26,7 @@ import javafx.scene.input.KeyCode; import javafx.scene.input.KeyEvent; +import org.jemmy.Point; import org.jemmy.interfaces.Keyboard; import org.junit.Test; diff --git a/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/input/MouseClickSample.java b/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/input/MouseClickSample.java index 77c8aabe..a4a8f2c2 100644 --- a/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/input/MouseClickSample.java +++ b/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/input/MouseClickSample.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -81,8 +81,7 @@ public void doubleClickPoint() { @Test public void rightClickPoint() { redTarget.mouse().click(1, new Point(20, 20), Mouse.MouseButtons.BUTTON3); - - checkMouseEvent(RED, MouseEvent.MOUSE_CLICKED, MouseButton.SECONDARY, 20, 20, 1); + checkMouseEvent(RED, MouseEvent.MOUSE_CLICKED, MouseButton.MIDDLE, 20, 20, 1); } /** diff --git a/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/input/MouseDNDSample.java b/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/input/MouseDNDSample.java index fad31f38..409a8a47 100644 --- a/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/input/MouseDNDSample.java +++ b/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/input/MouseDNDSample.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -69,7 +69,7 @@ public void dndOther() { @Test public void dndPointOtherRightShift() { redTarget.drag().dnd(new Point(20, 20), blueTarget.wrap(), new Point(10, 10), - Mouse.MouseButtons.BUTTON3, Keyboard.KeyboardModifiers.SHIFT_DOWN_MASK); + Mouse.MouseButtons.BUTTON2, Keyboard.KeyboardModifiers.SHIFT_DOWN_MASK); checkMouseEvent(RED, MouseEvent.MOUSE_PRESSED, MouseButton.SECONDARY, 20, 20, 1); checkMouseEvent(RED, MouseEvent.MOUSE_DRAGGED, MouseButton.SECONDARY, -90, 10, 1); diff --git a/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/listview/ListViewApp.java b/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/listview/ListViewApp.java index 31f2849b..09bc6b34 100644 --- a/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/listview/ListViewApp.java +++ b/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/listview/ListViewApp.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -82,6 +82,7 @@ public void start(Stage stage) throws Exception { stage.setTitle("ListViewApp"); stage.setScene(scene); + stage.setAlwaysOnTop(true); stage.show(); } diff --git a/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/listview/ListViewSample.java b/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/listview/ListViewSample.java index 54d9eab6..02fe5d3e 100644 --- a/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/listview/ListViewSample.java +++ b/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/listview/ListViewSample.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,7 +28,7 @@ import org.jemmy.fx.control.ListItemDock; import org.jemmy.fx.control.ListViewDock; import org.jemmy.fx.control.TextFieldCellEditor; -import org.jemmy.interfaces.List; +import org.jemmy.fx.interfaces.List; import org.jemmy.lookup.Any; import org.jemmy.resources.StringComparePolicy; import org.jemmy.samples.SampleBase; @@ -45,6 +45,22 @@ * @author kam, shura */ public class ListViewSample extends SampleBase { + +// public static void main(String[] args) throws InterruptedException { +// launch(); +// ListViewSample t = new ListViewSample(); +// t.lookup(); +// t.selectItemByItemObject(); +// t.selectItemByItemIndex(); +// t.editListItem(); +// t.lookupForItem(); +// t.getSelectedItem(); +// t.scrollToItem(); +// t.selectItemOfSpecificType(); +// t.selectMultipleItemsByIndexes(); +// t.selectMultipleItemsByItemsLookupCriteria(); +// System.out.println("Done"); +// } private static SceneDock scene; private static ListViewDock listView1; private static ListViewDock listView2; @@ -166,7 +182,7 @@ public void scrollToItem() { /** * Editing a value of a cell in editable ListView */ - //@Test//https://javafx-jira.kenai.com/browse/RT-31165 + @Test//https://javafx-jira.kenai.com/browse/RT-31165 public void editListItem() { String value = "Lithuania"; diff --git a/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/lookup/CompoundLookupSample.java b/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/lookup/CompoundLookupSample.java index 2e59d3ba..d5cb494b 100644 --- a/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/lookup/CompoundLookupSample.java +++ b/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/lookup/CompoundLookupSample.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,6 +27,7 @@ import javafx.scene.control.Label; import javafx.scene.layout.GridPane; import javafx.scene.layout.VBox; +import org.jemmy.Point; import org.jemmy.fx.NodeDock; import org.jemmy.fx.SceneDock; import org.jemmy.lookup.LookupCriteria; @@ -44,10 +45,13 @@ public class CompoundLookupSample extends LookupSampleBase { * Nested lookup. */ @Test - public void nestedLookup() { + public void nestedLookup() throws InterruptedException { //find the scene SceneDock scene = new SceneDock(); + //workaround for JDK-8257835 + scene.mouse().click(1); + //look for a VBox NodeDock vBox = new NodeDock(scene.asParent(), VBox.class); //look for a GridPane inside @@ -77,6 +81,9 @@ public void fewCriteria() { //find the scene SceneDock scene = new SceneDock(); + //workaround for JDK-8257835 + scene.mouse().click(1); + //let's find a label which has "1,1" in text by two criteria NodeDock label11 = new NodeDock(scene.asParent(), Label.class, new LookupCriteria<Label>() { diff --git a/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/lookup/LookupApp.java b/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/lookup/LookupApp.java index d92de077..3bd59719 100644 --- a/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/lookup/LookupApp.java +++ b/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/lookup/LookupApp.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -67,6 +67,7 @@ public void start(Stage stage) throws Exception { content.getChildren().add(mouseOverLabel); Scene scene = new MyScene(content); stage.setScene(scene); + stage.setAlwaysOnTop(true); stage.show(); } diff --git a/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/menu/MenuApp.java b/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/menu/MenuApp.java index d5e8dce0..cbbaadca 100644 --- a/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/menu/MenuApp.java +++ b/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/menu/MenuApp.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -115,6 +115,7 @@ public void start(Stage stage) throws Exception { stage.setTitle("MenuApp"); stage.setScene(scene); + stage.setAlwaysOnTop(true); stage.show(); } diff --git a/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/menu/MenuSample.java b/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/menu/MenuSample.java index 7ce2da6e..b29ffe3b 100644 --- a/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/menu/MenuSample.java +++ b/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/menu/MenuSample.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,16 +26,17 @@ import javafx.scene.control.ScrollPane; +import org.jemmy.Point; import org.jemmy.fx.NodeDock; import org.jemmy.fx.SceneDock; import org.jemmy.fx.control.*; -import org.jemmy.input.AWTRobotInputFactory; import org.jemmy.input.glass.GlassInputFactory; import org.jemmy.interfaces.Keyboard.KeyboardButtons; import org.jemmy.interfaces.Mouse.MouseButtons; import org.jemmy.resources.StringComparePolicy; import org.jemmy.samples.SampleBase; import org.junit.After; +import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; @@ -65,6 +66,9 @@ public static void launch() throws InterruptedException { // Obtaining a Dock for scene scene = new SceneDock(); + //workaround for JDK-8257835 + scene.mouse().click(1); + //Looking up for MenuBar. There is just one MenuBar in the scene so //no criteria is specified. menuBar = new MenuBarDock(scene.asParent()); @@ -156,13 +160,16 @@ public void pushContextMenuItem() { //right click to call the popup // http://javafx-jira.kenai.com/browse/JMY-179 - scrollPane.mouse().click(1, scrollPane.wrap().getClickPoint(), MouseButtons.BUTTON3); + scrollPane.mouse().click(1, scrollPane.wrap().getClickPoint(), MouseButtons.BUTTON2); //pushing a context menu is just like pushing main menu - new ContextMenuDock().asMenuOwner().push("item _2"); + var popup = new ContextMenuDock(); + popup.asMenuOwner().push("item _2"); + //TODO how to do this in the code? + popup.wrap().waitState(() -> popup.wrap().getControl().isShowing() ? null : popup); - scrollPane.mouse().click(1, scrollPane.wrap().getClickPoint(), MouseButtons.BUTTON3); + scrollPane.mouse().click(1, scrollPane.wrap().getClickPoint(), MouseButtons.BUTTON2); //or new MenuItemDock(new ContextMenuDock().asMenuParent(), "sub-", StringComparePolicy.SUBSTRING).mouse().click(); @@ -202,4 +209,4 @@ public void after() throws InterruptedException { new MenuDock(menuBar.asMenuParent(), 1).wrap().waitProperty("isShowing", false); Thread.sleep(200); } -} \ No newline at end of file +} diff --git a/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/tableview/TableViewApp.java b/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/tableview/TableViewApp.java index 0cde4e14..79155dcd 100644 --- a/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/tableview/TableViewApp.java +++ b/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/tableview/TableViewApp.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -122,6 +122,7 @@ public Date fromString(String string) { Scene scene = new Scene(vBox, 800, 600); stage.setScene(scene); + stage.setAlwaysOnTop(true); stage.show(); } diff --git a/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/text/TextApp.java b/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/text/TextApp.java index a81e9ab5..d7f3f174 100644 --- a/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/text/TextApp.java +++ b/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/text/TextApp.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -33,9 +33,11 @@ import javafx.scene.control.TextField; import javafx.scene.control.TextInputControl; import javafx.scene.input.KeyEvent; +import javafx.scene.input.MouseEvent; import javafx.scene.layout.VBox; import javafx.scene.text.Text; import javafx.stage.Stage; +import javafx.stage.WindowEvent; /** * This is a sample app to demonstrate Jemmy functionality. It provides a few @@ -62,6 +64,23 @@ public void start(Stage stage) throws Exception { singleLine.setId("single"); multiLine = new TextArea(); multiLine.addEventHandler(KeyEvent.KEY_TYPED, textUpdate); + //TODO + //this is to demonstrate a bug with extra invizible symbol + Runnable call = () -> { + int testLength = multiLine.getText().length(); + System.out.print("Text length " + testLength); + if(testLength > 0) + System.out.println(", last char " + multiLine.getText().charAt(testLength - 1)); + else + System.out.println(); + }; + multiLine.addEventHandler(MouseEvent.MOUSE_CLICKED, e -> { + call.run(); + }); + multiLine.addEventHandler(KeyEvent.KEY_RELEASED, e -> { + call.run(); + }); + //end TODO reset(); Button reset = new Button("Reset"); reset.setOnAction(t -> { @@ -71,6 +90,7 @@ public void start(Stage stage) throws Exception { content.getChildren().add(reset); content.getChildren().addAll(singleLine, multiLine, text); stage.setScene(new Scene(content)); + stage.setAlwaysOnTop(true); stage.show(); } @@ -80,7 +100,9 @@ private void updateText(TextInputControl textInputControl) { private void reset() { singleLine.setText("single line text"); - multiLine.setText("multi\nline\ntext\n"); + //commented out because of JDK-8283592 +// multiLine.setText("multi\nline\ntext\n"); + multiLine.setText("multi\nline\ntext"); updateText(multiLine); } diff --git a/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/text/TextSample.java b/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/text/TextSample.java index ea93bc8a..c88e0828 100644 --- a/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/text/TextSample.java +++ b/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/text/TextSample.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,6 +27,7 @@ import javafx.scene.control.TextArea; import javafx.scene.control.TextField; import javafx.scene.text.Text; +import org.jemmy.Point; import org.jemmy.fx.SceneDock; import org.jemmy.fx.TextDock; import org.jemmy.fx.control.LabeledDock; @@ -35,6 +36,8 @@ import org.jemmy.samples.SampleBase; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; + +import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; @@ -52,6 +55,9 @@ public class TextSample extends SampleBase { public static void launch() throws InterruptedException { startApp(TextApp.class); scene = new SceneDock(); + //workaround for JDK-8257835 + scene.mouse().click(1, + new Point(scene.wrap().getScreenBounds().width - 1, scene.wrap().getScreenBounds().height - 1)); } @Before @@ -158,9 +164,9 @@ public void type() { "multi", StringComparePolicy.SUBSTRING); //typing starts right where cursor it - multiLine.asSelectionText().to("text\n", false); + multiLine.asSelectionText().to("text", false); - multiLine.asSelectionText().type("and we are adding another line\n"); + multiLine.asSelectionText().type("\nanother line"); //so, if you are going to replace the whole text, clear old text first singleLine.clear(); diff --git a/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/treetableview/TreeTableViewApp.java b/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/treetableview/TreeTableViewApp.java index a96a6f0f..40903983 100644 --- a/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/treetableview/TreeTableViewApp.java +++ b/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/treetableview/TreeTableViewApp.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -116,6 +116,8 @@ public Date fromString(String string) { Scene scene = new Scene(vBox, 800, 500); stage.setScene(scene); + stage.toFront(); + stage.setAlwaysOnTop(true); stage.show(); } diff --git a/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/treetableview/TreeTableViewSample.java b/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/treetableview/TreeTableViewSample.java index 09ce3e0c..4762a3f4 100644 --- a/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/treetableview/TreeTableViewSample.java +++ b/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/treetableview/TreeTableViewSample.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -32,7 +32,7 @@ import org.jemmy.fx.control.TreeTableCellDock; import org.jemmy.fx.control.TreeTableViewDock; import org.jemmy.fx.control.TreeTableItemDock; -import org.jemmy.interfaces.EditableCellOwner.EditableCell; +import org.jemmy.fx.interfaces.EditableCellOwner.EditableCell; import org.jemmy.lookup.LookupCriteria; import static org.jemmy.resources.StringComparePolicy.*; import org.jemmy.samples.SampleBase; @@ -199,4 +199,4 @@ public void getSelectedCells() { public void scrollingViaScrollable2D() { treeTableView.asScrollable2D().asVerticalScroll().to(0.9); } -} \ No newline at end of file +} diff --git a/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/treeview/TreeViewApp.java b/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/treeview/TreeViewApp.java index 6bd142a7..0a54cf4d 100644 --- a/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/treeview/TreeViewApp.java +++ b/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/treeview/TreeViewApp.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,7 +24,9 @@ */ package org.jemmy.samples.treeview; +import com.sun.javafx.tk.Toolkit; import javafx.application.Application; +import javafx.application.Platform; import javafx.beans.property.SimpleStringProperty; import javafx.beans.property.StringProperty; import javafx.scene.Scene; @@ -71,7 +73,13 @@ public void start(Stage stage) throws Exception { Scene scene = new Scene(vBox, 800, 500); stage.setScene(scene); + stage.setAlwaysOnTop(true); stage.show(); + + Platform.runLater(() -> { + Toolkit.getToolkit().checkFxUserThread(); + System.out.println("fx thread"); + }); } private void addContent(TreeItem parentItem, int levels, int itemsPerLevel, String prefix) { diff --git a/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/treeview/TreeViewSample.java b/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/treeview/TreeViewSample.java index d9257d75..cceff2d9 100644 --- a/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/treeview/TreeViewSample.java +++ b/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/treeview/TreeViewSample.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -68,13 +68,8 @@ public void itemLookup() { //or find a second node by substring new TreeItemDock(treeView.asItemParent(), 2, "-3-2-", SUBSTRING).mouse().click(); //or a 5th by a custom criteria - new TreeItemDock(treeView.asItemParent(), Data.class, 4, new LookupCriteria<Data>() { - - @Override - public boolean check(Data cntrl) { - return cntrl.getValue().length() == 5; - } - }).mouse().click(); + new TreeItemDock(treeView.asItemParent(), Data.class, 4, cntrl-> cntrl.getValue().length() == 5) + .mouse().click(); } /** diff --git a/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/webview/WebViewSample.java b/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/webview/WebViewSample.java index 57db8bec..9f0e5af3 100644 --- a/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/webview/WebViewSample.java +++ b/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/webview/WebViewSample.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,7 +40,8 @@ public class WebViewSample extends SampleBase { @BeforeClass public static void launch() throws InterruptedException { - startApp(WebViewApp.class); + //TODO +// startApp(WebViewApp.class); scene = new SceneDock(); } diff --git a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/QueueExecutor.java b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/QueueExecutor.java index f8bf0513..6a86d639 100644 --- a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/QueueExecutor.java +++ b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/QueueExecutor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,7 +27,6 @@ import com.sun.javafx.tk.Toolkit; import javafx.application.Platform; import org.jemmy.JemmyException; -import org.jemmy.TimeoutExpiredException; import org.jemmy.action.AbstractExecutor; import org.jemmy.action.Action; import org.jemmy.env.Environment; @@ -62,31 +61,20 @@ private QueueExecutor() { * Gets what thread is the queue thread. * @return */ - public Thread getQueueThread() { - if (queueThread == null) { - try { - Platform.runLater(new Runnable() { - - @Override - public void run() { - queueThread = Thread.currentThread(); - } - }); - Root.ROOT.getEnvironment().getWaiter(QUEUE_IDENTIFYING_TIMEOUT.getName()).ensureState(new State<Object>() { - - @Override - public Object reached() { - return queueThread; - } - }); - } catch (TimeoutExpiredException e) { - //this is bad. THere got to be a way to check if we're on the queue - //or not. right now - no other way - sorry - queueThread = Thread.currentThread(); - } - } - return queueThread; - } + //this is bad. THere got to be a way to check if we're on the queue + //or not. right now - no other way - sorry +// public Thread getQueueThread() { +// if (queueThread == null) { +// try { +// Platform.runLater(() -> queueThread = Thread.currentThread()); +// Root.ROOT.getEnvironment().getWaiter(QUEUE_IDENTIFYING_TIMEOUT.getName()) +// .ensureState((State<Object>) () -> queueThread); +// } catch (TimeoutExpiredException e) { +// queueThread = Thread.currentThread(); +// } +// } +// return queueThread; +// } /** * {@inheritDoc} @@ -105,7 +93,8 @@ public void executeQueue(Environment env, Action action, Object... parameters) { Platform.runLater(wrapper); wrapper.waitDone(env.getTimeout(MAX_ACTION_TIME)); if (wrapper.failed()) { - throw new JemmyException("Failed to execute action '" + action + "' through Platform.runLater", action.getThrowable()); + throw new JemmyException("Failed to execute action '" + action + + "' through Platform.runLater", action.getThrowable()); } } } @@ -130,6 +119,8 @@ public void executeQueueDetached(Environment env, Action action, Object... param */ @Override public boolean isOnQueue() { + //this is bad. THere got to be a way to check if we're on the queue + //or not. right now - no other way - sorry //return Thread.currentThread().equals(getQueueThread()); try { Toolkit.getToolkit().checkFxUserThread(); @@ -149,13 +140,8 @@ public boolean isOnQueue() { protected boolean isQuiet() { emptyFunction.prepare(); Platform.runLater(emptyFunction); - Environment.getEnvironment().getWaiter(MAX_ACTION_TIME).ensureState(new State<Object>() { - - @Override - public Object reached() { - return emptyFunction.isExecuted() ? "" : null; - } - }); + Environment.getEnvironment().getWaiter(MAX_ACTION_TIME) + .ensureState((State<Object>) () -> emptyFunction.isExecuted() ? "" : null); return emptyFunction.getTime() <= QUEUE_THROUGH_TIME.getValue(); } @@ -190,6 +176,7 @@ class WrapperFunction implements Runnable { private Action action = null; private Object[] parameters = null; private boolean done = false; + private RuntimeException exception; public void setAction(Action action) { this.action = action; @@ -204,6 +191,7 @@ public void run() { try { action.execute(parameters); } catch (RuntimeException e) { + exception = e; } synchronized (this) { done = true; @@ -226,7 +214,7 @@ public boolean failed() { } public Throwable getThrowable() { - return action.getThrowable(); + return (action.getThrowable() != null) ? action.getThrowable() : exception; } public synchronized void waitDone(Timeout timeout) { diff --git a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/RelativeMouse.java b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/RelativeMouse.java index 12c24d6d..9ecf7dd8 100644 --- a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/RelativeMouse.java +++ b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/RelativeMouse.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -127,9 +127,10 @@ public void move(Point p) { @Override public void click() { - if (!isInWindow(node, null)) {// TODO: using drag&drop is questionable - throw new JemmyException("Click point is outside the window", node); - } + //TODO +// if (!isInWindow(node, null)) {// TODO: using drag&drop is questionable +// throw new JemmyException("Click point is outside the window", node); +// } theMouse.click(); } diff --git a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/Root.java b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/Root.java index bdcb5c09..bc7638fb 100644 --- a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/Root.java +++ b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/Root.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,9 +29,15 @@ import org.jemmy.control.Wrapper; import org.jemmy.env.Environment; import org.jemmy.image.*; +import org.jemmy.image.awt.AWTRobotCapturer; +import org.jemmy.image.awt.BufferedImageComparator; +import org.jemmy.image.awt.FilesystemImageLoader; +import org.jemmy.image.glass.FileGlassImageLoader; +import org.jemmy.image.glass.GlassImageCapturer; +import org.jemmy.image.glass.GlassPixelImageComparator; import org.jemmy.image.pixel.PixelEqualityRasterComparator; import org.jemmy.image.pixel.RasterComparator; -import org.jemmy.input.AWTRobotInputFactory; +import org.jemmy.input.awt.AWTRobotInputFactory; import org.jemmy.input.glass.GlassInputFactory; import org.jemmy.interfaces.ControlInterfaceFactory; import org.jemmy.lookup.AbstractParent; @@ -95,8 +101,6 @@ private Root() { useGlassRobot(this.env); } else if ( "awt".equals(robotType) ) { useAWTRobot(env); - } else if( ( osName.contains("nux") || osName.contains("nix") || osName.contains("sunos") || osName.contains("mac os") ) && !isEmbedded) { - useAWTRobot(env); } else { useGlassRobot(this.env); } diff --git a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/SceneWrap.java b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/SceneWrap.java index 87f2fc2c..7fe87806 100644 --- a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/SceneWrap.java +++ b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/SceneWrap.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -205,21 +205,23 @@ static void show(final Environment env, final Scene scene) { @Override public void run(Object... os) throws Exception { Window stage = scene.getWindow(); - if (!((Stage) stage).isFocused()) { + if (!stage.isFocused()) { ((Stage) stage).toFront(); + stage.requestFocus(); } } }); - env.getWaiter(WAIT_STATE_TIMEOUT).ensureValue(true, new State<Boolean>() { - public Boolean reached() { - return isFocused(scene, env); - } - }); + //TODO + //bug in FX??? +// env.getWaiter(WAIT_STATE_TIMEOUT).ensureValue(true, () -> isFocused(scene, env)); } } private static boolean isFocused(final Scene scene, Environment env) { - return new FutureAction<>(env, () -> scene.getWindow().isFocused()).get(); + return new FutureAction<>(env, () -> { +// System.out.println("scene.getWindow().isFocused() = " + scene.getWindow().isFocused()); + return scene.getWindow().isFocused(); + }).get(); } private static boolean isStageInstance(final Scene scene, Environment env) { diff --git a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/CheckBoxWrap.java b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/CheckBoxWrap.java index aed9f4ca..7d8bae2a 100644 --- a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/CheckBoxWrap.java +++ b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/CheckBoxWrap.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -148,18 +148,6 @@ public static CheckBoxWrap<CheckBox> find(NodeParent parent, String text) { getProperty(Root.LOOKUP_STRING_COMPARISON, StringComparePolicy.EXACT))); } - /** - * @param box - * @return - */ - public static State getState(CheckBox box) { - if (!box.isIndeterminate()) { - return box.isSelected() ? State.CHECKED : State.UNCHECKED; - } else { - return State.UNDEFINED; - } - } - /** * @return */ @@ -170,7 +158,11 @@ public State getState() { @Override public void run(Object... parameters) { - setResult(getState(getControl())); + if (!getControl().isIndeterminate()) { + setResult(getControl().isSelected() ? State.CHECKED : State.UNCHECKED); + } else { + setResult(State.UNDEFINED); + } } @Override diff --git a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/ColorPickerWrap.java b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/ColorPickerWrap.java index 705fce51..c7993ec1 100644 --- a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/ColorPickerWrap.java +++ b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/ColorPickerWrap.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,8 +29,7 @@ import javafx.scene.paint.Color; import org.jemmy.control.*; import org.jemmy.env.Environment; -import org.jemmy.fx.Root; -import org.jemmy.interfaces.Editor; +import org.jemmy.fx.interfaces.Editor; @ControlType(ColorPicker.class) @ControlInterfaces(value=Editor.class, diff --git a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/ComboBoxWrap.java b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/ComboBoxWrap.java index f34b76ed..91a4153c 100644 --- a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/ComboBoxWrap.java +++ b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/ComboBoxWrap.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -36,6 +36,7 @@ import org.jemmy.fx.ByObject; import org.jemmy.fx.ByStyleClass; import org.jemmy.fx.Root; +import org.jemmy.fx.interfaces.CriteriaSelectable; import org.jemmy.input.SelectionText; import org.jemmy.interfaces.*; import org.jemmy.lookup.Lookup; @@ -113,9 +114,12 @@ public void run(Object... os) throws Exception { public void select(final T state) { if (!isShowing()) { - ComboBoxWrap.this.as(Parent.class, Node.class).lookup(new ByStyleClass<>("arrow-button")).wrap().mouse().click(); + ComboBoxWrap.this.as(Parent.class, Node.class).lookup(new ByStyleClass<>("arrow-button")) + .wrap().mouse()/*.detached()*/.click(); } - Parent<Node> popupContainer = Root.ROOT.lookup(cntrl -> Root.ROOT.lookup(new ByObject<>(cntrl)).wrap().as(Parent.class, Node.class).lookup(new ByStyleClass(COMBO_BOX_STYLE_CLASS)).size() == 1).as(Parent.class, Node.class); + Parent<Node> popupContainer = Root.ROOT.lookup(cntrl -> Root.ROOT.lookup(new ByObject<>(cntrl)) + .wrap().as(Parent.class, Node.class).lookup(new ByStyleClass(COMBO_BOX_STYLE_CLASS)).size() == 1) + .as(Parent.class, Node.class); Wrap<? extends ListView> list = popupContainer.lookup(ListView.class).wrap(); list.as(Selectable.class, type).selector().select(state); diff --git a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/ItemDataParent.java b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/ItemDataParent.java index baba84e9..43309700 100644 --- a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/ItemDataParent.java +++ b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/ItemDataParent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,7 +26,7 @@ import org.jemmy.control.Wrap; import org.jemmy.interfaces.ControlInterface; -import org.jemmy.interfaces.EditableCellOwner; +import org.jemmy.fx.interfaces.EditableCellOwner; import org.jemmy.interfaces.Keyboard.KeyboardModifier; import org.jemmy.interfaces.Keyboard.KeyboardModifiers; import org.jemmy.interfaces.Mouse.MouseButtons; @@ -40,6 +40,7 @@ import java.io.PrintStream; import java.util.ArrayList; import java.util.List; +import java.util.Locale; abstract class ItemDataParent<ITEM, AUX> implements EditableCellOwner<AUX> { @@ -105,6 +106,10 @@ CellEditor<? super AUX> getEditor() { } public List<Wrap<? extends AUX>> select(LookupCriteria<AUX>... criteria) { + //TODO + //global setting? + var multySelectModifier = System.getProperty("os.name").toLowerCase() + .contains("mac os") ? KeyboardModifiers.META_DOWN_MASK : KeyboardModifiers.CTRL_DOWN_MASK; List<Wrap<? extends AUX>> res = new ArrayList<>(); KeyboardModifier[] mods = new KeyboardModifier[0]; for (LookupCriteria<AUX> cr : criteria) { @@ -116,7 +121,7 @@ public List<Wrap<? extends AUX>> select(LookupCriteria<AUX>... criteria) { w.as(Showable.class).shower().show(); w.mouse().click(1, w.getClickPoint(), MouseButtons.BUTTON1, mods); - mods = new KeyboardModifier[]{KeyboardModifiers.CTRL_DOWN_MASK}; + mods = new KeyboardModifier[]{multySelectModifier}; res.add(w); } } diff --git a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/ItemParent.java b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/ItemParent.java index 82d5c494..300279e2 100644 --- a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/ItemParent.java +++ b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/ItemParent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,8 +29,7 @@ import java.util.List; import org.jemmy.control.Wrap; import org.jemmy.interfaces.ControlInterface; -import org.jemmy.interfaces.EditableCellOwner; -import org.jemmy.interfaces.EditableCellOwner.CellEditor; +import org.jemmy.fx.interfaces.EditableCellOwner; import org.jemmy.interfaces.Keyboard.KeyboardModifier; import org.jemmy.interfaces.Keyboard.KeyboardModifiers; import org.jemmy.interfaces.Mouse.MouseButtons; @@ -114,7 +113,8 @@ public List<Wrap<? extends ITEM>> select(LookupCriteria<ITEM>... criteria) { w.as(Showable.class).shower().show(); w.mouse().click(1, w.getClickPoint(), MouseButtons.BUTTON1, mods); - mods = new KeyboardModifier[]{KeyboardModifiers.CTRL_DOWN_MASK}; +// mods = new KeyboardModifier[]{KeyboardModifiers.CTRL_DOWN_MASK}; + mods = new KeyboardModifier[]{KeyboardModifiers.META_DOWN_MASK}; res.add(w); } } diff --git a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/ItemWrap.java b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/ItemWrap.java index dbcbb088..7f1c426c 100644 --- a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/ItemWrap.java +++ b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/ItemWrap.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -32,8 +32,8 @@ import org.jemmy.control.Wrap; import org.jemmy.dock.DockInfo; import org.jemmy.dock.ObjectLookup; -import org.jemmy.interfaces.EditableCellOwner.CellEditor; -import org.jemmy.interfaces.EditableCellOwner.EditableCell; +import org.jemmy.fx.interfaces.EditableCellOwner.CellEditor; +import org.jemmy.fx.interfaces.EditableCellOwner.EditableCell; import org.jemmy.interfaces.Parent; import org.jemmy.interfaces.Show; import org.jemmy.interfaces.Showable; diff --git a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/ListItemParent.java b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/ListItemParent.java index a0a211f2..7ab563af 100644 --- a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/ListItemParent.java +++ b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/ListItemParent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -36,7 +36,7 @@ * @author Shura, KAM */ public class ListItemParent<ITEM> extends ItemParent<ITEM, Integer> - implements org.jemmy.interfaces.List<ITEM> { + implements org.jemmy.fx.interfaces.List<ITEM> { ListViewWrap<? extends ListView> listViewOp; diff --git a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/ListItemWrap.java b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/ListItemWrap.java index 3e3d14a5..af76c8c1 100644 --- a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/ListItemWrap.java +++ b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/ListItemWrap.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -34,7 +34,6 @@ import javafx.scene.control.Control; import javafx.scene.control.ListCell; import javafx.scene.control.ListView; -import javafx.util.Callback; import org.jemmy.Point; import org.jemmy.Rectangle; import org.jemmy.action.GetAction; @@ -42,10 +41,9 @@ import org.jemmy.dock.DockInfo; import org.jemmy.fx.Utils; import org.jemmy.fx.WindowElement; -import static org.jemmy.fx.control.TableUtils.getClickPoint; import org.jemmy.input.AbstractScroll; -import org.jemmy.interfaces.EditableCellOwner.CellEditor; -import org.jemmy.interfaces.EditableCellOwner.EditableCell; +import org.jemmy.fx.interfaces.EditableCellOwner.CellEditor; +import org.jemmy.fx.interfaces.EditableCellOwner.EditableCell; import org.jemmy.interfaces.*; import org.jemmy.lookup.LookupCriteria; @@ -164,7 +162,7 @@ public boolean check(ListCell control) { Bounds controlBounds = lv.sceneToLocal( control.localToScene(control.getBoundsInLocal())); if (viewArea.contains(controlBounds)) { - Long index = new Long(control.getIndex()); + Long index = Long.valueOf(control.getIndex()); res.add(index); return false; } @@ -237,4 +235,18 @@ public String toString() { return "Looking for a visible listCell with the value '" + item + "'"; } } + + public static class ByItemLookup implements LookupCriteria<ListView> { + + public final LookupCriteria itemLookup; + + public ByItemLookup(LookupCriteria itemLookup) { + this.itemLookup = itemLookup; + } + + @Override + public boolean check(ListView view) { + return view.getItems().stream().anyMatch(itemLookup::check); + } + } } diff --git a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/ListViewWrap.java b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/ListViewWrap.java index 98615cbd..294bb22d 100644 --- a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/ListViewWrap.java +++ b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/ListViewWrap.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -36,7 +36,6 @@ import org.jemmy.fx.NodeParent; import org.jemmy.fx.NodeWrap; import org.jemmy.fx.control.Scrollable2DImpl.EmptyScroll; -import org.jemmy.fx.control.Scrollable2DImpl.EmptyScroller; import org.jemmy.input.AbstractScroll; import org.jemmy.interfaces.*; import org.jemmy.lookup.Any; @@ -61,14 +60,14 @@ * @see ListViewDock */ @ControlType({ListView.class}) -@ControlInterfaces(value = {org.jemmy.interfaces.List.class, Selectable.class, Scroll.class}, +@ControlInterfaces(value = {org.jemmy.fx.interfaces.List.class, Selectable.class, Scroll.class}, encapsulates = {Object.class, Object.class}) public class ListViewWrap<CONTROL extends ListView> extends NodeWrap<CONTROL> implements Scroll, Selectable<Object> { private AbstractScroll scroll; private AbstractScroll emptyScroll = new EmptyScroll(); - private static Scroller emptyScroller = new EmptyScroller(); + private static Scroll emptyScroller = new Scrollable2DImpl.EmptyScroller(); private Selectable<Object> objectSelectable = new ListViewSelectable<Object>(Object.class); /** @@ -168,12 +167,11 @@ public <T extends Object> Selectable<T> asSelectable(Class<T> type) { * Allows to perform lookup within the list view by criteria formulated * in terms of user data stored in the list. * - * @return * @see #asItemParent(java.lang.Class) * @see ListItemWrap */ @As(Object.class) - public <T extends Object> org.jemmy.interfaces.List<T> asItemParent(Class<T> type) { + public <T extends Object> org.jemmy.fx.interfaces.List<T> asItemParent(Class<T> type) { return new ListItemParent<>(this, type); } @@ -182,7 +180,6 @@ long getSelectedIndex() { } /** - * @return */ public Object getSelectedItem() { return new FutureAction<Object>(getEnvironment(), () -> getControl().getSelectionModel().getSelectedItem()).get(); @@ -210,7 +207,6 @@ public double minimum() { } } - @Override @Deprecated public double value() { return position(); @@ -221,7 +217,7 @@ public double value() { public double position() { checkScroll(); if (scroll != null) { - return scroll.value(); + return scroll.position(); } else { return 0; } @@ -233,7 +229,7 @@ public Caret caret() { if (scroll != null) { return scroll.caret(); } else { - return emptyScroller; + return emptyScroller.caret(); } } @@ -246,11 +242,10 @@ public void to(double position) { } @Deprecated - @Override - public Scroller scroller() { + public Scroll scroller() { checkScroll(); if (scroll != null) { - return scroll.scroller(); + return scroll; } else { return emptyScroller; } diff --git a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/MenuTreeSelectorImpl.java b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/MenuTreeSelectorImpl.java index 97f5196a..5791ee12 100644 --- a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/MenuTreeSelectorImpl.java +++ b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/MenuTreeSelectorImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -55,6 +55,8 @@ static Wrap<? extends MenuItem> showMenu(Wrap<? extends MenuItem> parent, Lookup throw new IllegalStateException("Length is supposed to be greater than 0 at this moment"); } parent.mouse().click(); + parent.waitState(() -> parent.getControl() instanceof Menu && + ((Menu)parent.getControl()).isShowing() ? parent : null); Parent<MenuItem> container = parent.as(Parent.class, MenuItem.class); Wrap<? extends MenuItem> next = container.lookup(criteria[0]).wrap(); if (criteria.length == 1) { diff --git a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/ScrollBarWrap.java b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/ScrollBarWrap.java index b8b405ce..30ee9b3a 100644 --- a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/ScrollBarWrap.java +++ b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/ScrollBarWrap.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -34,6 +34,8 @@ import org.jemmy.control.Property; import org.jemmy.env.Environment; import org.jemmy.fx.NodeParent; +import org.jemmy.fx.interfaces.Shiftable; +import org.jemmy.fx.interfaces.Shifter; import org.jemmy.input.AbstractScroll; import org.jemmy.interfaces.*; import org.jemmy.lookup.LookupCriteria; @@ -80,7 +82,7 @@ public String toString() { @Override public Caret caret() { - return scroller(); + return ThemeDriverFactory.getThemeFactory().caret(ScrollBarWrap.this, this); } @Override @@ -115,15 +117,17 @@ public String toString() { }.dispatch(getEnvironment()); } - @Override - public double value() { - return position(); - } - - @Override - public Scroller scroller() { - return ThemeDriverFactory.getThemeFactory().caret(ScrollBarWrap.this, this); - } + //TODO +// @Override +// public double value() { +// return position(); +// } +// +// +// @Override +// public Caret scroller() { +// return ThemeDriverFactory.getThemeFactory().caret(ScrollBarWrap.this, this); +// } }; } @@ -173,20 +177,13 @@ public double position() { } @Deprecated - @Override - public double value() { - return position(); - } - - @Override - @Deprecated - public Scroller scroller() { - return theScroll.scroller(); + public double value() { + return theScroll.position(); } @Override public Caret caret() { - return scroller(); + return theScroll.caret(); } public Shifter shifter() { diff --git a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/Scrollable2DImpl.java b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/Scrollable2DImpl.java index e31aeaf7..155d5e29 100644 --- a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/Scrollable2DImpl.java +++ b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/Scrollable2DImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012 ,2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -36,6 +36,7 @@ import org.jemmy.control.Wrap; import org.jemmy.dock.Shortcut; import org.jemmy.fx.Root; +import org.jemmy.fx.interfaces.Scrollable2D; import org.jemmy.input.AbstractScroll; import org.jemmy.interfaces.*; import org.jemmy.interfaces.Caret.Direction; @@ -51,7 +52,7 @@ public class Scrollable2DImpl<SCROLL_CONTROL extends ScrollBar> implements Scrollable2D { private AbstractScroll emptyScroll = new EmptyScroll(); - private static Scroller emptyScroller = new EmptyScroller(); + private static Scroll emptyScroller = new EmptyScroller(); private AbstractScroll hScroll, vScroll; private ScrollsLookupCriteria<SCROLL_CONTROL> scrollsLookupCriteria; private Wrap<? extends Control> scrolledControl; @@ -159,7 +160,7 @@ public Caret hcaret() { if (vScroll != null) { return vScroll.caret(); } else { - return emptyScroller; + return emptyScroller.caret(); } } @@ -169,7 +170,7 @@ public Caret vcaret() { if (vScroll != null) { return vScroll.caret(); } else { - return emptyScroller; + return emptyScroller.caret(); } } @@ -187,7 +188,7 @@ public void hto(double position) { public void hto(Direction condition) { checkScrolls(); if (hScroll != null) { - hScroll.scroller().to(condition); + hScroll.caret().to(condition); } } @@ -205,7 +206,7 @@ public void vto(double position) { public void vto(Direction condition) { checkScrolls(); if (vScroll != null) { - vScroll.scroller().to(condition); + vScroll.caret().to(condition); } } @@ -258,7 +259,7 @@ public void to(Direction hCondition, Direction vCondition) { * scrollBar, having needed orientation, is that one, which is needed for * scrolling in that direction. * - * @param <CONTROL> for special cases of ScrollBar - like VirtualScrollBar. + * @param < CONTROL ></> for special cases of ScrollBar - like VirtualScrollBar. */ public abstract static class ScrollsLookupCriteria<SCROLL_BAR extends ScrollBar> implements LookupCriteria<SCROLL_BAR> { @@ -309,7 +310,7 @@ public double position() { @Override public Caret caret() { - return emptyScroller; + return emptyScroller.caret(); } @Override @@ -321,34 +322,140 @@ public double maximum() { public double minimum() { throw new JemmyException(""); } + } + + public static class EmptyScroller implements Scroll { @Override - public double value() { - throw new JemmyException(""); + public double maximum() { + return 0; + } + + @Override + public double minimum() { + return 0; + } + + @Override + public double position() { + return 0; } @Override - public Scroller scroller() { - return emptyScroller; + public Caret caret() { + return new Caret() { + @Override + public void to(double v) { + + } + + @Override + public void to(Direction direction) { + + } + }; + } + + @Override + public void to(double v) { + } } + public static class EmptyScroller2D implements Scrollable2D { + + @Override + public Scroll asVerticalScroll() { + return null; + } + + @Override + public Scroll asHorisontalScroll() { + return null; + } + + @Override + public double hmax() { + return 0; + } + + @Override + public double hmin() { + return 0; + } + + @Override + public double vmax() { + return 0; + } + + @Override + public double vmin() { + return 0; + } + + @Override + public double hpos() { + return 0; + } + + @Override + public double vpos() { + return 0; + } - public static class EmptyScroller implements Scroller { + @Override + public boolean isVerticalScrollable() { + return false; + } @Override - public void to(double value) { + public boolean isHorizontalScrollable() { + return false; } @Override - public void to(Caret.Direction condition) { + public Caret hcaret() { + return null; } @Override - public void scrollTo(double value) { + public Caret vcaret() { + return null; + } + + @Override + public void hto(double position) { + } @Override - public void scrollTo(Scroller.ScrollCondition condition) { + public void hto(Direction condition) { + + } + + @Override + public void vto(double position) { + + } + + @Override + public void vto(Direction condition) { + + } + + @Override + public void to(double hposition, double vposition) { + + } + + @Override + public void to(Point point) { + + } + + @Override + public void to(Direction hCondition, Direction vCondition) { + } } -} \ No newline at end of file +} diff --git a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/SliderWrap.java b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/SliderWrap.java index 5718e51d..239b124a 100644 --- a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/SliderWrap.java +++ b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/SliderWrap.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -33,6 +33,8 @@ import org.jemmy.control.Property; import org.jemmy.env.Environment; import org.jemmy.fx.NodeParent; +import org.jemmy.fx.interfaces.Shiftable; +import org.jemmy.fx.interfaces.Shifter; import org.jemmy.input.AbstractScroll; import org.jemmy.interfaces.*; import org.jemmy.lookup.LookupCriteria; @@ -60,22 +62,6 @@ public SliderWrap(Environment env, T node) { super(env, node); theScroll = new AbstractScroll() { - @Override - public double position() { - return new GetAction<Double>() { - - @Override - public void run(Object... parameters) { - setResult((double) getControl().getValue()); - } - - @Override - public String toString() { - return "Getting position of " + getControl(); - } - }.dispatch(getEnvironment()); - } - @Override public double maximum() { return new GetAction<Double>() { @@ -109,6 +95,9 @@ public String toString() { } @Override + public double position() { + return SliderWrap.this.position(); + } public double value() { return SliderWrap.this.value(); } @@ -118,8 +107,7 @@ public Caret caret() { return scroller(); } - @Override - public Scroller scroller() { + public Caret scroller() { return ThemeDriverFactory.getThemeFactory().caret(SliderWrap.this, this); } }; @@ -167,7 +155,7 @@ public double minimum() { @Property(VALUE_PROP_NAME) @Override public double position() { - return theScroll.position(); + return getControl().getValue(); } @Override @@ -176,7 +164,6 @@ public void to(double position) { } @Deprecated - @Override public double value() { return position(); } @@ -186,9 +173,8 @@ public Caret caret() { return theScroll.caret(); } - @Override - public Scroller scroller() { - return theScroll.scroller(); + public Caret scroller() { + return theScroll.caret(); } public Shifter shifter() { diff --git a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/StringMenuOwnerImpl.java b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/StringMenuOwnerImpl.java index b235ac18..8d5f01b4 100644 --- a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/StringMenuOwnerImpl.java +++ b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/StringMenuOwnerImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,6 +24,7 @@ */ package org.jemmy.fx.control; +import javafx.scene.Node; import javafx.scene.control.Menu; import javafx.scene.control.MenuItem; import org.jemmy.control.Wrap; diff --git a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TabParent.java b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TabParent.java index 8f5b4e6b..d57c4668 100644 --- a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TabParent.java +++ b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TabParent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -30,7 +30,7 @@ import org.jemmy.action.FutureAction; import org.jemmy.control.Wrap; import org.jemmy.control.Wrapper; -import org.jemmy.interfaces.CellOwner; +import org.jemmy.fx.interfaces.CellOwner; import org.jemmy.interfaces.Keyboard.KeyboardModifier; import org.jemmy.interfaces.Keyboard.KeyboardModifiers; import org.jemmy.interfaces.Mouse.MouseButtons; @@ -118,4 +118,4 @@ public List<ITEM> getControls() { ).get(); } -} \ No newline at end of file +} diff --git a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TabWrap.java b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TabWrap.java index fcf4d50f..907e06c2 100644 --- a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TabWrap.java +++ b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TabWrap.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -36,7 +36,9 @@ import org.jemmy.dock.ObjectLookup; import org.jemmy.env.Environment; import org.jemmy.fx.NodeParentImpl; -import org.jemmy.interfaces.CellOwner.Cell; +import org.jemmy.fx.interfaces.CellOwner.Cell; +import org.jemmy.fx.interfaces.Close; +import org.jemmy.fx.interfaces.Closer; import org.jemmy.interfaces.*; import org.jemmy.lookup.ByStringLookup; import org.jemmy.lookup.LookupCriteria; diff --git a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TableCellItemParent.java b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TableCellItemParent.java index f480981a..d7871f39 100644 --- a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TableCellItemParent.java +++ b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TableCellItemParent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,6 +29,7 @@ import javafx.scene.control.TableView; import org.jemmy.Point; import org.jemmy.control.Wrap; +import org.jemmy.fx.interfaces.Table; import org.jemmy.lookup.LookupCriteria; /** @@ -36,7 +37,7 @@ * @param DATA * @author Shura, KAM */ -class TableCellItemParent<DATA> extends ItemDataParent<Point, DATA> implements org.jemmy.interfaces.Table<DATA> { +class TableCellItemParent<DATA> extends ItemDataParent<Point, DATA> implements Table<DATA> { TableViewWrap<? extends TableView> tableViewOp; diff --git a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TableCellItemWrap.java b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TableCellItemWrap.java index a17d399a..d51b0d27 100644 --- a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TableCellItemWrap.java +++ b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TableCellItemWrap.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -34,8 +34,8 @@ import org.jemmy.dock.DockInfo; import org.jemmy.dock.ObjectLookup; import org.jemmy.fx.WindowElement; -import org.jemmy.interfaces.EditableCellOwner.CellEditor; -import org.jemmy.interfaces.EditableCellOwner.EditableCell; +import org.jemmy.fx.interfaces.EditableCellOwner.CellEditor; +import org.jemmy.fx.interfaces.EditableCellOwner.EditableCell; import org.jemmy.interfaces.Parent; import org.jemmy.interfaces.Show; import org.jemmy.interfaces.Showable; @@ -151,4 +151,4 @@ public String toString() { return "Looking for a (" + row + "," + column + ") cell"; } } -} \ No newline at end of file +} diff --git a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TableTreeScroll.java b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TableTreeScroll.java index cd9d4b97..e40476c7 100644 --- a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TableTreeScroll.java +++ b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TableTreeScroll.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -36,7 +36,6 @@ import org.jemmy.interfaces.Caret; import org.jemmy.interfaces.Parent; import org.jemmy.interfaces.Scroll; -import org.jemmy.interfaces.Scroller; import org.jemmy.lookup.Lookup; /** @@ -45,7 +44,7 @@ class TableTreeScroll implements Scroll { private AbstractScroll emptyScroll = new EmptyScroll(); - private Scroller emptyScroller = new EmptyScroller(); + private Scroll emptyScroller = new EmptyScroller(); protected AbstractScroll hScroll, vScroll; private Wrap<? extends Control> control; @@ -128,7 +127,7 @@ public double value() { public double position() { checkScrolls(); if (vScroll != null) { - return vScroll.value(); + return vScroll.position(); } else { return 0; } @@ -139,7 +138,7 @@ public Caret caret() { if (vScroll != null) { return vScroll.caret(); } else { - return emptyScroller; + return emptyScroller.caret(); } } @@ -151,12 +150,12 @@ public void to(double position) { } @Deprecated - public Scroller scroller() { + public Scroll scroller() { checkScrolls(); if (vScroll != null) { - return vScroll.scroller(); + return vScroll; } else { return emptyScroller; } } -} \ No newline at end of file +} diff --git a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TableViewWrap.java b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TableViewWrap.java index ae89efa1..717dbb8d 100644 --- a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TableViewWrap.java +++ b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TableViewWrap.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -35,10 +35,10 @@ import org.jemmy.control.Property; import org.jemmy.env.Environment; import org.jemmy.fx.control.Scrollable2DImpl.ScrollsLookupCriteria; -import org.jemmy.interfaces.EditableCellOwner; +import org.jemmy.fx.interfaces.EditableCellOwner; import org.jemmy.interfaces.Focusable; -import org.jemmy.interfaces.Scrollable2D; -import org.jemmy.interfaces.Table; +import org.jemmy.fx.interfaces.Scrollable2D; +import org.jemmy.fx.interfaces.Table; import java.util.ArrayList; @@ -221,4 +221,4 @@ protected int getRowIndex(IndexedCell tableCell) { protected int getColumnIndex(IndexedCell tableCell) { return ((TableCell) tableCell).getTableView().getVisibleLeafIndex(((TableCell) tableCell).getTableColumn()); } -} \ No newline at end of file +} diff --git a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TextFieldCellEditor.java b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TextFieldCellEditor.java index 0aae012e..c7705494 100644 --- a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TextFieldCellEditor.java +++ b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TextFieldCellEditor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,7 +29,7 @@ import org.jemmy.control.Wrap; import org.jemmy.env.Timeout; import org.jemmy.fx.Root; -import org.jemmy.interfaces.EditableCellOwner.CellEditor; +import org.jemmy.fx.interfaces.EditableCellOwner.CellEditor; import org.jemmy.interfaces.Keyboard.KeyboardButtons; import org.jemmy.interfaces.Parent; import org.jemmy.interfaces.Showable; diff --git a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/ThemeDriverFactory.java b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/ThemeDriverFactory.java index 32d204e9..9e12f2a1 100644 --- a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/ThemeDriverFactory.java +++ b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/ThemeDriverFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -34,11 +34,11 @@ import org.jemmy.control.Wrap; import org.jemmy.fx.Root; import org.jemmy.fx.control.caspian.CaspianDriverFactory; -import org.jemmy.interfaces.Editor; +import org.jemmy.interfaces.Caret; +import org.jemmy.fx.interfaces.Editor; import org.jemmy.interfaces.Focus; import org.jemmy.interfaces.Scroll; -import org.jemmy.interfaces.Scroller; -import org.jemmy.interfaces.Shifter; +import org.jemmy.fx.interfaces.Shifter; import org.jemmy.interfaces.TreeItem; /** @@ -95,7 +95,7 @@ public static ThemeDriverFactory getThemeFactory() { * caret() method. * @return */ - public abstract Scroller caret(final Wrap<? extends Control> wrap, final Scroll scroll); + public abstract Caret caret(final Wrap<? extends Control> wrap, final Scroll scroll); public abstract Shifter track(final Wrap<? extends Control> wrap, final Scroll scroll); diff --git a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TreeImpl.java b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TreeImpl.java index d75c8eec..940a927e 100644 --- a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TreeImpl.java +++ b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TreeImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,7 +27,6 @@ import javafx.scene.control.TreeItem; import javafx.scene.control.TreeView; import org.jemmy.control.Wrap; -import org.jemmy.fx.Root; import org.jemmy.interfaces.Tree; import org.jemmy.interfaces.TreeSelector; import org.jemmy.lookup.LookupCriteria; diff --git a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TreeItemWrap.java b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TreeItemWrap.java index 44c6ea41..96863906 100644 --- a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TreeItemWrap.java +++ b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TreeItemWrap.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -32,11 +32,10 @@ import org.jemmy.control.*; import org.jemmy.dock.DockInfo; import org.jemmy.dock.ObjectLookup; -import org.jemmy.fx.Root; import org.jemmy.fx.WindowElement; -import org.jemmy.interfaces.EditableCellOwner; -import org.jemmy.interfaces.EditableCellOwner.CellEditor; -import org.jemmy.interfaces.EditableCellOwner.EditableCell; +import org.jemmy.fx.interfaces.EditableCellOwner; +import org.jemmy.fx.interfaces.EditableCellOwner.CellEditor; +import org.jemmy.fx.interfaces.EditableCellOwner.EditableCell; import org.jemmy.interfaces.Show; import org.jemmy.interfaces.Showable; import org.jemmy.lookup.LookupCriteria; diff --git a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TreeNodeWrap.java b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TreeNodeWrap.java index ea59f346..66cf2018 100644 --- a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TreeNodeWrap.java +++ b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TreeNodeWrap.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,7 +28,6 @@ import javafx.scene.control.TreeCell; import javafx.scene.control.TreeItem; import javafx.scene.control.TreeView; -import javafx.util.Callback; import org.jemmy.Point; import org.jemmy.Rectangle; import org.jemmy.action.FutureAction; @@ -38,10 +37,9 @@ import org.jemmy.control.Wrap; import org.jemmy.fx.NodeWrap; import org.jemmy.interfaces.*; -import org.jemmy.interfaces.EditableCellOwner.CellEditor; -import org.jemmy.interfaces.EditableCellOwner.EditableCell; +import org.jemmy.fx.interfaces.EditableCellOwner.CellEditor; +import org.jemmy.fx.interfaces.EditableCellOwner.EditableCell; import org.jemmy.lookup.LookupCriteria; -import static org.jemmy.fx.control.TableUtils.*; /** * This wraps a node that renders the tree's data item @@ -76,11 +74,18 @@ public TreeViewWrap<? extends TreeView> tree() { @Override public Rectangle getScreenBounds() { return new FutureAction<>(getEnvironment(), () -> { - TreeCell treeCell = treeViewWrap.getTreeCell(getControl()); - if (treeCell != null) { - return NodeWrap.getScreenBounds(getEnvironment(), treeCell); + try { + TreeCell treeCell = treeViewWrap.getTreeCell(getControl()); + if (treeCell != null) { + return NodeWrap.getScreenBounds(getEnvironment(), treeCell); + } + return null; + } catch (Throwable e) { + //TODO + System.err.println("getScreenBounds"); + e.printStackTrace(); + throw e; } - return null; }).get(); } diff --git a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TreeTableCellParent.java b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TreeTableCellParent.java index 04dc09d2..cba9a4c8 100644 --- a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TreeTableCellParent.java +++ b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TreeTableCellParent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -30,13 +30,14 @@ import org.jemmy.Point; import org.jemmy.control.Wrap; import org.jemmy.fx.control.TableCellItemParent.ByPoint; +import org.jemmy.fx.interfaces.Table; import org.jemmy.lookup.LookupCriteria; /** * @param <DATA> * @author Alexander Kirov */ -class TreeTableCellParent<DATA> extends ItemDataParent<Point, DATA> implements org.jemmy.interfaces.Table<DATA> { +class TreeTableCellParent<DATA> extends ItemDataParent<Point, DATA> implements Table<DATA> { private TreeTableViewWrap<? extends TreeTableView> treeTableViewWrap; @@ -79,4 +80,4 @@ public List<Wrap<? extends DATA>> select(Point... point) { } return select(criteria); } -} \ No newline at end of file +} diff --git a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TreeTableCellWrap.java b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TreeTableCellWrap.java index f2a315c8..796b3bb6 100644 --- a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TreeTableCellWrap.java +++ b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TreeTableCellWrap.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,8 +40,8 @@ import org.jemmy.dock.DockInfo; import org.jemmy.dock.ObjectLookup; import org.jemmy.fx.WindowElement; -import org.jemmy.interfaces.EditableCellOwner.CellEditor; -import org.jemmy.interfaces.EditableCellOwner.EditableCell; +import org.jemmy.fx.interfaces.EditableCellOwner.CellEditor; +import org.jemmy.fx.interfaces.EditableCellOwner.EditableCell; import org.jemmy.interfaces.Parent; import org.jemmy.interfaces.Show; import org.jemmy.interfaces.Showable; @@ -171,4 +171,4 @@ public String toString() { return "Looking for a (" + row + "," + column + ") tree table cell."; } } -} \ No newline at end of file +} diff --git a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TreeTableItemParent.java b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TreeTableItemParent.java index fb64ff0d..efc7aada 100644 --- a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TreeTableItemParent.java +++ b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TreeTableItemParent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,7 +27,6 @@ import javafx.scene.control.TreeItem; import javafx.scene.control.TreeTableView; import org.jemmy.control.Wrap; -import org.jemmy.interfaces.EditableCellOwner; /** * @author Alexander Kirov @@ -68,4 +67,4 @@ private void refresh(TreeItem<? extends AUX> parent) { refresh(si); } } -} \ No newline at end of file +} diff --git a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TreeTableItemWrap.java b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TreeTableItemWrap.java index 5978eab0..1253fdee 100644 --- a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TreeTableItemWrap.java +++ b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TreeTableItemWrap.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -38,10 +38,9 @@ import org.jemmy.dock.DockInfo; import org.jemmy.dock.ObjectLookup; import org.jemmy.fx.WindowElement; -import static org.jemmy.fx.control.TableUtils.getClickPoint; -import org.jemmy.interfaces.EditableCellOwner; -import org.jemmy.interfaces.EditableCellOwner.CellEditor; -import org.jemmy.interfaces.EditableCellOwner.EditableCell; +import org.jemmy.fx.interfaces.EditableCellOwner; +import org.jemmy.fx.interfaces.EditableCellOwner.CellEditor; +import org.jemmy.fx.interfaces.EditableCellOwner.EditableCell; import org.jemmy.interfaces.Parent; import org.jemmy.interfaces.Show; import org.jemmy.interfaces.Showable; @@ -267,4 +266,4 @@ public void expand() { public void collapse() { treeItemImpl.collapse(); } -} \ No newline at end of file +} diff --git a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TreeTableNodeWrap.java b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TreeTableNodeWrap.java index debd39cd..11b8e7a2 100644 --- a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TreeTableNodeWrap.java +++ b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TreeTableNodeWrap.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,7 +28,6 @@ import javafx.scene.control.TreeItem; import javafx.scene.control.TreeTableRow; import javafx.scene.control.TreeTableView; -import javafx.util.Callback; import org.jemmy.Point; import org.jemmy.Rectangle; import org.jemmy.action.GetAction; @@ -38,8 +37,8 @@ import org.jemmy.control.Property; import org.jemmy.control.Wrap; import org.jemmy.fx.NodeWrap; -import org.jemmy.interfaces.EditableCellOwner; -import org.jemmy.interfaces.EditableCellOwner.CellEditor; +import org.jemmy.fx.interfaces.EditableCellOwner; +import org.jemmy.fx.interfaces.EditableCellOwner.CellEditor; import org.jemmy.interfaces.Parent; import org.jemmy.interfaces.Scroll; import org.jemmy.interfaces.Show; @@ -203,4 +202,4 @@ public void expand() { public void collapse() { itemWrap.collapse(); } -} \ No newline at end of file +} diff --git a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TreeTableViewWrap.java b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TreeTableViewWrap.java index a44d23c1..4ce1895c 100644 --- a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TreeTableViewWrap.java +++ b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TreeTableViewWrap.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -48,15 +48,14 @@ import org.jemmy.env.Environment; import org.jemmy.fx.control.Scrollable2DImpl.ScrollsLookupCriteria; import org.jemmy.interfaces.Caret; -import org.jemmy.interfaces.EditableCellOwner; +import org.jemmy.fx.interfaces.EditableCellOwner; import org.jemmy.interfaces.Focusable; import org.jemmy.interfaces.Parent; import org.jemmy.interfaces.Scroll; -import org.jemmy.interfaces.Scrollable2D; -import org.jemmy.interfaces.Scroller; +import org.jemmy.fx.interfaces.Scrollable2D; import org.jemmy.interfaces.Selectable; import org.jemmy.interfaces.Selector; -import org.jemmy.interfaces.Table; +import org.jemmy.fx.interfaces.Table; import org.jemmy.interfaces.Tree; /** @@ -351,7 +350,6 @@ public double maximum() { return scroll.maximum(); } - @Override @Deprecated public double value() { checkScroll(); @@ -359,10 +357,9 @@ public double value() { } @Deprecated - @Override - public Scroller scroller() { + public Caret scroller() { checkScroll(); - return scroll.scroller(); + return scroll.caret(); } @Override diff --git a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TreeViewWrap.java b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TreeViewWrap.java index 7f5cd00e..a74cd2a0 100644 --- a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TreeViewWrap.java +++ b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TreeViewWrap.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -37,6 +37,8 @@ import org.jemmy.control.Property; import org.jemmy.env.Environment; import org.jemmy.fx.control.Scrollable2DImpl.ScrollsLookupCriteria; +import org.jemmy.fx.interfaces.EditableCellOwner; +import org.jemmy.fx.interfaces.Scrollable2D; import org.jemmy.interfaces.*; import org.jemmy.lookup.ByStringLookup; import org.jemmy.resources.StringComparePolicy; @@ -300,7 +302,6 @@ public double maximum() { return scroll.maximum(); } - @Override @Deprecated public double value() { checkScroll(); @@ -308,9 +309,9 @@ public double value() { } @Deprecated - public Scroller scroller() { + public Caret scroller() { checkScroll(); - return scroll.scroller(); + return scroll.caret(); } public Caret caret() { diff --git a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/caspian/CaspianDriverFactory.java b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/caspian/CaspianDriverFactory.java index 9be0ed79..f31644c4 100644 --- a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/caspian/CaspianDriverFactory.java +++ b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/caspian/CaspianDriverFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,8 +40,9 @@ import org.jemmy.fx.control.ThemeDriverFactory; import org.jemmy.fx.control.TreeNodeWrap; import org.jemmy.fx.control.TreeTableItemWrap; +import org.jemmy.fx.interfaces.Shifter; import org.jemmy.interfaces.*; -import org.jemmy.interfaces.Editor; +import org.jemmy.fx.interfaces.Editor; import org.jemmy.interfaces.Keyboard.KeyboardButtons; /** @@ -88,7 +89,7 @@ public void setDragDelta(float dragDelta) { * {@inheritDoc} */ @Override - public Scroller caret(Wrap<? extends Control> wrap, Scroll scroll) { + public Caret caret(Wrap<? extends Control> wrap, Scroll scroll) { KnobTrackScrollerImpl res = createScrollerImpl(wrap, scroll); res.setDragDelta(dragDelta); return res; diff --git a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/caspian/ColorEditorImpl.java b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/caspian/ColorEditorImpl.java index 745bc4aa..cb260cbc 100644 --- a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/caspian/ColorEditorImpl.java +++ b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/caspian/ColorEditorImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,7 +40,7 @@ import org.jemmy.fx.ByText; import org.jemmy.fx.Root; import org.jemmy.fx.control.ColorPickerWrap; -import org.jemmy.interfaces.Editor; +import org.jemmy.fx.interfaces.Editor; import org.jemmy.interfaces.Parent; import org.jemmy.interfaces.Text; import org.jemmy.lookup.Lookup; @@ -103,7 +103,7 @@ public boolean check(Scene cntrl) { }).wrap(); dlg.as(Parent.class, Node.class).lookup(ToggleButton.class, new ByStyleClass(TOGGLE_BUTTON_STYLE_CLASS)).wrap().mouse().click(); Wrap<? extends TextField> color = dlg.as(Parent.class, Node.class).lookup(TextField.class, new ByStyleClass(WEB_COLOR_STYLE_CLASS)).wrap(); - final String hex = "#" + Integer.toHexString(((int) (state.getRed() * 255) << 16) + ((int) (state.getGreen() * 255) << 8) + (int) (state.getBlue() * 255)).toUpperCase(); + final String hex = "#" + Integer.toHexString(((int) (state.getRed() * 255) << 16) + ((int) (state.getGreen() * 255) << 8) + (int) (state.getBlue() * 255)).toLowerCase(); if (!color.as(Text.class).text().equals(hex)) { color.as(Text.class).clear(); color.as(Text.class).type(hex); @@ -138,4 +138,4 @@ public Boolean reached() { public Class<Color> getType() { return Color.class; } -} \ No newline at end of file +} diff --git a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/caspian/KnobTrackScrollerImpl.java b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/caspian/KnobTrackScrollerImpl.java index 1ade50b9..6b00e573 100644 --- a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/caspian/KnobTrackScrollerImpl.java +++ b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/caspian/KnobTrackScrollerImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -33,10 +33,10 @@ import org.jemmy.control.Wrap; import org.jemmy.fx.ByStyleClass; import org.jemmy.input.KnobDragScrollerImpl; -import org.jemmy.input.ScrollTrack; +import org.jemmy.fx.input.ScrollTrack; import org.jemmy.interfaces.Parent; import org.jemmy.interfaces.Scroll; -import org.jemmy.interfaces.Shifter; +import org.jemmy.fx.interfaces.Shifter; /** * Base class for deriving classes like SliderScroller and ScrollBarScroller. @@ -94,15 +94,13 @@ public Vector getScrollVector() { return new Vector(wrap.toAbsolute(new Point(0, 0)), wrap.toAbsolute(end)); } - @Override public void scrollTo(double value) { to(value); } - @Override - public void scrollTo(ScrollCondition condition) { - throw new UnsupportedOperationException("Use to(Direction)."); - } +// public void scrollTo(ScrollCondition condition) { +// throw new UnsupportedOperationException("Use to(Direction)."); +// } /** * Scrolling will be done, if scrollBar is visible, otherwise, we think, diff --git a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/caspian/TreeItem.java b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/caspian/TreeItem.java index a2b3aa31..fbc82d79 100644 --- a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/caspian/TreeItem.java +++ b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/caspian/TreeItem.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -30,7 +30,7 @@ import org.jemmy.control.Wrap; import org.jemmy.fx.control.TreeNodeWrap; import org.jemmy.interfaces.Parent; -import org.jemmy.interfaces.Scrollable2D; +import org.jemmy.fx.interfaces.Scrollable2D; import org.jemmy.timing.DescriptiveState; import org.jemmy.timing.State; diff --git a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/caspian/TreeTableItem.java b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/caspian/TreeTableItem.java index 8d41e7c8..2618128a 100644 --- a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/caspian/TreeTableItem.java +++ b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/caspian/TreeTableItem.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,15 +24,13 @@ */ package org.jemmy.fx.control.caspian; -import java.util.logging.Level; -import java.util.logging.Logger; import javafx.scene.Node; import javafx.scene.control.TreeTableView; import javafx.scene.layout.StackPane; import org.jemmy.control.Wrap; import org.jemmy.fx.control.TreeTableItemWrap; import org.jemmy.interfaces.Parent; -import org.jemmy.interfaces.Scrollable2D; +import org.jemmy.fx.interfaces.Scrollable2D; import org.jemmy.timing.DescriptiveState; import org.jemmy.timing.State; diff --git a/tools/Jemmy/JemmyFX/src/org/jemmy/input/ScrollTrack.java b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/input/ScrollTrack.java similarity index 97% rename from tools/Jemmy/JemmyFX/src/org/jemmy/input/ScrollTrack.java rename to tools/Jemmy/JemmyFX/src/org/jemmy/fx/input/ScrollTrack.java index 408ee9e1..d2252eb3 100644 --- a/tools/Jemmy/JemmyFX/src/org/jemmy/input/ScrollTrack.java +++ b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/input/ScrollTrack.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -22,7 +22,7 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ -package org.jemmy.input; +package org.jemmy.fx.input; import javafx.scene.control.Control; import org.jemmy.Point; @@ -30,9 +30,10 @@ import org.jemmy.control.Wrap; import org.jemmy.env.Environment; import org.jemmy.env.Timeout; +import org.jemmy.input.ScrollerImpl; import org.jemmy.interfaces.Mouse; import org.jemmy.interfaces.Scroll; -import org.jemmy.interfaces.Shifter; +import org.jemmy.fx.interfaces.Shifter; /** * Implementation of Shifter for controls owning a track which can be moved with mouse clicks. diff --git a/tools/Jemmy/JemmyFX/src/org/jemmy/interfaces/CellOwner.java b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/interfaces/CellOwner.java similarity index 89% rename from tools/Jemmy/JemmyFX/src/org/jemmy/interfaces/CellOwner.java rename to tools/Jemmy/JemmyFX/src/org/jemmy/fx/interfaces/CellOwner.java index fe3eeb92..c88c769f 100644 --- a/tools/Jemmy/JemmyFX/src/org/jemmy/interfaces/CellOwner.java +++ b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/interfaces/CellOwner.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -22,9 +22,11 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ -package org.jemmy.interfaces; +package org.jemmy.fx.interfaces; import org.jemmy.control.Wrap; +import org.jemmy.interfaces.Parent; +import org.jemmy.interfaces.TypeControlInterface; import org.jemmy.lookup.LookupCriteria; /** diff --git a/tools/Jemmy/JemmyFX/src/org/jemmy/interfaces/Close.java b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/interfaces/Close.java similarity index 91% rename from tools/Jemmy/JemmyFX/src/org/jemmy/interfaces/Close.java rename to tools/Jemmy/JemmyFX/src/org/jemmy/fx/interfaces/Close.java index b0846b83..e6f277aa 100644 --- a/tools/Jemmy/JemmyFX/src/org/jemmy/interfaces/Close.java +++ b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/interfaces/Close.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -22,7 +22,7 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ -package org.jemmy.interfaces; +package org.jemmy.fx.interfaces; public interface Close { public void close(); diff --git a/tools/Jemmy/JemmyFX/src/org/jemmy/interfaces/Closer.java b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/interfaces/Closer.java similarity index 91% rename from tools/Jemmy/JemmyFX/src/org/jemmy/interfaces/Closer.java rename to tools/Jemmy/JemmyFX/src/org/jemmy/fx/interfaces/Closer.java index 6ebe6711..5db1c7b6 100644 --- a/tools/Jemmy/JemmyFX/src/org/jemmy/interfaces/Closer.java +++ b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/interfaces/Closer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -22,8 +22,8 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ -package org.jemmy.interfaces; +package org.jemmy.fx.interfaces; public interface Closer { public Close closer(); -} \ No newline at end of file +} diff --git a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/interfaces/CriteriaSelectable.java b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/interfaces/CriteriaSelectable.java new file mode 100644 index 00000000..e0f45214 --- /dev/null +++ b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/interfaces/CriteriaSelectable.java @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code 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 General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + */ +package org.jemmy.fx.interfaces; + +import org.jemmy.interfaces.Selectable; +import org.jemmy.lookup.LookupCriteria; + +/** + * + * @author shura + */ +public abstract class CriteriaSelectable<T> implements Selectable<T> { + public void select(LookupCriteria<T> criteria) { + select(criteria, 0); + } + public void select(LookupCriteria<T> criteria, int index) { + for(T s : getStates()) { + if(criteria.check(s)) { + if(s != getState()) { + selector().select(s); + return; + } + } + } + } +} diff --git a/tools/Jemmy/JemmyFX/src/org/jemmy/interfaces/EditableCellOwner.java b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/interfaces/EditableCellOwner.java similarity index 94% rename from tools/Jemmy/JemmyFX/src/org/jemmy/interfaces/EditableCellOwner.java rename to tools/Jemmy/JemmyFX/src/org/jemmy/fx/interfaces/EditableCellOwner.java index 4ba18e9d..aa523861 100644 --- a/tools/Jemmy/JemmyFX/src/org/jemmy/interfaces/EditableCellOwner.java +++ b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/interfaces/EditableCellOwner.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -22,7 +22,7 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ -package org.jemmy.interfaces; +package org.jemmy.fx.interfaces; import org.jemmy.control.Wrap; diff --git a/tools/Jemmy/JemmyFX/src/org/jemmy/interfaces/Editor.java b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/interfaces/Editor.java similarity index 89% rename from tools/Jemmy/JemmyFX/src/org/jemmy/interfaces/Editor.java rename to tools/Jemmy/JemmyFX/src/org/jemmy/fx/interfaces/Editor.java index 130a93cd..97413de9 100644 --- a/tools/Jemmy/JemmyFX/src/org/jemmy/interfaces/Editor.java +++ b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/interfaces/Editor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,9 +23,10 @@ * questions. */ -package org.jemmy.interfaces; +package org.jemmy.fx.interfaces; import org.jemmy.control.Property; +import org.jemmy.interfaces.TypeControlInterface; public interface Editor<T> extends TypeControlInterface<T> { diff --git a/tools/Jemmy/JemmyFX/src/org/jemmy/interfaces/List.java b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/interfaces/List.java similarity index 92% rename from tools/Jemmy/JemmyFX/src/org/jemmy/interfaces/List.java rename to tools/Jemmy/JemmyFX/src/org/jemmy/fx/interfaces/List.java index d77054f1..6de0b8cc 100644 --- a/tools/Jemmy/JemmyFX/src/org/jemmy/interfaces/List.java +++ b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/interfaces/List.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -22,7 +22,7 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ -package org.jemmy.interfaces; +package org.jemmy.fx.interfaces; import org.jemmy.control.Wrap; diff --git a/tools/Jemmy/JemmyFX/src/org/jemmy/interfaces/Scrollable2D.java b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/interfaces/Scrollable2D.java similarity index 95% rename from tools/Jemmy/JemmyFX/src/org/jemmy/interfaces/Scrollable2D.java rename to tools/Jemmy/JemmyFX/src/org/jemmy/fx/interfaces/Scrollable2D.java index 448edeae..aa3fe372 100644 --- a/tools/Jemmy/JemmyFX/src/org/jemmy/interfaces/Scrollable2D.java +++ b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/interfaces/Scrollable2D.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -22,12 +22,15 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ -package org.jemmy.interfaces; +package org.jemmy.fx.interfaces; import org.jemmy.Point; import org.jemmy.control.Property; import org.jemmy.dock.Shortcut; +import org.jemmy.interfaces.Caret; import org.jemmy.interfaces.Caret.Direction; +import org.jemmy.interfaces.ControlInterface; +import org.jemmy.interfaces.Scroll; /** * Interface for controls, which allows scrolling in two directions - vertical @@ -141,4 +144,4 @@ public interface Scrollable2D extends ControlInterface { @Shortcut public void to(Direction hCondition, Direction vCondition); -} \ No newline at end of file +} diff --git a/tools/Jemmy/JemmyFX/src/org/jemmy/interfaces/Shiftable.java b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/interfaces/Shiftable.java similarity index 91% rename from tools/Jemmy/JemmyFX/src/org/jemmy/interfaces/Shiftable.java rename to tools/Jemmy/JemmyFX/src/org/jemmy/fx/interfaces/Shiftable.java index 9aeccd38..7f204ade 100644 --- a/tools/Jemmy/JemmyFX/src/org/jemmy/interfaces/Shiftable.java +++ b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/interfaces/Shiftable.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -22,9 +22,11 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ -package org.jemmy.interfaces; +package org.jemmy.fx.interfaces; +import org.jemmy.interfaces.CaretOwner; + /** * Interface representing an object holding a numeric value which * could be increased or decreased in unit and block steps, diff --git a/tools/Jemmy/JemmyFX/src/org/jemmy/interfaces/Shifter.java b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/interfaces/Shifter.java similarity index 95% rename from tools/Jemmy/JemmyFX/src/org/jemmy/interfaces/Shifter.java rename to tools/Jemmy/JemmyFX/src/org/jemmy/fx/interfaces/Shifter.java index b02544fe..284121be 100644 --- a/tools/Jemmy/JemmyFX/src/org/jemmy/interfaces/Shifter.java +++ b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/interfaces/Shifter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -22,7 +22,7 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ -package org.jemmy.interfaces; +package org.jemmy.fx.interfaces; /** * Interface represents a "handle" for shifting value/position of owning Shiftable diff --git a/tools/Jemmy/JemmyFX/src/org/jemmy/interfaces/Table.java b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/interfaces/Table.java similarity index 92% rename from tools/Jemmy/JemmyFX/src/org/jemmy/interfaces/Table.java rename to tools/Jemmy/JemmyFX/src/org/jemmy/fx/interfaces/Table.java index c57b7675..e8d7a79b 100644 --- a/tools/Jemmy/JemmyFX/src/org/jemmy/interfaces/Table.java +++ b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/interfaces/Table.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -22,7 +22,7 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ -package org.jemmy.interfaces; +package org.jemmy.fx.interfaces; import org.jemmy.Point; diff --git a/tools/Jemmy/JemmyFX/src/org/jemmy/interfaces/Tree.java b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/interfaces/Tree.java similarity index 94% rename from tools/Jemmy/JemmyFX/src/org/jemmy/interfaces/Tree.java rename to tools/Jemmy/JemmyFX/src/org/jemmy/fx/interfaces/Tree.java index e16d92e7..b9371c92 100644 --- a/tools/Jemmy/JemmyFX/src/org/jemmy/interfaces/Tree.java +++ b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/interfaces/Tree.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/tools/Jemmy/JemmyFX/src/org/jemmy/interfaces/TreeSelector.java b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/interfaces/TreeSelector.java similarity index 95% rename from tools/Jemmy/JemmyFX/src/org/jemmy/interfaces/TreeSelector.java rename to tools/Jemmy/JemmyFX/src/org/jemmy/fx/interfaces/TreeSelector.java index 5e50ec87..f217098e 100644 --- a/tools/Jemmy/JemmyFX/src/org/jemmy/interfaces/TreeSelector.java +++ b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/interfaces/TreeSelector.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/tools/Jemmy/JemmyFX/src/org/jemmy/interfaces/CriteriaSelectable.java b/tools/Jemmy/JemmyFX/src/org/jemmy/interfaces/CriteriaSelectable.java deleted file mode 100644 index 5ac30361..00000000 --- a/tools/Jemmy/JemmyFX/src/org/jemmy/interfaces/CriteriaSelectable.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * To change this template, choose Tools | Templates - * and open the template in the editor. - */ -package org.jemmy.interfaces; - -import org.jemmy.lookup.LookupCriteria; - -/** - * - * @author shura - */ -public abstract class CriteriaSelectable<T> implements Selectable<T> { - public void select(LookupCriteria<T> criteria) { - select(criteria, 0); - } - public void select(LookupCriteria<T> criteria, int index) { - for(T s : getStates()) { - if(criteria.check(s)) { - if(s != getState()) { - selector().select(s); - return; - } - } - } - } -} diff --git a/tools/Jemmy/JemmyFX/test/TEST.ROOT b/tools/Jemmy/JemmyFX/test/TEST.ROOT new file mode 100644 index 00000000..0d841c11 --- /dev/null +++ b/tools/Jemmy/JemmyFX/test/TEST.ROOT @@ -0,0 +1,2 @@ +TestNG.dirs = . + diff --git a/tools/Jemmy/JemmyFX/test/org/jemmy/fx/ImageTest.java b/tools/Jemmy/JemmyFX/test/org/jemmy/fx/ImageTest.java index a69f4af8..b35fcf82 100644 --- a/tools/Jemmy/JemmyFX/test/org/jemmy/fx/ImageTest.java +++ b/tools/Jemmy/JemmyFX/test/org/jemmy/fx/ImageTest.java @@ -15,6 +15,12 @@ */ public class ImageTest { +// public static void main(String[] args) throws Exception { +// ImageTest t = new ImageTest(); +// t.setUpClass(); +// t.hello(); +// t.tearDown(); +// } public ImageTest() { } diff --git a/tools/Jemmy/JemmyFX/test/org/jemmy/fx/LookupTest.java b/tools/Jemmy/JemmyFX/test/org/jemmy/fx/LookupTest.java index a3aae555..46335560 100644 --- a/tools/Jemmy/JemmyFX/test/org/jemmy/fx/LookupTest.java +++ b/tools/Jemmy/JemmyFX/test/org/jemmy/fx/LookupTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -44,6 +44,18 @@ */ public class LookupTest { +// public static void main(String[] args) throws Exception { +// LookupTest t = new LookupTest(); +// setUpClass(); +// t.ByText(); +// t.byId(); +// t.byTitle(); +// t.circle(); +// t.scenes(); +// t.square(); +// System.out.println("Done!"); +// } + public LookupTest() { } @@ -91,7 +103,7 @@ public void byTitle() { Wrap<? extends Scene> scene = Root.ROOT. lookup(Scene.class, new ByTitleSceneLookup<>("title1")).wrap(); - Wrap<? extends Scene> scene2 = Root.ROOT.lookup(Scene.class).wrap(0); + Wrap<? extends Scene> scene2 = Root.ROOT.lookup(Scene.class).wrap(1); assertEquals(scene.getControl(), scene2.getControl()); } diff --git a/tools/Jemmy/JemmyFX/test/org/jemmy/fx/control/AccordionApp.java b/tools/Jemmy/JemmyFX/test/org/jemmy/fx/control/AccordionApp.java index 64817cea..9c25b424 100644 --- a/tools/Jemmy/JemmyFX/test/org/jemmy/fx/control/AccordionApp.java +++ b/tools/Jemmy/JemmyFX/test/org/jemmy/fx/control/AccordionApp.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -86,7 +86,7 @@ public void start(Stage stage) throws Exception { Pane createTarget() { Pane pane = new Pane(); - pane.setMinSize(200, 550); + pane.setMinSize(100, 150); CheckBox check = new CheckBox(); check.setTranslateX(100); check.setTranslateY(100); diff --git a/tools/Jemmy/JemmyFX/test/org/jemmy/fx/control/AccordionTest.java b/tools/Jemmy/JemmyFX/test/org/jemmy/fx/control/AccordionTest.java index 80e46dca..f3f9d816 100644 --- a/tools/Jemmy/JemmyFX/test/org/jemmy/fx/control/AccordionTest.java +++ b/tools/Jemmy/JemmyFX/test/org/jemmy/fx/control/AccordionTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,6 +25,9 @@ package org.jemmy.fx.control; +import org.jemmy.Point; +import org.jemmy.env.Timeout; +import org.jemmy.fx.Root; import org.jemmy.fx.SceneDock; import org.jemmy.resources.StringComparePolicy; import org.jemmy.samples.SampleBase; @@ -33,6 +36,9 @@ import org.junit.Test; public class AccordionTest extends SampleBase { + + private static final Timeout TEST_STAB = new Timeout("test.stabilization", 100); + final static int STRESS_COUNT = 20; static SceneDock scene; @@ -61,13 +67,17 @@ public void stress() throws InterruptedException { CheckBoxDock second_check = new CheckBoxDock(second_pane.asParent()); for (int i = 0; i < STRESS_COUNT; i++) { reset(); + Root.ROOT.getEnvironment().getExecutor().waitQuiet(TEST_STAB); second_pane.asExpandable().expand(); + Root.ROOT.getEnvironment().getExecutor().waitQuiet(TEST_STAB); } for (int i = 0; i < STRESS_COUNT / 2; i++) { first_pane.asExpandable().expand(); + Root.ROOT.getEnvironment().getExecutor().waitQuiet(TEST_STAB); CheckBoxWrap.State state = i % 2 == 0 ? CheckBoxWrap.State.CHECKED : CheckBoxWrap.State.UNCHECKED; first_check.asSelectable().selector().select(state); second_pane.asExpandable().expand(); + Root.ROOT.getEnvironment().getExecutor().waitQuiet(TEST_STAB); second_check.asSelectable().selector().select(state); } } diff --git a/tools/Jemmy/JemmyFX/test/org/jemmy/fx/control/CheckBoxTreeTest.java b/tools/Jemmy/JemmyFX/test/org/jemmy/fx/control/CheckBoxTreeTest.java index c383f8dd..911bbf60 100644 --- a/tools/Jemmy/JemmyFX/test/org/jemmy/fx/control/CheckBoxTreeTest.java +++ b/tools/Jemmy/JemmyFX/test/org/jemmy/fx/control/CheckBoxTreeTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -47,6 +47,12 @@ */ public class CheckBoxTreeTest extends SampleBase { +// public static void main(String[] args) throws Exception { +// setUpClass(); +// new CheckBoxTreeTest().setUp(); +// System.out.println("Done!"); +// } + static Wrap<? extends TreeView> tree; static Parent<TreeItem> treeAsParent; static Wrap<? extends Scene> scene; @@ -94,4 +100,4 @@ public void run(Object... os) throws Exception { } }.dispatch(tree.getEnvironment()), "Root"); } -} \ No newline at end of file +} diff --git a/tools/Jemmy/JemmyFX/test/org/jemmy/fx/control/ColorPickerTest.java b/tools/Jemmy/JemmyFX/test/org/jemmy/fx/control/ColorPickerTest.java index 0ea4955d..b1e5829b 100644 --- a/tools/Jemmy/JemmyFX/test/org/jemmy/fx/control/ColorPickerTest.java +++ b/tools/Jemmy/JemmyFX/test/org/jemmy/fx/control/ColorPickerTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,7 +27,10 @@ import javafx.scene.paint.Color; import javafx.scene.shape.Rectangle; +import org.jemmy.Point; +import org.jemmy.env.Timeout; import org.jemmy.fx.NodeDock; +import org.jemmy.fx.Root; import org.jemmy.fx.SceneDock; import org.jemmy.samples.SampleBase; import org.jemmy.timing.State; @@ -44,6 +47,9 @@ public class ColorPickerTest extends SampleBase { public static void launch() throws InterruptedException { startApp(ColorPickerApp.class); scene = new SceneDock(); + //workaround for JDK-8257835 + scene.mouse().click(1); + Root.ROOT.getEnvironment().getExecutor().waitQuiet(new Timeout("", 100)); picker = new ColorPickerDock(scene.asParent(), "picker id"); rect = new NodeDock(scene.asParent(), "rect id"); } @@ -80,4 +86,4 @@ protected static boolean compareColor(Color a, Color b) { (Math.abs(a.getBlue() - b.getBlue()) <= 0.01) && (Math.abs(a.getOpacity()- b.getOpacity()) <= 0.01)); } -} \ No newline at end of file +} diff --git a/tools/Jemmy/JemmyFX/test/org/jemmy/fx/control/ComboBoxTest.java b/tools/Jemmy/JemmyFX/test/org/jemmy/fx/control/ComboBoxTest.java index b764362c..b9e283d1 100644 --- a/tools/Jemmy/JemmyFX/test/org/jemmy/fx/control/ComboBoxTest.java +++ b/tools/Jemmy/JemmyFX/test/org/jemmy/fx/control/ComboBoxTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,6 +26,7 @@ import javafx.scene.Node; import javafx.scene.control.ComboBox; +import javafx.stage.PopupWindow; import org.jemmy.control.Wrap; import org.jemmy.fx.AppExecutor; import org.jemmy.fx.Root; @@ -61,9 +62,10 @@ public void tearDown() { @Test public void select() throws InterruptedException { - Parent<Node> parent = Root.ROOT.lookup().as(Parent.class, Node.class); + Parent<Node> parent = Root.ROOT.lookup(s -> s.getWindow() instanceof PopupWindow) + .as(Parent.class, Node.class); Wrap<? extends ComboBox> bar = parent.lookup(ComboBox.class).wrap(); bar.as(Selectable.class).selector().select("Item 1"); - //bar.as(Text.class).type("Text");//Fails because of https://javafx-jira.kenai.com/browse/RT-31454 + bar.as(Text.class).type("Text"); } -} \ No newline at end of file +} diff --git a/tools/Jemmy/JemmyFX/test/org/jemmy/fx/control/ListItemTest.java b/tools/Jemmy/JemmyFX/test/org/jemmy/fx/control/ListItemTest.java index 427c929c..70493c34 100644 --- a/tools/Jemmy/JemmyFX/test/org/jemmy/fx/control/ListItemTest.java +++ b/tools/Jemmy/JemmyFX/test/org/jemmy/fx/control/ListItemTest.java @@ -6,6 +6,7 @@ import org.jemmy.fx.AppExecutor; import org.jemmy.fx.SceneDock; +import org.jemmy.fx.interfaces.List; import org.jemmy.lookup.Any; import org.jemmy.resources.StringComparePolicy; import org.junit.*; @@ -30,7 +31,7 @@ public static void setUpClass() throws Exception { public static void tearDownClass() throws Exception { } ListViewDock lst; - org.jemmy.interfaces.List list; + List list; @Before public void setUp() throws InterruptedException { diff --git a/tools/Jemmy/JemmyFX/test/org/jemmy/fx/control/ListTest.java b/tools/Jemmy/JemmyFX/test/org/jemmy/fx/control/ListTest.java index 1aa70a57..1b159a06 100644 --- a/tools/Jemmy/JemmyFX/test/org/jemmy/fx/control/ListTest.java +++ b/tools/Jemmy/JemmyFX/test/org/jemmy/fx/control/ListTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,6 +26,7 @@ import org.jemmy.fx.AppExecutor; import org.jemmy.fx.SceneDock; +import org.jemmy.fx.interfaces.List; import org.jemmy.lookup.Any; import org.jemmy.lookup.EqualsLookup; import org.junit.*; @@ -38,6 +39,17 @@ */ public class ListTest { +// public static void main(String[] args) throws Exception { +// setUpClass(); +// ListTest t = new ListTest(); +// t.setUp(); +// t.stringLookup(); +// t.indexLookup(); +// t.multySelect(); +// t.cellSelect(); +// System.out.println("Done!"); +// } + public ListTest() { } @@ -51,7 +63,7 @@ public static void tearDownClass() throws Exception { } ListViewDock lst; - org.jemmy.interfaces.List list; + List list; @Before public void setUp() throws InterruptedException { diff --git a/tools/Jemmy/JemmyFX/test/org/jemmy/fx/control/MenuTest.java b/tools/Jemmy/JemmyFX/test/org/jemmy/fx/control/MenuTest.java index 4887fffd..dfa2ecbb 100644 --- a/tools/Jemmy/JemmyFX/test/org/jemmy/fx/control/MenuTest.java +++ b/tools/Jemmy/JemmyFX/test/org/jemmy/fx/control/MenuTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -33,10 +33,8 @@ import org.jemmy.fx.ByText; import org.jemmy.fx.Controls; import org.jemmy.fx.Root; -import org.jemmy.fx.SceneDock; import org.jemmy.input.StringMenuOwner; import org.jemmy.interfaces.Parent; -import org.jemmy.interfaces.Tree; import org.jemmy.lookup.LookupCriteria; import org.jemmy.resources.StringComparePolicy; import org.junit.After; diff --git a/tools/Jemmy/JemmyFX/test/org/jemmy/fx/control/Reproducer.java b/tools/Jemmy/JemmyFX/test/org/jemmy/fx/control/Reproducer.java new file mode 100644 index 00000000..78bbb640 --- /dev/null +++ b/tools/Jemmy/JemmyFX/test/org/jemmy/fx/control/Reproducer.java @@ -0,0 +1,84 @@ +/* + * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code 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 General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + */ +package org.jemmy.fx.control; + +import javafx.application.Application; +import javafx.application.Platform; +import javafx.event.EventHandler; +import javafx.scene.Scene; +import javafx.scene.control.Button; +import javafx.scene.control.TextArea; +import javafx.scene.control.TextField; +import javafx.scene.control.TextInputControl; +import javafx.scene.input.KeyEvent; +import javafx.scene.layout.VBox; +import javafx.scene.text.Text; +import javafx.stage.Stage; + +public class Reproducer extends Application { + + Text text; + TextField singleLine; + TextArea multiLine; + + @Override + public void start(Stage stage) throws Exception { + text = new Text(); + EventHandler<KeyEvent> textUpdate = t -> { + Platform.runLater(() -> { + updateText((TextInputControl) t.getSource()); + }); + }; + singleLine = new TextField(); + singleLine.addEventHandler(KeyEvent.KEY_TYPED, textUpdate); + singleLine.setId("single"); + multiLine = new TextArea(); + multiLine.addEventHandler(KeyEvent.KEY_TYPED, textUpdate); + reset(); + Button reset = new Button("Reset"); + reset.setOnAction(t -> { + reset(); + }); + VBox content = new VBox(); + content.getChildren().add(reset); + content.getChildren().addAll(singleLine, multiLine, text); + stage.setScene(new Scene(content)); + stage.show(); + } + + private void updateText(TextInputControl textInputControl) { + text.setText("uneditable text:\n" + textInputControl.getText()); + } + + private void reset() { + singleLine.setText("single line text"); + //TODO + //multiLine.setText("multi\nline\ntext\n"); + updateText(multiLine); + } + + public static void main(String[] args) { + launch(); + } +} diff --git a/tools/Jemmy/JemmyFX/test/org/jemmy/fx/control/TableItemTest.java b/tools/Jemmy/JemmyFX/test/org/jemmy/fx/control/TableItemTest.java index a01e94a1..ed0bcc7a 100644 --- a/tools/Jemmy/JemmyFX/test/org/jemmy/fx/control/TableItemTest.java +++ b/tools/Jemmy/JemmyFX/test/org/jemmy/fx/control/TableItemTest.java @@ -6,10 +6,9 @@ import org.jemmy.fx.AppExecutor; import org.jemmy.fx.SceneDock; -import org.jemmy.interfaces.Table; +import org.jemmy.fx.interfaces.Table; import org.jemmy.resources.StringComparePolicy; import org.junit.*; -import static org.junit.Assert.*; /** * diff --git a/tools/Jemmy/JemmyFX/test/org/jemmy/fx/control/TableViewLookupTest.java b/tools/Jemmy/JemmyFX/test/org/jemmy/fx/control/TableViewLookupTest.java index 1b766013..5038f03d 100644 --- a/tools/Jemmy/JemmyFX/test/org/jemmy/fx/control/TableViewLookupTest.java +++ b/tools/Jemmy/JemmyFX/test/org/jemmy/fx/control/TableViewLookupTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,7 +29,7 @@ import org.jemmy.control.Wrap; import org.jemmy.fx.AppExecutor; import org.jemmy.fx.SceneDock; -import org.jemmy.interfaces.Table; +import org.jemmy.fx.interfaces.Table; import org.jemmy.lookup.EqualsLookup; import org.junit.*; diff --git a/tools/Jemmy/JemmyFX/test/org/jemmy/fx/control/TextTest.java b/tools/Jemmy/JemmyFX/test/org/jemmy/fx/control/TextTest.java index bbcd15f1..c8878ff7 100644 --- a/tools/Jemmy/JemmyFX/test/org/jemmy/fx/control/TextTest.java +++ b/tools/Jemmy/JemmyFX/test/org/jemmy/fx/control/TextTest.java @@ -11,12 +11,17 @@ import org.jemmy.fx.SceneDock; import org.jemmy.input.CaretText; import org.jemmy.input.SelectionText; +import org.jemmy.input.awt.AWTRobotInputFactory; import org.jemmy.interfaces.ControlInterface; import org.jemmy.interfaces.InterfaceException; +import org.jemmy.interfaces.Keyboard; import org.jemmy.interfaces.Text; import org.jemmy.resources.StringComparePolicy; import org.jemmy.samples.text.TextApp; +import org.jemmy.timing.State; import org.junit.*; + +import static org.jemmy.interfaces.Keyboard.KeyboardButtons.END; import static org.junit.Assert.*; /** @@ -25,11 +30,19 @@ */ public class TextTest { +// public static void main(String[] args) throws Exception { +// setUpClass(); +// TextTest t = new TextTest(); +// t.asTest(); +// System.out.println("Done!"); +// } + public TextTest() { } @BeforeClass public static void setUpClass() throws Exception { + AWTRobotInputFactory.runInOtherJVM(true); AppExecutor.executeNoBlock(TextApp.class); } diff --git a/tools/Jemmy/JemmyFX/test/org/jemmy/fx/control/TreeTableViewTest.java b/tools/Jemmy/JemmyFX/test/org/jemmy/fx/control/TreeTableViewTest.java index e30188a9..ad3e10a6 100644 --- a/tools/Jemmy/JemmyFX/test/org/jemmy/fx/control/TreeTableViewTest.java +++ b/tools/Jemmy/JemmyFX/test/org/jemmy/fx/control/TreeTableViewTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2023 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -88,9 +88,12 @@ public void treeItemSelectorTest() { public void tableImplementationTest() { expandAll();//https://javafx-jira.kenai.com/browse/RT-31123 //Supposing, after expansion, we have 40 lines with data. - List<Point> points = java.util.Arrays.asList(new Point[]{new Point(1, 3), new Point(0, 39), new Point(0, 2), new Point(1, 38)}); - treeTableView.asTable().select(new Point(1, 3), new Point(0, 39), new Point(0, 2), new Point(1, 38)); - assertTrue(treeTableView.getSelectedCells().equals(points)); + List<Point> points = java.util.Arrays.asList(new Point[]{new Point(0, 39), new Point(1, 3), new Point(0, 2), new Point(1, 38)}); + treeTableView.asTable().select(new Point(0, 39), new Point(1, 3), new Point(0, 2), new Point(1, 38)); + var selected = treeTableView.getSelectedCells(); + assertEquals(selected.size(), points.size()); + for(Point p : points) + assertTrue(selected.contains(p)); assertTrue(treeTableView.asTable(String.class).select(new Point(1, 1)).get(0) instanceof TreeTableCellWrap); assertTrue(treeTableView.asTable(String.class).select(new Point(0, 0)).get(0).getControl().equals("Root")); @@ -226,4 +229,4 @@ public boolean check(Data cntrl) { return cntrl.mainData.getValue().equals(mainData); } } -} \ No newline at end of file +} diff --git a/tools/Jemmy/JemmyFX/test/org/jemmy/fx/control/TreeTest.java b/tools/Jemmy/JemmyFX/test/org/jemmy/fx/control/TreeTest.java index e8030f92..ffa0581b 100644 --- a/tools/Jemmy/JemmyFX/test/org/jemmy/fx/control/TreeTest.java +++ b/tools/Jemmy/JemmyFX/test/org/jemmy/fx/control/TreeTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -31,8 +31,8 @@ import org.jemmy.env.Timeout; import org.jemmy.fx.AppExecutor; import org.jemmy.fx.SceneDock; -import org.jemmy.interfaces.EditableCellOwner; -import org.jemmy.interfaces.EditableCellOwner.EditableCell; +import org.jemmy.fx.interfaces.EditableCellOwner; +import org.jemmy.fx.interfaces.EditableCellOwner.EditableCell; import org.jemmy.interfaces.Parent; import org.jemmy.interfaces.Selectable; import org.jemmy.lookup.*; diff --git a/tools/Jemmy/JemmyFX/test/org/jemmy/fx/control/WebViewTest.java b/tools/Jemmy/JemmyFX/test/org/jemmy/fx/control/WebViewTest.java index c1c69a2d..31062137 100644 --- a/tools/Jemmy/JemmyFX/test/org/jemmy/fx/control/WebViewTest.java +++ b/tools/Jemmy/JemmyFX/test/org/jemmy/fx/control/WebViewTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -34,6 +34,8 @@ import org.junit.Test; public class WebViewTest extends SampleBase { + //TODO + /* static SceneDock scene; @BeforeClass @@ -56,4 +58,6 @@ public void test() { button.wrap().mouse().click(); } + + */ } diff --git a/tools/Jemmy/JemmyFXBrowser/build.xml b/tools/Jemmy/JemmyFXBrowser/build.xml index 8887f486..856a8af6 100644 --- a/tools/Jemmy/JemmyFXBrowser/build.xml +++ b/tools/Jemmy/JemmyFXBrowser/build.xml @@ -1,38 +1,15 @@ <?xml version="1.0" encoding="UTF-8"?> -<project name="JemmyFXBrowser" default="default" basedir="."> - <description>Builds, tests, and runs the project JemmyFXBrowser.</description> - <import file="nbproject/build-impl.xml"/> - <property file="../../../build.properties"/> - <target name="-pre-init" unless="no.need.to.find.java.fx"> - <ant antfile="../../../detect_javafx-nb.xml" inheritall="true"> - <property name="basedir" location="${basedir}/../../.."/> - <property name="property.file" value="${basedir}/nbproject/private/private.properties"/> - </ant> - </target> - <target name="-post-init"> - <ant antfile="build.xml" target="get-jemmy-core" inheritall="false" inheritrefs="false" dir=".."/> - </target> - <target name="-post-clean"> - <delete dir="${basedir}/target"/> - </target> - <target name="maven" depends="jar"> - <ant antfile="build.xml" dir="${project.JemmyFX}" target="maven"/> - <property file="${project.JemmyFX}/src/org/jemmy/fx/jemmy.properties" prefix="fx"/> - <ant antfile="build.xml" dir="${project.GlassImage}" target="maven"/> - <property file="${project.GlassImage}/src/org/jemmy/image/jemmy.properties" prefix="image"/> - <property file="${basedir}/src/org/jemmy/fx/jemmy.properties" prefix="browser"/> - <copy file="pom-tmpl.xml" tofile="pom.xml" overwrite="true"> - <filterchain> - <replacetokens> - <token key="JemmyFXBrowser.version" value="${browser.javafx.version}.${browser.version.minor}.${browser.version.mini}"/> - <token key="JemmyFX.version" value="${fx.javafx.version}.${fx.version.minor}.${fx.version.mini}"/> - <token key="GlassImage.version" value="${image.javafx.version}.${image.version.minor}.${image.version.mini}"/> - </replacetokens> - </filterchain> - </copy> - <exec command="mvn"> - <arg value="-e"/> - <arg value="install"/> - </exec> - </target> +<project name="jemmyfx.browser" default="compile"> + <basename file="${basedir}" property="."/> + <property name="rootdir" location="${basedir}/../../.."/> + <property name="project.name" value="JemmyFXBrowser"/> + <import file="${rootdir}/tools/make/build-template.xml"/> + <property name="dependencies.classpath" value="${jemmyfx-src}/build/classes"/> + <target name="build-dependencies"> + <antcall target="build-other-project"> + <param name="project" value="${jemmyfx-src}"/> + </antcall> + </target> + <target name="compile" depends="compile-src"/> + <target name="build-test-dependencies"/> </project> diff --git a/tools/Jemmy/JemmyFXBrowser/manifest.mf b/tools/Jemmy/JemmyFXBrowser/manifest.mf deleted file mode 100644 index 328e8e5b..00000000 --- a/tools/Jemmy/JemmyFXBrowser/manifest.mf +++ /dev/null @@ -1,3 +0,0 @@ -Manifest-Version: 1.0 -X-COMMENT: Main-Class will be added automatically by build - diff --git a/tools/Jemmy/JemmyFXBrowser/nbproject/build-impl.xml b/tools/Jemmy/JemmyFXBrowser/nbproject/build-impl.xml deleted file mode 100644 index 4bc615d0..00000000 --- a/tools/Jemmy/JemmyFXBrowser/nbproject/build-impl.xml +++ /dev/null @@ -1,1428 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -*** GENERATED FROM project.xml - DO NOT EDIT *** -*** EDIT ../build.xml INSTEAD *** - -For the purpose of easier reading the script -is divided into following sections: - - - initialization - - compilation - - jar - - execution - - debugging - - javadoc - - test compilation - - test execution - - test debugging - - applet - - cleanup - - --> -<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="JemmyFXBrowser-impl"> - <fail message="Please build using Ant 1.8.0 or higher."> - <condition> - <not> - <antversion atleast="1.8.0"/> - </not> - </condition> - </fail> - <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/> - <!-- - ====================== - INITIALIZATION SECTION - ====================== - --> - <target name="-pre-init"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="-pre-init" name="-init-private"> - <property file="nbproject/private/config.properties"/> - <property file="nbproject/private/configs/${config}.properties"/> - <property file="nbproject/private/private.properties"/> - </target> - <target depends="-pre-init,-init-private" name="-init-user"> - <property file="${user.properties.file}"/> - <!-- The two properties below are usually overridden --> - <!-- by the active platform. Just a fallback. --> - <property name="default.javac.source" value="1.4"/> - <property name="default.javac.target" value="1.4"/> - </target> - <target depends="-pre-init,-init-private,-init-user" name="-init-project"> - <property file="nbproject/configs/${config}.properties"/> - <property file="nbproject/project.properties"/> - </target> - <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init"> - <available file="${manifest.file}" property="manifest.available"/> - <condition property="splashscreen.available"> - <and> - <not> - <equals arg1="${application.splash}" arg2="" trim="true"/> - </not> - <available file="${application.splash}"/> - </and> - </condition> - <condition property="main.class.available"> - <and> - <isset property="main.class"/> - <not> - <equals arg1="${main.class}" arg2="" trim="true"/> - </not> - </and> - </condition> - <condition property="manifest.available+main.class"> - <and> - <isset property="manifest.available"/> - <isset property="main.class.available"/> - </and> - </condition> - <condition property="do.archive"> - <not> - <istrue value="${jar.archive.disabled}"/> - </not> - </condition> - <condition property="do.mkdist"> - <and> - <isset property="do.archive"/> - <isset property="libs.CopyLibs.classpath"/> - <not> - <istrue value="${mkdist.disabled}"/> - </not> - </and> - </condition> - <condition property="manifest.available+main.class+mkdist.available"> - <and> - <istrue value="${manifest.available+main.class}"/> - <isset property="do.mkdist"/> - </and> - </condition> - <condition property="do.archive+manifest.available"> - <and> - <isset property="manifest.available"/> - <istrue value="${do.archive}"/> - </and> - </condition> - <condition property="do.archive+main.class.available"> - <and> - <isset property="main.class.available"/> - <istrue value="${do.archive}"/> - </and> - </condition> - <condition property="do.archive+splashscreen.available"> - <and> - <isset property="splashscreen.available"/> - <istrue value="${do.archive}"/> - </and> - </condition> - <condition property="do.archive+manifest.available+main.class"> - <and> - <istrue value="${manifest.available+main.class}"/> - <istrue value="${do.archive}"/> - </and> - </condition> - <condition property="manifest.available-mkdist.available"> - <or> - <istrue value="${manifest.available}"/> - <isset property="do.mkdist"/> - </or> - </condition> - <condition property="manifest.available+main.class-mkdist.available"> - <or> - <istrue value="${manifest.available+main.class}"/> - <isset property="do.mkdist"/> - </or> - </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"/> - <isset property="have.tests"/> - </and> - </condition> - <condition property="no.javadoc.preview"> - <and> - <isset property="javadoc.preview"/> - <isfalse value="${javadoc.preview}"/> - </and> - </condition> - <property name="run.jvmargs" value=""/> - <property name="run.jvmargs.ide" value=""/> - <property name="javac.compilerargs" value=""/> - <property name="work.dir" value="${basedir}"/> - <condition property="no.deps"> - <and> - <istrue value="${no.dependencies}"/> - </and> - </condition> - <property name="javac.debug" value="true"/> - <property name="javadoc.preview" value="true"/> - <property name="application.args" value=""/> - <property name="source.encoding" value="${file.encoding}"/> - <property name="runtime.encoding" value="${source.encoding}"/> - <condition property="javadoc.encoding.used" value="${javadoc.encoding}"> - <and> - <isset property="javadoc.encoding"/> - <not> - <equals arg1="${javadoc.encoding}" arg2=""/> - </not> - </and> - </condition> - <property name="javadoc.encoding.used" value="${source.encoding}"/> - <property name="includes" value="**"/> - <property name="excludes" value=""/> - <property name="do.depend" value="false"/> - <condition property="do.depend.true"> - <istrue value="${do.depend}"/> - </condition> - <path id="endorsed.classpath.path" path="${endorsed.classpath}"/> - <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'"> - <length length="0" string="${endorsed.classpath}" when="greater"/> - </condition> - <condition else="false" property="jdkBug6558476"> - <and> - <matches pattern="1\.[56]" string="${java.specification.version}"/> - <not> - <os family="unix"/> - </not> - </and> - </condition> - <property name="javac.fork" value="${jdkBug6558476}"/> - <property name="jar.index" value="false"/> - <property name="jar.index.metainf" value="${jar.index}"/> - <property name="copylibs.rebase" value="true"/> - <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/> - <condition property="junit.available"> - <or> - <available classname="org.junit.Test" classpath="${run.test.classpath}"/> - <available classname="junit.framework.Test" classpath="${run.test.classpath}"/> - </or> - </condition> - <condition property="testng.available"> - <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/> - </condition> - <condition property="junit+testng.available"> - <and> - <istrue value="${junit.available}"/> - <istrue value="${testng.available}"/> - </and> - </condition> - <condition else="testng" property="testng.mode" value="mixed"> - <istrue value="${junit+testng.available}"/> - </condition> - <condition else="" property="testng.debug.mode" value="-mixed"> - <istrue value="${junit+testng.available}"/> - </condition> - </target> - <target name="-post-init"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check"> - <fail unless="src.dir">Must set src.dir</fail> - <fail unless="test.src.dir">Must set test.src.dir</fail> - <fail unless="build.dir">Must set build.dir</fail> - <fail unless="dist.dir">Must set dist.dir</fail> - <fail unless="build.classes.dir">Must set build.classes.dir</fail> - <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail> - <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail> - <fail unless="build.test.results.dir">Must set build.test.results.dir</fail> - <fail unless="build.classes.excludes">Must set build.classes.excludes</fail> - <fail unless="dist.jar">Must set dist.jar</fail> - </target> - <target name="-init-macrodef-property"> - <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1"> - <attribute name="name"/> - <attribute name="value"/> - <sequential> - <property name="@{name}" value="${@{value}}"/> - </sequential> - </macrodef> - </target> - <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors"> - <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${src.dir}" name="srcdir"/> - <attribute default="${build.classes.dir}" name="destdir"/> - <attribute default="${javac.classpath}" name="classpath"/> - <attribute default="${javac.processorpath}" name="processorpath"/> - <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="${javac.debug}" name="debug"/> - <attribute default="${empty.dir}" name="sourcepath"/> - <attribute default="${empty.dir}" name="gensrcdir"/> - <element name="customize" optional="true"/> - <sequential> - <property location="${build.dir}/empty" name="empty.dir"/> - <mkdir dir="${empty.dir}"/> - <mkdir dir="@{apgeneratedsrcdir}"/> - <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}"> - <src> - <dirset dir="@{gensrcdir}" erroronmissingdir="false"> - <include name="*"/> - </dirset> - </src> - <classpath> - <path path="@{classpath}"/> - </classpath> - <compilerarg line="${endorsed.classpath.cmd.line.arg}"/> - <compilerarg line="${javac.compilerargs}"/> - <compilerarg value="-processorpath"/> - <compilerarg path="@{processorpath}:${empty.dir}"/> - <compilerarg line="${ap.processors.internal}"/> - <compilerarg line="${annotation.processing.processor.options}"/> - <compilerarg value="-s"/> - <compilerarg path="@{apgeneratedsrcdir}"/> - <compilerarg line="${ap.proc.none.internal}"/> - <customize/> - </javac> - </sequential> - </macrodef> - </target> - <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal"> - <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${src.dir}" name="srcdir"/> - <attribute default="${build.classes.dir}" name="destdir"/> - <attribute default="${javac.classpath}" name="classpath"/> - <attribute default="${javac.processorpath}" name="processorpath"/> - <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="${javac.debug}" name="debug"/> - <attribute default="${empty.dir}" name="sourcepath"/> - <attribute default="${empty.dir}" name="gensrcdir"/> - <element name="customize" optional="true"/> - <sequential> - <property location="${build.dir}/empty" name="empty.dir"/> - <mkdir dir="${empty.dir}"/> - <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}"> - <src> - <dirset dir="@{gensrcdir}" erroronmissingdir="false"> - <include name="*"/> - </dirset> - </src> - <classpath> - <path path="@{classpath}"/> - </classpath> - <compilerarg line="${endorsed.classpath.cmd.line.arg}"/> - <compilerarg line="${javac.compilerargs}"/> - <customize/> - </javac> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac"> - <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${src.dir}" name="srcdir"/> - <attribute default="${build.classes.dir}" name="destdir"/> - <attribute default="${javac.classpath}" name="classpath"/> - <sequential> - <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}"> - <classpath> - <path path="@{classpath}"/> - </classpath> - </depend> - </sequential> - </macrodef> - <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${build.classes.dir}" name="destdir"/> - <sequential> - <fail unless="javac.includes">Must set javac.includes</fail> - <pathconvert pathsep="${line.separator}" property="javac.includes.binary"> - <path> - <filelist dir="@{destdir}" files="${javac.includes}"/> - </path> - <globmapper from="*.java" to="*.class"/> - </pathconvert> - <tempfile deleteonexit="true" property="javac.includesfile.binary"/> - <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/> - <delete> - <files includesfile="${javac.includesfile.binary}"/> - </delete> - <delete> - <fileset file="${javac.includesfile.binary}"/> - </delete> - </sequential> - </macrodef> - </target> - <target if="${junit.available}" name="-init-macrodef-junit-init"> - <condition else="false" property="nb.junit.batch" value="true"> - <and> - <istrue value="${junit.available}"/> - <not> - <isset property="test.method"/> - </not> - </and> - </condition> - <condition else="false" property="nb.junit.single" value="true"> - <and> - <istrue value="${junit.available}"/> - <isset property="test.method"/> - </and> - </condition> - </target> - <target if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}"> - <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element name="customize" optional="true"/> - <sequential> - <property name="junit.forkmode" value="perTest"/> - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> - <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/> - <syspropertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <formatter type="brief" usefile="false"/> - <formatter type="xml"/> - <jvmarg value="-ea"/> - <customize/> - </junit> - </sequential> - </macrodef> - </target> - <target if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}"> - <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element name="customize" optional="true"/> - <sequential> - <property name="junit.forkmode" value="perTest"/> - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> - <batchtest todir="${build.test.results.dir}"> - <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}"> - <filename name="@{testincludes}"/> - </fileset> - </batchtest> - <syspropertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <formatter type="brief" usefile="false"/> - <formatter type="xml"/> - <jvmarg value="-ea"/> - <customize/> - </junit> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/> - <target if="${testng.available}" name="-init-macrodef-testng"> - <macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element name="customize" optional="true"/> - <sequential> - <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}"> - <isset property="test.method"/> - </condition> - <union id="test.set"> - <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}"> - <filename name="@{testincludes}"/> - </fileset> - </union> - <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/> - <testng classfilesetref="test.set" failureProperty="tests.failed" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="JemmyFXBrowser" testname="TestNG tests" workingDir="${work.dir}"> - <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/> - <propertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </propertyset> - <customize/> - </testng> - </sequential> - </macrodef> - </target> - <target name="-init-macrodef-test-impl"> - <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element implicit="true" name="customize" optional="true"/> - <sequential> - <echo>No tests executed.</echo> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl"> - <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element implicit="true" name="customize" optional="true"/> - <sequential> - <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> - <customize/> - </j2seproject3:junit> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl"> - <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element implicit="true" name="customize" optional="true"/> - <sequential> - <j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> - <customize/> - </j2seproject3:testng> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test"> - <macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <sequential> - <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> - <customize> - <classpath> - <path path="${run.test.classpath}"/> - </classpath> - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> - <jvmarg line="${run.jvmargs}"/> - <jvmarg line="${run.jvmargs.ide}"/> - </customize> - </j2seproject3:test-impl> - </sequential> - </macrodef> - </target> - <target if="${junit.available}" name="-init-macrodef-junit-debug" unless="${nb.junit.batch}"> - <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element name="customize" optional="true"/> - <sequential> - <property name="junit.forkmode" value="perTest"/> - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> - <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/> - <syspropertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <formatter type="brief" usefile="false"/> - <formatter type="xml"/> - <jvmarg value="-ea"/> - <jvmarg line="${debug-args-line}"/> - <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> - <customize/> - </junit> - </sequential> - </macrodef> - </target> - <target if="${nb.junit.batch}" name="-init-macrodef-junit-debug-batch"> - <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element name="customize" optional="true"/> - <sequential> - <property name="junit.forkmode" value="perTest"/> - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> - <batchtest todir="${build.test.results.dir}"> - <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}"> - <filename name="@{testincludes}"/> - </fileset> - </batchtest> - <syspropertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <formatter type="brief" usefile="false"/> - <formatter type="xml"/> - <jvmarg value="-ea"/> - <jvmarg line="${debug-args-line}"/> - <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> - <customize/> - </junit> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-junit-debug,-init-macrodef-junit-debug-batch" if="${junit.available}" name="-init-macrodef-junit-debug-impl"> - <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element implicit="true" name="customize" optional="true"/> - <sequential> - <j2seproject3:junit-debug excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> - <customize/> - </j2seproject3:junit-debug> - </sequential> - </macrodef> - </target> - <target if="${testng.available}" name="-init-macrodef-testng-debug"> - <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${main.class}" name="testClass"/> - <attribute default="" name="testMethod"/> - <element name="customize2" optional="true"/> - <sequential> - <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}"> - <isset property="test.method"/> - </condition> - <condition else="-suitename JemmyFXBrowser -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}"> - <matches pattern=".*\.xml" string="@{testClass}"/> - </condition> - <delete dir="${build.test.results.dir}" quiet="true"/> - <mkdir dir="${build.test.results.dir}"/> - <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}"> - <customize> - <customize2/> - <jvmarg value="-ea"/> - <arg line="${testng.debug.mode}"/> - <arg line="-d ${build.test.results.dir}"/> - <arg line="-listener org.testng.reporters.VerboseReporter"/> - <arg line="${testng.cmd.args}"/> - </customize> - </j2seproject3:debug> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl"> - <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${main.class}" name="testClass"/> - <attribute default="" name="testMethod"/> - <element implicit="true" name="customize2" optional="true"/> - <sequential> - <j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}"> - <customize2/> - </j2seproject3:testng-debug> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit"> - <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <attribute default="${main.class}" name="testClass"/> - <attribute default="" name="testMethod"/> - <sequential> - <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> - <customize> - <classpath> - <path path="${run.test.classpath}"/> - </classpath> - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> - <jvmarg line="${run.jvmargs}"/> - <jvmarg line="${run.jvmargs.ide}"/> - </customize> - </j2seproject3:test-debug-impl> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng"> - <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <attribute default="${main.class}" name="testClass"/> - <attribute default="" name="testMethod"/> - <sequential> - <j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}"> - <customize2> - <syspropertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - </customize2> - </j2seproject3:testng-debug-impl> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/> - <!-- - pre NB7.2 profiling section; consider it deprecated - --> - <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/> - <target if="profiler.info.jvmargs.agent" name="-profile-pre-init"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target if="profiler.info.jvmargs.agent" name="-profile-post-init"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile"> - <macrodef name="resolve"> - <attribute name="name"/> - <attribute name="value"/> - <sequential> - <property name="@{name}" value="${env.@{value}}"/> - </sequential> - </macrodef> - <macrodef name="profile"> - <attribute default="${main.class}" name="classname"/> - <element name="customize" optional="true"/> - <sequential> - <property environment="env"/> - <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/> - <java classname="@{classname}" dir="${profiler.info.dir}" fork="true" jvm="${profiler.info.jvm}"> - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> - <jvmarg value="${profiler.info.jvmargs.agent}"/> - <jvmarg line="${profiler.info.jvmargs}"/> - <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/> - <arg line="${application.args}"/> - <classpath> - <path path="${run.classpath}"/> - </classpath> - <syspropertyset> - <propertyref prefix="run-sys-prop."/> - <mapper from="run-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <customize/> - </java> - </sequential> - </macrodef> - </target> - <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" name="-profile-init-check"> - <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail> - <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail> - </target> - <!-- - end of pre NB7.2 profiling section - --> - <target depends="-init-debug-args" name="-init-macrodef-nbjpda"> - <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1"> - <attribute default="${main.class}" name="name"/> - <attribute default="${debug.classpath}" name="classpath"/> - <attribute default="" name="stopclassname"/> - <sequential> - <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}"> - <classpath> - <path path="@{classpath}"/> - </classpath> - </nbjpdastart> - </sequential> - </macrodef> - <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1"> - <attribute default="${build.classes.dir}" name="dir"/> - <sequential> - <nbjpdareload> - <fileset dir="@{dir}" includes="${fix.classes}"> - <include name="${fix.includes}*.class"/> - </fileset> - </nbjpdareload> - </sequential> - </macrodef> - </target> - <target name="-init-debug-args"> - <property name="version-output" value="java version "${ant.java.version}"/> - <condition property="have-jdk-older-than-1.4"> - <or> - <contains string="${version-output}" substring="java version "1.0"/> - <contains string="${version-output}" substring="java version "1.1"/> - <contains string="${version-output}" substring="java version "1.2"/> - <contains string="${version-output}" substring="java version "1.3"/> - </or> - </condition> - <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none"> - <istrue value="${have-jdk-older-than-1.4}"/> - </condition> - <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem"> - <os family="windows"/> - </condition> - <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}"> - <isset property="debug.transport"/> - </condition> - </target> - <target depends="-init-debug-args" name="-init-macrodef-debug"> - <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${main.class}" name="classname"/> - <attribute default="${debug.classpath}" name="classpath"/> - <element name="customize" optional="true"/> - <sequential> - <java classname="@{classname}" dir="${work.dir}" fork="true"> - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> - <jvmarg line="${debug-args-line}"/> - <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> - <jvmarg value="-Dfile.encoding=${runtime.encoding}"/> - <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/> - <jvmarg line="${run.jvmargs}"/> - <jvmarg line="${run.jvmargs.ide}"/> - <classpath> - <path path="@{classpath}"/> - </classpath> - <syspropertyset> - <propertyref prefix="run-sys-prop."/> - <mapper from="run-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <customize/> - </java> - </sequential> - </macrodef> - </target> - <target name="-init-macrodef-java"> - <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1"> - <attribute default="${main.class}" name="classname"/> - <attribute default="${run.classpath}" name="classpath"/> - <attribute default="jvm" name="jvm"/> - <element name="customize" optional="true"/> - <sequential> - <java classname="@{classname}" dir="${work.dir}" fork="true"> - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> - <jvmarg value="-Dfile.encoding=${runtime.encoding}"/> - <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/> - <jvmarg line="${run.jvmargs}"/> - <jvmarg line="${run.jvmargs.ide}"/> - <classpath> - <path path="@{classpath}"/> - </classpath> - <syspropertyset> - <propertyref prefix="run-sys-prop."/> - <mapper from="run-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <customize/> - </java> - </sequential> - </macrodef> - </target> - <target name="-init-macrodef-copylibs"> - <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${manifest.file}" name="manifest"/> - <element name="customize" optional="true"/> - <sequential> - <property location="${build.classes.dir}" name="build.classes.dir.resolved"/> - <pathconvert property="run.classpath.without.build.classes.dir"> - <path path="${run.classpath}"/> - <map from="${build.classes.dir.resolved}" to=""/> - </pathconvert> - <pathconvert pathsep=" " property="jar.classpath"> - <path path="${run.classpath.without.build.classes.dir}"/> - <chainedmapper> - <flattenmapper/> - <filtermapper> - <replacestring from=" " to="%20"/> - </filtermapper> - <globmapper from="*" to="lib/*"/> - </chainedmapper> - </pathconvert> - <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/> - <copylibs compress="${jar.compress}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" rebase="${copylibs.rebase}" runtimeclasspath="${run.classpath.without.build.classes.dir}"> - <fileset dir="${build.classes.dir}"/> - <manifest> - <attribute name="Class-Path" value="${jar.classpath}"/> - <customize/> - </manifest> - </copylibs> - </sequential> - </macrodef> - </target> - <target name="-init-presetdef-jar"> - <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1"> - <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}"> - <j2seproject1:fileset dir="${build.classes.dir}"/> - </jar> - </presetdef> - </target> - <target name="-init-ap-cmdline-properties"> - <property name="annotation.processing.enabled" value="true"/> - <property name="annotation.processing.processors.list" value=""/> - <property name="annotation.processing.processor.options" value=""/> - <property name="annotation.processing.run.all.processors" value="true"/> - <property name="javac.processorpath" value="${javac.classpath}"/> - <property name="javac.test.processorpath" value="${javac.test.classpath}"/> - <condition property="ap.supported.internal" value="true"> - <not> - <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/> - </not> - </condition> - </target> - <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported"> - <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}"> - <isfalse value="${annotation.processing.run.all.processors}"/> - </condition> - <condition else="" property="ap.proc.none.internal" value="-proc:none"> - <isfalse value="${annotation.processing.enabled}"/> - </condition> - </target> - <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline"> - <property name="ap.cmd.line.internal" value=""/> - </target> - <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-test,-init-macrodef-test-debug,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/> - <!-- - =================== - COMPILATION SECTION - =================== - --> - <target name="-deps-jar-init" unless="built-jar.properties"> - <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/> - <delete file="${built-jar.properties}" quiet="true"/> - </target> - <target if="already.built.jar.${basedir}" name="-warn-already-built-jar"> - <echo level="warn" message="Cycle detected: JemmyFXBrowser was already built"/> - </target> - <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps"> - <mkdir dir="${build.dir}"/> - <touch file="${built-jar.properties}" verbose="false"/> - <property file="${built-jar.properties}" prefix="already.built.jar."/> - <antcall target="-warn-already-built-jar"/> - <propertyfile file="${built-jar.properties}"> - <entry key="${basedir}" value=""/> - </propertyfile> - <antcall target="-maybe-call-dep"> - <param name="call.built.properties" value="${built-jar.properties}"/> - <param location="${project.GlassImage}" name="call.subproject"/> - <param location="${project.GlassImage}/build.xml" name="call.script"/> - <param name="call.target" value="jar"/> - <param name="transfer.built-jar.properties" value="${built-jar.properties}"/> - </antcall> - <antcall target="-maybe-call-dep"> - <param name="call.built.properties" value="${built-jar.properties}"/> - <param location="${project.JemmyFX}" name="call.subproject"/> - <param location="${project.JemmyFX}/build.xml" name="call.script"/> - <param name="call.target" value="jar"/> - <param name="transfer.built-jar.properties" value="${built-jar.properties}"/> - </antcall> - </target> - <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/> - <target depends="init" name="-check-automatic-build"> - <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/> - </target> - <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build"> - <antcall target="clean"/> - </target> - <target depends="init,deps-jar" name="-pre-pre-compile"> - <mkdir dir="${build.classes.dir}"/> - </target> - <target name="-pre-compile"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target if="do.depend.true" name="-compile-depend"> - <pathconvert property="build.generated.subdirs"> - <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false"> - <include name="*"/> - </dirset> - </pathconvert> - <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/> - </target> - <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile"> - <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/> - <copy todir="${build.classes.dir}"> - <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> - </copy> - </target> - <target if="has.persistence.xml" name="-copy-persistence-xml"> - <mkdir dir="${build.classes.dir}/META-INF"/> - <copy todir="${build.classes.dir}/META-INF"> - <fileset dir="${meta.inf.dir}" includes="persistence.xml"/> - </copy> - </target> - <target name="-post-compile"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/> - <target name="-pre-compile-single"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single"> - <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail> - <j2seproject3:force-recompile/> - <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}"/> - </target> - <target name="-post-compile-single"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/> - <!-- - ==================== - JAR BUILDING SECTION - ==================== - --> - <target depends="init" name="-pre-pre-jar"> - <dirname file="${dist.jar}" property="dist.jar.dir"/> - <mkdir dir="${dist.jar.dir}"/> - </target> - <target name="-pre-jar"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive" name="-do-jar-without-manifest" unless="manifest.available-mkdist.available"> - <j2seproject1:jar/> - </target> - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class-mkdist.available"> - <j2seproject1:jar manifest="${manifest.file}"/> - </target> - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available+main.class" name="-do-jar-with-mainclass" 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 level="info">To run this application from the command line without Ant, try:</echo> - <property location="${build.classes.dir}" name="build.classes.dir.resolved"/> - <property location="${dist.jar}" name="dist.jar.resolved"/> - <pathconvert property="run.classpath.with.dist.jar"> - <path path="${run.classpath}"/> - <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/> - </pathconvert> - <echo level="info">java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo> - </target> - <target depends="init" if="do.archive" name="-do-jar-with-libraries-create-manifest" unless="manifest.available"> - <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/> - <touch file="${tmp.manifest.file}" verbose="false"/> - </target> - <target depends="init" if="do.archive+manifest.available" name="-do-jar-with-libraries-copy-manifest"> - <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/> - <copy file="${manifest.file}" tofile="${tmp.manifest.file}"/> - </target> - <target depends="init,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest" if="do.archive+main.class.available" name="-do-jar-with-libraries-set-main"> - <manifest file="${tmp.manifest.file}" mode="update"> - <attribute name="Main-Class" value="${main.class}"/> - </manifest> - </target> - <target depends="init,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-with-libraries-set-splashscreen"> - <basename file="${application.splash}" property="splashscreen.basename"/> - <mkdir dir="${build.classes.dir}/META-INF"/> - <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/> - <manifest file="${tmp.manifest.file}" mode="update"> - <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/> - </manifest> - </target> - <target depends="init,-init-macrodef-copylibs,compile,-pre-pre-jar,-pre-jar,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest,-do-jar-with-libraries-set-main,-do-jar-with-libraries-set-splashscreen" if="do.mkdist" name="-do-jar-with-libraries-pack"> - <j2seproject3:copylibs manifest="${tmp.manifest.file}"/> - <echo level="info">To run this application from the command line without Ant, try:</echo> - <property location="${dist.jar}" name="dist.jar.resolved"/> - <echo level="info">java -jar "${dist.jar.resolved}"</echo> - </target> - <target depends="-do-jar-with-libraries-pack" if="do.archive" name="-do-jar-with-libraries-delete-manifest"> - <delete> - <fileset file="${tmp.manifest.file}"/> - </delete> - </target> - <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest,-do-jar-with-libraries-set-main,-do-jar-with-libraries-set-splashscreen,-do-jar-with-libraries-pack,-do-jar-with-libraries-delete-manifest" name="-do-jar-with-libraries"/> - <target name="-post-jar"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target 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." name="jar"/> - <!-- - ================= - EXECUTION SECTION - ================= - --> - <target depends="init,compile" description="Run a main class." name="run"> - <j2seproject1:java> - <customize> - <arg line="${application.args}"/> - </customize> - </j2seproject1:java> - </target> - <target name="-do-not-recompile"> - <property name="javac.includes.binary" value=""/> - </target> - <target depends="init,compile-single" name="run-single"> - <fail unless="run.class">Must select one file in the IDE or set run.class</fail> - <j2seproject1:java classname="${run.class}"/> - </target> - <target depends="init,compile-test-single" name="run-test-with-main"> - <fail unless="run.class">Must select one file in the IDE or set run.class</fail> - <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/> - </target> - <!-- - ================= - DEBUGGING SECTION - ================= - --> - <target depends="init" if="netbeans.home" name="-debug-start-debugger"> - <j2seproject1:nbjpdastart name="${debug.class}"/> - </target> - <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test"> - <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/> - </target> - <target depends="init,compile" name="-debug-start-debuggee"> - <j2seproject3:debug> - <customize> - <arg line="${application.args}"/> - </customize> - </j2seproject3:debug> - </target> - <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/> - <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto"> - <j2seproject1:nbjpdastart stopclassname="${main.class}"/> - </target> - <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/> - <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single"> - <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail> - <j2seproject3:debug classname="${debug.class}"/> - </target> - <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/> - <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test"> - <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail> - <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/> - </target> - <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/> - <target depends="init" name="-pre-debug-fix"> - <fail unless="fix.includes">Must set fix.includes</fail> - <property name="javac.includes" value="${fix.includes}.java"/> - </target> - <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix"> - <j2seproject1:nbjpdareload/> - </target> - <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/> - <!-- - ================= - PROFILING SECTION - ================= - --> - <!-- - pre NB7.2 profiler integration - --> - <target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72"> - <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> - <nbprofiledirect> - <classpath> - <path path="${run.classpath}"/> - </classpath> - </nbprofiledirect> - <profile/> - </target> - <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72"> - <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail> - <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> - <nbprofiledirect> - <classpath> - <path path="${run.classpath}"/> - </classpath> - </nbprofiledirect> - <profile classname="${profile.class}"/> - </target> - <target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72"> - <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> - <nbprofiledirect> - <classpath> - <path path="${run.classpath}"/> - </classpath> - </nbprofiledirect> - <profile classname="sun.applet.AppletViewer"> - <customize> - <arg value="${applet.url}"/> - </customize> - </profile> - </target> - <target depends="profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72"> - <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> - <nbprofiledirect> - <classpath> - <path path="${run.test.classpath}"/> - </classpath> - </nbprofiledirect> - <junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true"> - <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/> - <jvmarg value="${profiler.info.jvmargs.agent}"/> - <jvmarg line="${profiler.info.jvmargs}"/> - <test name="${profile.class}"/> - <classpath> - <path path="${run.test.classpath}"/> - </classpath> - <syspropertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <formatter type="brief" usefile="false"/> - <formatter type="xml"/> - </junit> - </target> - <!-- - end of pre NB72 profiling section - --> - <target if="netbeans.home" name="-profile-check"> - <condition property="profiler.configured"> - <or> - <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/> - <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/> - </or> - </condition> - </target> - <target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent"> - <startprofiler/> - <antcall target="run"/> - </target> - <target depends="-profile-check,-profile-single-pre72" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-single" unless="profiler.info.jvmargs.agent"> - <fail unless="run.class">Must select one file in the IDE or set run.class</fail> - <startprofiler/> - <antcall target="run-single"/> - </target> - <target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/> - <target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs"> - <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail> - <startprofiler/> - <antcall target="test-single"/> - </target> - <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main"> - <fail unless="run.class">Must select one file in the IDE or set run.class</fail> - <startprofiler/> - <antcal target="run-test-with-main"/> - </target> - <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent"> - <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> - <startprofiler/> - <antcall target="run-applet"/> - </target> - <!-- - =============== - JAVADOC SECTION - =============== - --> - <target depends="init" if="have.sources" name="-javadoc-build"> - <mkdir dir="${dist.javadoc.dir}"/> - <condition else="" property="javadoc.endorsed.classpath.cmd.line.arg" value="-J${endorsed.classpath.cmd.line.arg}"> - <and> - <isset property="endorsed.classpath.cmd.line.arg"/> - <not> - <equals arg1="${endorsed.classpath.cmd.line.arg}" arg2=""/> - </not> - </and> - </condition> - <javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" 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}"> - <classpath> - <path path="${javac.classpath}"/> - </classpath> - <fileset dir="${src.dir}" excludes="*.java,${excludes}" includes="${includes}"> - <filename name="**/*.java"/> - </fileset> - <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false"> - <include name="**/*.java"/> - <exclude name="*.java"/> - </fileset> - <arg line="${javadoc.endorsed.classpath.cmd.line.arg}"/> - </javadoc> - <copy todir="${dist.javadoc.dir}"> - <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}"> - <filename name="**/doc-files/**"/> - </fileset> - <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false"> - <include name="**/doc-files/**"/> - </fileset> - </copy> - </target> - <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview"> - <nbbrowse file="${dist.javadoc.dir}/index.html"/> - </target> - <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/> - <!-- - ========================= - TEST COMPILATION SECTION - ========================= - --> - <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test"> - <mkdir dir="${build.test.classes.dir}"/> - </target> - <target name="-pre-compile-test"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target if="do.depend.true" name="-compile-test-depend"> - <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/> - </target> - <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test"> - <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" processorpath="${javac.test.processorpath}" srcdir="${test.src.dir}"/> - <copy todir="${build.test.classes.dir}"> - <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> - </copy> - </target> - <target name="-post-compile-test"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/> - <target name="-pre-compile-test-single"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single"> - <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail> - <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/> - <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" processorpath="${javac.test.processorpath}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/> - <copy todir="${build.test.classes.dir}"> - <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> - </copy> - </target> - <target name="-post-compile-test-single"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/> - <!-- - ======================= - TEST EXECUTION SECTION - ======================= - --> - <target depends="init" if="have.tests" name="-pre-test-run"> - <mkdir dir="${build.test.results.dir}"/> - </target> - <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run"> - <j2seproject3:test testincludes="**/*Test.java"/> - </target> - <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run"> - <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail> - </target> - <target depends="init" if="have.tests" name="test-report"/> - <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/> - <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/> - <target depends="init" if="have.tests" name="-pre-test-run-single"> - <mkdir dir="${build.test.results.dir}"/> - </target> - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single"> - <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail> - <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/> - </target> - <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single"> - <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail> - </target> - <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/> - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method"> - <fail unless="test.class">Must select some files in the IDE or set test.class</fail> - <fail unless="test.method">Must select some method in the IDE or set test.method</fail> - <j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/> - </target> - <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method"> - <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail> - </target> - <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method,-post-test-run-single-method" description="Run single unit test." name="test-single-method"/> - <!-- - ======================= - TEST DEBUGGING SECTION - ======================= - --> - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test"> - <fail unless="test.class">Must select one file in the IDE or set test.class</fail> - <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/> - </target> - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method"> - <fail unless="test.class">Must select one file in the IDE or set test.class</fail> - <fail unless="test.method">Must select some method in the IDE or set test.method</fail> - <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/> - </target> - <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test"> - <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/> - </target> - <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/> - <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/> - <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test"> - <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/> - </target> - <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/> - <!-- - ========================= - APPLET EXECUTION SECTION - ========================= - --> - <target depends="init,compile-single" name="run-applet"> - <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> - <j2seproject1:java classname="sun.applet.AppletViewer"> - <customize> - <arg value="${applet.url}"/> - </customize> - </j2seproject1:java> - </target> - <!-- - ========================= - APPLET DEBUGGING SECTION - ========================= - --> - <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet"> - <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> - <j2seproject3:debug classname="sun.applet.AppletViewer"> - <customize> - <arg value="${applet.url}"/> - </customize> - </j2seproject3:debug> - </target> - <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/> - <!-- - =============== - CLEANUP SECTION - =============== - --> - <target name="-deps-clean-init" unless="built-clean.properties"> - <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/> - <delete file="${built-clean.properties}" quiet="true"/> - </target> - <target if="already.built.clean.${basedir}" name="-warn-already-built-clean"> - <echo level="warn" message="Cycle detected: JemmyFXBrowser was already built"/> - </target> - <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps"> - <mkdir dir="${build.dir}"/> - <touch file="${built-clean.properties}" verbose="false"/> - <property file="${built-clean.properties}" prefix="already.built.clean."/> - <antcall target="-warn-already-built-clean"/> - <propertyfile file="${built-clean.properties}"> - <entry key="${basedir}" value=""/> - </propertyfile> - <antcall target="-maybe-call-dep"> - <param name="call.built.properties" value="${built-clean.properties}"/> - <param location="${project.GlassImage}" name="call.subproject"/> - <param location="${project.GlassImage}/build.xml" name="call.script"/> - <param name="call.target" value="clean"/> - <param name="transfer.built-clean.properties" value="${built-clean.properties}"/> - </antcall> - <antcall target="-maybe-call-dep"> - <param name="call.built.properties" value="${built-clean.properties}"/> - <param location="${project.JemmyFX}" name="call.subproject"/> - <param location="${project.JemmyFX}/build.xml" name="call.script"/> - <param name="call.target" value="clean"/> - <param name="transfer.built-clean.properties" value="${built-clean.properties}"/> - </antcall> - </target> - <target depends="init" name="-do-clean"> - <delete dir="${build.dir}"/> - <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/> - </target> - <target name="-post-clean"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/> - <target name="-check-call-dep"> - <property file="${call.built.properties}" prefix="already.built."/> - <condition property="should.call.dep"> - <and> - <not> - <isset property="already.built.${call.subproject}"/> - </not> - <available file="${call.script}"/> - </and> - </condition> - </target> - <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep"> - <ant antfile="${call.script}" inheritall="false" target="${call.target}"> - <propertyset> - <propertyref prefix="transfer."/> - <mapper from="transfer.*" to="*" type="glob"/> - </propertyset> - </ant> - </target> -</project> diff --git a/tools/Jemmy/JemmyFXBrowser/nbproject/genfiles.properties b/tools/Jemmy/JemmyFXBrowser/nbproject/genfiles.properties deleted file mode 100644 index 171e965e..00000000 --- a/tools/Jemmy/JemmyFXBrowser/nbproject/genfiles.properties +++ /dev/null @@ -1,8 +0,0 @@ -build.xml.data.CRC32=961368be -build.xml.script.CRC32=eed4370e -build.xml.stylesheet.CRC32=28e38971@1.38.3.45 -# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. -# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. -nbproject/build-impl.xml.data.CRC32=f6a41338 -nbproject/build-impl.xml.script.CRC32=f98075a6 -nbproject/build-impl.xml.stylesheet.CRC32=5a01deb7@1.68.1.46 diff --git a/tools/Jemmy/JemmyFXBrowser/nbproject/project.properties b/tools/Jemmy/JemmyFXBrowser/nbproject/project.properties deleted file mode 100644 index 9ef160f2..00000000 --- a/tools/Jemmy/JemmyFXBrowser/nbproject/project.properties +++ /dev/null @@ -1,98 +0,0 @@ -annotation.processing.enabled=true -annotation.processing.enabled.in.editor=false -annotation.processing.processors.list= -annotation.processing.run.all.processors=true -annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output -application.title=JemmyFXBrowser -application.vendor=shura -build.classes.dir=${build.dir}/classes -build.classes.excludes=**/*.java,**/*.form -# This directory is removed when the project is cleaned: -build.dir=build -build.generated.dir=${build.dir}/generated -build.generated.sources.dir=${build.dir}/generated-sources -# Only compile against the classpath explicitly listed here: -build.sysclasspath=ignore -build.test.classes.dir=${build.dir}/test/classes -build.test.results.dir=${build.dir}/test/results -# Uncomment to specify the preferred debugger connection transport: -#debug.transport=dt_socket -debug.classpath=\ - ${run.classpath} -debug.test.classpath=\ - ${run.test.classpath} -# This directory is removed when the project is cleaned: -dist.dir=dist -dist.jar=${dist.dir}/JemmyFXBrowser.jar -dist.javadoc.dir=${dist.dir}/javadoc -endorsed.classpath= -excludes= -file.reference.JemmyAWTInput.jar=../jemmy_core/JemmyAWTInput.jar -file.reference.JemmyBrowser.jar=../jemmy_core/JemmyBrowser.jar -file.reference.JemmyCore.jar=../jemmy_core/JemmyCore.jar -file.reference.junit.jar=../jemmy_core/junit.jar -includes=** -jar.archive.disabled=${jnlp.enabled} -jar.compress=false -jar.index=${jnlp.enabled} -javac.classpath=\ - ${file.reference.JemmyAWTInput.jar}:\ - ${file.reference.JemmyBrowser.jar}:\ - ${file.reference.JemmyCore.jar}:\ - ${reference.GlassImage.jar}:\ - ${reference.JemmyFX.jar} -# Space-separated list of extra javac options -javac.compilerargs= -javac.deprecation=false -javac.processorpath=\ - ${javac.classpath} -javac.source=1.6 -javac.target=1.6 -javac.test.classpath=\ - ${javac.classpath}:\ - ${build.classes.dir}:\ - ${file.reference.junit.jar} -javac.test.processorpath=\ - ${javac.test.classpath} -javadoc.additionalparam= -javadoc.author=false -javadoc.encoding=${source.encoding} -javadoc.noindex=false -javadoc.nonavbar=false -javadoc.notree=false -javadoc.private=false -javadoc.splitindex=true -javadoc.use=true -javadoc.version=false -javadoc.windowtitle= -jnlp.codebase.type=no.codebase -jnlp.descriptor=application -jnlp.enabled=false -jnlp.mixed.code=default -jnlp.offline-allowed=false -jnlp.signed=false -jnlp.signing= -jnlp.signing.alias= -jnlp.signing.keystore= -main.class=org.jemmy.fx.Browser -manifest.file=manifest.mf -meta.inf.dir=${src.dir}/META-INF -platform.active=default_platform -project.GlassImage=../GlassImage -project.JemmyFX=../JemmyFX -reference.GlassImage.jar=${project.GlassImage}/dist/GlassImage.jar -reference.JemmyFX.jar=${project.JemmyFX}/dist/JemmyFX.jar -run.classpath=\ - ${javac.classpath}:\ - ${build.classes.dir} -# 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=-Djava.library.path=${javafx.home} -run.test.classpath=\ - ${javac.test.classpath}:\ - ${build.test.classes.dir} -source.encoding=UTF-8 -src.dir=src -test.src.dir=test -mkdist.disabled=true diff --git a/tools/Jemmy/JemmyFXBrowser/nbproject/project.xml b/tools/Jemmy/JemmyFXBrowser/nbproject/project.xml deleted file mode 100644 index 49309b89..00000000 --- a/tools/Jemmy/JemmyFXBrowser/nbproject/project.xml +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<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/3"> - <name>JemmyFXBrowser</name> - <source-roots> - <root id="src.dir"/> - </source-roots> - <test-roots> - <root id="test.src.dir"/> - </test-roots> - </data> - <references xmlns="http://www.netbeans.org/ns/ant-project-references/1"> - <reference> - <foreign-project>GlassImage</foreign-project> - <artifact-type>jar</artifact-type> - <script>build.xml</script> - <target>jar</target> - <clean-target>clean</clean-target> - <id>jar</id> - </reference> - <reference> - <foreign-project>JemmyFX</foreign-project> - <artifact-type>jar</artifact-type> - <script>build.xml</script> - <target>jar</target> - <clean-target>clean</clean-target> - <id>jar</id> - </reference> - </references> - </configuration> -</project> diff --git a/tools/Jemmy/JemmyFXBrowser/src/org/jemmy/fx/Browser.java b/tools/Jemmy/JemmyFXBrowser/src/org/jemmy/fx/Browser.java index fb41701d..c194036f 100644 --- a/tools/Jemmy/JemmyFXBrowser/src/org/jemmy/fx/Browser.java +++ b/tools/Jemmy/JemmyFXBrowser/src/org/jemmy/fx/Browser.java @@ -4,9 +4,6 @@ */ package org.jemmy.fx; -import java.awt.AWTException; -import java.util.logging.Level; -import java.util.logging.Logger; import javafx.application.Platform; import javafx.event.EventHandler; import javafx.scene.Parent; @@ -14,8 +11,6 @@ import javafx.scene.input.KeyCode; import javafx.scene.input.KeyEvent; import javafx.stage.Stage; -import javax.swing.UnsupportedLookAndFeelException; -import javax.swing.plaf.metal.MetalLookAndFeel; import org.jemmy.action.GetAction; import org.jemmy.browser.BrowserDescriptor; import org.jemmy.browser.HierarchyDescriptor; @@ -29,6 +24,12 @@ import org.jemmy.timing.State; import org.jemmy.timing.Waiter; +import javax.swing.UnsupportedLookAndFeelException; +import javax.swing.plaf.metal.MetalLookAndFeel; +import java.awt.AWTException; +import java.util.logging.Level; +import java.util.logging.Logger; + /** * * @author shura @@ -57,15 +58,8 @@ public static void register(Scene scene, final KeyBind kb) { public void handle(KeyEvent ke) { if (!browserStarted && kb.check(ke)) { browserStarted = true; - Platform.runLater(new Runnable() { - - public void run() { - try { - runBrowser(); - } catch (AWTException ex) { - ex.printStackTrace(); - } - } + Platform.runLater(() -> { + runBrowser(); }); } } @@ -95,7 +89,7 @@ public String getName() { } }; - public static void runBrowser() throws AWTException { + public static void runBrowser() { try { javax.swing.UIManager.setLookAndFeel(new MetalLookAndFeel()); } catch (UnsupportedLookAndFeelException ex) { @@ -103,6 +97,11 @@ public static void runBrowser() throws AWTException { } BrowserDescriptor descr = new BrowserDescriptor() { + @Override + public boolean isActiveHighlightingProvided() { + return true; + } + ControlList hierarchy = new SceneList(); Wrapper wrapper = new SceneWrapper(Environment.getEnvironment()); @@ -156,7 +155,13 @@ public Wrapper getWrapper() { return wrapper; } }; - new HierarchyView(descr).setVisible(true); + new Thread(() -> { + try { + new HierarchyView(descr).setVisible(true); + } catch (AWTException e) { + e.printStackTrace(); + } + }).start(); } public static void startApp(final String[] argv) { diff --git a/tools/Jemmy/README.md b/tools/Jemmy/README.md new file mode 100644 index 00000000..df487ff8 --- /dev/null +++ b/tools/Jemmy/README.md @@ -0,0 +1,20 @@ +# Jemmy FX library + +Ststus: WIP + +## GlassRobot + +Status: recovered + +## GlassImage + +Status: recovered, needs more testing + +## JemmyFX + +Most samples working. Exceptions: + * WebView + * E2ESample - depends on the source layout + +Tests mostly working. Require detailed analysis. + * Window.toFront() and Window.requestFocus() - possibly a bug diff --git a/tools/Jemmy/build.xml b/tools/Jemmy/build.xml index 9e3cfb47..5b9fa1cb 100644 --- a/tools/Jemmy/build.xml +++ b/tools/Jemmy/build.xml @@ -1,61 +1,42 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- -Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. -DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - -This code is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License version 2 only, as -published by the Free Software Foundation. Oracle designates this -particular file as subject to the "Classpath" exception as provided -by Oracle in the LICENSE file that accompanied this code. - -This code 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 General Public License -version 2 for more details (a copy is included in the LICENSE file that -accompanied this code). - -You should have received a copy of the GNU General Public License version -2 along with this work; if not, write to the Free Software Foundation, -Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - -Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -or visit www.oracle.com if you need additional information or have any -questions. ---> -<project name="Jemmy lib" default="default" basedir="."> - <property name="jemmy.lib.dir" location="jemmy_core"/> - <target name="read-jemmy-core-version" unless="jemmy.core.version"> - <echo message="basedir = ${basedir}"/> - <property file="${basedir}/depend.properties"/> +<project name="jemmy.fx" default="compile"> + <basename file="${basedir}" property="."/> + <property name="gen.src.dir" location="${basedir}/gen-src"/> + <property name="build.dir" location="${basedir}/build"/> + <property name="build.classes.dir" location="${build.dir}/classes"/> + <property name="build.test.dir" location="${build.dir}/test"/> + <property name="dist.jar" location="${build.dir}/${jemmy.project.name}.jar"/> + <target name="init"> + <fail message="Please specify jemmy-v3.jars" unless="jemmy-v3.jars"/> + <fail message="Please specify javafx.home" unless="javafx.home"/> + <path id="jemmyfx.classpath"> + <pathelement location="${javafx.home}/lib/javafx.base.jar"/> + <pathelement location="${javafx.home}/lib/javafx.controls.jar"/> + <pathelement location="${javafx.home}/lib/javafx.graphics.jar"/> + <pathelement location="${javafx.home}/lib/javafx.media.jar"/> + <pathelement location="${javafx.home}/lib/javafx.web.jar"/> + <pathelement location="${jemmy-v3.jars}/JemmyCore.jar"/> + <pathelement location="${jemmy-v3.jars}/JemmyAWTInput.jar"/> + <pathelement location="${jemmy-v3.jars}/JemmyBrowser.jar"/> + <pathelement location="${jemmy-v3.jars}/JemmySupport.jar"/> + </path> </target> - <target name="check-jemmy-libs"> - <available file="${jemmy.lib.dir}/depend.properties" property="libs.already.copyed"/> - </target> - <target name="check-jemmy-libs-version" - depends="check-jemmy-libs" if="libs.already.copyed"> - <property file="${jemmy.lib.dir}/depend.properties" prefix="test."/> - <condition property="same.version.already.copied"> - <equals arg1="${jemmy.core.version}" arg2="${test.jemmy.core.version}"/> - </condition> - </target> - <target name="remove-wrong-version" unless="same.version.already.copied" if="libs.already.copyed"> - <antcall target="clean-jemmy-core"/> - </target> - <target name="get-jemmy-core" depends="read-jemmy-core-version, check-jemmy-libs-version, remove-wrong-version" - unless="same.version.already.copied"> - <echo message="jemmy.core.version=${jemmy.core.version}"/> - <mkdir dir="${jemmy.lib.dir}"/> - <property name="jemmy.download.url" value="http://jemmy.java.net/dist"/> - <get maxtime="600" src="${jemmy.download.url}/junit.jar" dest="${jemmy.lib.dir}"/> - <property name="dist.url" value="${jemmy.download.url}/${jemmy.core.version}"/> - <get maxtime="600" src="${dist.url}/JemmyCore.jar" dest="${jemmy.lib.dir}"/> - <get maxtime="600" src="${dist.url}/JemmyAWTInput.jar" dest="${jemmy.lib.dir}"/> - <get maxtime="600" src="${dist.url}/JemmyBrowser.jar" dest="${jemmy.lib.dir}"/> - <get maxtime="600" src="${dist.url}/JemmySupport.jar" dest="${jemmy.lib.dir}"/> - <echo message="jemmy.core.version=${jemmy.core.version}" file="${jemmy.lib.dir}/depend.properties" /> - </target> - <target name="clean-jemmy-core"> - <delete dir="${jemmy.lib.dir}" failonerror="false"/> + <target name="compile" depends="init"> + <mkdir dir="${build.classes.dir}"/> + <javac destdir="${build.classes.dir}" debug="on" includeantruntime="false"> + <classpath refid="jemmyfx.classpath"/> + <src> + <pathelement path="GlassImage/src"/> + <pathelement path="GlassRobot/src"/> + <pathelement path="JemmyFX/src"/> + </src> + <compilerarg value="-processor"/> + <compilerarg value="org.jemmy.support.Processor"/> + <compilerarg value="-Aactions=docks,dump"/> + <compilerarg value="-s"/> + <compilerarg value="${gen.src.dir}"/> + </javac> + <javac srcdir="${gen.src.dir}" + classpath="${jemmyfx.classpath}:${build.classes.dir}" destdir="${build.classes.dir}" debug="on" includeantruntime="false"/> </target> </project> diff --git a/tools/Jemmy/depend.properties b/tools/Jemmy/depend.properties deleted file mode 100644 index 23c989d6..00000000 --- a/tools/Jemmy/depend.properties +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. Oracle designates this -# particular file as subject to the "Classpath" exception as provided -# by Oracle in the LICENSE file that accompanied this code. -# -# This code 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 General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. -jemmy.core.version=20131107 - diff --git a/tools/SharedTestUtilsOpen/.gitignore b/tools/SharedTestUtilsOpen/.gitignore new file mode 100644 index 00000000..567609b1 --- /dev/null +++ b/tools/SharedTestUtilsOpen/.gitignore @@ -0,0 +1 @@ +build/ diff --git a/tools/SharedTestUtilsOpen/Readme.md b/tools/SharedTestUtilsOpen/Readme.md new file mode 100644 index 00000000..d287e9e7 --- /dev/null +++ b/tools/SharedTestUtilsOpen/Readme.md @@ -0,0 +1 @@ +Further work is needed on embedded execution. diff --git a/tools/SharedTestUtilsOpen/SharedTestUtilsOpen.iml b/tools/SharedTestUtilsOpen/SharedTestUtilsOpen.iml new file mode 100644 index 00000000..c90834f2 --- /dev/null +++ b/tools/SharedTestUtilsOpen/SharedTestUtilsOpen.iml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<module type="JAVA_MODULE" version="4"> + <component name="NewModuleRootManager" inherit-compiler-output="true"> + <exclude-output /> + <content url="file://$MODULE_DIR$"> + <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" /> + </content> + <orderEntry type="inheritedJdk" /> + <orderEntry type="sourceFolder" forTests="false" /> + </component> +</module> \ No newline at end of file diff --git a/tools/SharedTestUtilsOpen/build.xml b/tools/SharedTestUtilsOpen/build.xml index f25f63c1..939e7c8c 100644 --- a/tools/SharedTestUtilsOpen/build.xml +++ b/tools/SharedTestUtilsOpen/build.xml @@ -1,16 +1,18 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- - Copyright (c) 2010-2011, Oracle and/or its affiliates. All rights reserved. - DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ---> -<project name="SharedTestUtilsOpen" default="default" basedir="."> - <description>Builds, tests, and runs the project SharedTestUtilsOpen.</description> - <import file="nbproject/build-impl.xml"/> - - <target name="-pre-init" unless="no.need.to.find.java.fx"> - <ant antfile="../../detect_javafx-nb.xml" inheritall="true"> - <property name="basedir" location="${basedir}/../.."/> - <property name="property.file" value="${basedir}/nbproject/private/private.properties"/> - </ant> +<project name="shared.test.utils" default="compile"> + <basename file="${basedir}" property="."/> + <property name="rootdir" location="${basedir}/../.."/> + <property name="project.name" value="SharedTestUtilsOpen"/> + <import file="${basedir}/../make/build-template.xml"/> + <property name="dependencies.classpath" value="${jemmyfx-src}/build/classes${path.separator}${glass-robot-src}/build/classes${path.separator}${glass-image-src}/build/classes${path.separator}${jemmyfx-browser-src}/build/classes${path.separator}${jtreg.home}/lib/junit.jar${path.separator}${javafx.home}/lib/javafx-swt.jar${path.separator}${javafx.home}/lib/javafx.swing.jar"/> + <target name="compile" depends="compile-src"/> + <target name="build-dependencies"> + <antcall target="build-other-project"> + <param name="project" value="${jemmyfx-src}"/> + </antcall> + <antcall target="build-other-project"> + <param name="project" value="${jemmyfx-browser-src}"/> + </antcall> </target> + <target name="build-test-dependencies"/> </project> diff --git a/tools/SharedTestUtilsOpen/nbproject/build-impl.xml b/tools/SharedTestUtilsOpen/nbproject/build-impl.xml deleted file mode 100644 index a350328b..00000000 --- a/tools/SharedTestUtilsOpen/nbproject/build-impl.xml +++ /dev/null @@ -1,1461 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. -DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - -This code is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License version 2 only, as -published by the Free Software Foundation. Oracle designates this -particular file as subject to the "Classpath" exception as provided -by Oracle in the LICENSE file that accompanied this code. - -This code 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 General Public License -version 2 for more details (a copy is included in the LICENSE file that -accompanied this code). - -You should have received a copy of the GNU General Public License version -2 along with this work; if not, write to the Free Software Foundation, -Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - -Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -or visit www.oracle.com if you need additional information or have any -questions. ---> - -<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="SharedTestUtilsOpen-impl"> - <fail message="Please build using Ant 1.8.0 or higher."> - <condition> - <not> - <antversion atleast="1.8.0"/> - </not> - </condition> - </fail> - <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/> - <!-- - ====================== - INITIALIZATION SECTION - ====================== - --> - <target name="-pre-init"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="-pre-init" name="-init-private"> - <property file="nbproject/private/config.properties"/> - <property file="nbproject/private/configs/${config}.properties"/> - <property file="nbproject/private/private.properties"/> - </target> - <target depends="-pre-init,-init-private" name="-init-user"> - <property file="${user.properties.file}"/> - <!-- The two properties below are usually overridden --> - <!-- by the active platform. Just a fallback. --> - <property name="default.javac.source" value="1.4"/> - <property name="default.javac.target" value="1.4"/> - </target> - <target depends="-pre-init,-init-private,-init-user" name="-init-project"> - <property file="nbproject/configs/${config}.properties"/> - <property file="nbproject/project.properties"/> - </target> - <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init"> - <available file="${manifest.file}" property="manifest.available"/> - <condition property="splashscreen.available"> - <and> - <not> - <equals arg1="${application.splash}" arg2="" trim="true"/> - </not> - <available file="${application.splash}"/> - </and> - </condition> - <condition property="main.class.available"> - <and> - <isset property="main.class"/> - <not> - <equals arg1="${main.class}" arg2="" trim="true"/> - </not> - </and> - </condition> - <condition property="manifest.available+main.class"> - <and> - <isset property="manifest.available"/> - <isset property="main.class.available"/> - </and> - </condition> - <condition property="do.archive"> - <not> - <istrue value="${jar.archive.disabled}"/> - </not> - </condition> - <condition property="do.mkdist"> - <and> - <isset property="do.archive"/> - <isset property="libs.CopyLibs.classpath"/> - <not> - <istrue value="${mkdist.disabled}"/> - </not> - </and> - </condition> - <condition property="manifest.available+main.class+mkdist.available"> - <and> - <istrue value="${manifest.available+main.class}"/> - <isset property="do.mkdist"/> - </and> - </condition> - <condition property="do.archive+manifest.available"> - <and> - <isset property="manifest.available"/> - <istrue value="${do.archive}"/> - </and> - </condition> - <condition property="do.archive+main.class.available"> - <and> - <isset property="main.class.available"/> - <istrue value="${do.archive}"/> - </and> - </condition> - <condition property="do.archive+splashscreen.available"> - <and> - <isset property="splashscreen.available"/> - <istrue value="${do.archive}"/> - </and> - </condition> - <condition property="do.archive+manifest.available+main.class"> - <and> - <istrue value="${manifest.available+main.class}"/> - <istrue value="${do.archive}"/> - </and> - </condition> - <condition property="manifest.available-mkdist.available"> - <or> - <istrue value="${manifest.available}"/> - <isset property="do.mkdist"/> - </or> - </condition> - <condition property="manifest.available+main.class-mkdist.available"> - <or> - <istrue value="${manifest.available+main.class}"/> - <isset property="do.mkdist"/> - </or> - </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"/> - <isset property="have.tests"/> - </and> - </condition> - <condition property="no.javadoc.preview"> - <and> - <isset property="javadoc.preview"/> - <isfalse value="${javadoc.preview}"/> - </and> - </condition> - <property name="run.jvmargs" value=""/> - <property name="run.jvmargs.ide" value=""/> - <property name="javac.compilerargs" value=""/> - <property name="work.dir" value="${basedir}"/> - <condition property="no.deps"> - <and> - <istrue value="${no.dependencies}"/> - </and> - </condition> - <property name="javac.debug" value="true"/> - <property name="javadoc.preview" value="true"/> - <property name="application.args" value=""/> - <property name="source.encoding" value="${file.encoding}"/> - <property name="runtime.encoding" value="${source.encoding}"/> - <condition property="javadoc.encoding.used" value="${javadoc.encoding}"> - <and> - <isset property="javadoc.encoding"/> - <not> - <equals arg1="${javadoc.encoding}" arg2=""/> - </not> - </and> - </condition> - <property name="javadoc.encoding.used" value="${source.encoding}"/> - <property name="includes" value="**"/> - <property name="excludes" value=""/> - <property name="do.depend" value="false"/> - <condition property="do.depend.true"> - <istrue value="${do.depend}"/> - </condition> - <path id="endorsed.classpath.path" path="${endorsed.classpath}"/> - <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'"> - <length length="0" string="${endorsed.classpath}" when="greater"/> - </condition> - <condition else="false" property="jdkBug6558476"> - <and> - <matches pattern="1\.[56]" string="${java.specification.version}"/> - <not> - <os family="unix"/> - </not> - </and> - </condition> - <property name="javac.fork" value="${jdkBug6558476}"/> - <property name="jar.index" value="false"/> - <property name="jar.index.metainf" value="${jar.index}"/> - <property name="copylibs.rebase" value="true"/> - <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/> - <condition property="junit.available"> - <or> - <available classname="org.junit.Test" classpath="${run.test.classpath}"/> - <available classname="junit.framework.Test" classpath="${run.test.classpath}"/> - </or> - </condition> - <condition property="testng.available"> - <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/> - </condition> - <condition property="junit+testng.available"> - <and> - <istrue value="${junit.available}"/> - <istrue value="${testng.available}"/> - </and> - </condition> - <condition else="testng" property="testng.mode" value="mixed"> - <istrue value="${junit+testng.available}"/> - </condition> - <condition else="" property="testng.debug.mode" value="-mixed"> - <istrue value="${junit+testng.available}"/> - </condition> - </target> - <target name="-post-init"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check"> - <fail unless="src.dir">Must set src.dir</fail> - <fail unless="test.src.dir">Must set test.src.dir</fail> - <fail unless="build.dir">Must set build.dir</fail> - <fail unless="dist.dir">Must set dist.dir</fail> - <fail unless="build.classes.dir">Must set build.classes.dir</fail> - <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail> - <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail> - <fail unless="build.test.results.dir">Must set build.test.results.dir</fail> - <fail unless="build.classes.excludes">Must set build.classes.excludes</fail> - <fail unless="dist.jar">Must set dist.jar</fail> - </target> - <target name="-init-macrodef-property"> - <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1"> - <attribute name="name"/> - <attribute name="value"/> - <sequential> - <property name="@{name}" value="${@{value}}"/> - </sequential> - </macrodef> - </target> - <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors"> - <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${src.dir}" name="srcdir"/> - <attribute default="${build.classes.dir}" name="destdir"/> - <attribute default="${javac.classpath}" name="classpath"/> - <attribute default="${javac.processorpath}" name="processorpath"/> - <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="${javac.debug}" name="debug"/> - <attribute default="${empty.dir}" name="sourcepath"/> - <attribute default="${empty.dir}" name="gensrcdir"/> - <element name="customize" optional="true"/> - <sequential> - <property location="${build.dir}/empty" name="empty.dir"/> - <mkdir dir="${empty.dir}"/> - <mkdir dir="@{apgeneratedsrcdir}"/> - <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}"> - <src> - <dirset dir="@{gensrcdir}" erroronmissingdir="false"> - <include name="*"/> - </dirset> - </src> - <classpath> - <path path="@{classpath}"/> - </classpath> - <compilerarg line="${endorsed.classpath.cmd.line.arg}"/> - <compilerarg line="${javac.compilerargs}"/> - <compilerarg value="-processorpath"/> - <compilerarg path="@{processorpath}:${empty.dir}"/> - <compilerarg line="${ap.processors.internal}"/> - <compilerarg line="${annotation.processing.processor.options}"/> - <compilerarg value="-s"/> - <compilerarg path="@{apgeneratedsrcdir}"/> - <compilerarg line="${ap.proc.none.internal}"/> - <customize/> - </javac> - </sequential> - </macrodef> - </target> - <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal"> - <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${src.dir}" name="srcdir"/> - <attribute default="${build.classes.dir}" name="destdir"/> - <attribute default="${javac.classpath}" name="classpath"/> - <attribute default="${javac.processorpath}" name="processorpath"/> - <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="${javac.debug}" name="debug"/> - <attribute default="${empty.dir}" name="sourcepath"/> - <attribute default="${empty.dir}" name="gensrcdir"/> - <element name="customize" optional="true"/> - <sequential> - <property location="${build.dir}/empty" name="empty.dir"/> - <mkdir dir="${empty.dir}"/> - <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}"> - <src> - <dirset dir="@{gensrcdir}" erroronmissingdir="false"> - <include name="*"/> - </dirset> - </src> - <classpath> - <path path="@{classpath}"/> - </classpath> - <compilerarg line="${endorsed.classpath.cmd.line.arg}"/> - <compilerarg line="${javac.compilerargs}"/> - <customize/> - </javac> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac"> - <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${src.dir}" name="srcdir"/> - <attribute default="${build.classes.dir}" name="destdir"/> - <attribute default="${javac.classpath}" name="classpath"/> - <sequential> - <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}"> - <classpath> - <path path="@{classpath}"/> - </classpath> - </depend> - </sequential> - </macrodef> - <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${build.classes.dir}" name="destdir"/> - <sequential> - <fail unless="javac.includes">Must set javac.includes</fail> - <pathconvert pathsep="${line.separator}" property="javac.includes.binary"> - <path> - <filelist dir="@{destdir}" files="${javac.includes}"/> - </path> - <globmapper from="*.java" to="*.class"/> - </pathconvert> - <tempfile deleteonexit="true" property="javac.includesfile.binary"/> - <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/> - <delete> - <files includesfile="${javac.includesfile.binary}"/> - </delete> - <delete> - <fileset file="${javac.includesfile.binary}"/> - </delete> - </sequential> - </macrodef> - </target> - <target if="${junit.available}" name="-init-macrodef-junit-init"> - <condition else="false" property="nb.junit.batch" value="true"> - <and> - <istrue value="${junit.available}"/> - <not> - <isset property="test.method"/> - </not> - </and> - </condition> - <condition else="false" property="nb.junit.single" value="true"> - <and> - <istrue value="${junit.available}"/> - <isset property="test.method"/> - </and> - </condition> - </target> - <target if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}"> - <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element name="customize" optional="true"/> - <sequential> - <property name="junit.forkmode" value="perTest"/> - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> - <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/> - <syspropertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <formatter type="brief" usefile="false"/> - <formatter type="xml"/> - <jvmarg value="-ea"/> - <customize/> - </junit> - </sequential> - </macrodef> - </target> - <target if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}"> - <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element name="customize" optional="true"/> - <sequential> - <property name="junit.forkmode" value="perTest"/> - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> - <batchtest todir="${build.test.results.dir}"> - <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}"> - <filename name="@{testincludes}"/> - </fileset> - </batchtest> - <syspropertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <formatter type="brief" usefile="false"/> - <formatter type="xml"/> - <jvmarg value="-ea"/> - <customize/> - </junit> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/> - <target if="${testng.available}" name="-init-macrodef-testng"> - <macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element name="customize" optional="true"/> - <sequential> - <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}"> - <isset property="test.method"/> - </condition> - <union id="test.set"> - <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}"> - <filename name="@{testincludes}"/> - </fileset> - </union> - <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/> - <testng classfilesetref="test.set" failureProperty="tests.failed" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="SharedTestUtilsOpen" testname="TestNG tests" workingDir="${work.dir}"> - <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/> - <propertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </propertyset> - <customize/> - </testng> - </sequential> - </macrodef> - </target> - <target name="-init-macrodef-test-impl"> - <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element implicit="true" name="customize" optional="true"/> - <sequential> - <echo>No tests executed.</echo> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl"> - <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element implicit="true" name="customize" optional="true"/> - <sequential> - <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> - <customize/> - </j2seproject3:junit> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl"> - <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element implicit="true" name="customize" optional="true"/> - <sequential> - <j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> - <customize/> - </j2seproject3:testng> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test"> - <macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <sequential> - <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> - <customize> - <classpath> - <path path="${run.test.classpath}"/> - </classpath> - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> - <jvmarg line="${run.jvmargs}"/> - <jvmarg line="${run.jvmargs.ide}"/> - </customize> - </j2seproject3:test-impl> - </sequential> - </macrodef> - </target> - <target if="${junit.available}" name="-init-macrodef-junit-debug" unless="${nb.junit.batch}"> - <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element name="customize" optional="true"/> - <sequential> - <property name="junit.forkmode" value="perTest"/> - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> - <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/> - <syspropertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <formatter type="brief" usefile="false"/> - <formatter type="xml"/> - <jvmarg value="-ea"/> - <jvmarg line="${debug-args-line}"/> - <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> - <customize/> - </junit> - </sequential> - </macrodef> - </target> - <target if="${nb.junit.batch}" name="-init-macrodef-junit-debug-batch"> - <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element name="customize" optional="true"/> - <sequential> - <property name="junit.forkmode" value="perTest"/> - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> - <batchtest todir="${build.test.results.dir}"> - <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}"> - <filename name="@{testincludes}"/> - </fileset> - </batchtest> - <syspropertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <formatter type="brief" usefile="false"/> - <formatter type="xml"/> - <jvmarg value="-ea"/> - <jvmarg line="${debug-args-line}"/> - <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> - <customize/> - </junit> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-junit-debug,-init-macrodef-junit-debug-batch" if="${junit.available}" name="-init-macrodef-junit-debug-impl"> - <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element implicit="true" name="customize" optional="true"/> - <sequential> - <j2seproject3:junit-debug excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> - <customize/> - </j2seproject3:junit-debug> - </sequential> - </macrodef> - </target> - <target if="${testng.available}" name="-init-macrodef-testng-debug"> - <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${main.class}" name="testClass"/> - <attribute default="" name="testMethod"/> - <element name="customize2" optional="true"/> - <sequential> - <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}"> - <isset property="test.method"/> - </condition> - <condition else="-suitename SharedTestUtilsOpen -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}"> - <matches pattern=".*\.xml" string="@{testClass}"/> - </condition> - <delete dir="${build.test.results.dir}" quiet="true"/> - <mkdir dir="${build.test.results.dir}"/> - <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}"> - <customize> - <customize2/> - <jvmarg value="-ea"/> - <arg line="${testng.debug.mode}"/> - <arg line="-d ${build.test.results.dir}"/> - <arg line="-listener org.testng.reporters.VerboseReporter"/> - <arg line="${testng.cmd.args}"/> - </customize> - </j2seproject3:debug> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl"> - <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${main.class}" name="testClass"/> - <attribute default="" name="testMethod"/> - <element implicit="true" name="customize2" optional="true"/> - <sequential> - <j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}"> - <customize2/> - </j2seproject3:testng-debug> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit"> - <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <attribute default="${main.class}" name="testClass"/> - <attribute default="" name="testMethod"/> - <sequential> - <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> - <customize> - <classpath> - <path path="${run.test.classpath}"/> - </classpath> - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> - <jvmarg line="${run.jvmargs}"/> - <jvmarg line="${run.jvmargs.ide}"/> - </customize> - </j2seproject3:test-debug-impl> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng"> - <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <attribute default="${main.class}" name="testClass"/> - <attribute default="" name="testMethod"/> - <sequential> - <j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}"> - <customize2> - <syspropertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - </customize2> - </j2seproject3:testng-debug-impl> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/> - <!-- - pre NB7.2 profiling section; consider it deprecated - --> - <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/> - <target if="profiler.info.jvmargs.agent" name="-profile-pre-init"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target if="profiler.info.jvmargs.agent" name="-profile-post-init"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile"> - <macrodef name="resolve"> - <attribute name="name"/> - <attribute name="value"/> - <sequential> - <property name="@{name}" value="${env.@{value}}"/> - </sequential> - </macrodef> - <macrodef name="profile"> - <attribute default="${main.class}" name="classname"/> - <element name="customize" optional="true"/> - <sequential> - <property environment="env"/> - <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/> - <java classname="@{classname}" dir="${profiler.info.dir}" fork="true" jvm="${profiler.info.jvm}"> - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> - <jvmarg value="${profiler.info.jvmargs.agent}"/> - <jvmarg line="${profiler.info.jvmargs}"/> - <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/> - <arg line="${application.args}"/> - <classpath> - <path path="${run.classpath}"/> - </classpath> - <syspropertyset> - <propertyref prefix="run-sys-prop."/> - <mapper from="run-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <customize/> - </java> - </sequential> - </macrodef> - </target> - <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" name="-profile-init-check"> - <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail> - <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail> - </target> - <!-- - end of pre NB7.2 profiling section - --> - <target depends="-init-debug-args" name="-init-macrodef-nbjpda"> - <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1"> - <attribute default="${main.class}" name="name"/> - <attribute default="${debug.classpath}" name="classpath"/> - <attribute default="" name="stopclassname"/> - <sequential> - <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}"> - <classpath> - <path path="@{classpath}"/> - </classpath> - </nbjpdastart> - </sequential> - </macrodef> - <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1"> - <attribute default="${build.classes.dir}" name="dir"/> - <sequential> - <nbjpdareload> - <fileset dir="@{dir}" includes="${fix.classes}"> - <include name="${fix.includes}*.class"/> - </fileset> - </nbjpdareload> - </sequential> - </macrodef> - </target> - <target name="-init-debug-args"> - <property name="version-output" value="java version "${ant.java.version}"/> - <condition property="have-jdk-older-than-1.4"> - <or> - <contains string="${version-output}" substring="java version "1.0"/> - <contains string="${version-output}" substring="java version "1.1"/> - <contains string="${version-output}" substring="java version "1.2"/> - <contains string="${version-output}" substring="java version "1.3"/> - </or> - </condition> - <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none"> - <istrue value="${have-jdk-older-than-1.4}"/> - </condition> - <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem"> - <os family="windows"/> - </condition> - <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}"> - <isset property="debug.transport"/> - </condition> - </target> - <target depends="-init-debug-args" name="-init-macrodef-debug"> - <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${main.class}" name="classname"/> - <attribute default="${debug.classpath}" name="classpath"/> - <element name="customize" optional="true"/> - <sequential> - <java classname="@{classname}" dir="${work.dir}" fork="true"> - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> - <jvmarg line="${debug-args-line}"/> - <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> - <jvmarg value="-Dfile.encoding=${runtime.encoding}"/> - <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/> - <jvmarg line="${run.jvmargs}"/> - <jvmarg line="${run.jvmargs.ide}"/> - <classpath> - <path path="@{classpath}"/> - </classpath> - <syspropertyset> - <propertyref prefix="run-sys-prop."/> - <mapper from="run-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <customize/> - </java> - </sequential> - </macrodef> - </target> - <target name="-init-macrodef-java"> - <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1"> - <attribute default="${main.class}" name="classname"/> - <attribute default="${run.classpath}" name="classpath"/> - <attribute default="jvm" name="jvm"/> - <element name="customize" optional="true"/> - <sequential> - <java classname="@{classname}" dir="${work.dir}" fork="true"> - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> - <jvmarg value="-Dfile.encoding=${runtime.encoding}"/> - <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/> - <jvmarg line="${run.jvmargs}"/> - <jvmarg line="${run.jvmargs.ide}"/> - <classpath> - <path path="@{classpath}"/> - </classpath> - <syspropertyset> - <propertyref prefix="run-sys-prop."/> - <mapper from="run-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <customize/> - </java> - </sequential> - </macrodef> - </target> - <target name="-init-macrodef-copylibs"> - <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${manifest.file}" name="manifest"/> - <element name="customize" optional="true"/> - <sequential> - <property location="${build.classes.dir}" name="build.classes.dir.resolved"/> - <pathconvert property="run.classpath.without.build.classes.dir"> - <path path="${run.classpath}"/> - <map from="${build.classes.dir.resolved}" to=""/> - </pathconvert> - <pathconvert pathsep=" " property="jar.classpath"> - <path path="${run.classpath.without.build.classes.dir}"/> - <chainedmapper> - <flattenmapper/> - <filtermapper> - <replacestring from=" " to="%20"/> - </filtermapper> - <globmapper from="*" to="lib/*"/> - </chainedmapper> - </pathconvert> - <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/> - <copylibs compress="${jar.compress}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" rebase="${copylibs.rebase}" runtimeclasspath="${run.classpath.without.build.classes.dir}"> - <fileset dir="${build.classes.dir}"/> - <manifest> - <attribute name="Class-Path" value="${jar.classpath}"/> - <customize/> - </manifest> - </copylibs> - </sequential> - </macrodef> - </target> - <target name="-init-presetdef-jar"> - <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1"> - <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}"> - <j2seproject1:fileset dir="${build.classes.dir}"/> - </jar> - </presetdef> - </target> - <target name="-init-ap-cmdline-properties"> - <property name="annotation.processing.enabled" value="true"/> - <property name="annotation.processing.processors.list" value=""/> - <property name="annotation.processing.processor.options" value=""/> - <property name="annotation.processing.run.all.processors" value="true"/> - <property name="javac.processorpath" value="${javac.classpath}"/> - <property name="javac.test.processorpath" value="${javac.test.classpath}"/> - <condition property="ap.supported.internal" value="true"> - <not> - <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/> - </not> - </condition> - </target> - <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported"> - <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}"> - <isfalse value="${annotation.processing.run.all.processors}"/> - </condition> - <condition else="" property="ap.proc.none.internal" value="-proc:none"> - <isfalse value="${annotation.processing.enabled}"/> - </condition> - </target> - <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline"> - <property name="ap.cmd.line.internal" value=""/> - </target> - <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-test,-init-macrodef-test-debug,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/> - <!-- - =================== - COMPILATION SECTION - =================== - --> - <target name="-deps-jar-init" unless="built-jar.properties"> - <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/> - <delete file="${built-jar.properties}" quiet="true"/> - </target> - <target if="already.built.jar.${basedir}" name="-warn-already-built-jar"> - <echo level="warn" message="Cycle detected: SharedTestUtilsOpen was already built"/> - </target> - <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps"> - <mkdir dir="${build.dir}"/> - <touch file="${built-jar.properties}" verbose="false"/> - <property file="${built-jar.properties}" prefix="already.built.jar."/> - <antcall target="-warn-already-built-jar"/> - <propertyfile file="${built-jar.properties}"> - <entry key="${basedir}" value=""/> - </propertyfile> - <antcall target="-maybe-call-dep"> - <param name="call.built.properties" value="${built-jar.properties}"/> - <param location="${project.GlassImage}" name="call.subproject"/> - <param location="${project.GlassImage}/build.xml" name="call.script"/> - <param name="call.target" value="jar"/> - <param name="transfer.built-jar.properties" value="${built-jar.properties}"/> - </antcall> - <antcall target="-maybe-call-dep"> - <param name="call.built.properties" value="${built-jar.properties}"/> - <param location="${project.GlassRobot}" name="call.subproject"/> - <param location="${project.GlassRobot}/build.xml" name="call.script"/> - <param name="call.target" value="jar"/> - <param name="transfer.built-jar.properties" value="${built-jar.properties}"/> - </antcall> - <antcall target="-maybe-call-dep"> - <param name="call.built.properties" value="${built-jar.properties}"/> - <param location="${project.JemmyFX}" name="call.subproject"/> - <param location="${project.JemmyFX}/build.xml" name="call.script"/> - <param name="call.target" value="jar"/> - <param name="transfer.built-jar.properties" value="${built-jar.properties}"/> - </antcall> - <antcall target="-maybe-call-dep"> - <param name="call.built.properties" value="${built-jar.properties}"/> - <param location="${project.JemmyFXBrowser}" name="call.subproject"/> - <param location="${project.JemmyFXBrowser}/build.xml" name="call.script"/> - <param name="call.target" value="jar"/> - <param name="transfer.built-jar.properties" value="${built-jar.properties}"/> - </antcall> - </target> - <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/> - <target depends="init" name="-check-automatic-build"> - <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/> - </target> - <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build"> - <antcall target="clean"/> - </target> - <target depends="init,deps-jar" name="-pre-pre-compile"> - <mkdir dir="${build.classes.dir}"/> - </target> - <target name="-pre-compile"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target if="do.depend.true" name="-compile-depend"> - <pathconvert property="build.generated.subdirs"> - <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false"> - <include name="*"/> - </dirset> - </pathconvert> - <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/> - </target> - <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile"> - <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/> - <copy todir="${build.classes.dir}"> - <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> - </copy> - </target> - <target if="has.persistence.xml" name="-copy-persistence-xml"> - <mkdir dir="${build.classes.dir}/META-INF"/> - <copy todir="${build.classes.dir}/META-INF"> - <fileset dir="${meta.inf.dir}" includes="persistence.xml"/> - </copy> - </target> - <target name="-post-compile"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/> - <target name="-pre-compile-single"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single"> - <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail> - <j2seproject3:force-recompile/> - <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}"/> - </target> - <target name="-post-compile-single"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/> - <!-- - ==================== - JAR BUILDING SECTION - ==================== - --> - <target depends="init" name="-pre-pre-jar"> - <dirname file="${dist.jar}" property="dist.jar.dir"/> - <mkdir dir="${dist.jar.dir}"/> - </target> - <target name="-pre-jar"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive" name="-do-jar-without-manifest" unless="manifest.available-mkdist.available"> - <j2seproject1:jar/> - </target> - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class-mkdist.available"> - <j2seproject1:jar manifest="${manifest.file}"/> - </target> - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available+main.class" name="-do-jar-with-mainclass" 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 level="info">To run this application from the command line without Ant, try:</echo> - <property location="${build.classes.dir}" name="build.classes.dir.resolved"/> - <property location="${dist.jar}" name="dist.jar.resolved"/> - <pathconvert property="run.classpath.with.dist.jar"> - <path path="${run.classpath}"/> - <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/> - </pathconvert> - <echo level="info">java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo> - </target> - <target depends="init" if="do.archive" name="-do-jar-with-libraries-create-manifest" unless="manifest.available"> - <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/> - <touch file="${tmp.manifest.file}" verbose="false"/> - </target> - <target depends="init" if="do.archive+manifest.available" name="-do-jar-with-libraries-copy-manifest"> - <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/> - <copy file="${manifest.file}" tofile="${tmp.manifest.file}"/> - </target> - <target depends="init,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest" if="do.archive+main.class.available" name="-do-jar-with-libraries-set-main"> - <manifest file="${tmp.manifest.file}" mode="update"> - <attribute name="Main-Class" value="${main.class}"/> - </manifest> - </target> - <target depends="init,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-with-libraries-set-splashscreen"> - <basename file="${application.splash}" property="splashscreen.basename"/> - <mkdir dir="${build.classes.dir}/META-INF"/> - <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/> - <manifest file="${tmp.manifest.file}" mode="update"> - <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/> - </manifest> - </target> - <target depends="init,-init-macrodef-copylibs,compile,-pre-pre-jar,-pre-jar,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest,-do-jar-with-libraries-set-main,-do-jar-with-libraries-set-splashscreen" if="do.mkdist" name="-do-jar-with-libraries-pack"> - <j2seproject3:copylibs manifest="${tmp.manifest.file}"/> - <echo level="info">To run this application from the command line without Ant, try:</echo> - <property location="${dist.jar}" name="dist.jar.resolved"/> - <echo level="info">java -jar "${dist.jar.resolved}"</echo> - </target> - <target depends="-do-jar-with-libraries-pack" if="do.archive" name="-do-jar-with-libraries-delete-manifest"> - <delete> - <fileset file="${tmp.manifest.file}"/> - </delete> - </target> - <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest,-do-jar-with-libraries-set-main,-do-jar-with-libraries-set-splashscreen,-do-jar-with-libraries-pack,-do-jar-with-libraries-delete-manifest" name="-do-jar-with-libraries"/> - <target name="-post-jar"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target 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." name="jar"/> - <!-- - ================= - EXECUTION SECTION - ================= - --> - <target depends="init,compile" description="Run a main class." name="run"> - <j2seproject1:java> - <customize> - <arg line="${application.args}"/> - </customize> - </j2seproject1:java> - </target> - <target name="-do-not-recompile"> - <property name="javac.includes.binary" value=""/> - </target> - <target depends="init,compile-single" name="run-single"> - <fail unless="run.class">Must select one file in the IDE or set run.class</fail> - <j2seproject1:java classname="${run.class}"/> - </target> - <target depends="init,compile-test-single" name="run-test-with-main"> - <fail unless="run.class">Must select one file in the IDE or set run.class</fail> - <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/> - </target> - <!-- - ================= - DEBUGGING SECTION - ================= - --> - <target depends="init" if="netbeans.home" name="-debug-start-debugger"> - <j2seproject1:nbjpdastart name="${debug.class}"/> - </target> - <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test"> - <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/> - </target> - <target depends="init,compile" name="-debug-start-debuggee"> - <j2seproject3:debug> - <customize> - <arg line="${application.args}"/> - </customize> - </j2seproject3:debug> - </target> - <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/> - <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto"> - <j2seproject1:nbjpdastart stopclassname="${main.class}"/> - </target> - <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/> - <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single"> - <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail> - <j2seproject3:debug classname="${debug.class}"/> - </target> - <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/> - <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test"> - <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail> - <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/> - </target> - <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/> - <target depends="init" name="-pre-debug-fix"> - <fail unless="fix.includes">Must set fix.includes</fail> - <property name="javac.includes" value="${fix.includes}.java"/> - </target> - <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix"> - <j2seproject1:nbjpdareload/> - </target> - <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/> - <!-- - ================= - PROFILING SECTION - ================= - --> - <!-- - pre NB7.2 profiler integration - --> - <target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72"> - <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> - <nbprofiledirect> - <classpath> - <path path="${run.classpath}"/> - </classpath> - </nbprofiledirect> - <profile/> - </target> - <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72"> - <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail> - <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> - <nbprofiledirect> - <classpath> - <path path="${run.classpath}"/> - </classpath> - </nbprofiledirect> - <profile classname="${profile.class}"/> - </target> - <target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72"> - <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> - <nbprofiledirect> - <classpath> - <path path="${run.classpath}"/> - </classpath> - </nbprofiledirect> - <profile classname="sun.applet.AppletViewer"> - <customize> - <arg value="${applet.url}"/> - </customize> - </profile> - </target> - <target depends="profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72"> - <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> - <nbprofiledirect> - <classpath> - <path path="${run.test.classpath}"/> - </classpath> - </nbprofiledirect> - <junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true"> - <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/> - <jvmarg value="${profiler.info.jvmargs.agent}"/> - <jvmarg line="${profiler.info.jvmargs}"/> - <test name="${profile.class}"/> - <classpath> - <path path="${run.test.classpath}"/> - </classpath> - <syspropertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <formatter type="brief" usefile="false"/> - <formatter type="xml"/> - </junit> - </target> - <!-- - end of pre NB72 profiling section - --> - <target if="netbeans.home" name="-profile-check"> - <condition property="profiler.configured"> - <or> - <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/> - <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/> - </or> - </condition> - </target> - <target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent"> - <startprofiler/> - <antcall target="run"/> - </target> - <target depends="-profile-check,-profile-single-pre72" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-single" unless="profiler.info.jvmargs.agent"> - <fail unless="run.class">Must select one file in the IDE or set run.class</fail> - <startprofiler/> - <antcall target="run-single"/> - </target> - <target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/> - <target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs"> - <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail> - <startprofiler/> - <antcall target="test-single"/> - </target> - <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main"> - <fail unless="run.class">Must select one file in the IDE or set run.class</fail> - <startprofiler/> - <antcal target="run-test-with-main"/> - </target> - <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent"> - <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> - <startprofiler/> - <antcall target="run-applet"/> - </target> - <!-- - =============== - JAVADOC SECTION - =============== - --> - <target depends="init" if="have.sources" name="-javadoc-build"> - <mkdir dir="${dist.javadoc.dir}"/> - <condition else="" property="javadoc.endorsed.classpath.cmd.line.arg" value="-J${endorsed.classpath.cmd.line.arg}"> - <and> - <isset property="endorsed.classpath.cmd.line.arg"/> - <not> - <equals arg1="${endorsed.classpath.cmd.line.arg}" arg2=""/> - </not> - </and> - </condition> - <javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" 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}"> - <classpath> - <path path="${javac.classpath}"/> - </classpath> - <fileset dir="${src.dir}" excludes="*.java,${excludes}" includes="${includes}"> - <filename name="**/*.java"/> - </fileset> - <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false"> - <include name="**/*.java"/> - <exclude name="*.java"/> - </fileset> - <arg line="${javadoc.endorsed.classpath.cmd.line.arg}"/> - </javadoc> - <copy todir="${dist.javadoc.dir}"> - <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}"> - <filename name="**/doc-files/**"/> - </fileset> - <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false"> - <include name="**/doc-files/**"/> - </fileset> - </copy> - </target> - <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview"> - <nbbrowse file="${dist.javadoc.dir}/index.html"/> - </target> - <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/> - <!-- - ========================= - TEST COMPILATION SECTION - ========================= - --> - <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test"> - <mkdir dir="${build.test.classes.dir}"/> - </target> - <target name="-pre-compile-test"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target if="do.depend.true" name="-compile-test-depend"> - <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/> - </target> - <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test"> - <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" processorpath="${javac.test.processorpath}" srcdir="${test.src.dir}"/> - <copy todir="${build.test.classes.dir}"> - <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> - </copy> - </target> - <target name="-post-compile-test"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/> - <target name="-pre-compile-test-single"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single"> - <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail> - <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/> - <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" processorpath="${javac.test.processorpath}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/> - <copy todir="${build.test.classes.dir}"> - <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> - </copy> - </target> - <target name="-post-compile-test-single"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/> - <!-- - ======================= - TEST EXECUTION SECTION - ======================= - --> - <target depends="init" if="have.tests" name="-pre-test-run"> - <mkdir dir="${build.test.results.dir}"/> - </target> - <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run"> - <j2seproject3:test testincludes="**/*Test.java"/> - </target> - <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run"> - <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail> - </target> - <target depends="init" if="have.tests" name="test-report"/> - <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/> - <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/> - <target depends="init" if="have.tests" name="-pre-test-run-single"> - <mkdir dir="${build.test.results.dir}"/> - </target> - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single"> - <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail> - <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/> - </target> - <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single"> - <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail> - </target> - <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/> - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method"> - <fail unless="test.class">Must select some files in the IDE or set test.class</fail> - <fail unless="test.method">Must select some method in the IDE or set test.method</fail> - <j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/> - </target> - <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method"> - <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail> - </target> - <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method,-post-test-run-single-method" description="Run single unit test." name="test-single-method"/> - <!-- - ======================= - TEST DEBUGGING SECTION - ======================= - --> - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test"> - <fail unless="test.class">Must select one file in the IDE or set test.class</fail> - <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/> - </target> - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method"> - <fail unless="test.class">Must select one file in the IDE or set test.class</fail> - <fail unless="test.method">Must select some method in the IDE or set test.method</fail> - <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/> - </target> - <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test"> - <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/> - </target> - <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/> - <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/> - <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test"> - <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/> - </target> - <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/> - <!-- - ========================= - APPLET EXECUTION SECTION - ========================= - --> - <target depends="init,compile-single" name="run-applet"> - <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> - <j2seproject1:java classname="sun.applet.AppletViewer"> - <customize> - <arg value="${applet.url}"/> - </customize> - </j2seproject1:java> - </target> - <!-- - ========================= - APPLET DEBUGGING SECTION - ========================= - --> - <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet"> - <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> - <j2seproject3:debug classname="sun.applet.AppletViewer"> - <customize> - <arg value="${applet.url}"/> - </customize> - </j2seproject3:debug> - </target> - <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/> - <!-- - =============== - CLEANUP SECTION - =============== - --> - <target name="-deps-clean-init" unless="built-clean.properties"> - <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/> - <delete file="${built-clean.properties}" quiet="true"/> - </target> - <target if="already.built.clean.${basedir}" name="-warn-already-built-clean"> - <echo level="warn" message="Cycle detected: SharedTestUtilsOpen was already built"/> - </target> - <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps"> - <mkdir dir="${build.dir}"/> - <touch file="${built-clean.properties}" verbose="false"/> - <property file="${built-clean.properties}" prefix="already.built.clean."/> - <antcall target="-warn-already-built-clean"/> - <propertyfile file="${built-clean.properties}"> - <entry key="${basedir}" value=""/> - </propertyfile> - <antcall target="-maybe-call-dep"> - <param name="call.built.properties" value="${built-clean.properties}"/> - <param location="${project.GlassImage}" name="call.subproject"/> - <param location="${project.GlassImage}/build.xml" name="call.script"/> - <param name="call.target" value="clean"/> - <param name="transfer.built-clean.properties" value="${built-clean.properties}"/> - </antcall> - <antcall target="-maybe-call-dep"> - <param name="call.built.properties" value="${built-clean.properties}"/> - <param location="${project.GlassRobot}" name="call.subproject"/> - <param location="${project.GlassRobot}/build.xml" name="call.script"/> - <param name="call.target" value="clean"/> - <param name="transfer.built-clean.properties" value="${built-clean.properties}"/> - </antcall> - <antcall target="-maybe-call-dep"> - <param name="call.built.properties" value="${built-clean.properties}"/> - <param location="${project.JemmyFX}" name="call.subproject"/> - <param location="${project.JemmyFX}/build.xml" name="call.script"/> - <param name="call.target" value="clean"/> - <param name="transfer.built-clean.properties" value="${built-clean.properties}"/> - </antcall> - <antcall target="-maybe-call-dep"> - <param name="call.built.properties" value="${built-clean.properties}"/> - <param location="${project.JemmyFXBrowser}" name="call.subproject"/> - <param location="${project.JemmyFXBrowser}/build.xml" name="call.script"/> - <param name="call.target" value="clean"/> - <param name="transfer.built-clean.properties" value="${built-clean.properties}"/> - </antcall> - </target> - <target depends="init" name="-do-clean"> - <delete dir="${build.dir}"/> - <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/> - </target> - <target name="-post-clean"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/> - <target name="-check-call-dep"> - <property file="${call.built.properties}" prefix="already.built."/> - <condition property="should.call.dep"> - <and> - <not> - <isset property="already.built.${call.subproject}"/> - </not> - <available file="${call.script}"/> - </and> - </condition> - </target> - <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep"> - <ant antfile="${call.script}" inheritall="false" target="${call.target}"> - <propertyset> - <propertyref prefix="transfer."/> - <mapper from="transfer.*" to="*" type="glob"/> - </propertyset> - </ant> - </target> -</project> diff --git a/tools/SharedTestUtilsOpen/nbproject/genfiles.properties b/tools/SharedTestUtilsOpen/nbproject/genfiles.properties deleted file mode 100644 index 29fc07cd..00000000 --- a/tools/SharedTestUtilsOpen/nbproject/genfiles.properties +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. Oracle designates this -# particular file as subject to the "Classpath" exception as provided -# by Oracle in the LICENSE file that accompanied this code. -# -# This code 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 General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -build.xml.data.CRC32=7f157faf -build.xml.script.CRC32=3a17521c -build.xml.stylesheet.CRC32=28e38971@1.38.3.45 -# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. -# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. -nbproject/build-impl.xml.data.CRC32=8bec1865 -nbproject/build-impl.xml.script.CRC32=17c36c8e -nbproject/build-impl.xml.stylesheet.CRC32=6ddba6b6@1.53.1.46 diff --git a/tools/SharedTestUtilsOpen/nbproject/project.properties b/tools/SharedTestUtilsOpen/nbproject/project.properties deleted file mode 100644 index 4c0f19b6..00000000 --- a/tools/SharedTestUtilsOpen/nbproject/project.properties +++ /dev/null @@ -1,136 +0,0 @@ -# Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. Oracle designates this -# particular file as subject to the "Classpath" exception as provided -# by Oracle in the LICENSE file that accompanied this code. -# -# This code 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 General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -annotation.processing.enabled=true -annotation.processing.enabled.in.editor=false -annotation.processing.processors.list= -annotation.processing.run.all.processors=true -annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output -application.title=SharedTestUtilsOpen -application.vendor=sg155630 -build.classes.dir=${build.dir}/classes -build.classes.excludes=**/*.java,**/*.form -# This directory is removed when the project is cleaned: -build.dir=build -build.generated.dir=${build.dir}/generated -build.generated.sources.dir=${build.dir}/generated-sources -# Only compile against the classpath explicitly listed here: -build.sysclasspath=ignore -build.test.classes.dir=${build.dir}/test/classes -build.test.results.dir=${build.dir}/test/results -# Uncomment to specify the preferred debugger connection transport: -#debug.transport=dt_socket -debug.classpath=\ - ${run.classpath} -debug.test.classpath=\ - ${run.test.classpath} -# This directory is removed when the project is cleaned: -dist.dir=dist -dist.jar=${dist.dir}/SharedTestUtilsOpen.jar -dist.javadoc.dir=${dist.dir}/javadoc -endorsed.classpath= -excludes= -file.reference.JemmyAWT.jar=../lib/JemmyAWT.jar -file.reference.JemmySWT.jar=../lib/JemmySWT.jar -file.reference.swt.jar=../lib/swt.jar -project.GlassImage=../Jemmy/GlassImage -project.GlassRobot=../Jemmy/GlassRobot -project.JemmyFX=../Jemmy/JemmyFX -project.JemmyFXBrowser=../Jemmy/JemmyFXBrowser -reference.GlassImage.jar=${project.GlassImage}/dist/GlassImage.jar -reference.GlassRobot.jar=${project.GlassRobot}/dist/GlassRobot.jar -reference.JemmyFX.jar=${project.JemmyFX}/dist/JemmyFX.jar -reference.JemmyFXBrowser.jar=${project.JemmyFXBrowser}/dist/JemmyFXBrowser.jar -file.reference.JemmyAWTInput.jar=../Jemmy/jemmy_core/JemmyAWTInput.jar -file.reference.JemmyBrowser.jar=../Jemmy/jemmy_core/JemmyBrowser.jar -file.reference.JemmyCore.jar=../Jemmy/jemmy_core/JemmyCore.jar -file.reference.JemmySupport.jar=../Jemmy/jemmy_core/JemmySupport.jar -file.reference.junit.jar=../Jemmy/jemmy_core/junit.jar -file.reference.jfxrt.jar=${java.home}/lib/ext/jfxrt.jar -file.reference.jfxswt.jar=${java.home}/lib/javafx-swt.jar -includes=** -jar.archive.disabled=${jnlp.enabled} -jar.compress=false -jar.index=${jnlp.enabled} -javac.classpath=\ - ${file.reference.JemmyAWT.jar}:\ - ${file.reference.JemmyAWTInput.jar}:\ - ${file.reference.JemmyBrowser.jar}:\ - ${file.reference.JemmyCore.jar}:\ - ${file.reference.JemmySWT.jar}:\ - ${file.reference.JemmySupport.jar}:\ - ${file.reference.jfxrt.jar}:\ - ${file.reference.jfxswt.jar}:\ - ${file.reference.junit.jar}:\ - ${file.reference.swt.jar}:\ - ${reference.GlassImage.jar}:\ - ${reference.GlassRobot.jar}:\ - ${reference.JemmyFX.jar}:\ - ${reference.JemmyFXBrowser.jar} -# Space-separated list of extra javac options -javac.compilerargs= -javac.deprecation=false -javac.processorpath=\ - ${javac.classpath} -javac.source=1.8 -javac.target=1.8 -javac.test.classpath=\ - ${javac.classpath}:\ - ${build.classes.dir} -javac.test.processorpath=\ - ${javac.test.classpath} -javadoc.additionalparam= -javadoc.author=false -javadoc.encoding=${source.encoding} -javadoc.noindex=false -javadoc.nonavbar=false -javadoc.notree=false -javadoc.private=false -javadoc.splitindex=true -javadoc.use=true -javadoc.version=false -javadoc.windowtitle= -jnlp.codebase.type=no.codebase -jnlp.descriptor=application -jnlp.enabled=false -jnlp.mixed.code=default -jnlp.offline-allowed=false -jnlp.signed=false -jnlp.signing= -jnlp.signing.alias= -jnlp.signing.keystore= -main.class= -manifest.file=manifest.mf -meta.inf.dir=${src.dir}/META-INF -mkdist.disabled=true -platform.active=default_platform -run.classpath=\ - ${javac.classpath}:\ - ${build.classes.dir} -# 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.test.classpath=\ - ${javac.test.classpath}:\ - ${build.test.classes.dir} -source.encoding=UTF-8 -src.dir=src -test.src.dir=test diff --git a/tools/SharedTestUtilsOpen/nbproject/project.xml b/tools/SharedTestUtilsOpen/nbproject/project.xml deleted file mode 100644 index f9ab4fad..00000000 --- a/tools/SharedTestUtilsOpen/nbproject/project.xml +++ /dev/null @@ -1,74 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. -DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - -This code is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License version 2 only, as -published by the Free Software Foundation. Oracle designates this -particular file as subject to the "Classpath" exception as provided -by Oracle in the LICENSE file that accompanied this code. - -This code 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 General Public License -version 2 for more details (a copy is included in the LICENSE file that -accompanied this code). - -You should have received a copy of the GNU General Public License version -2 along with this work; if not, write to the Free Software Foundation, -Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - -Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -or visit www.oracle.com if you need additional information or have any -questions. ---> - -<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/3"> - <name>SharedTestUtilsOpen</name> - <source-roots> - <root id="src.dir"/> - </source-roots> - <test-roots> - <root id="test.src.dir"/> - </test-roots> - </data> - <references xmlns="http://www.netbeans.org/ns/ant-project-references/1"> - <reference> - <foreign-project>GlassImage</foreign-project> - <artifact-type>jar</artifact-type> - <script>build.xml</script> - <target>jar</target> - <clean-target>clean</clean-target> - <id>jar</id> - </reference> - <reference> - <foreign-project>GlassRobot</foreign-project> - <artifact-type>jar</artifact-type> - <script>build.xml</script> - <target>jar</target> - <clean-target>clean</clean-target> - <id>jar</id> - </reference> - <reference> - <foreign-project>JemmyFX</foreign-project> - <artifact-type>jar</artifact-type> - <script>build.xml</script> - <target>jar</target> - <clean-target>clean</clean-target> - <id>jar</id> - </reference> - <reference> - <foreign-project>JemmyFXBrowser</foreign-project> - <artifact-type>jar</artifact-type> - <script>build.xml</script> - <target>jar</target> - <clean-target>clean</clean-target> - <id>jar</id> - </reference> - </references> - </configuration> -</project> diff --git a/tools/SharedTestUtilsOpen/src/test/javaclient/shared/AppLauncher.java b/tools/SharedTestUtilsOpen/src/test/javaclient/shared/AppLauncher.java index 8fae3168..e24eaab9 100644 --- a/tools/SharedTestUtilsOpen/src/test/javaclient/shared/AppLauncher.java +++ b/tools/SharedTestUtilsOpen/src/test/javaclient/shared/AppLauncher.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,12 +24,9 @@ package test.javaclient.shared; -import com.sun.javafx.application.ParametersImpl; import com.sun.javafx.tk.Toolkit; -import java.util.Iterator; -import javafx.stage.Stage; import javafx.application.Application; -import javafx.application.Platform; +import javafx.stage.Stage; import javafx.stage.Window; import org.jemmy.env.Timeout; import org.jemmy.timing.State; @@ -56,28 +53,32 @@ public void launch(final Class cl, String[] args) { instantiateOnSwingQueue(cl, args); break; // https://bugs.openjdk.java.net/browse/JDK-8131888 - case SWT: - instantiateOnSWTQueue(cl, args); - break; - case REMOTE: - launchOnRemoteStage(cl, args); - break; +// case SWT: +// instantiateOnSWTQueue(cl, args); +// break; +// case REMOTE: +// launchOnRemoteStage(cl, args); +// break; default: throw new IllegalStateException("Unknown launch mode: " + mode); } } + //TODO + //only default and swing embedding are enabled because these are the only ones which are tested + //figure out the rest public enum Mode { - DEFAULT, SWING, SWT, REMOTE + DEFAULT, SWING/*, SWT, REMOTE*/ }; private Mode mode = Mode.DEFAULT; private long testDelay = Long.getLong("test.javafx.testdelay", 1000); private long testDelayRemote = Long.getLong("test.javafx.testdelayremote", 4000); public long getTestDelay() { - return mode == Mode.REMOTE ? testDelayRemote : testDelay; + return testDelay; + //return mode == Mode.REMOTE ? testDelayRemote : testDelay; } public Mode getMode() { @@ -88,9 +89,9 @@ private AppLauncher() { if (Boolean.getBoolean("javafx.swinginteroperability")) { mode = Mode.SWING; } - if (Boolean.getBoolean("javafx.swtinteroperability")) { - mode = Mode.SWT; - } +// if (Boolean.getBoolean("javafx.swtinteroperability")) { +// mode = Mode.SWT; +// } } private final static AppLauncher INSTANCE = new AppLauncher(); @@ -117,18 +118,15 @@ private static void instantiateOnSWTQueue(final Class<? extends Interoperability } private void launchOnRemoteStage(final Class<? extends Application> cl, final String[] args) { - Platform.runLater(new Runnable() { - - public void run() { - try { - Application obj = (Application) cl.newInstance(); - ParametersImpl.registerParameters(obj, new ParametersImpl(args)); - obj.start(remoteStage); - } catch (Exception ex) { - ex.printStackTrace(); - } - } - }); +// Platform.runLater(() -> { +// try { +// Application obj = cl.newInstance(); +// ParametersImpl.registerParameters(obj, new ParametersImpl(args)); +// obj.start(remoteStage); +// } catch (Exception ex) { +// ex.printStackTrace(); +// } +// }); } private static void defaultLaunch(final Class<? extends Application> cl, final String[] args) { @@ -182,14 +180,14 @@ public Boolean reached() { * @param remoteStage */ public void setRemoteStage(Stage remoteStage) { - if (remoteStage == null) { - throw new IllegalArgumentException("Stage can't null"); - } - if (this.remoteStage != null) { - throw new IllegalStateException("Current implementation allows only one remote stage per VM"); - } - mode = Mode.REMOTE; - this.remoteStage = remoteStage; +// if (remoteStage == null) { +// throw new IllegalArgumentException("Stage can't null"); +// } +// if (this.remoteStage != null) { +// throw new IllegalStateException("Current implementation allows only one remote stage per VM"); +// } +// mode = Mode.REMOTE; +// this.remoteStage = remoteStage; } - private Stage remoteStage = null; +// private Stage remoteStage = null; } diff --git a/tools/SharedTestUtilsOpen/src/test/javaclient/shared/CombinedTestChooserPresenter.java b/tools/SharedTestUtilsOpen/src/test/javaclient/shared/CombinedTestChooserPresenter.java index e962986a..b01a1d1a 100644 --- a/tools/SharedTestUtilsOpen/src/test/javaclient/shared/CombinedTestChooserPresenter.java +++ b/tools/SharedTestUtilsOpen/src/test/javaclient/shared/CombinedTestChooserPresenter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -38,7 +38,7 @@ import javafx.scene.control.Button; import javafx.scene.layout.VBox; import javafx.scene.paint.Color; -import org.eclipse.swt.widgets.Shell; +//import org.eclipse.swt.widgets.Shell; import com.sun.javafx.stage.WindowHelper; /** @@ -210,22 +210,23 @@ public void run() { SwingAWTUtils.finishShow(frame); } - public void show(final Shell shell, final Object panel) { - shell.setText(title); - SwingAWTUtils.setJFXPanelSize(panel, width + 50, height + TABS_SPACE + 30); - - Platform.runLater(new Runnable() { - - public void run() { - fillScene(); - synchronized (CombinedTestChooserPresenter.this) { - CombinedTestChooserPresenter.this.notify(); - } - SwingAWTUtils.setJFXPanelScene(panel, scene); - } - }); - shell.setLocation(30, 30); - } + //TODO +// public void show(final Shell shell, final Object panel) { +// shell.setText(title); +// SwingAWTUtils.setJFXPanelSize(panel, width + 50, height + TABS_SPACE + 30); +// +// Platform.runLater(new Runnable() { +// +// public void run() { +// fillScene(); +// synchronized (CombinedTestChooserPresenter.this) { +// CombinedTestChooserPresenter.this.notify(); +// } +// SwingAWTUtils.setJFXPanelScene(panel, scene); +// } +// }); +// shell.setLocation(30, 30); +// } public Scene getScene() { return scene; diff --git a/tools/SharedTestUtilsOpen/src/test/javaclient/shared/InteroperabilityApp.java b/tools/SharedTestUtilsOpen/src/test/javaclient/shared/InteroperabilityApp.java index 9b8dcd7d..9b476001 100644 --- a/tools/SharedTestUtilsOpen/src/test/javaclient/shared/InteroperabilityApp.java +++ b/tools/SharedTestUtilsOpen/src/test/javaclient/shared/InteroperabilityApp.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -35,10 +35,10 @@ import javafx.embed.swt.FXCanvas; import javafx.scene.Scene; import javafx.stage.Stage; -import org.eclipse.swt.SWT; -import org.eclipse.swt.layout.FillLayout; -import org.eclipse.swt.widgets.Display; -import org.eclipse.swt.widgets.Shell; +//import org.eclipse.swt.SWT; +//import org.eclipse.swt.layout.FillLayout; +//import org.eclipse.swt.widgets.Display; +//import org.eclipse.swt.widgets.Shell; import org.jemmy.action.GetAction; import org.jemmy.fx.Root; import static test.javaclient.shared.TestUtil.isEmbedded; @@ -162,92 +162,92 @@ public void run() { } public void startSWT() { - System.out.println("Start SWT interop mode."); - final CountDownLatch sync = new CountDownLatch(1 + (hasSecondaryScene() ? 1 : 0)); - - //Need to give getter there, as fx must be init only after fxcanvas creation. - OtherThreadRunner.invokeOnMainThread(new Runnable() { - public void run() { - final Display display = new Display(); - final Shell shell = new Shell(display); - shell.setLocation(30, 30); - shell.setLayout(new FillLayout()); - - if (getFirstStageName() == null) { - shell.setText("SWTShell : " + Utils.getRunEnvironmentInfo()); - } else { - shell.setText(getFirstStageName()); - } - - FXCanvas fxcanvas = new FXCanvas(shell, SWT.NONE); - //Toolkit is initialized, only when FXCanvas is created. - Scene scene = new GetAction<Scene>() { - @Override - public void run(Object... os) throws Exception { - InteroperabilityApp.this.scene = getScene(); - setResult(InteroperabilityApp.this.scene); - } - }.dispatch(Root.ROOT.getEnvironment()); - - shell.open(); - - Utils.setCustomFont(scene); - - fxcanvas.setScene(scene); - fxcanvas.setSize((int) scene.getWidth(), (int) scene.getHeight()); - - scene.heightProperty().addListener(new SWTUtils.SWTSizeListener(scene, fxcanvas)); - scene.widthProperty().addListener(new SWTUtils.SWTSizeListener(scene, fxcanvas)); - - sync.countDown(); - - if (hasSecondaryScene()) { - final StageInfo info = getSecondaryScene(); - final Shell shell1 = new Shell(display); - shell1.setLocation((int) Math.round(info.initialX), (int) Math.round(info.initialY)); - shell1.setLayout(new FillLayout()); - - if (info.stageName == null) { - shell1.setText("SWTShell : " + Utils.getRunEnvironmentInfo()); - } else { - shell1.setText(info.stageName); - } - - fxcanvas = new FXCanvas(shell1, SWT.NONE); - //Toolkit is initialized, only when FXCanvas is created. - Scene scene1 = null; - try { - scene1 = info.scene.call(); - } catch (Exception ex) { - ex.printStackTrace(); - } - - shell1.open(); - - Utils.setCustomFont(scene1); - - fxcanvas.setScene(scene1); - fxcanvas.setSize((int) scene1.getWidth(), (int) scene1.getHeight()); - - scene1.heightProperty().addListener(new SWTUtils.SWTSizeListener(scene1, fxcanvas)); - scene1.widthProperty().addListener(new SWTUtils.SWTSizeListener(scene1, fxcanvas)); - - sync.countDown(); - } - - while (!shell.isDisposed() && OtherThreadRunner.isRunning()) { - if (!display.readAndDispatch()) { - display.sleep(); - } - } - } - }); - - try { - sync.await(); - } catch (InterruptedException ex) { - Logger.getLogger(InteroperabilityApp.class.getName()).log(Level.SEVERE, null, ex); - } +// System.out.println("Start SWT interop mode."); +// final CountDownLatch sync = new CountDownLatch(1 + (hasSecondaryScene() ? 1 : 0)); +// +// //Need to give getter there, as fx must be init only after fxcanvas creation. +// OtherThreadRunner.invokeOnMainThread(new Runnable() { +// public void run() { +// final Display display = new Display(); +// final Shell shell = new Shell(display); +// shell.setLocation(30, 30); +// shell.setLayout(new FillLayout()); +// +// if (getFirstStageName() == null) { +// shell.setText("SWTShell : " + Utils.getRunEnvironmentInfo()); +// } else { +// shell.setText(getFirstStageName()); +// } +// +// FXCanvas fxcanvas = new FXCanvas(shell, SWT.NONE); +// //Toolkit is initialized, only when FXCanvas is created. +// Scene scene = new GetAction<Scene>() { +// @Override +// public void run(Object... os) throws Exception { +// InteroperabilityApp.this.scene = getScene(); +// setResult(InteroperabilityApp.this.scene); +// } +// }.dispatch(Root.ROOT.getEnvironment()); +// +// shell.open(); +// +// Utils.setCustomFont(scene); +// +// fxcanvas.setScene(scene); +// fxcanvas.setSize((int) scene.getWidth(), (int) scene.getHeight()); +// +// scene.heightProperty().addListener(new SWTUtils.SWTSizeListener(scene, fxcanvas)); +// scene.widthProperty().addListener(new SWTUtils.SWTSizeListener(scene, fxcanvas)); +// +// sync.countDown(); +// +// if (hasSecondaryScene()) { +// final StageInfo info = getSecondaryScene(); +// final Shell shell1 = new Shell(display); +// shell1.setLocation((int) Math.round(info.initialX), (int) Math.round(info.initialY)); +// shell1.setLayout(new FillLayout()); +// +// if (info.stageName == null) { +// shell1.setText("SWTShell : " + Utils.getRunEnvironmentInfo()); +// } else { +// shell1.setText(info.stageName); +// } +// +// fxcanvas = new FXCanvas(shell1, SWT.NONE); +// //Toolkit is initialized, only when FXCanvas is created. +// Scene scene1 = null; +// try { +// scene1 = info.scene.call(); +// } catch (Exception ex) { +// ex.printStackTrace(); +// } +// +// shell1.open(); +// +// Utils.setCustomFont(scene1); +// +// fxcanvas.setScene(scene1); +// fxcanvas.setSize((int) scene1.getWidth(), (int) scene1.getHeight()); +// +// scene1.heightProperty().addListener(new SWTUtils.SWTSizeListener(scene1, fxcanvas)); +// scene1.widthProperty().addListener(new SWTUtils.SWTSizeListener(scene1, fxcanvas)); +// +// sync.countDown(); +// } +// +// while (!shell.isDisposed() && OtherThreadRunner.isRunning()) { +// if (!display.readAndDispatch()) { +// display.sleep(); +// } +// } +// } +// }); +// +// try { +// sync.await(); +// } catch (InterruptedException ex) { +// Logger.getLogger(InteroperabilityApp.class.getName()).log(Level.SEVERE, null, ex); +// } } protected static class StageInfo { @@ -264,4 +264,4 @@ public StageInfo(Callable<Scene> scene, double initialX, double initialY, String this.stageName = stageName; } } -} \ No newline at end of file +} diff --git a/tools/SharedTestUtilsOpen/src/test/javaclient/shared/JemmyUtils.java b/tools/SharedTestUtilsOpen/src/test/javaclient/shared/JemmyUtils.java index db387d01..7bbdb147 100644 --- a/tools/SharedTestUtilsOpen/src/test/javaclient/shared/JemmyUtils.java +++ b/tools/SharedTestUtilsOpen/src/test/javaclient/shared/JemmyUtils.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -36,12 +36,17 @@ import org.jemmy.env.TestOut; import org.jemmy.fx.Root; import org.jemmy.image.*; +import org.jemmy.image.awt.AWTImage; +import org.jemmy.image.awt.PNGDecoder; +import org.jemmy.image.glass.GlassImage; +import org.jemmy.image.glass.GlassImageCapturer; +import org.jemmy.image.glass.GlassPixelImageComparator; import org.jemmy.image.pixel.AverageDistanceComparator; import org.jemmy.image.pixel.PixelEqualityRasterComparator; import org.jemmy.image.pixel.Raster; import org.jemmy.image.pixel.RasterComparator; -import org.jemmy.input.AWTRobotInputFactory; -import org.jemmy.input.RobotDriver; +import org.jemmy.input.awt.AWTRobotInputFactory; +import org.jemmy.input.awt.RobotDriver; import org.jemmy.input.glass.GlassInputFactory; import org.junit.Assert; @@ -118,7 +123,7 @@ public static double[] getColors(Image image){ GlassImage img = ((GlassImage) image); double[] colors = new double[img.getSupported().length]; - img.getColors(img.getImage().getWidth() / 2, img.getImage().getWidth() / 2, colors); + img.getColors((int)img.getImage().getWidth() / 2, (int)img.getImage().getWidth() / 2, colors); return new double[]{ colors[GlassPixelImageComparator.arrayIndexOf(img.getSupported(), Raster.Component.RED)], @@ -162,10 +167,11 @@ public static void comparePopUpRGB(Image image, Rectangle rec, CheckBox chB, int } public static void robotExit(){ - if(usingGlassRobot()) - GlassInputFactory.getRobot().destroy(); - else - RobotDriver.exit(); + //TODO +// if(usingGlassRobot()) +// GlassInputFactory.getRobot().destroy(); +// else +// RobotDriver.exit(); } public static void verifyColor(Image image, int x, int y){ @@ -186,13 +192,16 @@ public static void verifyColor(Image image, int x, int y){ } public static Image getScreenCapture(org.jemmy.Rectangle rect){ - if(usingGlassRobot()){ - Pixels screenCapture = GlassImageCapturer.getRobot().getScreenCapture(rect.x, rect.y, rect.width, rect.height); - return (Image) screenCapture; - }else{ + //TODO +// if(usingGlassRobot()){ +// Pixels screenCapture = GlassImageCapturer.getRobot() +// .getScreenCapture(rect.x, rect.y, rect.width, rect.height); +// return (Image) screenCapture; +// return null; +// }else{ Image screenshot = RobotDriver.createScreenCapture(rect); return screenshot; - } +// } } public static boolean isDuplicateImages(File file1, File file2) { diff --git a/tools/SharedTestUtilsOpen/src/test/javaclient/shared/SWTUtils.java b/tools/SharedTestUtilsOpen/src/test/javaclient/shared/SWTUtils.java index 7e5e7616..fbe68e64 100644 --- a/tools/SharedTestUtilsOpen/src/test/javaclient/shared/SWTUtils.java +++ b/tools/SharedTestUtilsOpen/src/test/javaclient/shared/SWTUtils.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. */ package test.javaclient.shared; @@ -9,16 +9,16 @@ import javafx.beans.value.ObservableValue; import javafx.embed.swt.FXCanvas; import javafx.scene.Scene; -import org.eclipse.swt.SWT; -import org.eclipse.swt.graphics.Rectangle; -import org.eclipse.swt.layout.FillLayout; -import org.eclipse.swt.widgets.Display; -import org.eclipse.swt.widgets.Shell; +//import org.eclipse.swt.SWT; +//import org.eclipse.swt.graphics.Rectangle; +//import org.eclipse.swt.layout.FillLayout; +//import org.eclipse.swt.widgets.Display; +//import org.eclipse.swt.widgets.Shell; import org.jemmy.action.GetAction; import org.jemmy.control.Wrap; import org.jemmy.fx.Root; import org.jemmy.interfaces.Parent; -import org.jemmy.swt.Shells; +//import org.jemmy.swt.Shells; /** * @author Stanislav Smirnov <stanislav.smirnov@oracle.com> @@ -28,94 +28,95 @@ public class SWTUtils { FXCanvas fxcanvas; public static Wrap<? extends Scene> getScene() { - Wrap<? extends Scene> scene; - // TODO: ugly stub here: should be resolved on Jemmy side - Wrap<? extends Shell> shell = null; - do { - try { - shell = Shells.SHELLS.lookup().wrap(); - } catch (NullPointerException ex) { - } - } while (shell == null); - final FXCanvas swt_panel = (FXCanvas) shell.as(Parent.class, FXCanvas.class).lookup(FXCanvas.class).wrap().getControl(); - SwingAWTUtils.SceneRetriever scene_retriever = new SwingAWTUtils.SceneRetriever(swt_panel); - swt_panel.getDisplay().syncExec(scene_retriever); - scene = scene_retriever.getScene(); - final Wrap<? extends Shell> fshell = shell; - swt_panel.getDisplay().syncExec(new Runnable() { - public void run() { - fshell.getControl().forceActive(); - } - }); - return scene; +// Wrap<? extends Scene> scene; +// // TODO: ugly stub here: should be resolved on Jemmy side +// Wrap<? extends Shell> shell = null; +// do { +// try { +// shell = Shells.SHELLS.lookup().wrap(); +// } catch (NullPointerException ex) { +// } +// } while (shell == null); +// final FXCanvas swt_panel = (FXCanvas) shell.as(Parent.class, FXCanvas.class).lookup(FXCanvas.class).wrap().getControl(); +// SwingAWTUtils.SceneRetriever scene_retriever = new SwingAWTUtils.SceneRetriever(swt_panel); +// swt_panel.getDisplay().syncExec(scene_retriever); +// scene = scene_retriever.getScene(); +// final Wrap<? extends Shell> fshell = shell; +// swt_panel.getDisplay().syncExec(new Runnable() { +// public void run() { +// fshell.getControl().forceActive(); +// } +// }); +// return scene; + return null; } public void startSWT(final GetAction<Scene> sceneGetter, final CountDownLatch sync, final double initialX, final double initialY, final String stageName) { - OtherThreadRunner.invokeOnMainThread(new Runnable() { - public void run() { - final Display display = new Display(); - final Shell shell = new Shell(display); - shell.setLocation((int) Math.round(initialX), (int) Math.round(initialY)); - shell.setLayout(new FillLayout()); - - if (stageName == null) { - shell.setText("SWTShell : " + Utils.getRunEnvironmentInfo()); - } else { - shell.setText(stageName); - } - - fxcanvas = new FXCanvas(shell, SWT.NONE); - //Toolkit is initialized, only when FXCanvas is created. - Scene scene = sceneGetter.dispatch(Root.ROOT.getEnvironment()); - - shell.open(); - - Utils.setCustomFont(scene); - - fxcanvas.setScene(scene); - fxcanvas.setSize((int) scene.getWidth(), (int) scene.getHeight()); - - scene.heightProperty().addListener(new SWTSizeListener(scene, fxcanvas)); - scene.widthProperty().addListener(new SWTSizeListener(scene, fxcanvas)); - - sync.countDown(); - - while (!shell.isDisposed() && OtherThreadRunner.isRunning()) { - if (!display.readAndDispatch()) { - display.sleep(); - } - } - } - }); +// OtherThreadRunner.invokeOnMainThread(new Runnable() { +// public void run() { +// final Display display = new Display(); +// final Shell shell = new Shell(display); +// shell.setLocation((int) Math.round(initialX), (int) Math.round(initialY)); +// shell.setLayout(new FillLayout()); +// +// if (stageName == null) { +// shell.setText("SWTShell : " + Utils.getRunEnvironmentInfo()); +// } else { +// shell.setText(stageName); +// } +// +// fxcanvas = new FXCanvas(shell, SWT.NONE); +// //Toolkit is initialized, only when FXCanvas is created. +// Scene scene = sceneGetter.dispatch(Root.ROOT.getEnvironment()); +// +// shell.open(); +// +// Utils.setCustomFont(scene); +// +// fxcanvas.setScene(scene); +// fxcanvas.setSize((int) scene.getWidth(), (int) scene.getHeight()); +// +// scene.heightProperty().addListener(new SWTSizeListener(scene, fxcanvas)); +// scene.widthProperty().addListener(new SWTSizeListener(scene, fxcanvas)); +// +// sync.countDown(); +// +// while (!shell.isDisposed() && OtherThreadRunner.isRunning()) { +// if (!display.readAndDispatch()) { +// display.sleep(); +// } +// } +// } +// }); } public static void createSWTTestPresenterShow(boolean isRunning, CombinedTestChooserPresenter combinedTestChooserPresenter) { - final Display display = new Display(); - final Shell shell = new Shell(display); - shell.setText("Shell"); - FXCanvas panel = new FXCanvas(shell, SWT.NONE); - combinedTestChooserPresenter.show(shell, panel); - - shell.pack(); - - shell.open(); - - while (!shell.isDisposed() && isRunning) { - if (!display.readAndDispatch()) { - display.sleep(); - } - } +// final Display display = new Display(); +// final Shell shell = new Shell(display); +// shell.setText("Shell"); +// FXCanvas panel = new FXCanvas(shell, SWT.NONE); +// combinedTestChooserPresenter.show(shell, panel); +// +// shell.pack(); +// +// shell.open(); +// +// while (!shell.isDisposed() && isRunning) { +// if (!display.readAndDispatch()) { +// display.sleep(); +// } +// } } public static void setCanvasSize(FXCanvas canvas, int width, int height) { - canvas.setSize(width, height); +// canvas.setSize(width, height); } public static void setCanvasScene(FXCanvas canvas, Scene scene) { - canvas.setScene(scene); +// canvas.setScene(scene); } public static class SWTSizeListener implements ChangeListener<Number> { @@ -129,20 +130,20 @@ public SWTSizeListener(Scene scene, FXCanvas canvas) { } public void changed(final ObservableValue<? extends Number> ov, final Number t, final Number t1) { - canvas.getDisplay().asyncExec(new Runnable() { - public void run() { - canvas.setSize((int) scene.getWidth(), (int) scene.getHeight()); - Shell shell = new GetAction<Shell>() { - @Override - public void run(Object... os) throws Exception { - setResult(canvas.getParent().getShell()); - } - }.dispatch(Root.ROOT.getEnvironment()); - Rectangle client_rect = shell.getClientArea(); - Rectangle bounding_rect = shell.getBounds(); - shell.setSize((int) scene.getWidth() + bounding_rect.width - client_rect.width, (int) scene.getHeight() + bounding_rect.height - client_rect.height); - } - }); +// canvas.getDisplay().asyncExec(new Runnable() { +// public void run() { +// canvas.setSize((int) scene.getWidth(), (int) scene.getHeight()); +// Shell shell = new GetAction<Shell>() { +// @Override +// public void run(Object... os) throws Exception { +// setResult(canvas.getParent().getShell()); +// } +// }.dispatch(Root.ROOT.getEnvironment()); +// Rectangle client_rect = shell.getClientArea(); +// Rectangle bounding_rect = shell.getBounds(); +// shell.setSize((int) scene.getWidth() + bounding_rect.width - client_rect.width, (int) scene.getHeight() + bounding_rect.height - client_rect.height); +// } +// }); } } -} \ No newline at end of file +} diff --git a/tools/SharedTestUtilsOpen/src/test/javaclient/shared/SwingAWTUtils.java b/tools/SharedTestUtilsOpen/src/test/javaclient/shared/SwingAWTUtils.java index 29eadfb6..e8950b42 100644 --- a/tools/SharedTestUtilsOpen/src/test/javaclient/shared/SwingAWTUtils.java +++ b/tools/SharedTestUtilsOpen/src/test/javaclient/shared/SwingAWTUtils.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,25 +25,27 @@ package test.javaclient.shared; import com.sun.javafx.application.PlatformImpl; -import java.awt.*; -import java.awt.image.BufferedImage; import javafx.beans.value.ChangeListener; import javafx.beans.value.ObservableValue; import javafx.embed.swing.JFXPanel; import javafx.embed.swt.FXCanvas; import javafx.scene.Scene; +import junit.framework.Assert; +import org.jemmy.control.Wrap; +import org.jemmy.image.Image; +import org.jemmy.image.awt.AWTImage; + import javax.script.ScriptEngine; import javax.script.ScriptEngineManager; import javax.swing.JFrame; import javax.swing.SwingUtilities; -import junit.framework.Assert; -import org.jemmy.awt.AWT; -import org.jemmy.awt.Showing; -import org.jemmy.control.Wrap; -import org.jemmy.fx.Root; -import org.jemmy.fx.SceneWrap; -import org.jemmy.image.AWTImage; -import org.jemmy.image.Image; +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.Dimension; +import java.awt.GraphicsDevice; +import java.awt.GraphicsEnvironment; +import java.awt.Toolkit; +import java.awt.image.BufferedImage; /** * @@ -137,19 +139,20 @@ public static void getDefaultToolkit() { } public static Wrap<? extends Scene> lookupScene() { - final Wrap<? extends Scene> scene; - JFXPanel fx_panel = AWT.getAWT().lookup(JFXPanel.class, new Showing<JFXPanel>()).wrap(0).getControl(); - scene = new SceneWrap<Scene>(Root.ROOT.getEnvironment(), fx_panel.getScene()); - try { - SwingUtilities.invokeLater(new Runnable() { - public void run() { - AWT.getAWT().lookup(JFrame.class, new Showing<JFrame>()).wrap(0).getControl().toFront(); - } - }); - } catch (Exception ex) { - ex.printStackTrace(); - } - return scene; +// final Wrap<? extends Scene> scene; +// JFXPanel fx_panel = AWT.getAWT().lookup(JFXPanel.class, new Showing<JFXPanel>()).wrap(0).getControl(); +// scene = new SceneWrap<Scene>(Root.ROOT.getEnvironment(), fx_panel.getScene()); +// try { +// SwingUtilities.invokeLater(new Runnable() { +// public void run() { +// AWT.getAWT().lookup(JFrame.class, new Showing<JFrame>()).wrap(0).getControl().toFront(); +// } +// }); +// } catch (Exception ex) { +// ex.printStackTrace(); +// } +// return scene; + return null; } public void startSwing(final Object oFrame, final Object panel, @@ -162,7 +165,9 @@ public void startSwing(final Object oFrame, final Object panel, public void run() { SwingAWTUtils.this.frame = frame; if (stageName != null) { - frame.setTitle(stageName); + frame.setTitle(stageName + " in a JFrame"); + } else { + frame.setTitle("JFrame"); } frame.setName(this.getClass().getSimpleName()); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); @@ -216,7 +221,7 @@ public SceneRetriever(final FXCanvas swt_panel) { } public void run() { - scene = new SceneWrap<Scene>(Root.ROOT.getEnvironment(), swtPanel.getScene()); +// scene = new SceneWrap<Scene>(Root.ROOT.getEnvironment(), swtPanel.getScene()); } public Wrap<? extends Scene> getScene() { diff --git a/tools/SharedTestUtilsOpen/src/test/javaclient/shared/TestBase.java b/tools/SharedTestUtilsOpen/src/test/javaclient/shared/TestBase.java index b1b3cdfd..2d7d58e2 100644 --- a/tools/SharedTestUtilsOpen/src/test/javaclient/shared/TestBase.java +++ b/tools/SharedTestUtilsOpen/src/test/javaclient/shared/TestBase.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,7 +25,8 @@ package test.javaclient.shared; import com.sun.glass.ui.Application; -import com.sun.glass.ui.Robot; +import javafx.scene.input.MouseButton; +import javafx.scene.robot.Robot; import java.io.File; import java.util.concurrent.Semaphore; import javafx.application.Platform; @@ -400,10 +401,10 @@ private void dndRobot(Wrap from, Point fromPoint, Wrap to, Point toPoint) throws Semaphore s = new Semaphore(0); Platform.runLater(() -> { if (robot == null) { - robot = Application.GetApplication().createRobot(); + robot = new Robot(); } robot.mouseMove(absFromPoint.x, absFromPoint.y); - robot.mousePress(Robot.MOUSE_LEFT_BTN); + robot.mousePress(MouseButton.PRIMARY); final int STEPS = 50; int dx = absToPoint.x - absFromPoint.x; int dy = absToPoint.y - absFromPoint.y; @@ -416,7 +417,7 @@ private void dndRobot(Wrap from, Point fromPoint, Wrap to, Point toPoint) throws ex.printStackTrace(); } } - robot.mouseRelease(Robot.MOUSE_LEFT_BTN); + robot.mouseRelease(MouseButton.PRIMARY); s.release(); }); s.acquire(); diff --git a/tools/SharedTestUtilsOpen/src/test/javaclient/shared/TestUtil.java b/tools/SharedTestUtilsOpen/src/test/javaclient/shared/TestUtil.java index 10c79329..2366bf9b 100644 --- a/tools/SharedTestUtilsOpen/src/test/javaclient/shared/TestUtil.java +++ b/tools/SharedTestUtilsOpen/src/test/javaclient/shared/TestUtil.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,9 +24,7 @@ package test.javaclient.shared; -import java.io.*; -import java.util.logging.Level; -import java.util.logging.Logger; +import com.sun.javafx.stage.WindowHelper; import javafx.scene.Scene; import javafx.stage.Stage; import javafx.stage.Window; @@ -37,7 +35,15 @@ import org.jemmy.timing.State; import test.javaclient.shared.description.TreeNode; import test.javaclient.shared.screenshots.GoldenImageManager; -import com.sun.javafx.stage.WindowHelper; + +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.io.Serializable; +import java.util.logging.Level; +import java.util.logging.Logger; /** * Utility methods @@ -172,16 +178,9 @@ public static void slow(long delay) { } public static Wrap<? extends Scene> getScene() { - final Wrap<? extends Scene> scene; - - scene = Root.ROOT.lookup(new ByWindowType(Stage.class)).lookup(Scene.class).wrap(0); - Utils.deferAction(new Runnable() { - public void run() { - //scene.getControl().getWindow().setFocused(true); - WindowHelper.setFocused(scene.getControl().getWindow(), true); - } - }); - + Wrap<? extends Scene> scene = Root.ROOT.lookup(new ByWindowType(Stage.class)).lookup(Scene.class).wrap(0); + var window = scene.waitState(() -> scene.getControl().getWindow()); + Utils.deferAction(() -> WindowHelper.setFocused(window, true)); return scene; } diff --git a/tools/SharedTestUtilsOpen/src/test/javaclient/shared/Utils.java b/tools/SharedTestUtilsOpen/src/test/javaclient/shared/Utils.java index 7cb6479b..7c05616d 100644 --- a/tools/SharedTestUtilsOpen/src/test/javaclient/shared/Utils.java +++ b/tools/SharedTestUtilsOpen/src/test/javaclient/shared/Utils.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,14 +24,6 @@ package test.javaclient.shared; -import javafx.application.Application; -import com.sun.javafx.runtime.VersionInfo; -import com.sun.prism.GraphicsPipeline; -import java.io.InputStream; -import java.net.URL; -import java.util.function.Supplier; -import java.util.regex.Matcher; -import java.util.regex.Pattern; import javafx.beans.binding.DoubleBinding; import javafx.event.EventHandler; import javafx.scene.Node; @@ -45,12 +37,15 @@ import javafx.scene.layout.StackPane; import javafx.scene.paint.Color; import javafx.scene.shape.Rectangle; -import javafx.scene.text.Font; import javafx.scene.text.Text; import javafx.stage.Stage; import org.jemmy.fx.Browser; + +import java.util.function.Supplier; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + import static test.javaclient.shared.JemmyUtils.usingGlassRobot; -import test.javaclient.shared.imagescomparator.ImageDuplicateExtractor; /** * @@ -59,19 +54,18 @@ public class Utils { public static void addBrowser(Scene scene) { + //TODO scene.setOnKeyPressed(new EventHandler<KeyEvent>() { boolean browserStarted = false; public void handle(KeyEvent ke) { if (!browserStarted && ke.isControlDown() && ke.isShiftDown() && ke.getCode() == KeyCode.B) { browserStarted = true; - deferAction(new Runnable() { - public void run() { - try { - Browser.runBrowser(); - } catch (Exception ex) { - ex.printStackTrace(); - } + deferAction(() -> { + try { + Browser.runBrowser(); + } catch (Exception ex) { + ex.printStackTrace(); } }); } @@ -130,29 +124,30 @@ public static String normalizeName(String name) { } public static void setCustomFont(final Scene scene) { - if (null == scene) { - throw new NullPointerException("Null scene appears to be"); - } - boolean success = true; - try { - final InputStream is = Utils.class.getResourceAsStream("font/LucidaSansRegular.ttf"); - final URL url = ImageDuplicateExtractor.class.getResource("custom_font.css"); - - if ((null != is) && (null != url)){ - Font.loadFont(is, 12); - scene.getStylesheets().add(url.toExternalForm()); - } else { - System.out.println("epic fail: is="+is+" url="+url); - throw new NullPointerException("setCustomFont failed"); - } - }catch(Throwable t){ - success = false; - } - finally { - if (!success) { - throw new RuntimeException("Font is not loaded"); - } - } + //TODO +// if (null == scene) { +// throw new NullPointerException("Null scene appears to be"); +// } +// boolean success = true; +// try { +// final InputStream is = Utils.class.getResourceAsStream("font/LucidaSansRegular.ttf"); +// final URL url = ImageDuplicateExtractor.class.getResource("custom_font.css"); +// +// if ((null != is) && (null != url)){ +// Font.loadFont(is, 12); +// scene.getStylesheets().add(url.toExternalForm()); +// } else { +// System.out.println("epic fail: is="+is+" url="+url); +// throw new NullPointerException("setCustomFont failed"); +// } +// }catch(Throwable t){ +// success = false; +// } +// finally { +// if (!success) { +// throw new RuntimeException("Font is not loaded"); +// } +// } } public static class TextButton extends StackPane { @@ -264,16 +259,18 @@ public void apply(Region region) { } public static String getRunEnvironmentInfo() { - GraphicsPipeline pipeline = com.sun.prism.GraphicsPipeline.getPipeline(); - String prim_order = System.getProperty("prism.order"); - return " FX: " + (pipeline != null ? pipeline.getClass().getSimpleName() : "No Pipeline info") - + " (prism.order:" + (prim_order != null ? prim_order : "No Prism Order info") + ")" - + " " + VersionInfo.getRuntimeVersion() - + " (build " + VersionInfo.getHudsonBuildNumber() + ")" - + " Java: " + System.getProperty("java.runtime.version") - + " Jvm: " + System.getProperty("java.vm.name") - + " LFeel env/get: " + System.getProperty("javafx.userAgentStylesheetUrl" - + " / " + Application.getUserAgentStylesheet()); + return ""; + //TODO +// GraphicsPipeline pipeline = com.sun.prism.GraphicsPipeline.getPipeline(); +// String prim_order = System.getProperty("prism.order"); +// return " FX: " + (pipeline != null ? pipeline.getClass().getSimpleName() : "No Pipeline info") +// + " (prism.order:" + (prim_order != null ? prim_order : "No Prism Order info") + ")" +// + " " + VersionInfo.getRuntimeVersion() +// + " (build " + VersionInfo.getHudsonBuildNumber() + ")" +// + " Java: " + System.getProperty("java.runtime.version") +// + " Jvm: " + System.getProperty("java.vm.name") +// + " LFeel env/get: " + System.getProperty("javafx.userAgentStylesheetUrl" +// + " / " + Application.getUserAgentStylesheet()); } public static boolean isJ2D() { diff --git a/tools/SharedTestUtilsOpen/src/test/javaclient/shared/screenshots/GoldenImageManager.java b/tools/SharedTestUtilsOpen/src/test/javaclient/shared/screenshots/GoldenImageManager.java index c440cba6..b1e65255 100644 --- a/tools/SharedTestUtilsOpen/src/test/javaclient/shared/screenshots/GoldenImageManager.java +++ b/tools/SharedTestUtilsOpen/src/test/javaclient/shared/screenshots/GoldenImageManager.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -44,11 +44,15 @@ public class GoldenImageManager { private static final String IMG_FOLDER = "images-svn"; private static File getImagesRoot() throws IOException { - return new File("./", IMG_FOLDER).getCanonicalFile(); + String root = System.getProperty("imageutils.goldenpath"); + if(root != null) + return new File(root); + else + return new File("./", IMG_FOLDER).getCanonicalFile(); } private static String getSuiteName() throws IOException { - return new File(".").getCanonicalFile().getName(); + return System.getProperty("imageutils.suite", new File(".").getCanonicalFile().getName()); } //Requires -XaddExports:javafx.graphics/com.sun.prism=ALL-UNNAMED to work in JDK9 diff --git a/tools/SharedTestUtilsOpen/src/test/javaclient/shared/screenshots/ScreenshotUtils.java b/tools/SharedTestUtilsOpen/src/test/javaclient/shared/screenshots/ScreenshotUtils.java index 43e3a1f5..8f179bd7 100644 --- a/tools/SharedTestUtilsOpen/src/test/javaclient/shared/screenshots/ScreenshotUtils.java +++ b/tools/SharedTestUtilsOpen/src/test/javaclient/shared/screenshots/ScreenshotUtils.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,9 +23,6 @@ */ package test.javaclient.shared.screenshots; -import java.nio.file.Paths; -import java.util.LinkedList; -import java.util.List; import javafx.scene.Node; import javafx.scene.Scene; import javafx.scene.layout.Pane; @@ -33,6 +30,8 @@ import org.jemmy.Rectangle; import org.jemmy.TimeoutExpiredException; import org.jemmy.control.Wrap; +import org.jemmy.env.Environment; +import org.jemmy.env.Timeout; import org.jemmy.fx.ByWindowType; import org.jemmy.fx.NodeDock; import org.jemmy.fx.Root; @@ -43,6 +42,10 @@ import test.javaclient.shared.AbstractTestableApplication; import test.javaclient.shared.JemmyUtils; +import java.nio.file.Paths; +import java.util.LinkedList; +import java.util.List; + /** * @author Andrey Glushchenko, andrey.rusakov@oracle.com */ @@ -51,6 +54,12 @@ public class ScreenshotUtils { private static final List<Throwable> SCREENSHOT_ERRORS = new LinkedList<>(); private static AbstractTestableApplication application; + private static final Timeout BEFORE_SAVING_GOLDEN = new Timeout("before.saving.golden", 3000); + + static { + Environment.getEnvironment().setTimeout(BEFORE_SAVING_GOLDEN); + } + /** * Verify or generate golden screenshot for a test. * @@ -81,6 +90,7 @@ public static void checkScreenshot(String testName, final Wrap node, Rectangle r List<String> goldenImages = GoldenImageManager.getTestImages(testName, ".png"); String resultPath = GoldenImageManager.getScreenshotPath(testName); if (goldenImages.isEmpty()) { + node.getEnvironment().getTimeout(BEFORE_SAVING_GOLDEN).sleep(); Image sceneImage = (rect == null) ? node.getScreenImage() : node.getScreenImage(rect); sceneImage.save(resultPath); throw new RuntimeException("No golden images found for " + testName diff --git a/tools/TestMarkup/.gitignore b/tools/TestMarkup/.gitignore new file mode 100644 index 00000000..567609b1 --- /dev/null +++ b/tools/TestMarkup/.gitignore @@ -0,0 +1 @@ +build/ diff --git a/tools/TestMarkup/build.xml b/tools/TestMarkup/build.xml index ea9229bf..7a747926 100644 --- a/tools/TestMarkup/build.xml +++ b/tools/TestMarkup/build.xml @@ -1,13 +1,11 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- You may freely edit this file. See commented blocks below for --> -<!-- some examples of how to customize the build. --> -<!-- (If you delete it and reopen the project it will be recreated.) --> -<!-- By default, only the Clean and Build commands use this build script. --> -<!-- Commands such as Run, Debug, and Test only use this build script if --> -<!-- the Compile on Save feature is turned off for the project. --> -<!-- You can turn off the Compile on Save (or Deploy on Save) setting --> -<!-- in the project's Project Properties dialog box.--> -<project name="TestMarkup" default="default" basedir="."> - <description>Builds, tests, and runs the project TestMarkup.</description> - <import file="nbproject/build-impl.xml"/> +<project name="test.markup" default="compile"> + <basename file="${basedir}" property="."/> + <property name="rootdir" location="${basedir}/../.."/> + <property name="project.name" value="TestMarkup"/> + <import file="${basedir}/../make/build-template.xml"/> + <property name="dependencies.classpath" value=""/> + <target name="compile" depends="compile-src"/> + <target name="build-dependencies"/> + <target name="build-test-dependencies"/> </project> diff --git a/tools/TestMarkup/nbproject/build-impl.xml b/tools/TestMarkup/nbproject/build-impl.xml deleted file mode 100644 index 552a979a..00000000 --- a/tools/TestMarkup/nbproject/build-impl.xml +++ /dev/null @@ -1,1405 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. -DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - -This code is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License version 2 only, as -published by the Free Software Foundation. Oracle designates this -particular file as subject to the "Classpath" exception as provided -by Oracle in the LICENSE file that accompanied this code. - -This code 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 General Public License -version 2 for more details (a copy is included in the LICENSE file that -accompanied this code). - -You should have received a copy of the GNU General Public License version -2 along with this work; if not, write to the Free Software Foundation, -Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - -Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -or visit www.oracle.com if you need additional information or have any -questions. ---> - -<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="TestMarkup-impl"> - <fail message="Please build using Ant 1.8.0 or higher."> - <condition> - <not> - <antversion atleast="1.8.0"/> - </not> - </condition> - </fail> - <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/> - <!-- - ====================== - INITIALIZATION SECTION - ====================== - --> - <target name="-pre-init"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="-pre-init" name="-init-private"> - <property file="nbproject/private/config.properties"/> - <property file="nbproject/private/configs/${config}.properties"/> - <property file="nbproject/private/private.properties"/> - </target> - <target depends="-pre-init,-init-private" name="-init-user"> - <property file="${user.properties.file}"/> - <!-- The two properties below are usually overridden --> - <!-- by the active platform. Just a fallback. --> - <property name="default.javac.source" value="1.4"/> - <property name="default.javac.target" value="1.4"/> - </target> - <target depends="-pre-init,-init-private,-init-user" name="-init-project"> - <property file="nbproject/configs/${config}.properties"/> - <property file="nbproject/project.properties"/> - </target> - <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init"> - <available file="${manifest.file}" property="manifest.available"/> - <condition property="splashscreen.available"> - <and> - <not> - <equals arg1="${application.splash}" arg2="" trim="true"/> - </not> - <available file="${application.splash}"/> - </and> - </condition> - <condition property="main.class.available"> - <and> - <isset property="main.class"/> - <not> - <equals arg1="${main.class}" arg2="" trim="true"/> - </not> - </and> - </condition> - <condition property="manifest.available+main.class"> - <and> - <isset property="manifest.available"/> - <isset property="main.class.available"/> - </and> - </condition> - <condition property="do.archive"> - <not> - <istrue value="${jar.archive.disabled}"/> - </not> - </condition> - <condition property="do.mkdist"> - <and> - <isset property="do.archive"/> - <isset property="libs.CopyLibs.classpath"/> - <not> - <istrue value="${mkdist.disabled}"/> - </not> - </and> - </condition> - <condition property="manifest.available+main.class+mkdist.available"> - <and> - <istrue value="${manifest.available+main.class}"/> - <isset property="do.mkdist"/> - </and> - </condition> - <condition property="do.archive+manifest.available"> - <and> - <isset property="manifest.available"/> - <istrue value="${do.archive}"/> - </and> - </condition> - <condition property="do.archive+main.class.available"> - <and> - <isset property="main.class.available"/> - <istrue value="${do.archive}"/> - </and> - </condition> - <condition property="do.archive+splashscreen.available"> - <and> - <isset property="splashscreen.available"/> - <istrue value="${do.archive}"/> - </and> - </condition> - <condition property="do.archive+manifest.available+main.class"> - <and> - <istrue value="${manifest.available+main.class}"/> - <istrue value="${do.archive}"/> - </and> - </condition> - <condition property="manifest.available-mkdist.available"> - <or> - <istrue value="${manifest.available}"/> - <isset property="do.mkdist"/> - </or> - </condition> - <condition property="manifest.available+main.class-mkdist.available"> - <or> - <istrue value="${manifest.available+main.class}"/> - <isset property="do.mkdist"/> - </or> - </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"/> - <isset property="have.tests"/> - </and> - </condition> - <condition property="no.javadoc.preview"> - <and> - <isset property="javadoc.preview"/> - <isfalse value="${javadoc.preview}"/> - </and> - </condition> - <property name="run.jvmargs" value=""/> - <property name="run.jvmargs.ide" value=""/> - <property name="javac.compilerargs" value=""/> - <property name="work.dir" value="${basedir}"/> - <condition property="no.deps"> - <and> - <istrue value="${no.dependencies}"/> - </and> - </condition> - <property name="javac.debug" value="true"/> - <property name="javadoc.preview" value="true"/> - <property name="application.args" value=""/> - <property name="source.encoding" value="${file.encoding}"/> - <property name="runtime.encoding" value="${source.encoding}"/> - <condition property="javadoc.encoding.used" value="${javadoc.encoding}"> - <and> - <isset property="javadoc.encoding"/> - <not> - <equals arg1="${javadoc.encoding}" arg2=""/> - </not> - </and> - </condition> - <property name="javadoc.encoding.used" value="${source.encoding}"/> - <property name="includes" value="**"/> - <property name="excludes" value=""/> - <property name="do.depend" value="false"/> - <condition property="do.depend.true"> - <istrue value="${do.depend}"/> - </condition> - <path id="endorsed.classpath.path" path="${endorsed.classpath}"/> - <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'"> - <length length="0" string="${endorsed.classpath}" when="greater"/> - </condition> - <condition else="false" property="jdkBug6558476"> - <and> - <matches pattern="1\.[56]" string="${java.specification.version}"/> - <not> - <os family="unix"/> - </not> - </and> - </condition> - <property name="javac.fork" value="${jdkBug6558476}"/> - <property name="jar.index" value="false"/> - <property name="jar.index.metainf" value="${jar.index}"/> - <property name="copylibs.rebase" value="true"/> - <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/> - <condition property="junit.available"> - <or> - <available classname="org.junit.Test" classpath="${run.test.classpath}"/> - <available classname="junit.framework.Test" classpath="${run.test.classpath}"/> - </or> - </condition> - <condition property="testng.available"> - <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/> - </condition> - <condition property="junit+testng.available"> - <and> - <istrue value="${junit.available}"/> - <istrue value="${testng.available}"/> - </and> - </condition> - <condition else="testng" property="testng.mode" value="mixed"> - <istrue value="${junit+testng.available}"/> - </condition> - <condition else="" property="testng.debug.mode" value="-mixed"> - <istrue value="${junit+testng.available}"/> - </condition> - </target> - <target name="-post-init"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check"> - <fail unless="src.dir">Must set src.dir</fail> - <fail unless="test.src.dir">Must set test.src.dir</fail> - <fail unless="build.dir">Must set build.dir</fail> - <fail unless="dist.dir">Must set dist.dir</fail> - <fail unless="build.classes.dir">Must set build.classes.dir</fail> - <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail> - <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail> - <fail unless="build.test.results.dir">Must set build.test.results.dir</fail> - <fail unless="build.classes.excludes">Must set build.classes.excludes</fail> - <fail unless="dist.jar">Must set dist.jar</fail> - </target> - <target name="-init-macrodef-property"> - <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1"> - <attribute name="name"/> - <attribute name="value"/> - <sequential> - <property name="@{name}" value="${@{value}}"/> - </sequential> - </macrodef> - </target> - <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors"> - <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${src.dir}" name="srcdir"/> - <attribute default="${build.classes.dir}" name="destdir"/> - <attribute default="${javac.classpath}" name="classpath"/> - <attribute default="${javac.processorpath}" name="processorpath"/> - <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="${javac.debug}" name="debug"/> - <attribute default="${empty.dir}" name="sourcepath"/> - <attribute default="${empty.dir}" name="gensrcdir"/> - <element name="customize" optional="true"/> - <sequential> - <property location="${build.dir}/empty" name="empty.dir"/> - <mkdir dir="${empty.dir}"/> - <mkdir dir="@{apgeneratedsrcdir}"/> - <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}"> - <src> - <dirset dir="@{gensrcdir}" erroronmissingdir="false"> - <include name="*"/> - </dirset> - </src> - <classpath> - <path path="@{classpath}"/> - </classpath> - <compilerarg line="${endorsed.classpath.cmd.line.arg}"/> - <compilerarg line="${javac.compilerargs}"/> - <compilerarg value="-processorpath"/> - <compilerarg path="@{processorpath}:${empty.dir}"/> - <compilerarg line="${ap.processors.internal}"/> - <compilerarg line="${annotation.processing.processor.options}"/> - <compilerarg value="-s"/> - <compilerarg path="@{apgeneratedsrcdir}"/> - <compilerarg line="${ap.proc.none.internal}"/> - <customize/> - </javac> - </sequential> - </macrodef> - </target> - <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal"> - <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${src.dir}" name="srcdir"/> - <attribute default="${build.classes.dir}" name="destdir"/> - <attribute default="${javac.classpath}" name="classpath"/> - <attribute default="${javac.processorpath}" name="processorpath"/> - <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="${javac.debug}" name="debug"/> - <attribute default="${empty.dir}" name="sourcepath"/> - <attribute default="${empty.dir}" name="gensrcdir"/> - <element name="customize" optional="true"/> - <sequential> - <property location="${build.dir}/empty" name="empty.dir"/> - <mkdir dir="${empty.dir}"/> - <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}"> - <src> - <dirset dir="@{gensrcdir}" erroronmissingdir="false"> - <include name="*"/> - </dirset> - </src> - <classpath> - <path path="@{classpath}"/> - </classpath> - <compilerarg line="${endorsed.classpath.cmd.line.arg}"/> - <compilerarg line="${javac.compilerargs}"/> - <customize/> - </javac> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac"> - <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${src.dir}" name="srcdir"/> - <attribute default="${build.classes.dir}" name="destdir"/> - <attribute default="${javac.classpath}" name="classpath"/> - <sequential> - <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}"> - <classpath> - <path path="@{classpath}"/> - </classpath> - </depend> - </sequential> - </macrodef> - <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${build.classes.dir}" name="destdir"/> - <sequential> - <fail unless="javac.includes">Must set javac.includes</fail> - <pathconvert pathsep="${line.separator}" property="javac.includes.binary"> - <path> - <filelist dir="@{destdir}" files="${javac.includes}"/> - </path> - <globmapper from="*.java" to="*.class"/> - </pathconvert> - <tempfile deleteonexit="true" property="javac.includesfile.binary"/> - <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/> - <delete> - <files includesfile="${javac.includesfile.binary}"/> - </delete> - <delete> - <fileset file="${javac.includesfile.binary}"/> - </delete> - </sequential> - </macrodef> - </target> - <target if="${junit.available}" name="-init-macrodef-junit-init"> - <condition else="false" property="nb.junit.batch" value="true"> - <and> - <istrue value="${junit.available}"/> - <not> - <isset property="test.method"/> - </not> - </and> - </condition> - <condition else="false" property="nb.junit.single" value="true"> - <and> - <istrue value="${junit.available}"/> - <isset property="test.method"/> - </and> - </condition> - </target> - <target if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}"> - <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element name="customize" optional="true"/> - <sequential> - <property name="junit.forkmode" value="perTest"/> - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> - <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/> - <syspropertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <formatter type="brief" usefile="false"/> - <formatter type="xml"/> - <jvmarg value="-ea"/> - <customize/> - </junit> - </sequential> - </macrodef> - </target> - <target if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}"> - <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element name="customize" optional="true"/> - <sequential> - <property name="junit.forkmode" value="perTest"/> - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> - <batchtest todir="${build.test.results.dir}"> - <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}"> - <filename name="@{testincludes}"/> - </fileset> - </batchtest> - <syspropertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <formatter type="brief" usefile="false"/> - <formatter type="xml"/> - <jvmarg value="-ea"/> - <customize/> - </junit> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/> - <target if="${testng.available}" name="-init-macrodef-testng"> - <macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element name="customize" optional="true"/> - <sequential> - <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}"> - <isset property="test.method"/> - </condition> - <union id="test.set"> - <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}"> - <filename name="@{testincludes}"/> - </fileset> - </union> - <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/> - <testng classfilesetref="test.set" failureProperty="tests.failed" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="TestMarkup" testname="TestNG tests" workingDir="${work.dir}"> - <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/> - <propertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </propertyset> - <customize/> - </testng> - </sequential> - </macrodef> - </target> - <target name="-init-macrodef-test-impl"> - <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element implicit="true" name="customize" optional="true"/> - <sequential> - <echo>No tests executed.</echo> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl"> - <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element implicit="true" name="customize" optional="true"/> - <sequential> - <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> - <customize/> - </j2seproject3:junit> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl"> - <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element implicit="true" name="customize" optional="true"/> - <sequential> - <j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> - <customize/> - </j2seproject3:testng> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test"> - <macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <sequential> - <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> - <customize> - <classpath> - <path path="${run.test.classpath}"/> - </classpath> - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> - <jvmarg line="${run.jvmargs}"/> - <jvmarg line="${run.jvmargs.ide}"/> - </customize> - </j2seproject3:test-impl> - </sequential> - </macrodef> - </target> - <target if="${junit.available}" name="-init-macrodef-junit-debug" unless="${nb.junit.batch}"> - <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element name="customize" optional="true"/> - <sequential> - <property name="junit.forkmode" value="perTest"/> - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> - <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/> - <syspropertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <formatter type="brief" usefile="false"/> - <formatter type="xml"/> - <jvmarg value="-ea"/> - <jvmarg line="${debug-args-line}"/> - <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> - <customize/> - </junit> - </sequential> - </macrodef> - </target> - <target if="${nb.junit.batch}" name="-init-macrodef-junit-debug-batch"> - <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element name="customize" optional="true"/> - <sequential> - <property name="junit.forkmode" value="perTest"/> - <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> - <batchtest todir="${build.test.results.dir}"> - <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}"> - <filename name="@{testincludes}"/> - </fileset> - </batchtest> - <syspropertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <formatter type="brief" usefile="false"/> - <formatter type="xml"/> - <jvmarg value="-ea"/> - <jvmarg line="${debug-args-line}"/> - <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> - <customize/> - </junit> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-junit-debug,-init-macrodef-junit-debug-batch" if="${junit.available}" name="-init-macrodef-junit-debug-impl"> - <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element implicit="true" name="customize" optional="true"/> - <sequential> - <j2seproject3:junit-debug excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> - <customize/> - </j2seproject3:junit-debug> - </sequential> - </macrodef> - </target> - <target if="${testng.available}" name="-init-macrodef-testng-debug"> - <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${main.class}" name="testClass"/> - <attribute default="" name="testMethod"/> - <element name="customize2" optional="true"/> - <sequential> - <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}"> - <isset property="test.method"/> - </condition> - <condition else="-suitename TestMarkup -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}"> - <matches pattern=".*\.xml" string="@{testClass}"/> - </condition> - <delete dir="${build.test.results.dir}" quiet="true"/> - <mkdir dir="${build.test.results.dir}"/> - <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}"> - <customize> - <customize2/> - <jvmarg value="-ea"/> - <arg line="${testng.debug.mode}"/> - <arg line="-d ${build.test.results.dir}"/> - <arg line="-listener org.testng.reporters.VerboseReporter"/> - <arg line="${testng.cmd.args}"/> - </customize> - </j2seproject3:debug> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl"> - <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${main.class}" name="testClass"/> - <attribute default="" name="testMethod"/> - <element implicit="true" name="customize2" optional="true"/> - <sequential> - <j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}"> - <customize2/> - </j2seproject3:testng-debug> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit"> - <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <attribute default="${main.class}" name="testClass"/> - <attribute default="" name="testMethod"/> - <sequential> - <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> - <customize> - <classpath> - <path path="${run.test.classpath}"/> - </classpath> - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> - <jvmarg line="${run.jvmargs}"/> - <jvmarg line="${run.jvmargs.ide}"/> - </customize> - </j2seproject3:test-debug-impl> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng"> - <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <attribute default="${main.class}" name="testClass"/> - <attribute default="" name="testMethod"/> - <sequential> - <j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}"> - <customize2> - <syspropertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - </customize2> - </j2seproject3:testng-debug-impl> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/> - <!-- - pre NB7.2 profiling section; consider it deprecated - --> - <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/> - <target if="profiler.info.jvmargs.agent" name="-profile-pre-init"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target if="profiler.info.jvmargs.agent" name="-profile-post-init"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile"> - <macrodef name="resolve"> - <attribute name="name"/> - <attribute name="value"/> - <sequential> - <property name="@{name}" value="${env.@{value}}"/> - </sequential> - </macrodef> - <macrodef name="profile"> - <attribute default="${main.class}" name="classname"/> - <element name="customize" optional="true"/> - <sequential> - <property environment="env"/> - <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/> - <java classname="@{classname}" dir="${profiler.info.dir}" fork="true" jvm="${profiler.info.jvm}"> - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> - <jvmarg value="${profiler.info.jvmargs.agent}"/> - <jvmarg line="${profiler.info.jvmargs}"/> - <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/> - <arg line="${application.args}"/> - <classpath> - <path path="${run.classpath}"/> - </classpath> - <syspropertyset> - <propertyref prefix="run-sys-prop."/> - <mapper from="run-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <customize/> - </java> - </sequential> - </macrodef> - </target> - <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" name="-profile-init-check"> - <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail> - <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail> - </target> - <!-- - end of pre NB7.2 profiling section - --> - <target depends="-init-debug-args" name="-init-macrodef-nbjpda"> - <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1"> - <attribute default="${main.class}" name="name"/> - <attribute default="${debug.classpath}" name="classpath"/> - <attribute default="" name="stopclassname"/> - <sequential> - <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}"> - <classpath> - <path path="@{classpath}"/> - </classpath> - </nbjpdastart> - </sequential> - </macrodef> - <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1"> - <attribute default="${build.classes.dir}" name="dir"/> - <sequential> - <nbjpdareload> - <fileset dir="@{dir}" includes="${fix.classes}"> - <include name="${fix.includes}*.class"/> - </fileset> - </nbjpdareload> - </sequential> - </macrodef> - </target> - <target name="-init-debug-args"> - <property name="version-output" value="java version "${ant.java.version}"/> - <condition property="have-jdk-older-than-1.4"> - <or> - <contains string="${version-output}" substring="java version "1.0"/> - <contains string="${version-output}" substring="java version "1.1"/> - <contains string="${version-output}" substring="java version "1.2"/> - <contains string="${version-output}" substring="java version "1.3"/> - </or> - </condition> - <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none"> - <istrue value="${have-jdk-older-than-1.4}"/> - </condition> - <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem"> - <os family="windows"/> - </condition> - <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}"> - <isset property="debug.transport"/> - </condition> - </target> - <target depends="-init-debug-args" name="-init-macrodef-debug"> - <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${main.class}" name="classname"/> - <attribute default="${debug.classpath}" name="classpath"/> - <element name="customize" optional="true"/> - <sequential> - <java classname="@{classname}" dir="${work.dir}" fork="true"> - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> - <jvmarg line="${debug-args-line}"/> - <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> - <jvmarg value="-Dfile.encoding=${runtime.encoding}"/> - <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/> - <jvmarg line="${run.jvmargs}"/> - <jvmarg line="${run.jvmargs.ide}"/> - <classpath> - <path path="@{classpath}"/> - </classpath> - <syspropertyset> - <propertyref prefix="run-sys-prop."/> - <mapper from="run-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <customize/> - </java> - </sequential> - </macrodef> - </target> - <target name="-init-macrodef-java"> - <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1"> - <attribute default="${main.class}" name="classname"/> - <attribute default="${run.classpath}" name="classpath"/> - <attribute default="jvm" name="jvm"/> - <element name="customize" optional="true"/> - <sequential> - <java classname="@{classname}" dir="${work.dir}" fork="true"> - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> - <jvmarg value="-Dfile.encoding=${runtime.encoding}"/> - <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/> - <jvmarg line="${run.jvmargs}"/> - <jvmarg line="${run.jvmargs.ide}"/> - <classpath> - <path path="@{classpath}"/> - </classpath> - <syspropertyset> - <propertyref prefix="run-sys-prop."/> - <mapper from="run-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <customize/> - </java> - </sequential> - </macrodef> - </target> - <target name="-init-macrodef-copylibs"> - <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3"> - <attribute default="${manifest.file}" name="manifest"/> - <element name="customize" optional="true"/> - <sequential> - <property location="${build.classes.dir}" name="build.classes.dir.resolved"/> - <pathconvert property="run.classpath.without.build.classes.dir"> - <path path="${run.classpath}"/> - <map from="${build.classes.dir.resolved}" to=""/> - </pathconvert> - <pathconvert pathsep=" " property="jar.classpath"> - <path path="${run.classpath.without.build.classes.dir}"/> - <chainedmapper> - <flattenmapper/> - <filtermapper> - <replacestring from=" " to="%20"/> - </filtermapper> - <globmapper from="*" to="lib/*"/> - </chainedmapper> - </pathconvert> - <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/> - <copylibs compress="${jar.compress}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" rebase="${copylibs.rebase}" runtimeclasspath="${run.classpath.without.build.classes.dir}"> - <fileset dir="${build.classes.dir}"/> - <manifest> - <attribute name="Class-Path" value="${jar.classpath}"/> - <customize/> - </manifest> - </copylibs> - </sequential> - </macrodef> - </target> - <target name="-init-presetdef-jar"> - <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1"> - <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}"> - <j2seproject1:fileset dir="${build.classes.dir}"/> - </jar> - </presetdef> - </target> - <target name="-init-ap-cmdline-properties"> - <property name="annotation.processing.enabled" value="true"/> - <property name="annotation.processing.processors.list" value=""/> - <property name="annotation.processing.processor.options" value=""/> - <property name="annotation.processing.run.all.processors" value="true"/> - <property name="javac.processorpath" value="${javac.classpath}"/> - <property name="javac.test.processorpath" value="${javac.test.classpath}"/> - <condition property="ap.supported.internal" value="true"> - <not> - <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/> - </not> - </condition> - </target> - <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported"> - <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}"> - <isfalse value="${annotation.processing.run.all.processors}"/> - </condition> - <condition else="" property="ap.proc.none.internal" value="-proc:none"> - <isfalse value="${annotation.processing.enabled}"/> - </condition> - </target> - <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline"> - <property name="ap.cmd.line.internal" value=""/> - </target> - <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-test,-init-macrodef-test-debug,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/> - <!-- - =================== - COMPILATION SECTION - =================== - --> - <target name="-deps-jar-init" unless="built-jar.properties"> - <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/> - <delete file="${built-jar.properties}" quiet="true"/> - </target> - <target if="already.built.jar.${basedir}" name="-warn-already-built-jar"> - <echo level="warn" message="Cycle detected: TestMarkup was already built"/> - </target> - <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps"> - <mkdir dir="${build.dir}"/> - <touch file="${built-jar.properties}" verbose="false"/> - <property file="${built-jar.properties}" prefix="already.built.jar."/> - <antcall target="-warn-already-built-jar"/> - <propertyfile file="${built-jar.properties}"> - <entry key="${basedir}" value=""/> - </propertyfile> - </target> - <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/> - <target depends="init" name="-check-automatic-build"> - <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/> - </target> - <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build"> - <antcall target="clean"/> - </target> - <target depends="init,deps-jar" name="-pre-pre-compile"> - <mkdir dir="${build.classes.dir}"/> - </target> - <target name="-pre-compile"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target if="do.depend.true" name="-compile-depend"> - <pathconvert property="build.generated.subdirs"> - <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false"> - <include name="*"/> - </dirset> - </pathconvert> - <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/> - </target> - <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile"> - <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/> - <copy todir="${build.classes.dir}"> - <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> - </copy> - </target> - <target if="has.persistence.xml" name="-copy-persistence-xml"> - <mkdir dir="${build.classes.dir}/META-INF"/> - <copy todir="${build.classes.dir}/META-INF"> - <fileset dir="${meta.inf.dir}" includes="persistence.xml"/> - </copy> - </target> - <target name="-post-compile"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/> - <target name="-pre-compile-single"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single"> - <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail> - <j2seproject3:force-recompile/> - <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}"/> - </target> - <target name="-post-compile-single"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/> - <!-- - ==================== - JAR BUILDING SECTION - ==================== - --> - <target depends="init" name="-pre-pre-jar"> - <dirname file="${dist.jar}" property="dist.jar.dir"/> - <mkdir dir="${dist.jar.dir}"/> - </target> - <target name="-pre-jar"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive" name="-do-jar-without-manifest" unless="manifest.available-mkdist.available"> - <j2seproject1:jar/> - </target> - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class-mkdist.available"> - <j2seproject1:jar manifest="${manifest.file}"/> - </target> - <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available+main.class" name="-do-jar-with-mainclass" 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 level="info">To run this application from the command line without Ant, try:</echo> - <property location="${build.classes.dir}" name="build.classes.dir.resolved"/> - <property location="${dist.jar}" name="dist.jar.resolved"/> - <pathconvert property="run.classpath.with.dist.jar"> - <path path="${run.classpath}"/> - <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/> - </pathconvert> - <echo level="info">java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo> - </target> - <target depends="init" if="do.archive" name="-do-jar-with-libraries-create-manifest" unless="manifest.available"> - <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/> - <touch file="${tmp.manifest.file}" verbose="false"/> - </target> - <target depends="init" if="do.archive+manifest.available" name="-do-jar-with-libraries-copy-manifest"> - <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/> - <copy file="${manifest.file}" tofile="${tmp.manifest.file}"/> - </target> - <target depends="init,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest" if="do.archive+main.class.available" name="-do-jar-with-libraries-set-main"> - <manifest file="${tmp.manifest.file}" mode="update"> - <attribute name="Main-Class" value="${main.class}"/> - </manifest> - </target> - <target depends="init,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-with-libraries-set-splashscreen"> - <basename file="${application.splash}" property="splashscreen.basename"/> - <mkdir dir="${build.classes.dir}/META-INF"/> - <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/> - <manifest file="${tmp.manifest.file}" mode="update"> - <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/> - </manifest> - </target> - <target depends="init,-init-macrodef-copylibs,compile,-pre-pre-jar,-pre-jar,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest,-do-jar-with-libraries-set-main,-do-jar-with-libraries-set-splashscreen" if="do.mkdist" name="-do-jar-with-libraries-pack"> - <j2seproject3:copylibs manifest="${tmp.manifest.file}"/> - <echo level="info">To run this application from the command line without Ant, try:</echo> - <property location="${dist.jar}" name="dist.jar.resolved"/> - <echo level="info">java -jar "${dist.jar.resolved}"</echo> - </target> - <target depends="-do-jar-with-libraries-pack" if="do.archive" name="-do-jar-with-libraries-delete-manifest"> - <delete> - <fileset file="${tmp.manifest.file}"/> - </delete> - </target> - <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest,-do-jar-with-libraries-set-main,-do-jar-with-libraries-set-splashscreen,-do-jar-with-libraries-pack,-do-jar-with-libraries-delete-manifest" name="-do-jar-with-libraries"/> - <target name="-post-jar"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target 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." name="jar"/> - <!-- - ================= - EXECUTION SECTION - ================= - --> - <target depends="init,compile" description="Run a main class." name="run"> - <j2seproject1:java> - <customize> - <arg line="${application.args}"/> - </customize> - </j2seproject1:java> - </target> - <target name="-do-not-recompile"> - <property name="javac.includes.binary" value=""/> - </target> - <target depends="init,compile-single" name="run-single"> - <fail unless="run.class">Must select one file in the IDE or set run.class</fail> - <j2seproject1:java classname="${run.class}"/> - </target> - <target depends="init,compile-test-single" name="run-test-with-main"> - <fail unless="run.class">Must select one file in the IDE or set run.class</fail> - <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/> - </target> - <!-- - ================= - DEBUGGING SECTION - ================= - --> - <target depends="init" if="netbeans.home" name="-debug-start-debugger"> - <j2seproject1:nbjpdastart name="${debug.class}"/> - </target> - <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test"> - <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/> - </target> - <target depends="init,compile" name="-debug-start-debuggee"> - <j2seproject3:debug> - <customize> - <arg line="${application.args}"/> - </customize> - </j2seproject3:debug> - </target> - <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/> - <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto"> - <j2seproject1:nbjpdastart stopclassname="${main.class}"/> - </target> - <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/> - <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single"> - <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail> - <j2seproject3:debug classname="${debug.class}"/> - </target> - <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/> - <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test"> - <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail> - <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/> - </target> - <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/> - <target depends="init" name="-pre-debug-fix"> - <fail unless="fix.includes">Must set fix.includes</fail> - <property name="javac.includes" value="${fix.includes}.java"/> - </target> - <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix"> - <j2seproject1:nbjpdareload/> - </target> - <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/> - <!-- - ================= - PROFILING SECTION - ================= - --> - <!-- - pre NB7.2 profiler integration - --> - <target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72"> - <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> - <nbprofiledirect> - <classpath> - <path path="${run.classpath}"/> - </classpath> - </nbprofiledirect> - <profile/> - </target> - <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72"> - <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail> - <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> - <nbprofiledirect> - <classpath> - <path path="${run.classpath}"/> - </classpath> - </nbprofiledirect> - <profile classname="${profile.class}"/> - </target> - <target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72"> - <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> - <nbprofiledirect> - <classpath> - <path path="${run.classpath}"/> - </classpath> - </nbprofiledirect> - <profile classname="sun.applet.AppletViewer"> - <customize> - <arg value="${applet.url}"/> - </customize> - </profile> - </target> - <target depends="profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72"> - <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> - <nbprofiledirect> - <classpath> - <path path="${run.test.classpath}"/> - </classpath> - </nbprofiledirect> - <junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true"> - <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/> - <jvmarg value="${profiler.info.jvmargs.agent}"/> - <jvmarg line="${profiler.info.jvmargs}"/> - <test name="${profile.class}"/> - <classpath> - <path path="${run.test.classpath}"/> - </classpath> - <syspropertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <formatter type="brief" usefile="false"/> - <formatter type="xml"/> - </junit> - </target> - <!-- - end of pre NB72 profiling section - --> - <target if="netbeans.home" name="-profile-check"> - <condition property="profiler.configured"> - <or> - <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/> - <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/> - </or> - </condition> - </target> - <target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent"> - <startprofiler/> - <antcall target="run"/> - </target> - <target depends="-profile-check,-profile-single-pre72" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-single" unless="profiler.info.jvmargs.agent"> - <fail unless="run.class">Must select one file in the IDE or set run.class</fail> - <startprofiler/> - <antcall target="run-single"/> - </target> - <target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/> - <target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs"> - <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail> - <startprofiler/> - <antcall target="test-single"/> - </target> - <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main"> - <fail unless="run.class">Must select one file in the IDE or set run.class</fail> - <startprofiler/> - <antcal target="run-test-with-main"/> - </target> - <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent"> - <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> - <startprofiler/> - <antcall target="run-applet"/> - </target> - <!-- - =============== - JAVADOC SECTION - =============== - --> - <target depends="init" if="have.sources" name="-javadoc-build"> - <mkdir dir="${dist.javadoc.dir}"/> - <condition else="" property="javadoc.endorsed.classpath.cmd.line.arg" value="-J${endorsed.classpath.cmd.line.arg}"> - <and> - <isset property="endorsed.classpath.cmd.line.arg"/> - <not> - <equals arg1="${endorsed.classpath.cmd.line.arg}" arg2=""/> - </not> - </and> - </condition> - <javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" 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}"> - <classpath> - <path path="${javac.classpath}"/> - </classpath> - <fileset dir="${src.dir}" excludes="*.java,${excludes}" includes="${includes}"> - <filename name="**/*.java"/> - </fileset> - <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false"> - <include name="**/*.java"/> - <exclude name="*.java"/> - </fileset> - <arg line="${javadoc.endorsed.classpath.cmd.line.arg}"/> - </javadoc> - <copy todir="${dist.javadoc.dir}"> - <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}"> - <filename name="**/doc-files/**"/> - </fileset> - <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false"> - <include name="**/doc-files/**"/> - </fileset> - </copy> - </target> - <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview"> - <nbbrowse file="${dist.javadoc.dir}/index.html"/> - </target> - <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/> - <!-- - ========================= - TEST COMPILATION SECTION - ========================= - --> - <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test"> - <mkdir dir="${build.test.classes.dir}"/> - </target> - <target name="-pre-compile-test"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target if="do.depend.true" name="-compile-test-depend"> - <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/> - </target> - <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test"> - <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" processorpath="${javac.test.processorpath}" srcdir="${test.src.dir}"/> - <copy todir="${build.test.classes.dir}"> - <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> - </copy> - </target> - <target name="-post-compile-test"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/> - <target name="-pre-compile-test-single"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single"> - <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail> - <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/> - <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" processorpath="${javac.test.processorpath}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/> - <copy todir="${build.test.classes.dir}"> - <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> - </copy> - </target> - <target name="-post-compile-test-single"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/> - <!-- - ======================= - TEST EXECUTION SECTION - ======================= - --> - <target depends="init" if="have.tests" name="-pre-test-run"> - <mkdir dir="${build.test.results.dir}"/> - </target> - <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run"> - <j2seproject3:test testincludes="**/*Test.java"/> - </target> - <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run"> - <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail> - </target> - <target depends="init" if="have.tests" name="test-report"/> - <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/> - <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/> - <target depends="init" if="have.tests" name="-pre-test-run-single"> - <mkdir dir="${build.test.results.dir}"/> - </target> - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single"> - <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail> - <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/> - </target> - <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single"> - <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail> - </target> - <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/> - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method"> - <fail unless="test.class">Must select some files in the IDE or set test.class</fail> - <fail unless="test.method">Must select some method in the IDE or set test.method</fail> - <j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/> - </target> - <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method"> - <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail> - </target> - <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method,-post-test-run-single-method" description="Run single unit test." name="test-single-method"/> - <!-- - ======================= - TEST DEBUGGING SECTION - ======================= - --> - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test"> - <fail unless="test.class">Must select one file in the IDE or set test.class</fail> - <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/> - </target> - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method"> - <fail unless="test.class">Must select one file in the IDE or set test.class</fail> - <fail unless="test.method">Must select some method in the IDE or set test.method</fail> - <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/> - </target> - <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test"> - <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/> - </target> - <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/> - <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/> - <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test"> - <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/> - </target> - <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/> - <!-- - ========================= - APPLET EXECUTION SECTION - ========================= - --> - <target depends="init,compile-single" name="run-applet"> - <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> - <j2seproject1:java classname="sun.applet.AppletViewer"> - <customize> - <arg value="${applet.url}"/> - </customize> - </j2seproject1:java> - </target> - <!-- - ========================= - APPLET DEBUGGING SECTION - ========================= - --> - <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet"> - <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> - <j2seproject3:debug classname="sun.applet.AppletViewer"> - <customize> - <arg value="${applet.url}"/> - </customize> - </j2seproject3:debug> - </target> - <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/> - <!-- - =============== - CLEANUP SECTION - =============== - --> - <target name="-deps-clean-init" unless="built-clean.properties"> - <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/> - <delete file="${built-clean.properties}" quiet="true"/> - </target> - <target if="already.built.clean.${basedir}" name="-warn-already-built-clean"> - <echo level="warn" message="Cycle detected: TestMarkup was already built"/> - </target> - <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps"> - <mkdir dir="${build.dir}"/> - <touch file="${built-clean.properties}" verbose="false"/> - <property file="${built-clean.properties}" prefix="already.built.clean."/> - <antcall target="-warn-already-built-clean"/> - <propertyfile file="${built-clean.properties}"> - <entry key="${basedir}" value=""/> - </propertyfile> - </target> - <target depends="init" name="-do-clean"> - <delete dir="${build.dir}"/> - <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/> - </target> - <target name="-post-clean"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/> - <target name="-check-call-dep"> - <property file="${call.built.properties}" prefix="already.built."/> - <condition property="should.call.dep"> - <and> - <not> - <isset property="already.built.${call.subproject}"/> - </not> - <available file="${call.script}"/> - </and> - </condition> - </target> - <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep"> - <ant antfile="${call.script}" inheritall="false" target="${call.target}"> - <propertyset> - <propertyref prefix="transfer."/> - <mapper from="transfer.*" to="*" type="glob"/> - </propertyset> - </ant> - </target> -</project> diff --git a/tools/TestMarkup/nbproject/genfiles.properties b/tools/TestMarkup/nbproject/genfiles.properties deleted file mode 100644 index 2b18097b..00000000 --- a/tools/TestMarkup/nbproject/genfiles.properties +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. Oracle designates this -# particular file as subject to the "Classpath" exception as provided -# by Oracle in the LICENSE file that accompanied this code. -# -# This code 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 General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -build.xml.data.CRC32=ed71d77b -build.xml.script.CRC32=fb5d9c6a -build.xml.stylesheet.CRC32=28e38971@1.38.2.45 -# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. -# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. -nbproject/build-impl.xml.data.CRC32=ed71d77b -nbproject/build-impl.xml.script.CRC32=baa90471 -nbproject/build-impl.xml.stylesheet.CRC32=6ddba6b6@1.53.1.46 diff --git a/tools/TestMarkup/nbproject/project.properties b/tools/TestMarkup/nbproject/project.properties deleted file mode 100644 index 0135164b..00000000 --- a/tools/TestMarkup/nbproject/project.properties +++ /dev/null @@ -1,108 +0,0 @@ -# Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. Oracle designates this -# particular file as subject to the "Classpath" exception as provided -# by Oracle in the LICENSE file that accompanied this code. -# -# This code 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 General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -annotation.processing.enabled=true -annotation.processing.enabled.in.editor=false -annotation.processing.processors.list= -annotation.processing.run.all.processors=true -annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output -application.title=TestMarkup -application.vendor=shura -build.classes.dir=${build.dir}/classes -build.classes.excludes=**/*.java,**/*.form -# This directory is removed when the project is cleaned: -build.dir=build -build.generated.dir=${build.dir}/generated -build.generated.sources.dir=${build.dir}/generated-sources -# Only compile against the classpath explicitly listed here: -build.sysclasspath=ignore -build.test.classes.dir=${build.dir}/test/classes -build.test.results.dir=${build.dir}/test/results -# Uncomment to specify the preferred debugger connection transport: -#debug.transport=dt_socket -debug.classpath=\ - ${run.classpath} -debug.test.classpath=\ - ${run.test.classpath} -# This directory is removed when the project is cleaned: -dist.dir=dist -dist.jar=${dist.dir}/TestMarkup.jar -dist.javadoc.dir=${dist.dir}/javadoc -endorsed.classpath= -excludes= -file.reference.junit.jar=../Jemmy/jemmy_core/junit.jar -includes=** -jar.archive.disabled=${jnlp.enabled} -jar.compress=false -jar.index=${jnlp.enabled} -javac.classpath=\ - ${java.home}/../lib/tools.jar -# Space-separated list of extra javac options -javac.compilerargs= -javac.deprecation=false -javac.processorpath=\ - ${javac.classpath} -javac.source=1.8 -javac.target=1.8 -javac.test.classpath=\ - ${javac.classpath}:\ - ${build.classes.dir}:\ - ${file.reference.junit.jar} -javac.test.processorpath=\ - ${javac.test.classpath} -javadoc.additionalparam= -javadoc.author=false -javadoc.encoding=${source.encoding} -javadoc.noindex=false -javadoc.nonavbar=false -javadoc.notree=false -javadoc.private=false -javadoc.splitindex=true -javadoc.use=true -javadoc.version=false -javadoc.windowtitle= -jnlp.codebase.type=no.codebase -jnlp.descriptor=application -jnlp.enabled=false -jnlp.mixed.code=default -jnlp.offline-allowed=false -jnlp.signed=false -jnlp.signing= -jnlp.signing.alias= -jnlp.signing.keystore= -main.class=testmarkup.Main -manifest.file=manifest.mf -meta.inf.dir=${src.dir}/META-INF -mkdist.disabled=false -platform.active=default_platform -run.classpath=\ - ${javac.classpath}:\ - ${build.classes.dir} -# 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.test.classpath=\ - ${javac.test.classpath}:\ - ${build.test.classes.dir} -source.encoding=UTF-8 -src.dir=src -test.src.dir=test diff --git a/tools/TestMarkup/nbproject/project.xml b/tools/TestMarkup/nbproject/project.xml deleted file mode 100644 index a553a0f6..00000000 --- a/tools/TestMarkup/nbproject/project.xml +++ /dev/null @@ -1,40 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. -DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - -This code is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License version 2 only, as -published by the Free Software Foundation. Oracle designates this -particular file as subject to the "Classpath" exception as provided -by Oracle in the LICENSE file that accompanied this code. - -This code 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 General Public License -version 2 for more details (a copy is included in the LICENSE file that -accompanied this code). - -You should have received a copy of the GNU General Public License version -2 along with this work; if not, write to the Free Software Foundation, -Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - -Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -or visit www.oracle.com if you need additional information or have any -questions. ---> - -<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/3"> - <name>TestMarkup</name> - <source-roots> - <root id="src.dir"/> - </source-roots> - <test-roots> - <root id="test.src.dir"/> - </test-roots> - </data> - </configuration> -</project> diff --git a/tools/TestMarkup/src/com/oracle/jdk/sqe/cc/markup/property/Template.java b/tools/TestMarkup/src/com/oracle/jdk/sqe/cc/markup/property/Template.java index 164b2441..310f160e 100644 --- a/tools/TestMarkup/src/com/oracle/jdk/sqe/cc/markup/property/Template.java +++ b/tools/TestMarkup/src/com/oracle/jdk/sqe/cc/markup/property/Template.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,10 +23,6 @@ */ package com.oracle.jdk.sqe.cc.markup.property; -import com.sun.javadoc.ClassDoc; -import com.sun.javadoc.DocErrorReporter; -import com.sun.javadoc.MethodDoc; -import com.sun.javadoc.RootDoc; import java.io.*; import java.util.HashMap; import java.util.Map; @@ -35,8 +31,9 @@ * * @author shura */ +//TODO public class Template { - +/* public static boolean start(RootDoc doc) throws FileNotFoundException, IOException { if(out == null) out = System.out; for (ClassDoc cls : doc.classes()) { @@ -120,4 +117,6 @@ public static boolean validOptions(String options[][], } return true; } + + */ } diff --git a/tools/make/build-template.xml b/tools/make/build-template.xml new file mode 100644 index 00000000..56c60f56 --- /dev/null +++ b/tools/make/build-template.xml @@ -0,0 +1,113 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project name="jemmy.fx" default="compile"> + <property name="src.dir" location="${basedir}/src"/> + <property name="test.dir" location="${basedir}/test"/> + <property name="build.dir" location="${basedir}/build"/> + <property name="build.classes.dir" location="${build.dir}/classes"/> + <property name="build.test.dir" location="${build.dir}/test"/> + <property name="test.output.dir" location="${build.dir}/test-output"/> + <property name="dist.jar" location="${build.dir}/${project.name}.jar"/> + <property name="glass-image-src" location="${rootdir}/tools/Jemmy/GlassImage"/> + <property name="glass-robot-src" location="${rootdir}/tools/Jemmy/GlassRobot"/> + <property name="jemmyfx-src" location="${rootdir}/tools/Jemmy/JemmyFX"/> + <property name="jemmyfx-browser-src" location="${rootdir}/tools/Jemmy/JemmyFXBrowser"/> + <property name="shared-test-utils-src" location="${rootdir}/tools/SharedTestUtilsOpen"/> + <property name="test-markup-src" location="${rootdir}/tools/TestMarkup"/> + <property name="imageutils.goldenpath" location="${build.dir}/golden"/> + <property name="imageutils.outputpath" location="${build.dir}/images"/> + <property name="imageutils.suite" value="${project.name}"/> + <property environment="env"/> + <target name="init"> + <fail message="Please specify jemmy-v3.jars" unless="jemmy-v3.jars"/> + <fail message="Please specify javafx.home" unless="javafx.home"/> + <path id="jemmyfx.classpath"> + <pathelement location="${javafx.home}/lib/javafx.base.jar"/> + <pathelement location="${javafx.home}/lib/javafx.controls.jar"/> + <pathelement location="${javafx.home}/lib/javafx.graphics.jar"/> + <pathelement location="${javafx.home}/lib/javafx.media.jar"/> + <pathelement location="${javafx.home}/lib/javafx.web.jar"/> + <pathelement location="${jemmy-v3.jars}/JemmyCore.jar"/> + <pathelement location="${jemmy-v3.jars}/JemmyAWTInput.jar"/> + <pathelement location="${jemmy-v3.jars}/JemmyBrowser.jar"/> + <pathelement location="${jemmy-v3.jars}/JemmySupport.jar"/> + </path> + </target> + <target name="compile-src" depends="init,build-dependencies"> + <mkdir dir="${build.classes.dir}"/> + <javac destdir="${build.classes.dir}" debug="on" includeantruntime="false"> + <classpath> + <path refid="jemmyfx.classpath"/> + <pathelement path="${dependencies.classpath}"/> + </classpath> + <src> + <pathelement path="${src.dir}"/> + </src> + </javac> + </target> + <target name="build-other-project"> + <ant dir="${project}" inheritAll="false"> + <property name="javafx.home" value="${javafx.home}"/> + <property name="jemmy-v2.jars" value="${jemmy-v2.jars}"/> + <property name="junit.jar" value="${junit.jar}"/> + </ant> + </target> + <target name="jar" depends="compile"> + <jar jarfile="${dist.jar}" basedir="${build.classes.dir}"/> + </target> + <target name="compile-test" depends="compile,build-test-dependencies"> + <fail message="Please specify jtreg.home" unless="jtreg.home"/> + <mkdir dir="${build.test.dir}"/> + <javac srcdir="${test.dir}" destdir="${build.test.dir}" debug="on" includeantruntime="false"> + <classpath> + <path refid="jemmyfx.classpath"/> + <pathelement path="${dependencies.classpath}"/> + <pathelement path="${test.dependencies.classpath}"/> + <pathelement location="${build.classes.dir}"/> + <pathelement location="${jtreg.home}/lib/junit.jar"/> + </classpath> + </javac> + </target> + <target name="find-tests" unless="tests"> + <fileset id="testset" dir="${test.dir}"> + <include name="**/*Test.java" /> + </fileset> + <pathconvert pathsep="${line.separator}" property="testlist" refid="testset"> + <globmapper from="${test.dir}/*" to="*"/> + </pathconvert> + <echo file="${test.list}">${testlist}</echo> + <property name="tests" value="@${test.list}"/> + </target> + <property name="test.list" value="${build.dir}/test.list"/> + <property name="test.workdir" value="${build.dir}/test.workdir"/> + <property name="test.report" value="${build.dir}/test.report"/> + <target name="define-excludes" if="test.problem.list"> + <property name="text.exclude.option" value="-exclude:${test.problem.list}"/> + </target> + <target name="define-no-excludes" unless="test.problem.list"> + <property name="text.exclude.option" value=""/> + </target> + <target name="test" depends="build-test-dependencies,compile-test,find-tests,define-excludes,define-no-excludes"> + <mkdir dir="${imageutils.goldenpath}"/> + <mkdir dir="${imageutils.outputpath}"/> + <property name="jemmyfx.classpath.prop" refid="jemmyfx.classpath"/> + <exec executable="${env.SHELL}"> + <arg value="${jtreg.home}/bin/jtreg"/> + <arg value="-vmoption:-Dimageutils.goldenpath=${imageutils.goldenpath}"/> + <arg value="-vmoption:-Dimageutils.outputpath=${imageutils.outputpath}"/> + <arg value="-vmoption:-Dimageutils.suite=${imageutils.suite}"/> + <arg value="-timeout:10"/> + <arg value="-cpa:${build.classes.dir}:${dependencies.classpath}:${test.dependencies.classpath}:${jemmyfx.classpath.prop}:${jtreg.home}/lib/junit.jar"/> + <arg value="-w:${test.workdir}"/> + <arg value="-r:${test.report}"/> + <arg value="${text.exclude.option}"/> + <arg value="-conc:1"/> + <arg value="-ovm"/> + <arg value="-v:default"/> + <arg value="-dir:test"/> + <arg value="${tests}"/> + </exec> + </target> + <target name="clean"> + <deltree dir="${build.dir}"/> + </target> +</project>