Codebase list jtharness / c5420d2
New upstream version 5.0 Emmanuel Bourg 6 years ago
203 changed file(s) with 4697 addition(s) and 2262 deletion(s). Raw diff Collapse all Expand all
00 repo: a621b82029eea89e1fe7feea9ebbac489a6b3866
1 node: 184698ad8757598ad1a850c9a71b1e3ba54743f6
1 node: 142b98326aafe755c2460af671bcf0ee834b97cc
22 branch: default
3 tag: 4.6
3 tag: jt5.0
00 0ed5ae3cb5a28d91f205755c7f5dfc3e4c976049 4.6b05
11 0ed5ae3cb5a28d91f205755c7f5dfc3e4c976049 4.6b05
22 0000000000000000000000000000000000000000 4.6b05
3 184698ad8757598ad1a850c9a71b1e3ba54743f6 4.6
4 dc134cf8fb40b026885020cb70d62b492bc55547 jt4.6
0 DO NOT TRANSLATE OR LOCALIZE.
1 -----------------------------
2
3 %% This notice is provided with respect to ASM v3.1
4
5 --- begin of LICENSE ---
6
7 Copyright (c) 2000-2011 INRIA, France Telecom
8 All rights reserved.
9
10 Redistribution and use in source and binary forms, with or without
11 modification, are permitted provided that the following conditions
12 are met:
13 1. Redistributions of source code must retain the above copyright
14 notice, this list of conditions and the following disclaimer.
15 2. Redistributions in binary form must reproduce the above copyright
16 notice, this list of conditions and the following disclaimer in the
17 documentation and/or other materials provided with the distribution.
18 3. Neither the name of the copyright holders nor the names of its
19 contributors may be used to endorse or promote products derived from
20 this software without specific prior written permission.
21
22 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
23 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
26 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
27 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
28 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
29 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
30 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
32 THE POSSIBILITY OF SUCH DAMAGE.
33
34 --- end of LICENSE ---
35
36 %% This notice is provided with respect to junit v4.4
37
38 --- begin of LICENSE ---
39
40 Eclipse Public License - v 1.0
41
42 THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
43 LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM
44 CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
45
46 1. DEFINITIONS
47
48 "Contribution" means:
49
50 a) in the case of the initial Contributor, the initial code and
51 documentation distributed under this Agreement, and
52 b) in the case of each subsequent Contributor:
53
54 i) changes to the Program, and
55
56 ii) additions to the Program;
57
58 where such changes and/or additions to the Program originate from and are
59 distributed by that particular Contributor. A Contribution 'originates' from a
60 Contributor if it was added to the Program by such Contributor itself or anyone
61 acting on such Contributor's behalf. Contributions do not include additions to
62 the Program which: (i) are separate modules of software distributed in
63 conjunction with the Program under their own license agreement, and (ii) are
64 not derivative works of the Program.
65
66 "Contributor" means any person or entity that distributes the Program.
67
68 "Licensed Patents " mean patent claims licensable by a Contributor which are
69 necessarily infringed by the use or sale of its Contribution alone or when
70 combined with the Program.
71
72 "Program" means the Contributions distributed in accordance with this Agreement.
73
74 "Recipient" means anyone who receives the Program under this Agreement,
75 including all Contributors.
76
77 2. GRANT OF RIGHTS
78
79 a) Subject to the terms of this Agreement, each Contributor hereby grants
80 Recipient a non-exclusive, worldwide, royalty-free copyright license to
81 reproduce, prepare derivative works of, publicly display, publicly perform,
82 distribute and sublicense the Contribution of such Contributor, if any, and
83 such derivative works, in source code and object code form.
84
85 b) Subject to the terms of this Agreement, each Contributor hereby grants
86 Recipient a non-exclusive, worldwide, royalty-free patent license under
87 Licensed Patents to make, use, sell, offer to sell, import and otherwise
88 transfer the Contribution of such Contributor, if any, in source code and
89 object code form. This patent license shall apply to the combination of the
90 Contribution and the Program if, at the time the Contribution is added by the
91 Contributor, such addition of the Contribution causes such combination to be
92 covered by the Licensed Patents. The patent license shall not apply to any
93 other combinations which include the Contribution. No hardware per se is
94 licensed hereunder.
95
96 c) Recipient understands that although each Contributor grants the
97 licenses to its Contributions set forth herein, no assurances are provided by
98 any Contributor that the Program does not infringe the patent or other
99 intellectual property rights of any other entity. Each Contributor disclaims
100 any liability to Recipient for claims brought by any other entity based on
101 infringement of intellectual property rights or otherwise. As a condition to
102 exercising the rights and licenses granted hereunder, each Recipient hereby
103 assumes sole responsibility to secure any other intellectual property rights
104 needed, if any. For example, if a third party patent license is required to
105 allow Recipient to distribute the Program, it is Recipient's responsibility to
106 acquire that license before distributing the Program.
107
108 d) Each Contributor represents that to its knowledge it has sufficient
109 copyright rights in its Contribution, if any, to grant the copyright license
110 set forth in this Agreement.
111
112 3. REQUIREMENTS
113
114 A Contributor may choose to distribute the Program in object code form under
115 its own license agreement, provided that:
116
117 a) it complies with the terms and conditions of this Agreement; and
118
119 b) its license agreement:
120
121 i) effectively disclaims on behalf of all Contributors all warranties and
122 conditions, express and implied, including warranties or conditions of title
123 and non-infringement, and implied warranties or conditions of merchantability
124 and fitness for a particular purpose;
125
126 ii) effectively excludes on behalf of all Contributors all liability for
127 damages, including direct, indirect, special, incidental and consequential
128 damages, such as lost profits;
129
130 iii) states that any provisions which differ from this Agreement are
131 offered by that Contributor alone and not by any other party; and
132
133 iv) states that source code for the Program is available from such
134 Contributor, and informs licensees how to obtain it in a reasonable manner on
135 or through a medium customarily used for software exchange.
136
137 When the Program is made available in source code form:
138
139 a) it must be made available under this Agreement; and
140
141 b) a copy of this Agreement must be included with each copy of the
142 Program.
143
144 Contributors may not remove or alter any copyright notices contained within the
145 Program.
146
147 Each Contributor must identify itself as the originator of its Contribution, if
148 any, in a manner that reasonably allows subsequent Recipients to identify the
149 originator of the Contribution.
150
151 4. COMMERCIAL DISTRIBUTION
152
153 Commercial distributors of software may accept certain responsibilities with
154 respect to end users, business partners and the like. While this license is
155 intended to facilitate the commercial use of the Program, the Contributor who
156 includes the Program in a commercial product offering should do so in a manner
157 which does not create potential liability for other Contributors. Therefore, if
158 a Contributor includes the Program in a commercial product offering, such
159 Contributor ("Commercial Contributor") hereby agrees to defend and indemnify
160 every other Contributor ("Indemnified Contributor") against any losses, damages
161 and costs (collectively "Losses") arising from claims, lawsuits and other legal
162 actions brought by a third party against the Indemnified Contributor to the
163 extent caused by the acts or omissions of such Commercial Contributor in
164 connection with its distribution of the Program in a commercial product
165 offering. The obligations in this section do not apply to any claims or Losses
166 relating to any actual or alleged intellectual property infringement. In order
167 to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
168 Contributor in writing of such claim, and b) allow the Commercial Contributor
169 to control, and cooperate with the Commercial Contributor in, the defense and
170 any related settlement negotiations. The Indemnified Contributor may
171 participate in any such claim at its own expense.
172
173 For example, a Contributor might include the Program in a commercial product
174 offering, Product X. That Contributor is then a Commercial Contributor. If that
175 Commercial Contributor then makes performance claims, or offers warranties
176 related to Product X, those performance claims and warranties are such
177 Commercial Contributor's responsibility alone. Under this section, the
178 Commercial Contributor would have to defend claims against the other
179 Contributors related to those performance claims and warranties, and if a court
180 requires any other Contributor to pay any damages as a result, the Commercial
181 Contributor must pay those damages.
182
183 5. NO WARRANTY
184
185 EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN
186 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR
187 IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE,
188 NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each
189 Recipient is solely responsible for determining the appropriateness of using
190 and distributing the Program and assumes all risks associated with its exercise
191 of rights under this Agreement, including but not limited to the risks and
192 costs of program errors, compliance with applicable laws, damage to or loss of
193 data, programs or equipment, and unavailability or interruption of operations.
194
195 6. DISCLAIMER OF LIABILITY
196
197 EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY
198 CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL,
199 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST
200 PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
201 STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
202 WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS
203 GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
204
205 7. GENERAL
206
207 If any provision of this Agreement is invalid or unenforceable under applicable
208 law, it shall not affect the validity or enforceability of the remainder of the
209 terms of this Agreement, and without further action by the parties hereto, such
210 provision shall be reformed to the minimum extent necessary to make such
211 provision valid and enforceable.
212
213 If Recipient institutes patent litigation against any
214 entity (including a cross-claim or counterclaim in a lawsuit) alleging that the
215 Program itself (excluding combinations of the Program with other software or
216 hardware) infringes such Recipient's patent(s), then such Recipient's rights
217 granted under Section 2(b) shall terminate as of the date such litigation is
218 filed.
219
220 All Recipient's rights under this Agreement shall terminate if it fails to
221 comply with any of the material terms or conditions of this Agreement and does
222 not cure such failure in a reasonable period of time after becoming aware of
223 such noncompliance. If all Recipient's rights under this Agreement terminate,
224 Recipient agrees to cease use and distribution of the Program as soon as
225 reasonably practicable. However, Recipient's obligations under this Agreement
226 and any licenses granted by Recipient relating to the Program shall continue
227 and survive.
228
229 Everyone is permitted to copy and distribute copies of this Agreement, but in
230 order to avoid inconsistency the Agreement is copyrighted and may only be
231 modified in the following manner. The Agreement Steward reserves the right to
232 publish new versions (including revisions) of this Agreement from time to time.
233 No one other than the Agreement Steward has the right to modify this Agreement.
234 The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to
235 serve as the Agreement Steward to a suitable separate entity. Each new version
236 of the Agreement will be given a distinguishing version number. The Program
237 (including Contributions) may always be distributed subject to the version of
238 the Agreement under which it was received. In addition, after a new version of
239 the Agreement is published, Contributor may elect to distribute the Program
240 (including its Contributions) under the new version. Except as expressly stated
241 in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
242 the intellectual property of any Contributor under this Agreement, whether
243 expressly, by implication, estoppel or otherwise. All rights in the Program not
244 expressly granted under this Agreement are reserved.
245
246 This Agreement is governed by the laws of the State of New York and the
247 intellectual property laws of the United States of America. No party to this
248 Agreement will bring a legal action under this Agreement more than one year
249 after the cause of action arose. Each party waives its rights to a jury trial
250 in any resulting litigation.
251
252 --- end of LICENSE ---
00 <?xml version='1.0' encoding='ISO-8859-1' ?>
11 <!--
22 $Id$
3
4 Copyright (c) 2006, 2009, Oracle and/or its affiliates. All rights reserved.
3
4 Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
55 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6
6
77 This code is free software; you can redistribute it and/or modify it
88 under the terms of the GNU General Public License version 2 only, as
99 published by the Free Software Foundation. Oracle designates this
1010 particular file as subject to the "Classpath" exception as provided
1111 by Oracle in the LICENSE file that accompanied this code.
12
12
1313 This code is distributed in the hope that it will be useful, but WITHOUT
1414 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1515 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
1616 version 2 for more details (a copy is included in the LICENSE file that
1717 accompanied this code).
18
18
1919 You should have received a copy of the GNU General Public License version
2020 2 along with this work; if not, write to the Free Software Foundation,
2121 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
22
22
2323 Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2424 or visit www.oracle.com if you need additional information or have any
2525 questions.
2828
2929 <patternset id="i18ntest.packages">
3030 <include name="com/sun/jct/utils/i18ncheck/**"/>
31 <exclude name="com/sun/jct/utils/i18ncheck/I18NVisitor15.java"/>
31 <exclude name="com/sun/jct/utils/i18ncheck/I18NVisitor15.java"/>
3232 <exclude name="com/sun/jct/utils/i18ncheck/I18NVisitor16.java"/>
33 </patternset>
33 </patternset>
3434
3535 <target name="test-i18n" depends="test-i18n-static" description="Runs i18n checking on all JT Harness src"/>
3636 <target name="test-i18n-static" depends="test-i18n-dynamic">
6464 </java>
6565 </target>
6666 <target name="test-i18n-dynamic" depends="compile.test.i18n, build-examples">
67 <copy file="${exam.dir}/tutorial/simpleTags/demots/lib/demots.jti"
67 <copy file="${exam.dir}/tutorial/simpleTags/demots/lib/demots.jti"
6868 todir="${build.tmp}"/>
6969 <java classname="${test.i18n.dynamic.class}" fork="true">
7070 <classpath>
7272 </classpath>
7373 <arg value="${build.tmp}/i18ncheck"/>
7474 <arg value="${BUILD_DIR}/classes/"/>
75 <arg value="${BUILD_DIR}/binaries/lib/jh.jar"/>
7675 <arg value="${BUILD_DIR}/binaries/examples/tutorial/demots"/>
7776 <arg value="${build.tmp}/demots_wd"/>
7877 <arg value="${build.tmp}/demots.jti"/>
8079 <arg value="${build.tmp}/services_wd"/>
8180 </java>
8281 </target>
83
84
82
83
8584 <condition property="jdk6.available">
8685 <contains string="${java.version}" substring="1.6"/>
87 </condition>
86 </condition>
8887 <target name="compile.test.i18n" depends="visitor15.compile, visitor16.compile, dist">
8988 <mkdir dir="${build.classes}"/>
90
89
9190 <javac encoding="iso-8859-1" debug="true" target="1.5" source="1.5"
9291 srcdir="${test.dir}"
9392 destdir="${build.classes}"
9695 </javac>
9796 </target>
9897 <target name="visitor15.compile" unless="jdk6.available">
99 <mkdir dir="${build.classes}"/>
98 <mkdir dir="${build.classes}"/>
10099 <javac encoding="iso-8859-1" debug="true" target="1.5" source="1.5"
101100 srcdir="${test.dir}"
102101 destdir="${build.classes}"
103102 classpath="${jdk14.classpath}">
104103 <include name="com/sun/jct/utils/i18ncheck/I18NVisitor15.java"/>
105 </javac>
104 </javac>
106105 </target>
107106 <target name="visitor16.compile" if="jdk6.available">
108 <mkdir dir="${build.classes}"/>
107 <mkdir dir="${build.classes}"/>
109108 <javac encoding="iso-8859-1" debug="true" target="1.5" source="1.5"
110109 srcdir="${test.dir}"
111110 destdir="${build.classes}"
2424 # questions.
2525 #
2626
27 build.version = 4.6
27 build.version = 5.0
2828 build.milestone = dev
2929 build.number = b00
3030
4848 javadoc.splitindex = true
4949 javadoc.use = true
5050 javadoc.version = false
51 javadoc.windowtitle = JT Harness Version 4.6
52 javadoc.footer = Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
51 javadoc.windowtitle = JT Harness Version 5.0
52 javadoc.footer = Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved.
5353
5454 run.class = com.sun.javatest.tool.Main
55 jdk14.classpath = ${jhalljar}:${servletjar}
55 jdk14.classpath = ${servletjar}
5656 jdk11.classpath = ${jcommjar}
5757 javadoc.classpath = ${jdk11.classpath}:${jdk14.classpath}
58 run.classpath = ${build.classes}:${jhjar}
58 run.classpath = ${build.classes}
5959
60 javahelp.missing = Please specify a 'jhall.jar' location in the 'local.properties' file.
6160 jcomm.missing = Please specify the location of the serial communcations API implementation jar (comm.jar) in the 'local.properties' file.
6261 servlet.missing = Please specify a 'servlet.jar' location in the 'local.properties' file.
6362 junit.missing = Please specify a 'junitlib' location in the 'local.properties' file.
00 <?xml version='1.0' encoding='ISO-8859-1' ?>
11 <!--
2 $Id$
3
4 Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
2 Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved.
53 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6
4
75 This code is free software; you can redistribute it and/or modify it
86 under the terms of the GNU General Public License version 2 only, as
97 published by the Free Software Foundation. Oracle designates this
108 particular file as subject to the "Classpath" exception as provided
119 by Oracle in the LICENSE file that accompanied this code.
12
10
1311 This code is distributed in the hope that it will be useful, but WITHOUT
1412 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1513 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
1614 version 2 for more details (a copy is included in the LICENSE file that
1715 accompanied this code).
18
16
1917 You should have received a copy of the GNU General Public License version
2018 2 along with this work; if not, write to the Free Software Foundation,
2119 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
22
20
2321 Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2422 or visit www.oracle.com if you need additional information or have any
2523 questions.
2624 -->
2725 <project name="jtharness" default="build" basedir="..">
28
26
2927 <import file="build-i18ncheck.xml"/>
3028
3129 <property file="build/local.properties"/>
3230 <property file="build/build.properties"/>
3331
3432 <import file="jtlite/build-jtlite.xml"/>
35
33
3634 <property environment="env"/>
37
35
3836 <patternset id="helpset">
39 <include name="**/*.hs"/>
37 <include name="**/*.hs"/>
4038 <include name="**/default/**"/>
4139 <include name="**/images/**"/>
4240 <exclude name="com/sun/javatest/tool/images/spl_*.gif"/>
4341 </patternset>
44
42
4543 <target name="build" depends="dist" description="Creates the build-distribution."/>
46
44
4745 <target name="clean" description="Removes the entire build-distribution directory.">
4846 <delete dir="${BUILD_DIR}"/>
4947 </target>
50
48
5149 <target name="stamp" description="Set up build time properties.">
5250 <tstamp>
5351 <format property="build.date" pattern="MMMMM dd, yyyy" locale="en"/>
5452 <format property="build.date.time" pattern="MMMMM dd, yyyy hh:mm aa" locale="en"/>
5553 </tstamp>
56
57 </target>
58
54
55 </target>
56
5957 <presetdef name="buildinfo">
6058 <echo file="${build.classes}/META-INF/buildInfo.txt"># Build info
6159 date=${build.date}
6765 harness-variety=Full Bundle
6866 </echo>
6967 </presetdef>
70
68
7169 <!-- ********** JT Harness *********************************************** -->
7270
7371 <property name="src.javatest.help" location="${src.dir}/com/sun/javatest/help"/>
7876 -->
7977 <property name="build.javatest.help" location="${build.classes}/com/sun/javatest/help"/>
8078 <property name="build.javatestAgent.help" location="${build.classes}/com/sun/javatest/agent/help"/>
81
79
8280 <patternset id="interview.resources">
8381 <include name="com/sun/interview/**/*.properties"/>
8482 <include name="com/sun/interview/wizard/*.gif"/>
8583 <include name="com/sun/interview/wizard/selectiontree/resources/*.gif"/>
8684 </patternset>
87
85
8886 <patternset id="javatest.resources">
8987 <include name="com/sun/javatest/**/*.properties"/>
9088 <include name="com/sun/javatest/**/*.xsd"/>
9290 <include name="com/sun/javatest/**/*.css"/>
9391 <exclude name="com/sun/javatest/tool/images/spl_*.gif"/>
9492 </patternset>
95
93
9694 <patternset id="javatest.junit.resources">
9795 <include name="com/sun/javatest/junit/**/*.properties"/>
9896 </patternset>
99
97
10098 <patternset id="javatest.packages">
10199 <include name="com/sun/interview/**"/>
102100 <include name="com/sun/javatest/**"/>
103101 <exclude name="com/sun/javatest/junit/**"/>
104 </patternset>
102 <exclude name="com/sun/javatest/agent/SerialPort*.java" unless="jcomm.present"/>
103 </patternset>
105104
106105 <patternset id="test.packages">
107106 <include name="com/sun/jct/utils/copyrightcheck/**" />
108107 </patternset>
109
108
110109 <patternset id="javatest.jdk11.files">
111110 <include name="com/sun/javatest/Command.java"/>
112111 <include name="com/sun/javatest/JavaTestSecurityManager.java"/>
124123 <include name="com/sun/javatest/util/FileInfoCache.java"/>
125124 <include name="com/sun/javatest/util/ReadAheadIterator.java"/>
126125 </patternset>
127
126
128127 <patternset id="javatest.junit.packages">
129128 <include name="com/sun/javatest/junit/**"/>
130129 </patternset>
131
130
132131 <target name="dist" depends="jar,jar.junit,dist.doc,build-examples,lite,test-copyrights" description="Creates the build-distribution.">
133132 <property name="zip.prefix" value="jtharness-${build.version}"/>
134133 <property name="zip.root" location="${BUILD_DIR}/tmp/zip/${zip.prefix}"/>
137136 <copy todir="${zip.root}">
138137 <fileset dir="${BUILD_DIR}/binaries"/>
139138 </copy>
140
139
141140 <mkdir dir="${BUILD_DIR}/bundles"/>
142141 <zip destfile="${BUILD_DIR}/bundles/${zip.prefix}.zip" filesOnly="true"
143142 basedir="${zip.root}/.." excludes="${zip.prefix}/examples/*, ${zip.prefix}/examples/"/>
154153 <copy todir="${target.legal.dir}">
155154 <fileset dir="${legal.dir}"/>
156155 </copy>
157
156
158157 <property name="target.doc.dir" value="${BUILD_DIR}/binaries/doc"/>
159158 <mkdir dir="${target.doc.dir}"/>
160159 <copy todir="${target.doc.dir}">
174173 <copy todir="${target.javadoc.dir}">
175174 <fileset dir="${javadoc.dir}"/>
176175 </copy>
177
176
178177 <!-- API docs -->
179178 <property name="target.javadoc.dir" value="${target.doc.dir}/api"/>
180179 <mkdir dir="${target.javadoc.dir}"/>
217216
218217
219218 </target>
220
219
221220 <!-- JAR Section -->
222221
223 <target name="jar" depends="jar.check,stamp" unless="javatest.jar.ok" description="Build JAR.">
222 <target name="jar" depends="jar.check,stamp" unless="javatest.jar.ok" description="Build JAR.">
224223 <mkdir dir="${BUILD_DIR}/binaries/lib"/>
225224 <jar destfile="${BUILD_DIR}/binaries/lib/javatest.jar" basedir="${build.classes}" index="false">
226225 <manifest>
227226 <attribute name="Built-By" value="${user.name}"/>
228 <attribute name="Main-Class" value="${run.class}"/>
229 <attribute name="Class-Path" value="jh.jar"/>
230 <attribute name="SplashScreen-Image" value="com/sun/javatest/tool/images/splash.gif"/>
227 <attribute name="Main-Class" value="${run.class}"/>
231228 </manifest>
232229 <include name="META-INF/buildInfo.txt"/>
233230 <include name="copyright.txt"/>
235232 <include name="META-INF/services/com.sun.javatest.report.ReportFormat"/>
236233 <patternset refid="javatest.packages"/>
237234 </jar>
238 <copy file="${jhjar}" todir="${BUILD_DIR}/binaries/lib"/>
239 </target>
240
235 </target>
236
241237 <target name="jar.check" depends="compile">
242238 <dependset>
243239 <srcfileset dir="${build.classes}">
249245 </dependset>
250246 <available property="javatest.jar.ok" file="${BUILD_DIR}/binaries/lib/javatest.jar"/>
251247 </target>
252
248
253249 <!-- JAR - JUnit Support Section -->
254250
255 <target name="jar.junit" depends="jar.junit.check,stamp" unless="jt-junit.jar.ok" description="Build JUnit JAR.">
251 <target name="jar.junit" depends="jar.junit.check,stamp" unless="jt-junit.jar.ok" description="Build JUnit JAR.">
256252 <mkdir dir="${BUILD_DIR}/binaries/lib"/>
257253 <jar destfile="${BUILD_DIR}/binaries/lib/jt-junit.jar" basedir="${build.junit.classes}" index="false">
258254 <manifest>
263259 <patternset refid="javatest.junit.packages"/>
264260 </jar>
265261 </target>
266
262
267263 <target name="jar.junit.check" depends="compile.junit.classes">
268264 <dependset>
269265 <srcfileset dir="${build.junit.classes}">
273269 </dependset>
274270 <available property="jt-junit.jar.ok" file="${BUILD_DIR}/binaries/lib/jt-junit.jar"/>
275271 </target>
276
272
277273 <!-- Compilation Section -->
278274
279275 <target name="compile" depends="compile.classes,compile.resources,compile-javatest.help" description="Compile project."/>
280
276
277 <target name="compile.serial.warning" unless="jcomm.present">
278 <echo message="Serial Agent classes will not be compiled"/>
279 </target>
280
281281 <target name="compile.classes">
282 <available file="${jhalljar}" type="file" property="javahelp.present"/>
283 <fail unless="javahelp.present" message="${javahelp.missing}"/>
284
285
282
286283 <available file="${jcommjar}" type="file" property="jcomm.present"/>
287 <fail unless="jcomm.present" message="${jcomm.missing}"/>
288
284 <antcall target="compile.serial.warning"/>
285
289286 <available file="${servletjar}" type="file" property="servlet.present"/>
290287 <fail unless="servlet.present" message="${servlet.missing}"/>
291
288
289 <delete dir="${build.classes}" quiet="true"/>
292290 <mkdir dir="${build.classes}"/>
293 <javac encoding="iso-8859-1" debug="true" target="1.1" source="1.2"
291 <javac encoding="iso-8859-1" debug="true" target="1.7"
294292 srcdir="${src.dir}"
293 sourcepath=""
295294 destdir="${build.classes}"
296 classpath="${jdk11.classpath}:${jcommjar}>">
297 <patternset refid="javatest.jdk11.files"/>
298 </javac>
299 <javac encoding="iso-8859-1" debug="true" target="1.5" source="1.5"
300 srcdir="${src.dir}"
301 destdir="${build.classes}"
302 classpath="${jdk14.classpath}">
295 classpath="${jdk14.classpath}:${jcommjar}">
303296 <patternset refid="javatest.packages"/>
304297 </javac>
305298 <copy todir="${build.classes}">
307300 <include name="copyright.txt"/>
308301 </fileset>
309302 </copy>
310
311 </target>
312
303
304 </target>
305
313306 <target name="compile.test.copyright.classes">
314307 <mkdir dir="${build.classes}"/>
315 <javac encoding="iso-8859-1" debug="true" target="1.5" source="1.5"
308 <javac encoding="iso-8859-1" debug="true" target="1.7"
316309 srcdir="${test.dir}"
317310 destdir="${build.classes}"
318311 classpath="${jdk14.classpath}">
323316 <target name="compile.junit.classes" depends="compile.classes,compile.junit.resources">
324317 <available file="${junitlib}" type="file" property="junit.present"/>
325318 <fail unless="junit.present" message="${junit.missing}"/>
326
319
327320 <mkdir dir="${build.junit.classes}"/>
328 <javac encoding="iso-8859-1" debug="true" target="1.5" source="1.5"
321 <javac encoding="iso-8859-1" debug="true" target="1.7"
329322 srcdir="${src.dir}"
330323 destdir="${build.junit.classes}"
331324 classpath="${jdk14.classpath}:${build.classes}:${bytecodelib}:${junitlib}">
332325 <patternset refid="javatest.junit.packages"/>
333326 </javac>
334
327
335328 <copy todir="${build.junit.classes}">
336329 <fileset dir="${legal.dir}">
337330 <include name="copyright.txt"/>
338331 </fileset>
339332 </copy>
340
341 </target>
342
343 <target name="compile.javahelp">
344 <presetdef name="jhindexer">
345 <java fork="true" failonerror="true"
346 dir="unset"
347 classpath="${jhalljar}"
348 classname="com.sun.java.help.search.Indexer">
349 </java>
350 </presetdef>
351
352 <delete dir="${build.javatestAgent.help}/default/JavaHelpSearch"/>
353 <delete dir="${build.javatest.help}/default/JavaHelpSearch"/>
354 <copy todir="${build.classes}">
355 <fileset dir="${src.dir}">
356 <patternset refid="helpset"/>
357 </fileset>
358 </copy>
359
360 <!-- build the search index -->
361 <jhindexer dir="${build.javatest.help}">
362 <arg value="-c"/>
363 <arg line="-db JavaHelpSearch"/>
364 <arg line="default"/>
365 </jhindexer>
366 <jhindexer dir="${build.javatestAgent.help}">
367 <arg value="-c"/>
368 <arg line="-db JavaHelpSearch"/>
369 <arg line="default"/>
370 </jhindexer>
371
372 <move todir="${build.javatest.help}/default/JavaHelpSearch">
373 <fileset dir="${build.javatest.help}/JavaHelpSearch"/>
374 </move>
375
376 <move todir="${build.javatestAgent.help}/default/JavaHelpSearch">
377 <fileset dir="${build.javatestAgent.help}/JavaHelpSearch"/>
378 </move>
379
380 </target>
333
334 </target>
335
381336 <target name="compile-javatest.help" depends="compile-javatest.help.main,compile-javatestAgent.help"/>
382
337
383338 <target name="compile.resources" depends="stamp">
384339 <copy todir="${build.classes}">
385340 <fileset dir="${src.dir}">
389344 </copy>
390345 <mkdir dir="${build.classes}/META-INF/"/>
391346 <buildinfo/>
392 <copy file="${src.dir}/com/sun/javatest/tool/images/${javatest.splash}.gif"
393 tofile="${build.classes}/com/sun/javatest/tool/images/splash.gif" />
394 <copy file="${src.dir}/com/sun/javatest/tool/images/${javatest.splash}F.gif"
395 tofile="${build.classes}/com/sun/javatest/tool/images/splash_fr.gif" />
396347 <copy file="${src.dir}/com/sun/javatest/tool/i18n.properties"
397348 tofile="${build.classes}/com/sun/javatest/tool/i18n_fr.properties"/>
398 <replace file="${build.classes}/com/sun/javatest/tool/i18n_fr.properties"
399 token="splash.gif" value="splash_fr.gif"/>
400349 <mkdir dir="${build.classes}/META-INF/services"/>
401350 <copy file="${build.dir}/JavaTest.cmdMgrs.lst" tofile="${build.classes}/META-INF/services/com.sun.javatest.tool.CommandManager.lst"/>
402351 <copy file="${build.dir}/JavaTest.toolMgrs.lst" tofile="${build.classes}/META-INF/services/com.sun.javatest.tool.ToolManager.lst"/>
403352 <copy file="${build.dir}/com.sun.javatest.report.ReportFormat" tofile="${build.classes}/META-INF/services/com.sun.javatest.report.ReportFormat"/>
404353 </target>
405
354
406355 <target name="compile.junit.resources" depends="stamp">
407356 <copy todir="${build.junit.classes}">
408357 <fileset dir="${src.dir}">
412361 <mkdir dir="${build.classes}/META-INF/"/>
413362 <buildinfo/>
414363 </target>
415
416
364
365
417366 <target name="run" depends="compile" description="Run application.">
418367 <fail unless="run.class">${run.class.missing}</fail>
419368 <java fork="true" classname="${run.class}">
422371 </classpath>
423372 </java>
424373 </target>
425
374
426375 <target name="javadoc" description="Creates API documentation for the JT Harness source.">
376 <condition property="javadoc.add" value="${javadoc.additionalparam} -Xdoclint:none" else="${javadoc.additionalparam}">
377 <contains string="${java.version}" substring="1.8" />
378 </condition>
379
427380 <mkdir dir="${javadoc.dir}"/>
428 <javadoc destdir="${javadoc.dir}" source="1.5" encoding="${javadoc.encoding}" notree="${javadoc.notree}" use="${javadoc.use}"
381 <javadoc destdir="${javadoc.dir}" encoding="${javadoc.encoding}" notree="${javadoc.notree}" use="${javadoc.use}"
429382 nonavbar="${javadoc.nonavbar}"
430383 noindex="${javadoc.noindex}" splitindex="${javadoc.splitindex}" author="${javadoc.author}"
431384 version="${javadoc.version}"
432385 windowtitle="${javadoc.windowtitle}" private="${javadoc.private}"
433 additionalparam="${javadoc.additionalparam}" failonerror="true"
386 additionalparam="${javadoc.add}" failonerror="true"
434387 useexternalfile="true">
435388 <classpath>
436 <path path="${jhjar}:${jcommjar}:${ant.home}/lib/ant.jar"/>
389 <path path="${jcommjar}:${ant.home}/lib/ant.jar"/>
437390 </classpath>
438391 <sourcepath>
439392 <pathelement location="${src.dir}"/>
452405 <package name="com.sun.javatest.report" />
453406 </javadoc>
454407 </target>
455
408
456409 <target name="test" depends="jar,test-nohead,test-i18n,test-copyrights,test-sanity" description="Runs test on JT Harness.">
457410 <java fork="true" failonerror="true" classname="${run.class}">
458411 <classpath>
459 <path path="${jhalljar}"/>
460412 <path path="${BUILD_DIR}/binaries/lib/javatest.jar"/>
461413 </classpath>
462414 <arg value="-version"/>
463415 </java>
464416 </target>
465
417
466418 <target name="test-sanity" depends="test-sanity-version,test-sanity-simpletck" />
467419
468420 <target name="test-sanity-version" depends="jar">
470422 outputproperty="test.sanity.version.output"
471423 resultproperty="test.sanity.version.result">
472424 <classpath>
473 <path path="${jhalljar}"/>
474425 <path path="${BUILD_DIR}/binaries/lib/javatest.jar"/>
475426 </classpath>
476427 <arg value="-version"/>
500451 outputproperty="test.sanity.simpletck.output"
501452 resultproperty="test.sanity.simpletck.result">
502453 <classpath>
503 <path path="${jhalljar}" />
504454 <path path="${libs}/demots.jar" />
505455 <path path="${libs}/demoapi.jar" />
506456 </classpath>
527477 <target name="test-nohead" depends="dist" description="Runs all tests, which do not need display">
528478 <antcall target="test-statusmsg"/>
529479 </target>
530
480
531481 <target name="test-statusmsg" depends="jar" description="Tests the message string filtering of the Status class">
532482 <junit fork="no" haltonerror="off" printsummary="withOutAndErr" filtertrace="off" showoutput="on">
533483 <classpath>
537487 </junit>
538488 </target>
539489
540 <target name="compile-javatest.help.main" depends="ant-jct.utils" unless="javatest.help.ok" >
490 <target name="compile-javatest.help.main" unless="javatest.help.ok" >
541491 <!-- copy across the help files -->
542492 <delete dir="${build.javatest.help}"/>
543493 <mkdir dir="${build.tmp}"/>
544
494
545495 <copy todir="${build.javatest.help}" >
546496 <fileset dir="${src.dir}/com/sun/javatest/help/">
547497 <patternset refid="helpset"/>
552502 <patternset refid="helpset"/>
553503 </fileset>
554504 </copy>
555
556 <!-- build the glossary -->
557 <glossarygen mapDir="${src.javatest.help}/default"
558 mapOutFile="${build.tmp}/javatestGlossaryMap.xml"
559 xmlOutFile="${build.javatest.help}/default/glossary.xml"
560 dir="${src.javatest.help}/default/glossary">
561 <include name="**/*.html"/>
562 </glossarygen>
563 <!-- build the index -->
564 <indexgen mapDir="${src.javatest.help}/default"
565 mapOutFile="${build.tmp}/javatestIndexMap.xml"
566 xmlOutFile="${build.javatest.help}/default/index.xml"
567 dir="${src.javatest.help}/default">
568 <include name="**/*.html"/>
569 <exclude name="**/license.html"/>
570 </indexgen>
571 <!-- build the combined map -->
572 <mapmerge outFile="${build.javatest.help}/default/map.xml">
573 <fileset file="${src.javatest.help}/default/map.xml"/>
574 <fileset file="${build.tmp}/javatestGlossaryMap.xml"/>
575 <fileset file="${build.tmp}/javatestIndexMap.xml"/>
576 </mapmerge>
577 <!-- build the search index -->
578 <jhindexer dir="${build.javatest.help}">
579 <arg value="-c"/>
580 <arg file="${src.javatest.help}/jhindexer-config.txt "/>
581 <arg line="-db default/JavaHelpSearch"/>
582 <arg line="default"/>
583 </jhindexer>
584 </target>
585
505 </target>
506
586507 <target name="check-javatest.help">
587508 <dependset>
588509 <srcfileset dir="${src.javatest.help}" />
589510 <targetfileset dir="${build.javatest.help}" />
590511 </dependset>
591512 <available property="javatest.help.ok" file="${build.javatest.help}/default/map.xml"/>
592 </target>
593 <target name="compile-javatestAgent.help" depends="ant-jct.utils" unless="javatestAgent.help.ok" >
513 </target>
514 <target name="compile-javatestAgent.help" unless="javatestAgent.help.ok" >
594515 <!-- copy across the help files -->
595516 <copy todir="${build.javatestAgent.help}">
596517 <fileset dir="${src.dir}/com/sun/javatest/agent/help/">
598519 <exclude name="**/*.tif"/>
599520 </fileset>
600521 </copy>
601 <!-- build the glossary -->
602 <glossarygen mapDir="${src.javatest.help}/default"
603 mapOutFile="${build.tmp}/javatestAgentGlossaryMap.xml"
604 xmlOutFile="${build.javatestAgent.help}/default/glossary.xml"
605 dir="${src.javatestAgent.help}/default/glossary">
606 <include name="**/*.html"/>
607 </glossarygen>
608 <!-- build the index -->
609 <indexgen mapDir="${src.javatest.help}/default"
610 mapOutFile="${build.tmp}/javatestAgentIndexMap.xml"
611 xmlOutFile="${build.javatestAgent.help}/default/index.xml"
612 dir="${src.javatestAgent.help}/default">
613 <include name="**/*.html"/>
614 <exclude name="**/license.html"/>
615 </indexgen>
616 <!-- build the combined map -->
617 <mapmerge outFile="${build.javatestAgent.help}/default/map.xml">
618 <fileset file="${src.javatestAgent.help}/default/map.xml"/>
619 <fileset file="${build.tmp}/javatestAgentGlossaryMap.xml"/>
620 <fileset file="${build.tmp}/javatestAgentIndexMap.xml"/>
621 </mapmerge>
622 <!-- build the search index -->
623 <jhindexer dir="${build.javatestAgent.help}">
624 <arg value="-c"/>
625 <arg file="${src.javatestAgent.help}/jhindexer-config.txt "/>
626 <arg line="-db default/JavaHelpSearch"/>
627 <arg line="default"/>
628 </jhindexer>
629 </target>
630
522 </target>
523
631524 <target name="check-javatestAgent.help">
632525 <dependset>
633526 <srcfileset dir="${src.javatestAgent.help}" />
634527 <targetfileset dir="${build.javatestAgent.help}" />
635528 </dependset>
636529 <available property="javatestAgent.help.ok" file="${build.javatestAgent.help}/default/map.xml"/>
637 </target>
530 </target>
638531 <!-- ********** jct-utils ********************************************** -->
639
640 <target name="ant-jct.utils" depends="compile-jct.utils">
641 <taskdef name="glossarygen" classname="com.sun.jct.utils.glossarygen.Main$$Ant" classpath="${build.classes}" />
642 <taskdef name="indexgen" classname="com.sun.jct.utils.indexgen.Main$$Ant" classpath="${build.classes}" />
643 <taskdef name="mapmerge" classname="com.sun.jct.utils.mapmerge.Main$$Ant" classpath="${build.classes}" />
644 <presetdef name="jhindexer">
645 <java fork="true" failonerror="true"
646 dir="unset"
647 classpath="${jhalljar}"
648 classname="com.sun.java.help.search.Indexer">
649 </java>
650 </presetdef>
651 </target>
652
532
653533 <target name="compile-jct.utils">
654 <mkdir dir="${build.classes}"/>
534 <mkdir dir="${build.classes}"/>
655535 <javac encoding="iso-8859-1" debug="true" source="1.4"
656 srcdir="${src.dir}"
536 srcdir="${src.dir}"
657537 destdir="${build.classes}">
658538 <include name="com/sun/jct/utils/glossarygen/**"/>
659539 <include name="com/sun/jct/utils/indexgen/**"/>
660540 <include name="com/sun/jct/utils/mapmerge/**"/>
661541 </javac>
662542 </target>
663
543
664544 <!-- ********** examples ********************************************** -->
665545 <target name="build-examples" depends="build-tutorial"/>
666
546
667547 <target name="build-tutorial" depends="jar">
668548 <property name="build.examples" location="${BUILD_DIR}/binaries/examples/tutorial"/>
669549 <mkdir dir="${build.tmp}/${exam.dir}/demoapi"/>
670550 <mkdir dir="${build.tmp}/${exam.dir}/simpleTags"/>
671551 <mkdir dir="${build.examples}/demots/lib"/>
672
552
673553 <javac encoding="iso-8859-1" debug="true" source="1.4"
674 srcdir="${exam.dir}/tutorial/demoapi"
554 srcdir="${exam.dir}/tutorial/demoapi"
675555 destdir="${build.tmp}/${exam.dir}/demoapi">
676556 </javac>
677 <jar destfile="${build.examples}/demots/lib/demoapi.jar"
557 <jar destfile="${build.examples}/demots/lib/demoapi.jar"
678558 basedir="${build.tmp}/${exam.dir}/demoapi" index="false">
679559 <manifest>
680560 <attribute name="Built-By" value="${user.name}"/>
681 <attribute name="Main-Class" value="${run.class}"/>
561 <attribute name="Main-Class" value="${run.class}"/>
682562 </manifest>
683563 </jar>
684564 <copy todir="${build.examples}/demots/lib">
685565 <fileset file="${BUILD_DIR}/binaries/lib/javatest.jar"/>
686 <fileset file="${jhjar}"/>
687 </copy>
688
689
566 </copy>
567
568
690569 <javac encoding="iso-8859-1" debug="true" source="1.4"
691 srcdir="${exam.dir}/tutorial/simpleTags"
570 srcdir="${exam.dir}/tutorial/simpleTags"
692571 destdir="${build.tmp}/${exam.dir}/simpleTags"
693 classpath="${BUILD_DIR}/binaries/lib/javatest.jar:${build.examples}/demots/lib/demoapi.jar:${jhalljar}">
572 classpath="${BUILD_DIR}/binaries/lib/javatest.jar:${build.examples}/demots/lib/demoapi.jar">
694573 </javac>
695574 <copy todir="${build.tmp}/${exam.dir}/simpleTags">
696575 <fileset dir="${exam.dir}/tutorial/simpleTags/src">
698577 <include name="**/*.properties"/>
699578 </fileset>
700579 </copy>
701
702 <jar destfile="${build.examples}/demots/lib/jtdemots.jar"
580
581 <jar destfile="${build.examples}/demots/lib/jtdemots.jar"
703582 basedir="${build.tmp}/${exam.dir}/simpleTags" index="false">
704583 <manifest>
705584 <attribute name="Built-By" value="${user.name}"/>
706 <attribute name="Main-Class" value="${run.class}"/>
585 <attribute name="Main-Class" value="${run.class}"/>
707586 </manifest>
708587 </jar>
709588 <copy todir="${build.examples}/demots">
715594 <copy todir="${build.examples}/demoapi">
716595 <fileset dir="${exam.dir}/tutorial/demoapi"/>
717596 </copy>
718
719
597
598
720599 </target>
721
722
600
601
723602 <target name="build-services-ts" depends="build-tutorial">
724603 <property name="services.ts" location="${BUILD_DIR}/binaries/examples/services_ts"/>
725604 <mkdir dir="${build.tmp}/${exam.dir}/services_demo/classes"/>
727606
728607 <copy todir="${services.ts}/lib">
729608 <fileset file="${BUILD_DIR}/binaries/lib/javatest.jar"/>
730 <fileset file="${jhjar}"/>
731609 <fileset file="${build.examples}/demots/lib/demoapi.jar"/>
732610 </copy>
733611
735613 <javac encoding="iso-8859-1" debug="true"
736614 srcdir="${exam.dir}/services_demo/src"
737615 destdir="${build.tmp}/${exam.dir}/services_demo/classes"
738 classpath="${BUILD_DIR}/binaries/lib/javatest.jar:${jhalljar}">
616 classpath="${BUILD_DIR}/binaries/lib/javatest.jar">
739617 </javac>
740618 <copy todir="${build.tmp}/${exam.dir}/services_demo/classes">
741619 <fileset dir="${exam.dir}/services_demo/src">
760638
761639
762640 <!--
763 ********** copyright checker **********************************************
641 ********** copyright checker **********************************************
764642 -->
765643 <property file="build/copyright.properties"/>
766644 <target name="test-copyrights" depends="compile.test.copyright.classes">
2424 # questions.
2525 #
2626
27 #Please specify location of jhall.jar here - for compilation
28 jhalljar = jhall.jar
29
30 # needed only at runtime
31 jhjar = jh.jar
32
3327 # location of jar with with implementation of java serial communications API
3428 jcommjar = comm.jar
3529
9999 }
100100
101101 public boolean isValueValid() {
102 return isValidIdentifier(value);
102 return true;
103 //return isValidIdentifier(value);
103104 }
104105
105106 protected Question getNext() {
00 /*
11 * $Id$
22 *
3 * Copyright (c) 2001, 2009, Oracle and/or its affiliates. All rights reserved.
3 * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
44 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55 *
66 * This code is free software; you can redistribute it and/or modify it
2626 package com.sun.interview;
2727
2828 import java.io.File;
29 import java.util.ArrayList;
2930 import java.util.Map;
30 import java.util.Vector;
3131
3232 /**
3333 * A {@link Question question} to which the response is one or more filenames.
112112 return getValue();
113113 }
114114
115 @Override
115116 public String getStringValue() {
116117 return join(value);
117118 }
119120 /**
120121 * Set the response to this question to the value represented by
121122 * a string-valued argument.
123 * @param paths The new value for the question, can be null to set no value.
122124 * @see #getValue
123125 */
126 @Override
124127 public void setValue(String paths) {
125128 setValue(paths == null ? (File[])null : split(paths));
126129 }
139142 }
140143 }
141144
145 /**
146 * Simple validation, upgrade if needed.
147 * Iterates values, checks against filters, except if interview semantics
148 * are set to an pre-50 version, in which case true is always returned.
149 * Using semantics greater than 50 is highly recommended and recommended if
150 * an old interview is being modernized.
151 * @return False if any values are rejected by filters, true otherwise.
152 * True if there are no values or no filters.
153 * @see com.sun.interview.Interview#getInterviewSemantics
154 * @see com.sun.interview.Interview#SEMANTIC_VERSION_50
155 */
156 @Override
142157 public boolean isValueValid() {
158 if (interview.getInterviewSemantics() < Interview.SEMANTIC_VERSION_50) {
159 // not that useful, but it's how the original question behaved
160 return true;
161 }
162
163 if (value == null || value.length == 0 ||
164 filters == null || filters.length == 0) {
165 return true;
166 }
167
168 for (File f: value) {
169 if (f == null) {
170 continue;
171 }
172
173 for (FileFilter fs: filters) {
174 if (fs != null && !fs.accept(f)) {
175 return false;
176 }
177 }
178 } // for
179
143180 return true;
144181 }
145182
183 @Override
146184 public boolean isValueAlwaysValid() {
147185 return false;
148186 }
172210
173211 /**
174212 * Set the filters used to select valid files for a response
175 * to this question.
176 * @param filters An array of filters used to select valid files for a response
213 * to this question. For pre-50 behavior, both the filters and the hint
214 * filter values are treated the same, and neither is used for validation
215 * (e.g. <code>isValid()</code>.
216 * @param fs An array of filters used to select valid files for a response
177217 * to this question
178218 * @see #getFilters
179219 * @see #setFilters
180 */
181 public void setFilters(FileFilter[] filters) {
182 this.filters = filters;
220 * @see #getHintFilters
221 */
222 public void setFilters(FileFilter[] fs) {
223 if (interview.getInterviewSemantics() >= Interview.SEMANTIC_VERSION_50) {
224 filters = fs;
225 }
226 else {
227 // old behavior, the fitlers act as hint filters, not validation
228 // filters
229 filters = hintFilters = fs;
230 }
231 }
232
233 /**
234 * Set the filters which the user can use to help find files among a list
235 * of files - this is somewhat exposing of the fact that there is a user
236 * interface. This should not be confused with setFilters(), which in
237 * version 5.0 or later of the harness, are used to do validity checks on
238 * the actual value (e.g.. in <code>isValid()</code>.
239 * @param fs Filters which might be offered to the user.
240 * @see #setFilters
241 * @see #isValueValid
242 * @since 5.0
243 */
244 public void setHintFilters(FileFilter[] fs) {
245 hintFilters = fs;
246 }
247
248 /**
249 * A set of filters to help users locate the right file/dir.
250 * These filters are not used for validating the question value.
251 * @see #setHintFilters(com.sun.interview.FileFilter[])
252 * @see #getFilters
253 * @since 5.0
254 */
255 public FileFilter[] getHintFilters() {
256 if (interview.getInterviewSemantics() >= Interview.SEMANTIC_VERSION_50) {
257 return hintFilters;
258 } else {
259 return filters;
260 }
183261 }
184262
185263 /**
261339
262340 char sep = (s.indexOf('\n') == -1 ? ' ' : '\n');
263341
264 Vector v = new Vector();
342 ArrayList v = new ArrayList();
265343 int start = -1;
266344 for (int i = 0; i < s.length(); i++) {
267345 if (s.charAt(i) == sep) {
268346 if (start != -1)
269 v.addElement(new File(s.substring(start, i)));
347 v.add(new File(s.substring(start, i)));
270348 start = -1;
271349 } else
272350 if (start == -1)
273351 start = i;
274352 }
275353 if (start != -1)
276 v.addElement(new File(s.substring(start)));
354 v.add(new File(s.substring(start)));
277355 if (v.size() == 0)
278356 return empty;
279357 File[] a = new File[v.size()];
280 v.copyInto(a);
358 v.toArray(a);
281359 return a;
282360 }
283361
370448 private boolean baseRelativeOnly;
371449
372450 private FileFilter[] filters;
451 private FileFilter[] hintFilters;
373452
374453 private boolean duplicatesAllowed = true;
375454 }
00 /*
11 * $Id$
22 *
3 * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
3 * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
44 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55 *
66 * This code is free software; you can redistribute it and/or modify it
2626 package com.sun.interview;
2727
2828 import com.sun.javatest.TestSuite;
29 import com.sun.javatest.tool.jthelp.HelpID;
30 import com.sun.javatest.tool.jthelp.HelpSet;
31
2932 import java.net.URL;
3033 import java.text.MessageFormat;
34 import java.util.HashMap;
3135 import java.util.ResourceBundle;
32 import javax.help.HelpSet;
33 import javax.help.HelpSetException;
34 import javax.help.Map.ID;
3536
3637 /**
3738 * Class that contains a number of static method to work with both JavaTest
5657 }
5758
5859 /**
59 * Get the JavaHelp ID identifying the "more info" help for this
60 * Get the JavaHelp HelpID identifying the "more info" help for this
6061 * question, or null if none.
61 * @return the JavaHelp ID identifying the "more info" help for this
62 * @return the JavaHelp HelpID identifying the "more info" help for this
6263 * question, or null if none.
6364 */
64 public static ID getHelpID(Question q) {
65 public static HelpID getHelpID(Question q) {
6566 if (q == null) {
6667 return null;
6768 }
6869 Object id = q.getHelpID();
69 if (id != null && id instanceof ID) {
70 return (ID)id;
70 if (id != null && id instanceof HelpID) {
71 return (HelpID)id;
7172 }
7273
73 ID helpID = getID(q.getInterview(), q.getKey());
74 HelpID helpID = getID(q.getInterview(), q.getKey());
7475 if (helpID != null) {
7576 q.setHelpID(helpID);
7677 }
7879 }
7980
8081 /**
81 * Creates ID for given interview and question key
82 * Creates HelpID for given interview and question key
8283 * @param i interview
8384 * @param key question key
84 * @return ID to be used for the question.
85 * @return HelpID to be used for the question.
8586 */
86 private static ID getID(Interview i, String key) {
87 ID id = null;
87 private static HelpID getID(Interview i, String key) {
88 HelpID helpId = null;
8889 if (i.getParent() != null)
89 id = getID(i.getParent(), key);
90 helpId = getID(i.getParent(), key);
9091
91 if (id != null) {
92 //System.err.println("Q: int:" + i.getTag() + " key:" + key + " id:" + id);
93 return id;
92 if (helpId != null) {
93 //System.err.println("Q: int:" + i.getTag() + " key:" + key + " helpId:" + helpId);
94 return helpId;
9495 }
9596
9697 HelpSet hs = getHelpSet(i);
9798 if (hs != null) {
98 javax.help.Map m = hs.getLocalMap();
99 if (m != null && m.isValidID(key, hs)) {
100 id = ID.create(key, hs);
101 //System.err.println("Q: FOUND int:" + i.getTag() + " key:" + key + " id:" + id);
102 return id;
99 HashMap m = hs.getLocalMap();
100 if (m != null) {
101 helpId = HelpID.create(key, hs);
102 //System.err.println("Q: FOUND int:" + i.getTag() + " key:" + key + " helpId:" + helpId);
103 return helpId;
103104 }
104105 }
105106 return null;
109110 * Get helpsets containing any related documents for this test suite.
110111 * By default, the resource names for the help sets are obtained from
111112 * getAdditionalDocNames().
113 * @param ts The test suite to look for the docs within.
112114 * @return an array of help sets containing docs associated with this
113115 * testsuite. The array will be empty if there are no such docs.
114 * @throws TestSuite.Fault if there are problems opening any of the
116 * @throws Help.Fault if there are problems opening any of the
115117 * helpsets.
116118 */
117119 public static HelpSet[] getAdditionalDocs(TestSuite ts) throws Help.Fault {
128130 if (u == null) {
129131 throw new Help.Fault(i18n, "ts.cantFindDoc", name);
130132 }
131 try {
132 docs[i] = new HelpSet(loader, u);
133 } catch (HelpSetException e) {
134 throw new Help.Fault(i18n, "ts.cantOpenDoc",
135 new Object[] { name, e });
136 }
133 docs[i] = new HelpSet(loader, u);
137134 }
138135 // only set if all opened OK
139136 additionalDocs = docs;
00 /*
11 * $Id$
22 *
3 * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
3 * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
44 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55 *
66 * This code is free software; you can redistribute it and/or modify it
6262 *
6363 * @param interview - interview object to reset HelpSet
6464 * @param object - an instance of javax.help.HelpSet
65 * @throws com.sun.interview.Interview.Fault if something went wrong
6665 */
6766 public Object updateHelpSetObject(Interview interview, Object object);
6867
00 /*
11 * $Id$
22 *
3 * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
3 * Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved.
44 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55 *
66 * This code is free software; you can redistribute it and/or modify it
2929 import java.net.MalformedURLException;
3030 import java.net.URL;
3131 import java.net.URLClassLoader;
32 import java.security.AccessController;
33 import java.security.PrivilegedAction;
3234 import java.text.MessageFormat;
3335 import java.util.ArrayList;
3436 import java.util.Arrays;
278280 // name is not null
279281 if (!name.equals(bundleName)) {
280282 Class c = getClass();
281 ClassLoader cl = c.getClassLoader();
282 String rn;
283 final ClassLoader cl = c.getClassLoader();
284 final String rn;
283285 if (name.startsWith("/"))
284286 rn = name.substring(1);
285287 else {
288290 rn = pn + "." + name;
289291 }
290292 //System.err.println("INT: looking for bundle: " + rn);
291 bundle = ResourceBundle.getBundle(rn, Locale.getDefault(), cl);
293 bundle = AccessController.doPrivileged(
294 new PrivilegedAction<ResourceBundle>() {
295 public ResourceBundle run() {
296 return ResourceBundle.getBundle(rn, Locale.getDefault(), cl);
297 }
298 });
292299 bundleName = name;
293300 }
294301 }
307314 * cannot be found.
308315 * @see #getResourceBundle
309316 */
310 protected void setResourceBundle(String name, File file)
317 protected void setResourceBundle(final String name, File file)
311318 throws MissingResourceException {
312319 if (bundleName != null && bundleName.equals(name)) {
313320 return;
314321 }
315322 try {
316323 URL[] url = {new URL("file:" + file.getAbsolutePath() + "/")};
317 URLClassLoader cl = new URLClassLoader(url);
318 bundle = ResourceBundle.getBundle(name, Locale.getDefault(), cl);
324 final URLClassLoader cl = new URLClassLoader(url);
325 bundle = AccessController.doPrivileged(
326 new PrivilegedAction<ResourceBundle>() {
327 public ResourceBundle run() {
328 return ResourceBundle.getBundle(name, Locale.getDefault(), cl);
329 }
330 });
319331 bundleName = name;
320332 } catch (MalformedURLException e) {
321333 }
19771989 * possible during construction. It is recommended that you select
19781990 * the most recent version possible when developing a new interview.
19791991 * As this interview ages and the harness libraries progress, the
1980 * interview should remain locked at the current behavior.
1992 * interview should remain locked at the current behavior. Each subsequent
1993 * version works under the assumption that the behavior of all previous
1994 * versions is also enabled, there is no way to select individual behaviors.
1995 *
1996 * <p>
1997 * The version numbers are effectively an indication of the harness version
1998 * where the behavior was added (32 = 3.2, 50 = 5.0). Gaps in numbering
1999 * would indicate that no incompatible behavior changes occurred.
2000 * </p>
2001 *
2002 * <p>
2003 * Select PRE_32 behavior to select behaviors prior to 3.2.
2004 * </p>
2005 *
2006 * <p>
2007 * In Version 32, the first versioned semantic change was introduced.
2008 * Interviews will generally request SEMANTIC_PRE_32 for old semantics.
2009 * This version has the behavioral changes:
2010 * <dl>
2011 * <dt>ChoiceQuestion</dt>
2012 * <dd>If the value is reset to null, resulting in the value being
2013 * "cleared", new behavior simply calls <code>clear()</code> to do this. Old
2014 * behavior was to select either the last value or first possible
2015 * choice (from the array of possible choices) THEN call <code>updatePath()</code>
2016 * and <code>setEdited()</code>.</dd>
2017 * <dt>FileListQuestion</dt>
2018 * <dd>During construction, <code>clear()</code> will be called before the
2019 * default value is set, in older implementations it was not called.</dd>
2020 * <dt>FileQuestion</dt>
2021 * <dd>During construction, <code>clear()</code> will be called before the
2022 * default value is set, in older implementations it was not called.</dd>
2023 * </dl>
2024 * </p>
2025 *
2026 * <p>
2027 * In Version 43 changes to the way in which <code>export()</code> works were
2028 * introduced. Earlier than this version, the list of questions to call
2029 * <code>export()</code> upon with pre-generated as a flattened list of
2030 * Questions (with all sub-interviews removed). In 43 and later, the
2031 * structure is NOT flattened, but instead exporting will recurse into
2032 * sub-interviews by calling its (the Interview) <code>export()</code>.
2033 * Additionally, questions which are on the path but hidden will be exported.
2034 * Note that being hidden is not the same at being disabled.
2035 * </p>
2036 *
2037 * <p>
2038 * In Version 50, FileListQuestion has significantly altered processing
2039 * of filters. See the {@link com.sun.interview.FileListQuestion#isValueValid}
2040 * for an explanation.
2041 * </p>
19812042 *
19822043 * @param value Which semantics the interview should use.
19832044 * @see #SEMANTIC_PRE_32
19842045 * @see #SEMANTIC_VERSION_32
2046 * @see #SEMANTIC_VERSION_43
2047 * @see #SEMANTIC_VERSION_50
19852048 * @see #SEMANTIC_MAX_VERSION
19862049 * @since 3.2
19872050 * @see #getInterviewSemantics
23032366 trimPath(q);
23042367 predictPath(q);
23052368 //showPath(this, q, 0);
2369 verifyPredictPath();
23062370
23072371 if (!pathContains(currPath[currPath.length - 1]))
23082372 setCurrentQuestionFromPath(currPath);
23092373
23102374 notifyPathUpdated();
2375 }
2376
2377 private void verifyPredictPath(){
2378 for (Object o : getInterviews()){
2379 if (o instanceof Interview){
2380 Interview i = (Interview) o;
2381 if (i.path != null && i.currIndex >= i.path.size()){
2382 i.currIndex = i.path.size()-1;
2383 }
2384 }
2385 }
23112386 }
23122387
23132388 /* useful debug routine
26662741 public static final int SEMANTIC_VERSION_43 = 2;
26672742
26682743 /**
2744 *
2745 * Where necessary, the harness interview should behave as it did for the
2746 * 4.3 release. This does not control every single possible change in
2747 * behavior, but does control certain behaviors which may cause problems with
2748 * interview code written against an earlier version of the harness.
2749 *
2750 *
2751 * @see #setInterviewSemantics
2752 */
2753 public static final int SEMANTIC_VERSION_50 = 3;
2754
2755 /**
26692756 * The highest version number currently in use. Note that the compiler
26702757 * will probably inline this during compilation, so you will be locked at
26712758 * the version which you compile against. This is probably a useful
26722759 * behavior in this case.
26732760 * @see #setInterviewSemantics
26742761 */
2675 public static final int SEMANTIC_MAX_VERSION = 2;
2762 public static final int SEMANTIC_MAX_VERSION = 3;
26762763
26772764 static class Path {
26782765 void addQuestion(Question q) {
2525 */
2626 package com.sun.interview;
2727
28 import com.sun.javatest.tool.jthelp.HelpID;
29 import com.sun.javatest.tool.jthelp.HelpSet;
30
2831 import java.io.File;
2932 import java.net.MalformedURLException;
3033 import java.net.URL;
3134 import java.net.URLClassLoader;
32 import java.util.ArrayList;
33 import java.util.Enumeration;
34 import java.util.Iterator;
35 import java.util.List;
36 import java.util.ResourceBundle;
37 import javax.help.HelpSet;
38 import javax.help.HelpSetException;
39 import javax.help.Map.ID;
35 import java.util.*;
4036
4137 /**
4238 * Implementation of the HelpSetFactory interface which is aware of javax.help
5248 }
5349
5450 public Object createHelpSetObject(String name, Class c) throws Interview.Fault {
55 try {
56 ClassLoader cl = c.getClassLoader();
57 String hsn;
58 if (name.startsWith("/")) {
59 hsn = name.substring(1); // strip off leading /
60 } else {
61 String cn = c.getName();
62 String pn = cn.substring(0, cn.lastIndexOf('.'));
63 hsn = pn.replace('.', '/') + "/" + name;
64 }
65 URL u = HelpSet.findHelpSet(cl, hsn);
66 if (u == null) {
67 throw new HelpNotFoundFault(i18n, "interview.cantFindHelp", hsn);
68 }
69 return new HelpSet(cl, u);
70 } catch (HelpSetException e) {
71 throw new BadHelpFault(i18n, "interview.badHelp", e);
51 ClassLoader cl = c.getClassLoader();
52 String hsn;
53 String pref = "";
54 if (name.startsWith("/")) {
55 hsn = name.substring(1); // strip off leading /
56 pref = hsn.substring(0, hsn.lastIndexOf("/")+1);
57 } else {
58 String cn = c.getName();
59 String pn = cn.substring(0, cn.lastIndexOf('.'));
60 hsn = pn.replace('.', '/') + "/" + name;
61 pref = hsn.substring(0, hsn.indexOf(name));
7262 }
63 URL u = HelpSet.findHelpSet(cl, hsn);
64 if (u == null) {
65 throw new HelpNotFoundFault(i18n, "interview.cantFindHelp", hsn);
66 }
67 return new HelpSet(cl, u, pref);
7368 }
7469
7570 public Object createHelpSetObject(String name, File file) throws Interview.Fault {
8378 }
8479 HelpSet helpset = new HelpSet(cl, url);
8580 return helpset;
86 } catch (HelpSetException helpsetexception) {
87 throw new BadHelpFault(i18n, "interview.badHelp", helpsetexception);
8881 } catch (MalformedURLException e) {
8982 throw new HelpNotFoundFault(i18n, "interview.cantFindHelp", file.getPath());
9083 }
9386 public Object createHelpID(Object hsObject, String target) {
9487 if (hsObject != null) {
9588 HelpSet hs = (HelpSet) hsObject;
96 javax.help.Map m = hs.getCombinedMap();
97 if (m.isValidID(target, hs)) {
98 return ID.create(target, hs);
89 HashMap m = hs.getCombinedMap();
90 if (m != null && !m.isEmpty()) {
91 return HelpID.create(target, hs);
9992 }
10093 }
10194
121114 List<HelpSet> helpSetsToRemove = new ArrayList<HelpSet>();
122115
123116 // transfer help sets old to new
124 for (Enumeration e = oldHelpSet.getHelpSets(); e.hasMoreElements(); ) {
125 HelpSet entry = (HelpSet) (e.nextElement());
117 for (HelpSet entry : oldHelpSet.getHelpSets()) {
126118 helpSetsToRemove.add(entry);
127119 newHelpSet.add(entry);
128120 } // for
176168 * This exception is to report problems found while opening a JavaHelp help set.
177169 */
178170 public static class BadHelpFault extends Interview.Fault {
179 BadHelpFault(ResourceBundle i18n, String s, HelpSetException e) {
171 BadHelpFault(ResourceBundle i18n, String s, Exception e) {
180172 super(i18n, s, e.getMessage());
181 this.exc = e;
182173 }
183
184 /**
185 * The underlying JavaHelp exception.
186 */
187 public final HelpSetException exc;
188174 }
189175
190176 }
757757 */
758758 public String getGroupDisplayName(String group) {
759759 ResourceBundle b = interview.getResourceBundle();
760 presentationKeys = new HashMap();
761760 String rn = tag + "." + group + ".group";
762761
763762 try {
808807 if (value == null || value.getProperty(key) == null)
809808 throw new IllegalArgumentException("No such key: " + key);
810809
810 if (c instanceof BooleanConstraints) {
811 if (value.getProperty(key) == null || value.getProperty(key).isEmpty()) {
812 if (defaultValue.getProperty(key) != null && !defaultValue.getProperty(key).isEmpty()) {
813 value.put(key, defaultValue.getProperty(key));
814 }
815 else{
816 if (((BooleanConstraints) c).isYesNo()){
817 value.put(key, BooleanConstraints.NO);
818 }
819 else{
820 value.put(key, BooleanConstraints.FALSE);
821 }
822 }
823 }
824 }
811825 constraints.put(key, c);
812826 }
813827
819833 */
820834 public String getConstraintKeyFromRow(Object[] values) {
821835 if (values != null && values.length > 0 )
822 return values[0].toString();
836 return getKeyPropertyName(values[0].toString());
823837 else
824838 return "";
839 }
840
841 /**
842 * Get the property name for displayed key value in the table
843 * @param key value of the key in the table
844 * @return key or the property name for the key
845 */
846 public String getKeyPropertyName(String key){
847 if (presentationKeys != null){
848 for (Object keyProperty : presentationKeys.keySet()){
849 if (key.equals(presentationKeys.get(keyProperty))){
850 return (String) keyProperty;
851 }
852 }
853 }
854
855 return key;
856 }
857
858 /**
859 * Returns the localized key values to display
860 */
861 public HashMap getPresentationKeys(){
862 return presentationKeys;
825863 }
826864
827865 /**
14031441 * Constraints allowing a value to be either a boolean or Yes/No response.
14041442 */
14051443 public static class BooleanConstraints extends ValueConstraints {
1444
1445 public final static String YES = "Yes";
1446 public final static String NO = "No";
1447 public final static String TRUE = "True";
1448 public final static String FALSE = "False";
1449
14061450 public BooleanConstraints() {
14071451 super();
14081452 }
248248 }
249249
250250 /**
251 * Get the JavaHelp ID identifying the "more info" help for this
251 * Get the HelpID identifying the "more info" help for this
252252 * question, or null if none.
253253 *
254 * Normally, this method returns null and real work on JavaHelp ID is done
254 * Normally, this method returns null and real work on JavaHelp HelpID is done
255255 * by com.sun.interview.wizard.Help class, if wizard presents.
256256 * Subclasses might override this method to return not null value,
257257 * in this case returned value will be used. Returned object must be
258 * an instance of javax.help.Map.ID.
258 * an instance of HelpID.
259259 *
260 * @return the JavaHelp ID identifying the "more info" help for this
260 * @return the HelpID identifying the "more info" help for this
261261 * question, or null if none.
262262 */
263263 public Object getHelpID() {
267267 /**
268268 * Set HelpID object associated with the Question.
269269 *
270 * @param object Should be instance of javax.help.Map.ID
270 * @param object Should be instance of HelpID
271271 *
272272 */
273273 public void setHelpID(Object object) {
2525 */
2626 package com.sun.interview;
2727
28 import java.io.BufferedInputStream;
29 import java.io.BufferedWriter;
30 import java.io.File;
31 import java.io.FileInputStream;
32 import java.io.FileNotFoundException;
33 import java.io.FileWriter;
34 import java.io.InputStream;
35 import java.io.IOException;
36 import java.io.Writer;
28 import java.io.*;
29 import java.nio.charset.StandardCharsets;
3730 import java.text.MessageFormat;
3831 import java.util.Map;
3932 import java.util.Iterator;
210203 throw new BadArgs(i18n, "wp.noOutput");
211204 }
212205
213 Class ic = Class.forName(interviewClassName);
206 Class ic = Class.forName(interviewClassName, true, ClassLoader.getSystemClassLoader());
214207 Interview interview = (Interview)(ic.newInstance());
215208 Question[] questions;
216209
232225 }
233226
234227 try {
235 Writer out = new FileWriter(outFileName);
228 Writer out = new OutputStreamWriter(new FileOutputStream(outFileName), StandardCharsets.UTF_8);
236229 WizPrint wp = new WizPrint(interview, questions);
237230 wp.setShowTags(!path);
238231 wp.setShowResponses(path);
00 /*
11 * $Id$
22 *
3 * Copyright (c) 2002, 2009, Oracle and/or its affiliates. All rights reserved.
3 * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
44 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55 *
66 * This code is free software; you can redistribute it and/or modify it
6060 list.setBaseDirectory(q.getBaseDirectory());
6161 label.setLabelFor(list);
6262
63 FileFilter[] filters = q.getFilters();
63 FileFilter[] filters = q.getHintFilters();
6464 if (filters == null || filters.length == 0) {
6565 list.setFileSelectionMode(JFileChooser.FILES_ONLY);
6666 }
00 /*
11 * $Id$
22 *
3 * Copyright (c) 2002, 2009, Oracle and/or its affiliates. All rights reserved.
3 * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
44 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55 *
66 * This code is free software; you can redistribute it and/or modify it
3232 import javax.swing.JComponent;
3333 import javax.swing.JFileChooser;
3434
35 import com.sun.interview.DirectoryFileFilter;
3536 import com.sun.interview.ExtensionFileFilter;
3637 import com.sun.interview.FileFilter;
3738 import com.sun.interview.FileQuestion;
6970 strSuggs[i] = suggs[i].getPath();
7071 }
7172
72 final TypeInPanel p = new TypeInPanel("file",
73 String fileType = "file"; // default
74 if (isSelectingDir(q.getFilters())) {
75 // response will be a dir, select special directory text
76 fileType = "file.dir";
77 }
78
79 final TypeInPanel p = new TypeInPanel(fileType,
7380 q,
7481 0,
7582 strSuggs,
159166 return null;
160167 }
161168
169 /**
170 * Internal routine to help determine if we'll be selecting a dir or file.
171 * @return True if a dir (folder) will be the result.
172 */
173 private boolean isSelectingDir(FileFilter[] filters) {
174 if (filters == null || filters.length == 0) {
175 return false;
176 }
177
178 boolean allDirType = true;
179 for (FileFilter f: filters) {
180 allDirType = allDirType && (f instanceof DirectoryFileFilter);
181 }
182
183 return allDirType;
184 }
185
162186 private static final I18NResourceBundle i18n = I18NResourceBundle.getDefaultBundle();
163187 }
2828 import java.awt.BorderLayout;
2929 import java.awt.Dimension;
3030 import java.awt.Toolkit;
31 import javax.help.BadIDException;
32 import javax.help.HelpSet;
33 import javax.help.InvalidHelpSetContextException;
34 import javax.help.JHelpContentViewer;
35 import javax.help.Map.ID;
3631 import javax.accessibility.AccessibleContext;
3732 import javax.swing.JComponent;
3833 import javax.swing.event.AncestorEvent;
4237 import com.sun.interview.Help;
4338 import com.sun.interview.Interview;
4439 import com.sun.interview.Question;
40 import com.sun.javatest.tool.jthelp.HelpSet;
41 import com.sun.javatest.tool.jthelp.HelpID;
42 import com.sun.javatest.tool.jthelp.JHelpContentViewer;
4543
4644 class InfoPanel extends JComponent
4745 {
6563 }
6664
6765 public void setCurrentID(Question q) {
68 try {
69 ID id = Help.getHelpID(q);
70 // uugh
71 if (id == null)
72 System.err.println("WARNING: no help for " + q.getKey());
73 else {
74 //System.err.println("IP: set help ID " + id);
75 viewer.setCurrentID(id);
76 //System.err.println("IP: currentURL " + viewer.getCurrentURL());
77 //System.err.println("IP: currentTitle " + viewer.getDocumentTitle());
78 }
79 }
80 catch (BadIDException e) {
66 HelpID helpId = Help.getHelpID(q);
67 // uugh
68 if (helpId == null)
8169 System.err.println("WARNING: no help for " + q.getKey());
82 }
83 catch (InvalidHelpSetContextException e) {
84 e.printStackTrace();
70 else {
71 //System.err.println("IP: set help HelpID " + helpId);
72 viewer.setCurrentID(helpId);
73 //System.err.println("IP: currentURL " + viewer.getCurrentURL());
74 //System.err.println("IP: currentTitle " + viewer.getDocumentTitle());
8575 }
8676 }
8777
00 /*
11 * $Id$
22 *
3 * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
3 * Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved.
44 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55 *
66 * This code is free software; you can redistribute it and/or modify it
2828 import java.awt.Component;
2929 import java.awt.Dimension;
3030 import java.awt.GridBagConstraints;
31 import java.awt.GridBagLayout;
3231 import java.awt.KeyboardFocusManager;
3332 import java.awt.event.ActionEvent;
3433 import java.awt.event.ActionListener;
3938
4039 import javax.swing.BorderFactory;
4140 import javax.swing.Box;
41 import javax.swing.BoxLayout;
4242 import javax.swing.JComponent;
4343 import javax.swing.JLabel;
4444 import javax.swing.JPanel;
5151
5252 import com.sun.interview.PropertiesQuestion;
5353 import com.sun.interview.Question;
54 import com.sun.javatest.tool.UIFactory;
55
5456 import java.util.Iterator;
5557 import java.util.Set;
5658 import javax.swing.CellEditor;
6567
6668 tables = new HashMap();
6769
68 panel = new JPanel(new GridBagLayout());
70 panel = new JPanel();
71 panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
6972 panel.setName("properties");
7073 panel.setFocusable(false);
7174
160163 if (model.getRowCount() == 0)
161164 return;
162165
163 GridBagConstraints c = new GridBagConstraints();
164 c.gridx = 0;
165 c.gridy = tables.size() * 4;
166 c.anchor = GridBagConstraints.PAGE_START;
167 c.weightx = 1.0;
168 c.fill = GridBagConstraints.BOTH;
169
170 if (c.gridy > 0) {
171 Component box = Box.createVerticalStrut(40);
166 if (tables.size() == 0) {
167 Component box = Box.createVerticalStrut(20);
172168 box.setFocusable(false);
173 c.weighty = 1.0;
174 panel.add(box, c);
175 c.weighty = 0.0;
169 panel.add(box);
176170 }
177171
178172 // null group is for ungrouped properties
181175 label.setName(question.getGroupDisplayName(group));
182176 //label.setDisplayedMnemonic(i18n.getString("int.sldr.mne").charAt(0));
183177 //label.setToolTipText(i18n.getString("int.sldr.tip"));
184 panel.add(label, c);
178 panel.add(label);
179 Component box = Box.createVerticalStrut(5);
180 box.setFocusable(false);
181 panel.add(box);
185182 }
186183 /*
187184 else {
191188 }
192189 */
193190
194 if (renderer == null)
191 if (renderer == null ||
192 renderer.getQuestion() != question) {
195193 renderer = new RenderingUtilities.PropCellRenderer(question);
194 }
196195
197196 JTable table = createTable(model);
198197 table.setBorder(BorderFactory.createEtchedBorder());
199198 table.setRowSelectionAllowed(false);
200199 table.setColumnSelectionAllowed(false);
201200 table.getTableHeader().setReorderingAllowed(false);
201 table.setBackground(UIFactory.Colors.WINDOW_BACKGROUND.getValue());
202202
203203 // setup key column
204204 for (int i = 0; i < table.getColumnCount(); i++) {
211211 tc.setResizable(true);
212212 }
213213
214 c.gridy++;
215214 //panel.add(new JScrollPane(table), c);
216 panel.add(table.getTableHeader(), c);
217
218 c.gridy++;
219 panel.add(table, c);
215 panel.add(table.getTableHeader());
216
217 panel.add(table);
218
219 Component box = Box.createVerticalStrut(20);
220 box.setFocusable(false);
221 panel.add(box);
220222
221223 tables.put(group, table);
222224 }
261263 super(model);
262264 setIntercellSpacing(new Dimension(4,4));
263265 setRowHeight((int)(getRowHeight() * 1.5));
266 setFocusable(false);
264267 }
265268
266269 public boolean isCellEditable(int row, int column) {
268271 return false;
269272
270273 if ( column == 1 &&
271 question.isReadOnlyValue((String)(getValueAt(row, 0))) )
274 question.isReadOnlyValue(question.getKeyPropertyName((String)getValueAt(row, 0))) )
272275 return false;
273276
274277 return true;
317320
318321 d = d2;
319322 }
323
324 for (int i = 0; i < d.length; i++){
325 if (q.getPresentationKeys() != null && q.getPresentationKeys().get(d[i][0]) != null){
326 d[i][0] = (String) q.getPresentationKeys().get(d[i][0]);
327 }
328 }
329
320330 setDataVector(d, headers);
321331 }
322332
339349
340350 public void setValueAt(Object o, int row, int col) {
341351 if (col == 1) {
342 String key = (String)(getValueAt(row, 0));
352 String key = q.getKeyPropertyName((String)(getValueAt(row, 0)));
343353
344354 q.updateProperty(key, (String)o);
345355 fireEditedEvent(this, editedListener);
357367
358368 protected Runnable valueSaver;
359369 protected HashMap tables;
360 protected TableCellRenderer renderer;
370 protected RenderingUtilities.PropCellRenderer renderer;
361371 protected PropertiesQuestion question;
362372 protected JPanel panel;
363373
00 /*
11 * $Id$
22 *
3 * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
3 * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
44 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55 *
66 * This code is free software; you can redistribute it and/or modify it
2929 import java.awt.Component;
3030 import java.awt.GridBagConstraints;
3131 import java.awt.GridBagLayout;
32 import java.awt.Dimension;
3233 import java.awt.event.ActionEvent;
3334 import java.awt.event.ActionListener;
3435 import java.io.File;
4142 import javax.swing.JPanel;
4243 import javax.swing.JTable;
4344 import javax.swing.JTextField;
45 import javax.swing.JCheckBox;
46 import javax.swing.JRadioButton;
47 import javax.swing.ButtonGroup;
48 import javax.swing.Box;
49 import javax.swing.BoxLayout;
4450 import javax.swing.event.CellEditorListener;
4551 import javax.swing.table.DefaultTableCellRenderer;
4652 import javax.swing.table.TableCellEditor;
53 import javax.swing.border.LineBorder;
4754
4855 import com.sun.interview.ExtensionFileFilter;
4956 import com.sun.interview.FileFilter;
5461 import com.sun.interview.PropertiesQuestion.IntConstraints;
5562 import com.sun.interview.PropertiesQuestion.StringConstraints;
5663 import com.sun.interview.PropertiesQuestion.ValueConstraints;
64 import com.sun.javatest.tool.UIFactory;
5765
5866 /**
5967 * Utilities for rendering questions.
7179 this.q = q;
7280 }
7381
74
7582 public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) {
7683 assignDelegate(table, row, column);
7784 return delegate.getTableCellEditorComponent(table, value, isSelected, row, column);
180187
181188 JTextField tf = (JTextField)getComponent();
182189 tf.setText(value.toString());
190 tf.setFocusable(false);
183191
184192 if (vc instanceof IntConstraints) {
185193 IntConstraints ic = (IntConstraints)vc;
227235 this.rules = rules;
228236 }
229237
238 @Override
239 public Object getCellEditorValue() {
240 if (rules != null){
241 if (rules instanceof BooleanConstraints){
242 if (((BooleanConstraints)rules).isYesNo()) {
243 return yesNoBox.getValue();
244 }
245 else {
246 return jCheckBox.isSelected() ? BooleanConstraints.TRUE : BooleanConstraints.FALSE;
247 }
248 }
249 }
250 return super.getCellEditorValue();
251 }
252
230253 @Override
231254 public Component getTableCellEditorComponent(final JTable table, Object value,
232255 boolean isSelected, final int row, final int column) {
239262 String key = question.getConstraintKeyFromRow(values);
240263
241264 rules = question.getConstraints(key);
265
266 if (rules instanceof BooleanConstraints){
267
268 if (((BooleanConstraints) rules).isYesNo()) {
269 if (yesNoBox == null){
270 yesNoBox = new YesNoBox();
271 }
272 yesNoBox.selectYes(BooleanConstraints.YES.equals(value));
273 return yesNoBox;
274 } else {
275 if (jCheckBox == null) {
276 jCheckBox = new JCheckBox();
277 }
278 jCheckBox.setSelected(BooleanConstraints.TRUE.equals(value));
279 return jCheckBox;
280 }
281
282 }
242283
243284 final JComboBox cb = ((JComboBox)getComponent());
244285 cb.setEditable(true);
250291
251292 String valid = question.isValueValid(key);
252293 if (valid != null) {
253 cb.setBackground(Color.RED);
254294 cb.setToolTipText(valid);
255295 }
256296 else
382422 }
383423 else {}
384424 }
385 else if (rules instanceof BooleanConstraints) {
386 BooleanConstraints bolRules = (BooleanConstraints)rules;
387 cb.setEditable(false);
388 if (bolRules.isYesNo()) {
389 configureSet(cb, new String[] {"Yes", "No"}, true,
390 bolRules.isUnsetAllowed());
391 }
392 else {
393 configureSet(cb, new String[] {"True", "False"}, true,
394 bolRules.isUnsetAllowed());
395 }
396 }
397425 else if (rules instanceof FilenameConstraints) {
398426 FilenameConstraints strRules = (FilenameConstraints)rules;
399427 cb.setEditable(true);
455483
456484 private PropertiesQuestion question;
457485 private ValueConstraints rules;
486 private JCheckBox jCheckBox;
487 private YesNoBox yesNoBox;
458488 } // editor cell
459489
460490
468498
469499 public Component getTableCellRendererComponent(JTable table, Object value,
470500 boolean isSelected, boolean hasFocus, int row, int column) {
471 Component c = super.getTableCellRendererComponent(table, value, isSelected,
472 hasFocus, row, column);
473
501
502 if (column == 1){
503 String keyName = q.getKeyPropertyName((String)table.getValueAt(row, 0));
504 PropertiesQuestion.ValueConstraints constraints = q.getConstraints(keyName);
505 if (constraints instanceof BooleanConstraints){
506 if (((BooleanConstraints) constraints).isYesNo()) {
507 yesNoBox = new YesNoBox();
508 yesNoBox.selectYes(BooleanConstraints.YES.equals(value));
509 return yesNoBox;
510
511 }
512 else{
513 jCheckBox = new JCheckBox();
514 jCheckBox.setSelected(BooleanConstraints.TRUE.equals(value));
515 return jCheckBox;
516 }
517 }
518 else{
519 jComboBox = new JComboBox();
520 jComboBox.addItem(value);
521 jComboBox.setEditable(true);
522 if ( q.isValueValid((String)(q.getKeyPropertyName((String)table.getValueAt(row, 0)))) != null ) {
523 jComboBox.setBorder(new LineBorder(Color.RED, 2));
524 }
525 return jComboBox;
526 }
527 }
528 else {
529 Component c = super.getTableCellRendererComponent(table, value, isSelected,
530 hasFocus, row, column);
531 c.setBackground(UIFactory.Colors.WINDOW_BACKGROUND.getValue());
532 ((DefaultTableCellRenderer)c).setHorizontalAlignment(DefaultTableCellRenderer.RIGHT);
533 return c;
534 }
474535 // XXX needs i18n and 508
475 if ( q.isValueValid((String)(table.getValueAt(row, 0))) != null )
476 c.setBackground(Color.RED);
477 else
478 c.setBackground(Color.WHITE);
479
480 return c;
536 }
537
538 public PropertiesQuestion getQuestion() {
539 return q;
481540 }
482541
483542 PropertiesQuestion q;
543 JCheckBox jCheckBox;
544 YesNoBox yesNoBox;
545 JComboBox jComboBox;
484546 } // non-editing cell
547
548 static class YesNoBox extends JPanel{
549
550 private JRadioButton yesButton;
551 private JRadioButton noButton;
552 private ButtonGroup bgroup;
553
554 public YesNoBox(){
555 super();
556 setLayout(new BoxLayout(this, BoxLayout.X_AXIS));
557
558 bgroup = new ButtonGroup();
559 yesButton = new JRadioButton(BooleanConstraints.YES);
560 noButton = new JRadioButton(BooleanConstraints.NO);
561 bgroup.add(yesButton);
562 bgroup.add(noButton);
563
564 add(yesButton);
565 add(Box.createRigidArea(new Dimension(5,0)));
566 add(noButton);
567 }
568
569 public String getValue(){
570 if (yesButton.isSelected()){
571 return BooleanConstraints.YES;
572 }
573 return BooleanConstraints.NO;
574 }
575
576 public void selectYes(boolean value){
577 yesButton.setSelected(value);
578 noButton.setSelected(!value);
579 }
580
581 }
485582
486583 private static final I18NResourceBundle i18n = I18NResourceBundle.getDefaultBundle();
487584 }
3636 import java.awt.event.ActionListener;
3737 import java.util.Hashtable;
3838 import javax.accessibility.AccessibleContext;
39 import javax.help.HelpBroker;
4039 import javax.swing.BorderFactory;
4140 import javax.swing.DefaultListCellRenderer;
4241 import javax.swing.JButton;
5251 import javax.swing.SwingUtilities;
5352 import com.sun.interview.Interview;
5453 import com.sun.interview.Question;
54 import com.sun.javatest.tool.jthelp.HelpBroker;
5555
5656 class SearchDialog extends JDialog
5757 {
165165 contentPane.add(btns, BorderLayout.SOUTH);
166166
167167 if (helpBroker != null)
168 helpBroker.enableHelpKey(getRootPane(), helpPrefix + "search.csh", null);
168 helpBroker.enableHelpKey(getRootPane(), helpPrefix + "search.csh");
169169
170170 pack();
171171 setLocationRelativeTo(parent);
317317 else if (cmd.equals(CLOSE))
318318 setVisible(false);
319319 else if (cmd.equals(HELP)) {
320 helpBroker.setCurrentID(helpPrefix + "search.csh");
321 helpBroker.setDisplayed(true);
320 helpBroker.displayCurrentID(helpPrefix + "search.csh");
322321 }
323322 }
324323 };
3131 import java.awt.event.ActionEvent;
3232 import java.awt.event.ActionListener;
3333 import java.util.Map;
34 import javax.help.HelpBroker;
3534 import javax.accessibility.AccessibleContext;
3635 import javax.swing.AbstractAction;
3736 import javax.swing.BorderFactory;
4645 import com.sun.interview.FinalQuestion;
4746 import com.sun.interview.Interview;
4847 import com.sun.interview.Question;
48 import com.sun.javatest.tool.jthelp.HelpBroker;
4949
5050 /**
5151 * A widget comprising the basic panels for a wizard: an index for the
3636 import java.awt.event.ActionListener;
3737 import java.awt.event.WindowAdapter;
3838 import java.awt.event.WindowEvent;
39 import java.io.BufferedInputStream;
40 import java.io.BufferedOutputStream;
41 import java.io.File;
42 import java.io.FileInputStream;
43 import java.io.FileNotFoundException;
44 import java.io.FileOutputStream;
45 import java.io.FileWriter;
46 import java.io.IOException;
47 import java.io.InputStream;
48 import java.io.OutputStream;
49 import java.io.Writer;
39 import java.io.*;
5040 import java.lang.reflect.InvocationTargetException;
5141 import java.lang.reflect.Method;
5242 import java.net.URL;
43 import java.nio.charset.StandardCharsets;
5344 import java.util.Properties;
54 import javax.help.HelpBroker;
55 import javax.help.HelpSet;
5645 import javax.swing.BorderFactory;
5746 import javax.swing.Box;
5847 import javax.swing.Icon;
8372 import com.sun.interview.Interview;
8473 import com.sun.interview.Question;
8574 import com.sun.interview.WizPrint;
75 import com.sun.javatest.tool.jthelp.HelpBroker;
76 import com.sun.javatest.tool.jthelp.HelpSet;
77 import com.sun.javatest.tool.jthelp.JTHelpBroker;
8678
8779 /**
8880 * A wizard to present an {@link Interview interview} consisting of
120112 try {
121113 UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
122114
123 Class ic = (Class.forName(args[0]));
115 Class ic = (Class.forName(args[0], true, ClassLoader.getSystemClassLoader()));
124116 Interview i = (Interview)(ic.newInstance());
125117 Wizard w = new Wizard(i);
126118 w.showInFrame(true);
450442 helpHelpSet = infoPanel.getHelpSet();
451443
452444 if (helpHelpBroker == null && helpHelpSet != null)
453 helpHelpBroker = helpHelpSet.createHelpBroker();
445 helpHelpBroker = new JTHelpBroker();
454446
455447 if (helpHelpBroker != null && helpHelpSet != null)
456 helpHelpBroker.enableHelpKey(main, helpHelpPrefix + "window.csh", helpHelpSet);
448 helpHelpBroker.enableHelpKey(main, helpHelpPrefix + "window.csh");
457449 if (infoPanel == null)
458450 main.add(body);
459451 else
642634 if (f.exists() && !okToOverwrite(f))
643635 return;
644636 try {
645 Writer out = new FileWriter(f);
637 Writer out = new OutputStreamWriter(new FileOutputStream(f), StandardCharsets.UTF_8);
646638 WizPrint w = new WizPrint(interview, interview.getPath());
647639 w.setShowResponses(true);
648640 w.write(out);
683675 * Handle the "help" action
684676 */
685677 private void performHelp() {
686 helpHelpBroker.setCurrentID(helpHelpPrefix + "intro.csh");
687 helpHelpBroker.setDisplayed(true);
678 helpHelpBroker.displayCurrentID(helpHelpPrefix + "intro.csh");
688679 }
689680
690681 /**
11 # $Id$
22 #
33 #
4 # Copyright (c) 2001, 2009, Oracle and/or its affiliates. All rights reserved.
4 # Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
55 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
66 #
77 # This code is free software; you can redistribute it and/or modify it
6464 file.lbl=File:
6565 file.mne=F
6666 file.tip=Your response to the current question
67 file.dir.lbl=Dir:
68 file.dir.mne=D
69 file.dir.tip=Your response to the current question
70 file.dir.chc.ed.desc=Your response to the current question
71 file.dir.chc.ed.name=Response
6772
6873 find.case.ckb=Consider case
6974 find.case.mne=D
2525 */
2626 package com.sun.javatest;
2727
28 import java.io.BufferedInputStream;
29 import java.io.BufferedWriter;
30 import java.io.File;
31 import java.io.FileInputStream;
32 import java.io.FileNotFoundException;
33 import java.io.FileWriter;
34 import java.io.InputStream;
35 import java.io.IOException;
36 import java.io.PrintStream;
37 import java.io.PrintWriter;
28 import java.io.*;
3829 import java.net.URL;
3930 import java.net.URLClassLoader;
31 import java.nio.charset.StandardCharsets;
4032 import java.text.MessageFormat;
4133 import java.util.Properties;
4234 import java.util.ResourceBundle;
536528 wp.setShowResponses(true);
537529 wp.setShowResponseTypes(false);
538530 wp.setShowTags(true);
539 BufferedWriter out = new BufferedWriter(new FileWriter(logFile));
531 BufferedWriter out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(logFile), StandardCharsets.UTF_8));
540532 wp.write(out);
541533 }
542534
2525 */
2626 package com.sun.javatest;
2727
28 import java.io.BufferedInputStream;
29 import java.io.BufferedOutputStream;
30 import java.io.BufferedReader;
31 import java.io.BufferedWriter;
32 import java.io.File;
33 import java.io.FileInputStream;
34 import java.io.FileNotFoundException;
35 import java.io.FileOutputStream;
36 import java.io.FileReader;
37 import java.io.FileWriter;
38 import java.io.IOException;
39 import java.io.InputStream;
40 import java.io.OutputStream;
41 import java.io.PrintStream;
42 import java.io.Reader;
43 import java.io.StringReader;
44 import java.io.Writer;
28 import java.io.*;
29 import java.nio.charset.StandardCharsets;
4530 import java.util.HashSet;
4631 import java.util.Set;
4732
268253 }
269254
270255 if (src.getName().endsWith(".html")) {
271 in = new BufferedReader(new FileReader(src));
256 in = new BufferedReader(new InputStreamReader(new FileInputStream(src), StandardCharsets.UTF_8));
272257 if (dest.equals(src)) {
273258 int size = (int)(src.length());
274259 char data[] = new char[size];
279264 String s = new String(data, 0, data.length);
280265 in = new StringReader(s);
281266 }
282 out = new BufferedWriter(new FileWriter(dest));
267 out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(dest), StandardCharsets.UTF_8));
283268 currFile = src;
284269 line = 1;
285270 edit(in, out);
00 /*
11 * $Id$
22 *
3 * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
3 * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
44 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55 *
66 * This code is free software; you can redistribute it and/or modify it
2525 */
2626 package com.sun.javatest;
2727
28 import java.io.BufferedReader;
29 import java.io.BufferedWriter;
30 import java.io.File;
31 import java.io.FileNotFoundException;
32 import java.io.FileReader;
33 import java.io.FileWriter;
34 import java.io.IOException;
35 import java.io.Reader;
36 import java.io.StringReader;
37 import java.io.Writer;
28 import java.io.*;
29 import java.nio.charset.StandardCharsets;
3830 import java.util.Arrays;
3931 import java.util.HashMap;
4032 import java.util.Iterator;
6557 /**
6658 * Test if a file appears to be for an exclude list, by checking the extension.
6759 * @param f The file to be tested.
68 * @return <code>true</code if the file appears to be an exclude list.
60 * @return <code>true</code> if the file appears to be an exclude list.
6961 */
7062 public static boolean isExcludeFile(File f) {
7163 return f.getPath().endsWith(EXCLUDEFILE_EXTN);
10698 {
10799 setStrictModeEnabled(strict);
108100 if (f != null) {
109 FileReader fr = new FileReader(f);
110 BufferedReader in = new BufferedReader(fr);
101 BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(f), StandardCharsets.UTF_8));
111102 try {
112103 Parser p = new Parser(in);
113104 Entry e;
118109 }
119110 finally {
120111 in.close();
121 fr.close();
122112 }
123113 }
124114 }
612602 maxPlatformWidth = Math.max(platformsToString(entry).length(), maxPlatformWidth);
613603 }
614604
615 BufferedWriter out = new BufferedWriter(new FileWriter(f));
605 BufferedWriter out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(f), StandardCharsets.UTF_8));
616606 out.write("# Exclude List");
617607 out.newLine();
618608 out.write("# SCCS %" + 'W' + "% %" + 'E' + "%"); // TAKE CARE WITH SCCS HEADERS
2525 */
2626 package com.sun.javatest;
2727
28 import java.io.BufferedReader;
29 import java.io.File;
30 import java.io.FileNotFoundException;
31 import java.io.FileReader;
32 import java.io.IOException;
33 import java.io.Reader;
28 import java.io.*;
29 import java.nio.charset.StandardCharsets;
3430 import java.util.Iterator;
3531
3632 import com.sun.javatest.util.I18NResourceBundle;
7369 throws FileNotFoundException, IOException
7470 {
7571 Properties p = new Properties();
76 Reader in = new BufferedReader(new FileReader(file));
72 Reader in = new BufferedReader(new InputStreamReader(new FileInputStream(file), StandardCharsets.UTF_8));
7773 p.load(in);
7874 in.close();
7975
106102 * <dd>Specify the test suite
107103 * <dt><code>-keywords</code> <i>expr</i>
108104 * <dd>Specify a keyword expression, used to filter the tests to be run.
109 * <dt><code>-status</code> <i>status-list></i>
105 * <dt><code>-status</code> <i>status-list</i>
110106 * <dd>Specify the status values used to select tests at runtime.
111107 * <i>status-list</i> should be a comma-separated list of words from
112108 * the following list:
00 /*
11 * $Id$
22 *
3 * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
3 * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
44 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55 *
66 * This code is free software; you can redistribute it and/or modify it
3737 import com.sun.javatest.util.DynamicArray;
3838 import com.sun.javatest.util.I18NResourceBundle;
3939 import com.sun.javatest.util.ReadAheadIterator;
40 import java.util.HashMap;
41 import java.util.Set;
4042
4143 /**
4244 * The object responsible for coordinating the execution of a test run.
590592 throw new Fault(i18n, "harness.alreadyRunning");
591593
592594 worker = new Thread() {
595 @Override
593596 public void run() {
594597 boolean ok = false;
595598 try {
689692 env.putUrlAndFile("testSuiteRootDir", testSuite.getRootDir());
690693 }
691694
695
696 // notify the test suite we are starting
697 testSuite.starting(this);
698 notifier.startingTestRun(params);
699
692700 testIter = createTreeIterator();
693 // // get items required to select the tests to be run
694 // String[] tests = params.getTests();
695 // TestFilter[] filters = params.getFilters();
696 //
697 // resultTable.waitUntilReady();
698 //
699 // // get the appropriate iterator from TRT
700 // if (tests == null || tests.length == 0)
701 // testIter = resultTable.getIterator(filters);
702 // else {
703 // try {
704 // // CLEANUP REQUIRED: validation only occurs on Files, not Strings
705 // // resultTable.getIterator should validate strings too
706 // File[] files = new File[tests.length];
707 // for (int i = 0; i < tests.length; i++)
708 // files[i] = new File(tests[i]);
709 // testIter = resultTable.getIterator(files, filters);
710 // }
711 // catch (TestResultTable.Fault err) {
712 // throw new Harness.Fault(i18n, "harness.badInitFiles",
713 // err.getMessage());
714 // }
715 // }
716 // // attach a read ahead iterator
717 // // use testIter to get specialized info, use raTestIter to get tests
718 // raTestIter = new ReadAheadIterator(testIter, readAheadMode, DEFAULT_READ_AHEAD);
719701 raTestIter = getTestsIterator(testIter);
720702
721703 // autostopThreshold is currently defined by a system property,
723705 if (autostopThreshold > 0)
724706 addObserver(new Autostop(autostopThreshold));
725707
726 // notify the test suite we are starting
727 testSuite.starting(this);
728
729 notifier.startingTestRun(params);
730
731708 TestRunner r = testSuite.createTestRunner();
732
733709 r.setWorkDirectory(workDir);
734710 r.setBackupPolicy(backupPolicy);
735711 r.setEnvironment(env);
785761 TestFilter[] filters = params.getFilters();
786762 // no tests are in the error, pass, fail categories -> none selected
787763 notifyError(i18n, "harness.noTests",
788 formatFilterList(listFilterNames(filters)));
764 new Object[] {
765 formatFilterList(listFilterNames(filters)),
766 testIter.getRejectCount(),
767 formatFilterStats(params.getTests(), testIter)
768 });
789769 ok = false;
790770 }
791771 else {
891871 return sb.toString();
892872 }
893873
874 private static String formatFilterStats(final String[] tests,
875 final TreeIterator iter) {
876 TRT_Iterator treeit = null;
877
878 if (iter == null || !(iter instanceof TRT_Iterator)) {
879 return "";
880 }
881 else {
882 treeit = ((TRT_Iterator)iter);
883 }
884
885 TestFilter[] filters = treeit.getFilters();
886 HashMap<TestFilter, ArrayList<TestDescription>> map = treeit.getFilterStats();
887 Set<TestFilter> keyset = map.keySet();
888 StringBuilder sb = new StringBuilder();
889
890 // special case for Tests to Run because there is no associated
891 // TestFilter
892 if (tests != null && tests.length > 0) {
893 sb.append("- ");
894 sb.append("Tests to Run (" + tests.length + " path(s) specified)");
895 sb.append("\n");
896 }
897
898 for (TestFilter f: keyset) {
899 ArrayList<TestDescription> tds = map.get(f);
900 // this works, should consider switching to something which has more
901 // rendering control - RTF
902 sb.append("- ");
903 sb.append(tds.size());
904 sb.append(" due to "); // could use upgrade for readability
905 sb.append(f.getName());
906 sb.append("\n");
907 sb.append(" "); // indentation
908 sb.append(f.getReason());
909 sb.append("\n");
910 } // for
911
912 return sb.toString();
913 }
914
894915
895916 private void notifyError(I18NResourceBundle i18n, String key) {
896917 notifyLocalizedError(i18n.getString(key));
00 /*
11 * $Id$
22 *
3 * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
3 * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
44 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55 *
66 * This code is free software; you can redistribute it and/or modify it
747747 Vector v = new Vector();
748748
749749 TestFilter excludeFilter = getExcludeListFilter();
750 if (excludeFilter != null)
750 if (excludeFilter != null) {
751751 v.addElement(excludeFilter);
752 }
752753
753754 TestFilter keywordFilter = getKeywordsFilter();
754 if (keywordFilter != null)
755 if (keywordFilter != null) {
755756 v.addElement(keywordFilter);
757 }
756758
757759 TestFilter statusFilter = getPriorStatusFilter();
758 if (statusFilter != null)
760 if (statusFilter != null) {
759761 v.addElement(statusFilter);
760
761 TestFilter testSuiteFilter = getRelevantTestFilter();
762 if (testSuiteFilter != null)
763 v.addElement(testSuiteFilter);
764
765 if (v.size() == 0)
762 }
763
764 TestFilter testSuiteFilter = null;
765 try {
766 testSuiteFilter = getRelevantTestFilter();
767 }
768 catch (Exception e) {
769 testSuiteFilter = null;
770 }
771 if (testSuiteFilter != null) {
772 v.addElement(testSuiteFilter);
773 }
774
775 if (v.size() == 0) {
766776 return null;
767 else if (equal(v, cachedTestFilters))
777 }
778 else if (equal(v, cachedTestFilters)) {
768779 return cachedTestFilters;
780 }
769781 else {
770782 TestFilter[] filters = new TestFilter[v.size()];
771783 v.copyInto(filters);
4646 import java.io.PrintWriter;
4747 import java.io.StringReader;
4848 import java.io.StringWriter;
49 import java.nio.charset.StandardCharsets;
4950 import java.util.HashMap;
5051 import java.util.HashSet;
5152 import java.util.Iterator;
134135 processQuestionFromSet(templateData, allQuestionMap, actual.keySet(), actual);
135136
136137 if (pm.hasConflicts() || pm.hasUpdates()) {
137 psConflicts = new PrintStream(new FileOutputStream(pm.getConflictReportFile()));
138 psUpdates = new PrintStream(new FileOutputStream(pm.getUpdatesReportFile()));
138 psConflicts = new PrintStream(new FileOutputStream(pm.getConflictReportFile()), true, StandardCharsets.UTF_8.name());
139 psUpdates = new PrintStream(new FileOutputStream(pm.getUpdatesReportFile()), true, StandardCharsets.UTF_8.name());
139140 pm.makeConflictsReport(psConflicts);
140141 pm.makeUpdatesReport(psUpdates);
141142 updateAll();
740741 if (is == null) {
741742 return "";
742743 }
743 r = new BufferedReader(new InputStreamReader(is));
744 r = new BufferedReader(new InputStreamReader(is, StandardCharsets.UTF_8));
744745
745746 String line;
746747 while( (line = r.readLine()) != null )
00 /*
11 * $Id$
22 *
3 * Copyright (c) 1996, 2009, Oracle and/or its affiliates. All rights reserved.
3 * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
44 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55 *
66 * This code is free software; you can redistribute it and/or modify it
8383 * @param text if the type is one of "all of" or "any of", text should
8484 * be a white-space separated list of keywords; if type is "expr",
8585 * text should be a boolean valued expression formed from
86 * keywords, '&' (and), '|' (or), '!' (not) and '(' ')' (parentheses).
86 * keywords, '&amp;' (and), '|' (or), '!' (not) and '(' ')' (parentheses).
8787 * @return A Keywords object for the specified type and text.
8888 * @throws Keywords.Fault if there are errors in the arguments.
8989 */
9797 * @param text if the type is one of "all of" or "any of", text should
9898 * be a white-space separated list of keywords; if type is "expr",
9999 * text should be a boolean valued expression formed from
100 * keywords, '&' (and), '|' (or), '!' (not) and '(' ')' (parentheses).
100 * keywords, '&amp;' (and), '|' (or), '!' (not) and '(' ')' (parentheses).
101101 * @param validKeywords a set of valid keywords for this test suite,
102102 * or null.
103103 * If not null, all the keywords in <i>text</i> must be in this set.
109109 if (text == null) {
110110 text = "";
111111 }
112 if (type == null || type.equals("ignore"))
112
113 Keywords result = null;
114 if (type == null || type.equals("ignore")) {
113115 return null;
114 else if (type.equals(ALL_OF))
115 return new AllKeywords(StringArray.split(text), lowerCaseValidKeywords);
116 else if (type.equals(ANY_OF))
117 return new AnyKeywords(StringArray.split(text), lowerCaseValidKeywords);
116 } else if (type.equals(ALL_OF)) {
117 result = new AllKeywords(StringArray.split(text), lowerCaseValidKeywords);
118 result.setSummary(result.toString());
119 return result;
120 }
121 else if (type.equals(ANY_OF)) {
122 result = new AnyKeywords(StringArray.split(text), lowerCaseValidKeywords);
123 result.setSummary(result.toString());
124 return result;
125 }
118126 else if (type.equals(EXPR)) {
119127 ExprParser p = new ExprParser(text, lowerCaseValidKeywords);
120 return p.parse();
121 }
122 else
128 result = p.parse();
129 result.setSummary(text);
130 return result;
131 }
132 else {
123133 throw new Fault(i18n, "kw.badKeywordType", type);
124 }
134 }
135 }
136
137
138 /**
139 * Set the descriptive representation of the kw expression provided by the user.
140 * @param text Useful text rendering of current kw expression
141 */
142 void setSummary(String text) {
143 this.text = text;
144 }
145
146 /**
147 * Get a human digestable version of the kw represented by this object.
148 * @return Human readable, fully descriptive rendering of current kw setting
149 */
150 public String getSummary() {
151 return text;
152 }
153
154 protected String text;
125155
126156 /**
127157 * A constant to indicate that all of a list of keywords should be matched.
257287 * @param s
258288 * @return
259289 */
290 @Override
260291 public boolean accepts(Set s) {
261292 return s.containsAll(keys);
262293 }
263294
295 @Override
264296 public String toString() {
265297 return "all of (" + allKwds + ")";
266298 }
276308 * @param s - the set
277309 * @return false, if none of the keywords is in the set
278310 */
311 @Override
279312 public boolean accepts(Set s) {
280313 for (String kwd :keys) {
281314 if (s.contains(kwd)) {
285318 return false;
286319 }
287320
321 @Override
288322 public String toString() {
289323 return "any of (" + allKwds + ")";
290324 }
00 /*
11 * $Id$
22 *
3 * Copyright (c) 2001, 2009, Oracle and/or its affiliates. All rights reserved.
3 * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
44 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55 *
66 * This code is free software; you can redistribute it and/or modify it
5959
6060 @Override
6161 public String getReason() {
62 return i18n.getString("keywordsFilter.reason");
62 return i18n.getString("keywordsFilter.reason", keywords.getSummary());
6363 }
6464
6565 @Override
00 /*
11 * $Id$
22 *
3 * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3 * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
44 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55 *
66 * This code is free software; you can redistribute it and/or modify it
2626 package com.sun.javatest;
2727
2828 import com.sun.javatest.util.DynamicArray;
29 import java.io.BufferedReader;
30 import java.io.BufferedWriter;
31 import java.io.File;
32 import java.io.FileNotFoundException;
33 import java.io.FileReader;
34 import java.io.FileWriter;
35 import java.io.IOException;
36 import java.io.Writer;
29
30 import java.io.*;
31 import java.nio.charset.StandardCharsets;
3732 import java.util.HashMap;
3833 import java.util.Map;
3934
4035 import com.sun.javatest.util.I18NResourceBundle;
41 import java.io.Reader;
42 import java.io.StringReader;
36
4337 import java.util.ArrayList;
4438 import java.util.Iterator;
4539 import java.util.TreeSet;
153147 /**
154148 * Test if a file appears to be for an exclude list, by checking the extension.
155149 * @param f The file to be tested.
156 * @return <code>true</code if the file appears to be a known failures list.
150 * @return <code>true</code> if the file appears to be a known failures list.
157151 */
158152 public static boolean isKflFile(File f) {
159153 return f.getPath().endsWith(KFLFILE_EXTN);
194188 {
195189 setStrictModeEnabled(strict);
196190 if (f != null) {
197 BufferedReader in = new BufferedReader(new FileReader(f));
191 BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(f), StandardCharsets.UTF_8));
198192
199193 Parser p = new Parser(in);
200194 try {
469463 * file is being written.
470464 */
471465 public void write(File f) throws IOException {
472 BufferedWriter out = new BufferedWriter(new FileWriter(f));
466 BufferedWriter out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(f), StandardCharsets.UTF_8));
473467 out.write("### KFL/");
474468 out.write(KFL_FILE_VERSION);
475469 out.newLine();
3232 import java.net.MalformedURLException;
3333 import java.net.URL;
3434 import java.net.URLClassLoader;
35 import java.security.AccessController;
36 import java.security.PrivilegedAction;
3537 import java.util.Enumeration;
3638 import java.util.Locale;
3739 import java.util.ResourceBundle;
5254 return ownClass.getClassLoader().getResources(name);
5355 }
5456
55 public static InputStream getResourceAsStream(String name, Class ownClass) {
57 public static InputStream getResourceAsStream(final String name, final Class ownClass) {
5658 URL url = getExtResource(name, ownClass);
5759 try {
5860 if (url != null) {
5961 return url.openStream();
6062 } else {
61 return ownClass.getResourceAsStream(name);
63 InputStream is = AccessController.doPrivileged(
64 new PrivilegedAction<InputStream>() {
65 @Override
66 public InputStream run() {
67 return ownClass.getResourceAsStream(name);
68 }
69 });
70 return is;
6271 }
6372 } catch (IOException e) {
6473 return null;
181190 public static ResourceBundle getBundle(String name, Locale aDefault, ClassLoader classLoader) {
182191 if (ext != null) {
183192 initAltClassLoader();
184 ResourceBundle altB = ResourceBundle.getBundle(name, aDefault, altClassLoader);
193 ResourceBundle altB = getSBundle(name, aDefault, altClassLoader);
185194 if (altB.getKeys().hasMoreElements()) {
186195 return altB;
187196 }
188197 }
189 return ResourceBundle.getBundle(name, aDefault, classLoader);
198 return getSBundle(name, aDefault, classLoader);
190199 }
191200
192201 public static ResourceBundle getBundle(String name) {
193202 if (ext != null) {
194203 initAltClassLoader();
195 ResourceBundle altB = ResourceBundle.getBundle(name, Locale.getDefault(), altClassLoader);
204 ResourceBundle altB = getSBundle(name, Locale.getDefault(), altClassLoader);
196205 if (altB.getKeys().hasMoreElements()) {
197206 return altB;
198207 }
199208 }
200 return ResourceBundle.getBundle(name);
209 return getSBundle(name, Locale.getDefault(), ResourceLoader.class.getClassLoader());
210 }
211
212 private static ResourceBundle getSBundle(final String name, final Locale locale, final ClassLoader cl) {
213 ResourceBundle bundle = AccessController.doPrivileged(
214 new PrivilegedAction<ResourceBundle>() {
215 public ResourceBundle run() {
216 return ResourceBundle.getBundle(name, locale, cl);
217 }
218 });
219 return bundle;
201220 }
202221
203222 private static ClassLoader altClassLoader;
00 /*
11 * $Id$
22 *
3 * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
3 * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
44 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55 *
66 * This code is free software; you can redistribute it and/or modify it
2727
2828 import java.util.ArrayList;
2929 import java.util.Enumeration;
30 import java.util.Hashtable;
30 import java.util.HashMap;
3131 import java.util.Iterator;
3232 import java.util.LinkedList;
3333 import java.util.NoSuchElementException;
3434 import java.util.Stack;
35 import java.util.Vector;
36
35
36 import com.sun.javatest.tool.Preferences;
3737 import com.sun.javatest.util.Debug;
3838 import com.sun.javatest.util.I18NResourceBundle;
39 import java.util.Set;
3940
4041
4142 /**
6465 resultStats = new int[Status.NUM_STATES];
6566 nodeIndex = -1;
6667 currFrame = null;
68
69 setRecordRejects(true);
6770 }
6871
6972 TRT_Iterator(TestResultTable.TreeNode node) {
242245 if (recordRejects == true) {
243246 // only create new objects if they don't exist
244247 // users can turn on and off this feature if they want
245 if (filteredTRs == null)
246 filteredTRs = new Hashtable(10); // not likely to have > 10 filters
247
248 if (fo == null)
248 if (filteredTRs == null) {
249 filteredTRs = new HashMap(10); // not likely to have > 10 filters
250 }
251
252 if (fo == null) {
249253 fo = new FilterObserver();
254 }
255
256 if (rejLock == null) {
257 rejLock = new Object();
258 }
250259 }
251260 }
252261
273282 * @return Array as described or null if no tests have been rejected yet.
274283 */
275284 @Override
276 public Hashtable getFilterStats() {
277 if (filteredTRs == null)
285 public HashMap<TestFilter, ArrayList<TestDescription>> getFilterStats() {
286 if (filteredTRs == null) {
278287 return null;
288 }
279289 else {
280 // create shallow, reformatted version of stored data
290 // create shallow copy
281291 // keys are TRs, values are TestFilters.
282 Hashtable out = new Hashtable();
292 HashMap<TestFilter, ArrayList<TestDescription>> out = new HashMap(filteredTRs.size());
283293
284294 synchronized (rejLock) {
285 Enumeration keys = filteredTRs.keys();
295 Set keys = filteredTRs.keySet();
286296 // each key is a TestFilter
287 while (keys.hasMoreElements()) {
297 Iterator<TestFilter> it = keys.iterator();
298 while (it.hasNext()) {
288299 // could cast this to TestFilter, but why?
289 Object thisKey = keys.nextElement();
290
291 // the HT value is a Vector or TRs
292 Iterator it = ((Vector)(filteredTRs.get(thisKey))).iterator();
293
294 while (it.hasNext()) {
295 out.put(it.next(), thisKey);
296 } // inner while
300 TestFilter thisKey = it.next();
301 ArrayList<TestDescription> al = (ArrayList<TestDescription>) filteredTRs.get(thisKey).clone();
302 out.put(thisKey, al);
297303 } // outer while
298304 } // sync
299305
787793
788794 absoluteCount++;
789795 currentResult = tr;
796 TestDescription td = tr.getDescription();
790797
791798 for (int i = 0; i < filters.length; i++) {
792799 boolean accepted = true;
793800 try {
794 if (fo == null)
795 accepted = filters[i].accepts(tr.getDescription());
796 else
797 accepted = filters[i].accepts(tr.getDescription(), fo);
801 if (fo == null) {
802 accepted = filters[i].accepts(td);
803 }
804 else {
805 accepted = filters[i].accepts(td, fo);
806 }
798807 }
799808 catch (TestFilter.Fault f) {
800809 accepted = true;
809818 }
810819
811820 rejectCount++;
821
822 if (recordRejectTR && tr.getStatus().isNotRun()) {
823 ArrayList<TestFilter> rejectors = getFullFilteredList(filters, td);
824 // optimize this for shared Status objects
825 Status newstatus = Status.notRun(generateFilteredStatus(rejectors));
826 TestResult newone = new TestResult(td, newstatus);
827 tr.getParent().getEnclosingTable().update(newone, true);
828 }
829
812830 // rejected
813831 return i;
814832 }
844862 }
845863
846864 /**
847 private TestResultTable.TreeNode traverseToNode(TestResultTable.TreeNode start, String path) {
848 String curr;
849 TestResultTable.TreeNode pos;
850
851 while (path != null) {
852 } // while
853 }
854 */
865 * Query filter list to determine all the filters which would reject test.
866 * Necessary calculation because the rest of harness filtering typically fails fast
867 * on the first rejection. Composite filters are not included in the search, only
868 * concrete filters are returned.
869 * @param filters Filters to check.
870 * @param td Tests to check.
871 * @return Null if the filter list is empty, array of size zero or greater
872 * otherwise. Will be size zero if no filters reject the test.
873 */
874 private static ArrayList<TestFilter> getFullFilteredList(
875 final TestFilter[] filters,
876 final TestDescription td) {
877 if (td == null || filters == null || filters.length == 0) {
878 return null;
879 }
880
881 final ArrayList<TestFilter> out = new ArrayList<TestFilter>();
882 TestFilter.Observer foo = new TestFilter.Observer() {
883 public void rejected(TestDescription td, TestFilter f) {
884 out.add(f);
885 }
886 };
887
888 for (TestFilter f : filters) {
889 try {
890 if (out.contains(f)) {
891 // optimization
892 continue;
893 }
894
895 f.accepts(td, foo);
896 }
897 catch (TestFilter.Fault fault) {
898 out.add(f);
899 }
900 } // for
901
902 return out;
903 }
904
905 private static String generateFilteredStatus(ArrayList<TestFilter> fs) {
906 StringBuilder sb = new StringBuilder();
907
908 if (fs == null || fs.size() == 0) {
909 sb.append("Rejected by test filters.");
910 }
911 else {
912 sb.append("Rejected by test filters: " );
913
914 for (TestFilter f : fs) {
915 sb.append(f.getName());
916 sb.append(", ");
917 }
918 }
919 if (sb.length() > 2) {
920 return sb.substring(0, sb.length()-2); // remove trailing ", "
921 }
922 else {
923 // exceptional case
924 return "";
925 }
926 }
855927
856928 /**
857929 * Tests (literally) that were provided by the client through one of the
874946 private int[] resultStats; // pass/fail/error statistics
875947 private int absoluteCount; // how many tests were processed
876948
877
878949 // filter rejection info
879950 private int rejectCount;
880951 private boolean recordRejects; // true when we are collecting reject stats
881 private Hashtable filteredTRs; // key==TestFilter value=Vector of TestResults
952 private HashMap<TestFilter, ArrayList<TestDescription>> filteredTRs; // key==TestFilter value=ArrayList of TestResults
882953 private TestResult currentResult; // necessary communicate with filter observer, yuck
883954 private Object rejLock;
884955 private FilterObserver fo; // null if feature is disabled
956
957 final Preferences p = Preferences.access();
958 boolean recordRejectTR = p.getPreference("exec.recordNotrunReasons", "false").equals("true");
885959
886960 // ------ state information ------
887961 private Stack stack;
9411015 @Override
9421016 public void rejected(TestDescription d, TestFilter rejector) {
9431017 synchronized (rejLock) {
944 Vector vec = (Vector)(filteredTRs.get(rejector));
1018 ArrayList vec = filteredTRs.get(rejector);
9451019 if (vec == null) {
946 vec = new Vector();
1020 vec = new ArrayList();
9471021 filteredTRs.put(rejector, vec);
9481022 }
9491023
950 // remove later...
1024 // XXX remove later...
9511025 try {
9521026 if (currentResult.getDescription() != d)
9531027 throw new JavaTestError("TRT_Iterator observered TR.TD does not match filtered one.");
9561030 throw new JavaTestError("TRT_Iterator cannot determine TR source info.", f);
9571031 } // sanity check
9581032
959 vec.add(currentResult);
960
1033 vec.add(d);
9611034 } // sync
9621035 }
9631036 }
2525 */
2626 package com.sun.javatest;
2727
28 import java.io.BufferedReader;
29 import java.io.File;
30 import java.io.FileReader;
31 import java.io.FileNotFoundException;
32 import java.io.IOException;
33 import java.io.Reader;
28 import java.io.*;
3429 //import java.util.Hashtable;
30 import java.nio.charset.StandardCharsets;
3531 import java.util.Iterator;
3632 import java.util.Map;
3733 import java.util.Vector;
186182
187183 try {
188184 Properties p = new Properties();
189 Reader in = new BufferedReader(new FileReader(f));
185 Reader in = new BufferedReader(new InputStreamReader(new FileInputStream(f), StandardCharsets.UTF_8));
190186 p.load(in);
191187 in.close();
192188
00 /*
11 * $Id$
22 *
3 * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
3 * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
44 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55 *
66 * This code is free software; you can redistribute it and/or modify it
2525 */
2626 package com.sun.javatest;
2727
28 import java.io.BufferedReader;
29 import java.io.File;
30 import java.io.FileNotFoundException;
31 import java.io.FileReader;
32 import java.io.FileWriter;
33 import java.io.IOException;
34 import java.io.PrintWriter;
35 import java.io.Reader;
36 import java.io.StringReader;
37 import java.io.Writer;
28 import java.io.*;
3829 import java.lang.ref.WeakReference;
30 import java.nio.charset.StandardCharsets;
3931 import java.text.DateFormat;
4032 import java.text.ParseException;
4133 import java.text.SimpleDateFormat;
285277 /**
286278 * Find out how many output buffers this section has inside it.
287279 *
288 * @return The number of output buffers in use (>=0).
280 * @return The number of output buffers in use (&gt;=0).
289281 */
290282 public synchronized int getOutputCount() {
291283 return buffers.length;
660652 int charsRead = 0;
661653 while (charsRead < chars) {
662654 int n = in.read(data, 0, Math.min(data.length, chars-charsRead));
655
656 // sanity check, may be truncated file
657 if (n < 0) {
658 throw new ReloadFault(i18n, "rslt.badRuntimeErr", new Object[]
659 {resultsFile, Integer.toString(n)});
660 }
661
663662 buff.append(data, 0, n);
664663 charsRead += n;
665664 }
746745 notifyUpdatedOutput(Section.this, name, end, end, buf, offset, len);
747746
748747 if (output.length() > maxOutputSize) {
749 int overflowEnd = maxOutputSize*2/3;
748 int overflowEnd = maxOutputSize/3;
750749 if (overflowed) {
751750 // output.delete(overflowStart, overflowEnd);
752751 // JDK 1.1--start
753752 String s = output.toString();
754 output = new StringBuffer(s.substring(0, overflowStart) + s.substring(overflowEnd));
753 output = new StringBuffer(s.substring(0, overflowStart) + s.substring(output.length()-overflowEnd));
755754 // JDK 1.1--end
756755 notifyUpdatedOutput(Section.this, name, overflowStart, overflowEnd, "");
757756 }
10511050 sections = null;
10521051 execStatus = null;
10531052
1054 reload(new FileReader(resultsFile));
1053 reload(new InputStreamReader(new FileInputStream(resultsFile), StandardCharsets.UTF_8));
10551054
10561055 // this next line is dubious since the execStatus should have
10571056 // been set during the reload
15551554 private void writeResults(File tempFile, BackupPolicy backupPolicy)
15561555 throws IOException
15571556 {
1558 FileWriter out;
1557 Writer out;
15591558 try {
1560 out = new FileWriter(tempFile);
1559 out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(tempFile), StandardCharsets.UTF_8));
15611560 }
15621561 catch (IOException e) {
15631562 execStatus = Status.error("Problem writing result file for test: " + getTestName());
20382037 throw new IllegalStateException("Cannot do a reload of this object.");
20392038
20402039 try {
2041 reload(new FileReader(resultsFile));
2040 reload(new BufferedReader(new InputStreamReader(new FileInputStream(resultsFile), StandardCharsets.UTF_8)));
20422041
20432042 // Well, we have successfully reloaded it, so the object is now taking
20442043 // up a big footprint again ... put it back on the list to be shrunk again
20762075 }
20772076 else
20782077 throw new ReloadFault(i18n, "rslt.badHeader", resultsFile);
2078 }
2079 catch (RuntimeException e) {
2080 throw new ReloadFault(i18n, "rslt.badRuntimeErr",
2081 new String[] {resultsFile.getPath(), e.getLocalizedMessage()});
20792082 }
20802083 finally {
20812084 r.close();
23052308 if (execStatus == null)
23062309 execStatus = Status.error("NO STATUS RECORDED IN FILE");
23072310
2308 // check whether checksum was valid or not
2309 //if (checksumText == null)
2311 // checksum support removed
23102312 checksumState = NO_CHECKSUM;
2311 /*else {
2312 try {
2313 long cs = Long.parseLong(checksumText, 16);
2314 if (cs == computeChecksum())
2315 checksumState = GOOD_CHECKSUM;
2316 else
2317 checksumState = BAD_CHECKSUM;
2318 }
2319 catch (RuntimeException e) {
2320 checksumState = BAD_CHECKSUM;
2321 }
2322 }*/
23232313 }
23242314
23252315 /**
27042694 /**
27052695 * DateFormat, that is used to store date into TestResult
27062696 */
2707 private static final DateFormat dateFormat =
2697 public static final DateFormat dateFormat =
27082698 new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy", Locale.US);
27092699
27102700 static final String EXTN = ".jtr";
3333 import java.util.Map;
3434 import java.util.TreeMap;
3535
36 import com.sun.javatest.logging.WorkDirLogHandler;
3637 import com.sun.javatest.util.Debug;
3738 import com.sun.javatest.util.Fifo;
3839 import com.sun.javatest.util.I18NResourceBundle;
40
41 import java.util.logging.Handler;
3942 import java.util.logging.Logger;
4043
4144 /**
445448 }
446449 catch (InterruptedException e) {
447450 // ignore
451 }
452
453 try {
454 if (workDir != null && workDir.getTestSuite() != null) {
455 Logger log = workDir.getTestSuite().getLog(workDir, i18n.getString("core.log.name"));
456 if (log != null && log.getHandlers() != null) {
457 for (Handler handler : log.getHandlers()) {
458 if (handler instanceof WorkDirLogHandler) {
459 ((WorkDirLogHandler) handler).close();
460 }
461 }
462 }
463 }
464 }
465 catch (TestSuite.NoSuchLogFault noSuchLogFault) {
466 //nothing to do
448467 }
449468
450469 // important to avoid memory leak !!!
515534 catch (TestResult.ReloadFault e) {
516535 // delete this jtr and continue
517536 // should we inform TRT? perhaps via observer
518 workDir.log(i18n, "trc.badjtr", f);
537 workDir.log(i18n, "trc.badjtr", new Object[] {f, e.getLocalizedMessage()});
519538 f.delete();
520539 }
521540 }
538557 return tr;
539558 }
540559 catch (TestResult.ReloadFault e) {
541 // bad .jtr, delete it
542 workDir.log(i18n, "trc.badjtr", jtr);
560 // bad .jtr, delete it
561 workDir.log(i18n, "trc.badjtr", new Object[] {jtr, e.getLocalizedMessage()});
543562 jtr.delete();
544563 // this notRun status will persist in cache until cache rebuilt
545564 String name = tr.getTestName();
00 /*
11 * $Id$
22 *
3 * Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.
3 * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
44 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55 *
66 * This code is free software; you can redistribute it and/or modify it
2828 import java.io.File;
2929 import java.io.IOException;
3030 import java.text.Collator;
31 import java.util.ArrayList;
3132 import java.util.Arrays;
3233 import java.util.Comparator;
3334 import java.util.Enumeration;
35 import java.util.HashMap;
3436 import java.util.HashSet;
3537 import java.util.Hashtable;
3638 import java.util.Iterator;
4143 import java.util.Vector;
4244 import java.util.concurrent.locks.ReentrantLock;
4345
46 import com.sun.javatest.finder.TestFinderDecorator;
4447 import com.sun.javatest.tool.Preferences;
4548 import com.sun.javatest.util.Debug;
4649 import com.sun.javatest.util.DynamicArray;
260263
261264 /**
262265 * Create a table ready to be occupied.
263 *
264 * @deprecated This method will become private.
265 * XXX make this method private
266266 */
267267 public TestResultTable() {
268 //table = new Hashtable();
269268 statusTables = new Hashtable[Status.NUM_STATES];
270269 for (int i = 0; i < statusTables.length; i++)
271270 statusTables[i] = new Hashtable();
272271
273272 root = new TRT_TreeNode(this, null);
274
275 /* OLD
276 // cache compression policy
277 int prop = Integer.getInteger("jt.cacheThreshold", 40).intValue();
278 if (prop < 0 || prop > 100)
279 prop = 40;
280
281 COMPRESSION_THRESHOLD = prop/100.0f;
282 */
283273
284274 instanceId++;
285275 if (com.sun.javatest.httpd.HttpdServer.isActive()) {
341331
342332 if (trCache == null)
343333 initFinder();
334 }
335
336 public void updateTestExecutionOrderOnTheFly(){
337 root = new TRT_TreeNode(TestResultTable.this, null);
344338 }
345339
346340 /**
549543 }
550544 }
551545
546 if (trCache != null){
547 trCache.requestFullUpdate();
548 }
549
552550 return true;
553551 }
554552
641639 if (target == null)
642640 return null;
643641
644 Vector path = new Vector();
642 ArrayList path = new ArrayList();
645643 TreeNode loc = target.getParent();
646644 while (loc != null) {
647 path.insertElementAt(loc, 0);
645 path.add(0, loc);
648646 loc = loc.getParent();
649647 // getParent() will be null for the root node
650648 } // while
651649
652650 TreeNode[] result = new TreeNode[path.size()];
653 path.copyInto(result);
651 path.toArray(result);
654652
655653 if (debug == 2 || debug == 99) {
656654 Debug.println("TRT - getObjectPath() results:");
677675 if (target == null)
678676 return null;
679677
680 Vector path = new Vector();
678 ArrayList path = new ArrayList();
681679 TreeNode loc = target;
682680 while (loc != null) {
683 path.insertElementAt(loc, 0);
681 path.add(0, loc);
684682 loc = loc.getParent(); // getParent() will be null for the root node
685683 } // while
686684
687685 TreeNode[] result = new TreeNode[path.size()];
688 path.copyInto(result);
686 path.toArray(result);
689687
690688 if (debug == 2 || debug == 99) {
691689 Debug.println("TRT - getObjectPath() results:");
951949 if (debug == 1 || debug == 99)
952950 Debug.println("TRT.lookupInitURL gave back " + Arrays.toString(objs));
953951
954 if (objs == null) // no match
955 continue;
952 if (objs == null) { // no match
953 }
956954 else if (objs instanceof TreeNode[]) {
957955 // don't add duplicates
958956 if (!initNodes.contains((TreeNode) objs[0]))
11101108 public static String getRootRelativePath(TreeNode node) {
11111109 if (node.isRoot()) return "";
11121110
1113 StringBuffer name = new StringBuffer(node.getName());
1111 StringBuilder name = new StringBuilder(node.getName());
11141112 node = node.getParent();
11151113
11161114 while (node != null && !node.isRoot()) {
13711369 }
13721370
13731371 /**
1372 * Removes empty nodes (things with no tests below them).
1373 * @param node The node to perform the prune operation upon.
13741374 * @return True if some nodes were pruned, false otherwise.
13751375 */
13761376 synchronized public boolean prune(TreeNode node) throws Fault {
25462546 * @return Array as described or null if no tests have been rejected yet.
25472547 * @since 3.0.3
25482548 */
2549 public abstract Hashtable getFilterStats();
2549 public abstract HashMap<TestFilter, ArrayList<TestDescription>> getFilterStats();
25502550
25512551 // --- misc info ---
25522552 /**
4747 import java.util.logging.LogRecord;
4848 import com.sun.javatest.finder.BinaryTestFinder;
4949 import com.sun.javatest.finder.HTMLTestFinder;
50 import com.sun.javatest.finder.TestFinderDecorator;
5051 import com.sun.javatest.interview.LegacyParameters;
5152 import com.sun.javatest.lib.KeywordScript;
5253 import com.sun.javatest.logging.WorkDirLogHandler;
312313 throw new Fault(i18n, "ts.notASubtype",
313314 new Object[] {className, "testsuite", TestSuite.class.getName()});
314315 }
316 catch (UnsupportedClassVersionError uce){
317 throw new Fault(i18n, "ts.compiledRecentVersion",
318 new Object[] {System.getProperty("java.version"), root.getPath()});
319 }
315320
316321 String[] args = new String[tsClassAndArgs.length - 1];
317322 System.arraycopy(tsClassAndArgs, 1, args, 0, args.length);
319324 }
320325
321326 // initialize test finder
322 testSuite.setTestFinder(testSuite.createTestFinder());
327 testSuite.setTestFinder(new TestFinderDecorator(testSuite.createTestFinder()));
323328
324329 return testSuite;
325330 }
00 /*
11 * $Id$
22 *
3 * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
3 * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
44 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55 *
66 * This code is free software; you can redistribute it and/or modify it
928928 }
929929
930930 /**
931 * See <code>putTestAnnotation(String,String,String).
931 * See <code>putTestAnnotation(String,String,String)</code>.
932932 *
933933 * @see #putTestAnnotation(String,String,String)
934934 */
6464 String tag = null;
6565 boolean localizeArgs = false;
6666 boolean sharedCl = false;
67 int timeout = 0;
6768
6869 // analyze options
6970 int i = 0;
7980 } else if (args[i].equalsIgnoreCase("-sharedClassLoader") ||
8081 args[i].equalsIgnoreCase("-sharedCl")) {
8182 sharedCl = true;
82 } else {
83 }
84 else if ((args[i].equals("-ct") || args[i].equals("-commandTimeout")) && i+1 < args.length) {
85 try {
86 timeout = Integer.parseInt(args[++i]);
87 }
88 catch (NumberFormatException e) {
89 return Status.error("bad commandTimeout number: " + args[i]);
90 }
91 }
92 else {
8393 return Status.error("Unrecognized option: " + args[i]);
8494 }
8595 }
108118 t.setClassPath(classPath);
109119
110120 t.setSharedClassLoader(sharedCl);
121 t.setAgentCommandTimeout(timeout);
111122
112123 out.println("Executing command via " + t.getConnection().getName());
113124
00 /*
11 * $Id$
22 *
3 * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
3 * Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved.
44 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55 *
66 * This code is free software; you can redistribute it and/or modify it
4747 if (host.length() == 0) {
4848 throw new IllegalArgumentException("Cannot start active agent connection - empty value for hostname.");
4949 }
50 else if (port <= 0) {
51 throw new IllegalArgumentException("Cannot start active agent connection - port number must be greater than zero.");
50 else if (port < 0) {
51 throw new IllegalArgumentException("Cannot start active agent connection - port number must be non-negative.");
5252 }
5353
5454 this.host = host;
00 /*
11 * $Id$
22 *
3 * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
3 * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
44 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55 *
66 * This code is free software; you can redistribute it and/or modify it
3636 import java.lang.reflect.Constructor;
3737 import java.lang.reflect.InvocationTargetException;
3838 import java.lang.reflect.Method;
39 import java.util.Arrays;
3940 import java.util.Enumeration;
4041 import java.util.MissingResourceException;
4142 import java.util.Vector;
4849 import com.sun.javatest.util.WriterStream;
4950
5051 /**
51 * The means by which the tes harness executes requests on other machines.
52 * The means by which the the harness executes requests on other machines.
5253 * Agents are typically started by using one of AgentMain, AgentFrame,
5354 * or AgentApplet. The requests themselves are made from the harness
5455 * via AgentManager, or a library class that uses AgentManager.
573574 }
574575
575576 // The following is used to ensure consistency between Agent and AgentManager
576 static final short protocolVersion = 104;
577 static final short protocolVersion = 105;
577578
578579 /**
579580 * The default port to which active agents will try and connect on a nominated host.
594595 static final byte STATUS = (byte)'S';
595596
596597 static final String productName = "JT Harness Agent";
597 static final String productVersion = "JTA_4.6";
598 static final String productCopyright = "Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.";
598 static final String productVersion = "JTA_5.0";
599 static final String productCopyright = "Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.";
599600
600601
601602 /**
763764 traceOut.println("sharedClassLoader: " + sharedClassLoader);
764765 }
765766
767 timeoutValue = in.readInt();
768
769 if (tracing)
770 traceOut.println("COMMAND TIMEOUT(seconds) IS `" + timeoutValue + "'");
771
766772 byte guard = in.readByte();
767773 if (guard != 0)
768774 throw new IOException("data format error");
779785 if (remoteClasses) {
780786 cl = getAgentClassLoader(sharedClassLoader);
781787 c = cl.loadClass(className);
782 } else
788 } else {
783789 c = Class.forName(className);
790 }
784791
785792 if (request.equals("executeTest")) {
786793 return executeTest(c, args, testLog, testRef);
788795 return executeCommand(c, args, testLog, testRef, cl);
789796 } else if (request.equals("executeMain")) {
790797 return executeMain(c, args, testLog, testRef);
791 } else
798 } else {
792799 return Status.error("Unrecognized request for agent: `" + request + "'");
800 }
793801 } catch (ClassCastException e) {
794802 if (tracing)
795803 e.printStackTrace(traceOut);
841849
842850 Command tc = (Command)(c.newInstance());
843851 tc.setClassLoader(cl);
844 return tc.run(args, testLog, testRef);
852 return new CommandExecutor(tc, args, testLog, testRef, timeoutValue).execute();
853 }
854
855 private class CommandExecutor {
856
857 private String[] args;
858 private PrintWriter testLog;
859 private PrintWriter testRef;
860 private Command tc;
861 private Status result;
862
863 private final Object LOCK = new Object();
864 private boolean executed = false;
865 private boolean timeout = false;
866 private int timeoutValue = 0;
867
868 public CommandExecutor(Command tc, String[] args, PrintWriter testLog,
869 PrintWriter testRef, int timeoutValue) {
870 this.args = args;
871 this.testLog = testLog;
872 this.testRef = testRef;
873 this.tc = tc;
874 this.timeoutValue = timeoutValue;
875 }
876
877 public Status execute(){
878
879 Timer alarmTimer = null;
880 if (timeoutValue != 0) {
881 alarmTimer = new Timer();
882 alarmTimer.requestDelayedCallback(new Timer.Timeable() {
883 @Override
884 public void timeout() {
885 result = Status.error("Marked as error by timeout after "+timeout+" seconds");
886 timeout = true;
887 synchronized (LOCK) {
888 LOCK.notifyAll();
889 }
890 }
891 }, timeoutValue * 1000);
892 }
893
894 Thread executeThread = new Thread(new Runnable() {
895 @Override
896 public void run() {
897 try {
898 result = tc.run(args, testLog, testRef);
899 }
900 catch (Exception e){
901 result = Status.error("Unhandled " + e.getClass().getName() + " exception " +
902 "for " + tc.getClass().getName() + " command. " +
903 "Exception message: " + e.getMessage());
904 }
905 finally {
906 executed = true;
907 synchronized (LOCK) {
908 LOCK.notifyAll();
909 }
910 }
911 }
912 }, "CommandExecutor executeThread for command args: "+ Arrays.toString(args));
913 executeThread.start();
914
915 synchronized (LOCK) {
916 while (!executed && !timeout) {
917 try {
918 LOCK.wait();
919 }
920 catch (InterruptedException e) {
921 // treat interrupt as exit request
922 break;
923 }
924 }
925 }
926
927 executeThread.setPriority(Thread.MIN_PRIORITY);
928 executeThread.interrupt();
929 if (alarmTimer != null){
930 alarmTimer.finished();
931 }
932
933 return result;
934 }
935
845936 }
846937
847938 private Status executeMain(Class c, String[] args,
904995 */
905996 synchronized void sendChars(byte type, char b[], int off, int len) throws IOException {
906997 out.write(type);
907 out.writeUTF(new String(b, off, len));
998
999 String message = new String(b, off, len);
1000 int strlen = message.length();
1001 int utflen = 0;
1002 int c, count = 0;
1003
1004 // shortcut if it's not possible to exceed the limit
1005 if (strlen * 3 < 65535) {
1006 count = strlen;
1007 }
1008 else {
1009 /* count number of chars to meet 65535 bytes boundary */
1010 for (int i = 0; i < strlen; i++) {
1011 c = message.charAt(i);
1012 if ((c >= 0x0001) && (c <= 0x007F)) {
1013 utflen++;
1014 } else if (c > 0x07FF) {
1015 utflen += 3;
1016 } else {
1017 utflen += 2;
1018 }
1019
1020 // truncate here because we won't be able to encode more
1021 if (utflen > 65535) {
1022 break;
1023 } else {
1024 count = i;
1025 }
1026 } // for
1027 }
1028
1029 out.writeUTF(message.substring(0, count));
1030 //out.writeUTF(new String(b, off, len));
9081031 switch (type) {
9091032 case LOG_FLUSH:
9101033 case REF_FLUSH:
9241047 /**
9251048 * Get the bytecodes for a class
9261049 */
927 synchronized byte[] getClassData(String className) throws ClassNotFoundException {
1050 synchronized AgentRemoteClassData getClassData(String className) throws ClassNotFoundException {
9281051 if (tracing)
9291052 traceOut.println("REMOTE LOAD " + className);
9301053
9331056 out.writeUTF(className);
9341057 out.flush();
9351058
936 int size = in.readInt();
937 if (size == 0)
938 throw new ClassNotFoundException(className);
939
940 byte[] data = new byte[size];
941 int offset = 0;
942 while (offset < data.length) {
943 int n = in.read(data, offset, data.length - offset);
944 if (n == -1)
945 throw new ClassNotFoundException(className + ": EOF while reading class data");
946 else
947 offset += n;
948 }
949
950 //System.err.println(data.length);
951 //for (int i = 0; i < min(10, data.length); i++) {
952 // System.err.print(data[i] + " ");
953 //}
954 //System.err.print(" ... ");
955 //for (int i = max(0, data.length - 10); i < data.length; i++) {
956 // System.err.print(data[i] + " ");
957 //}
958 //System.err.println();
959
960 return data;
1059 AgentRemoteClassData classData = new AgentRemoteClassData(in);
1060 if (tracing) {
1061 traceOut.println("REMOTE LOADED CLASS " + classData.toString());
1062 }
1063 return classData;
9611064 } catch (IOException e) {
9621065 throw new ClassNotFoundException(className + ": " + e);
9631066 }
10241127 if (classLoaderConstructor == null) {
10251128 try {
10261129 classLoaderConstructor = classLoaderClass.getDeclaredConstructor(argTypes);
1130 classLoaderConstructor.setAccessible(true);
10271131 } catch (NoSuchMethodException e) {
10281132 e.printStackTrace();
10291133 }
10541158 private DataOutputStream out;
10551159 private String tag;
10561160 private String request;
1161 private Integer timeoutValue;
10571162 }
10581163
10591164 private static Constructor classLoaderConstructor;
10891194 public synchronized void write(int ch) throws IOException {
10901195 buf[count++] = (char)ch;
10911196 if (count == buf.length) {
1092 parent.sendChars(type, buf, 0, count);
1093 count = 0;
1197 try {
1198 parent.sendChars(type, buf, 0, count);
1199 }
1200 finally {
1201 count = 0;
1202 }
10941203 }
10951204 }
10961205
11411250 case Agent.LOG: type = Agent.LOG_FLUSH; break;
11421251 case Agent.REF: type = Agent.REF_FLUSH; break;
11431252 }
1144 parent.sendChars(type, buf, 0, count);
1145 count = 0;
1253 try {
1254 parent.sendChars(type, buf, 0, count);
1255 }
1256 finally {
1257 count = 0;
1258 }
11461259 }
11471260 }
11481261
3636 import java.awt.Label;
3737 import java.awt.Panel;
3838 import java.io.IOException;
39 import java.lang.reflect.InvocationTargetException;
40 import java.lang.reflect.Method;
3941 import java.net.URL;
4042
4143 import com.sun.javatest.Status;
123125 PassiveModeOptions pmo = new PassiveModeOptions();
124126 pmo.setPort(passivePort);
125127
126 SerialPortModeOptions smo = new SerialPortModeOptions();
127 if (serialPort != null)
128 smo.setPort(serialPort);
128 ModeOptions smo = null;
129 try {
130 Class serial = Class.forName("com.sun.javatest.agent.SerialPortModeOptions");
131 smo = (ModeOptions)serial.newInstance();
132 } catch (Exception e) {
133 System.err.println("There is no support for serial port");
134 }
135 if (serialPort != null){
136 try {
137 Method setPortMethod = smo.getClass().getMethod("setPort", String.class);
138 setPortMethod.invoke(smo, serialPort);
139 }
140 catch (SecurityException | NoSuchMethodException |
141 IllegalArgumentException| InvocationTargetException |
142 IllegalAccessException e) {
143 System.err.println("Could not set serial port:");
144 e.printStackTrace();
145 }
146 }
129147
130148 ModeOptions[] modeOptions = new ModeOptions[] {amo, pmo, smo};
131149
00 /*
11 * $Id$
22 *
3 * Copyright (c) 2003, 2009, Oracle and/or its affiliates. All rights reserved.
3 * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
44 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55 *
66 * This code is free software; you can redistribute it and/or modify it
5454 }
5555 }
5656 catch (ClassNotFoundException e) {
57 byte[] data = parent.getClassData(className);
58 c = defineClass(className, data, 0, data.length);
57 AgentRemoteClassData data = parent.getClassData(className);
58 c = defineClass(className, data.getByteData(), 0, data.getByteData().length);
5959 }
6060 }
6161
00 /*
11 * $Id$
22 *
3 * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
3 * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
44 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55 *
66 * This code is free software; you can redistribute it and/or modify it
3131 import java.net.URL;
3232 import java.net.URLConnection;
3333 import java.net.URLStreamHandler;
34 import java.security.CodeSigner;
3435 import java.security.CodeSource;
3536 import java.security.PermissionCollection;
3637 import java.security.Permissions;
3839 import java.util.HashMap;
3940 import java.util.MissingResourceException;
4041
41 class AgentClassLoader2 extends ClassLoader {
42 class AgentClassLoader2 extends InstantiationClassLoader {
4243
4344 private CodeSource cs = null;
4445 private final HashMap<CodeSource, ProtectionDomain> pdcache = new HashMap<CodeSource, ProtectionDomain>(11);
4546 private static volatile AgentClassLoader2 instance = null;
4647
47 public AgentClassLoader2(Agent.Task parent) {
48 super(parent.getClass().getClassLoader());
48 private AgentClassLoader2(Agent.Task parent, ClassLoader cl) {
49 super(cl);
4950 this.parent = parent;
5051
5152 SecurityManager security = System.getSecurityManager();
6364 }
6465 }
6566
67 private AgentClassLoader2(Agent.Task parent) {
68 this(parent, parent.getClass().getClassLoader());
69 }
6670
6771 private ProtectionDomain getProtectionDomain(CodeSource cs) {
6872 ProtectionDomain pd = null;
9397 return instance;
9498 }
9599
100 public Class loadClassLocal(String name) throws ClassNotFoundException {
101 Class target = null;
102 System.out.println("FORCE REMOTE " + name);
103 try {
104 target = findClass(name);
105 } catch (ClassNotFoundException e) {
106 // not found remote, search locally
107 // this is reverse of normal CL operation
108 target = super.loadClass(name);
109 //target = findSystemClass(name);
110 } catch (NoClassDefFoundError e2) {
111 target = super.loadClass(name);
112 //target = findSystemClass(name);
113 }
114
115 return target;
116 }
117
96118
97119 @Override
98120 public Class findClass(String className) throws ClassNotFoundException {
99121 if (className != null) {
100122 int i = className.lastIndexOf('.');
101 if (i>0) {
102 String pkgName = className.substring(0,i);
123 if (i > 0) {
124 String pkgName = className.substring(0, i);
103125 if (getPackage(pkgName) == null) {
104126 definePackage(pkgName, null, null, null, null, null, null, null);
105127 }
106128 }
107 byte[] data = parent.getClassData(className);
108 return defineClass(className, data, 0, data.length, getProtectionDomain(cs));
129 AgentRemoteClassData classData = parent.getClassData(className);
130 ProtectionDomain pd = null;
131 if (classData != null && classData.getCodeSource() != null) {
132 try {
133 pd = getProtectionDomain(new CodeSource(new URL("file:" + classData.getCodeSource()), (CodeSigner[]) null));
134 } catch (IOException e) {
135 // ProtectionDomain will be replaced
136 }
137 }
138 if (pd == null) {
139 pd = getProtectionDomain(cs);
140 }
141
142 return defineClass(className, classData.getByteData(), 0, classData.getByteData().length, pd);
143
109144 }
110145 throw new ClassNotFoundException();
111146 }
165200
166201 private Agent.Task parent;
167202
203 @Override
204 public ClassLoader newClassLoaderInstance(ClassLoader parentCL) throws InstantiationStateException {
205 if (instance == null || !instance.equals(this)) {
206 synchronized (AgentClassLoader2.class) {
207 if (instance == null || !instance.equals(this)) {
208 return new AgentClassLoader2(parent, parentCL);
209 }
210 }
211 }
212 throw new InstantiationStateException("Only one instance of the "+getClass().getName()+" class could exist");
213 }
214
168215 private class AgentURLStreamHandler extends URLStreamHandler {
169216 AgentURLStreamHandler(byte[] bytes) {
170217 super();
3737 import java.awt.event.WindowEvent;
3838 import java.io.IOException;
3939 import java.io.PrintStream;
40 import java.lang.reflect.InvocationTargetException;
4041 import java.lang.reflect.Method;
4142
4243 import com.sun.javatest.JavaTestSecurityManager;
8990
9091 ActiveModeOptions amo = new ActiveModeOptions();
9192 PassiveModeOptions pmo = new PassiveModeOptions();
92 SerialPortModeOptions smo = new SerialPortModeOptions();
93 ModeOptions smo = null;
94
95 try {
96 Class serial = Class.forName("com.sun.javatest.agent.SerialPortModeOptions");
97 smo = (ModeOptions)serial.newInstance();
98 } catch (Exception e) {
99 System.err.println("There is no support for serial port");
100 }
93101
94102 for (int i = 0; i < args.length; i++) {
95103 try {
178186 System.err.println("Could not initialize serial ports");
179187 System.exit(1);
180188 }
181 else
182 smo.setPort(serialPort);
189 else {
190 try {
191 Method setPortMethod = smo.getClass().getMethod("setPort", String.class);
192 setPortMethod.invoke(smo, serialPort);
193 }
194 catch (SecurityException | NoSuchMethodException |
195 IllegalArgumentException| InvocationTargetException |
196 IllegalAccessException e) {
197 System.err.println("Could not set serial port:");
198 e.printStackTrace();
199 }
200 }
183201 }
184202
185203
00 /*
11 * $Id$
22 *
3 * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
3 * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
44 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55 *
66 * This code is free software; you can redistribute it and/or modify it
2929 import java.io.PrintStream;
3030 import java.lang.reflect.Constructor;
3131 import java.lang.reflect.InvocationTargetException;
32 import java.util.HashMap;
3233
3334 import com.sun.javatest.JavaTestSecurityManager;
3435 import com.sun.javatest.Status;
143144 // installing a less permissive one; moan if it can't be installed.
144145 JavaTestSecurityManager.install();
145146
147 if (Boolean.getBoolean("javatest.trace.printargs") &&
148 args != null && args.length > 0) {
149 StringBuffer fullCmd = new StringBuffer();
150 StringBuffer incrementalCmd = new StringBuffer();
151
152 for (int i = 0; i < args.length; i++) {
153 fullCmd.append(args[i]);
154 fullCmd.append(" ");
155
156 incrementalCmd.append("// ");
157 incrementalCmd.append(args[i]);
158 incrementalCmd.append("\n");
159 } // for
160
161 System.out.println(fullCmd.toString().trim());
162 System.out.println(incrementalCmd.toString());
163 }
164
146165 int rc;
147166 try {
148167 run(args);
280299 else if (args[i].equalsIgnoreCase("-map")) {
281300 mapFile = args[++i];
282301 return 2;
302 } else if (args[i].equalsIgnoreCase("-mapArg")) {
303 mappedArgs.put(args[++i], args[++i]);
304 return 3;
283305 }
284306 else if (args[i].equalsIgnoreCase("-trace")) {
285307 tracing = true;
468490 String[] msgs = {"Problem reading map file", e.toString()};
469491 throw new Fault(msgs);
470492 }
493 } else if (mappedArgs.size() > 0) {
494 agent.setMap(new Map(mappedArgs));
471495 }
472496
473497 Integer delay = Integer.getInteger("agent.retry.delay");
494518 out.println(" -passivePort port set the port for passive connections (implies -passive)");
495519 out.println(" -serialPort port set the port for serial port connections");
496520 out.println(" -map file map file for translating arguments of incoming requests");
521 out.println(" -mapArg from to map \"from\" arg to \"to\" arg for incoming requests");
497522 out.println(" -concurrency num set the maximum number of simultaneous connections");
498523 out.println(" -trace trace the execution of the agent");
499524 out.println(" -observer class add an observer to the agent");
521546 private String serialPort = null;
522547 private int concurrency = 1;
523548 private String mapFile = null;
549 private java.util.Map<String, String> mappedArgs = new HashMap<String, String>();
524550 private String observerClassName;
525551 private boolean tracing;
526552
535561 private static class ErrorObserver implements Agent.Observer {
536562 ErrorObserver() {
537563 try {
538 connectExceptionClass = Class.forName("java.net.ConnectException");
564 connectExceptionClass = Class.forName("java.net.ConnectException", true, ClassLoader.getSystemClassLoader());
539565 }
540566 catch (Throwable t) {
541567 // ignore
542568 }
543569
544570 try {
545 unknownHostExceptionClass = Class.forName("java.net.UnknownHostException");
571 unknownHostExceptionClass = Class.forName("java.net.UnknownHostException", true, ClassLoader.getSystemClassLoader());
546572 }
547573 catch (Throwable t) {
548574 // ignore
00 /*
11 * $Id$
22 *
3 * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
3 * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
44 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55 *
66 * This code is free software; you can redistribute it and/or modify it
309309 }
310310
311311 /**
312 * Set the timeout after command thread will be interrupted on the agent
313 * @param timeout value in seconds
314 */
315 public void setAgentCommandTimeout(int timeout) {
316 this.timeout = timeout;
317 }
318
319 /**
312320 * Request the agent for this client to execute a standard Test class.
313321 * @param tag A string to identify the request in debug and trace output.
314322 * @param className The name of the class to execute. The class must be an
418426 out.writeBoolean(localizeArgs);
419427 out.writeBoolean(classPath != null); // specify remoteClasses if classPath has been given
420428 out.writeBoolean(sharedCl);
429 out.writeInt(timeout);
421430 out.writeByte(0);
422431 out.flush();
423432
459468 case Agent.CLASS:
460469 String className = in.readUTF();
461470 //System.err.println("received request for " + className);
462 byte[] classData = locateClass(className);
463 if (classData == null)
464 //System.err.println("class not found: " + className);
465 out.writeInt(0);
466 else {
467 //System.err.println(classData.length);
468 //for (int i = 0; i < Math.min(10, classData.length); i++) {
469 // System.err.print(classData[i] + " ");
470 //}
471 //System.err.print(" ... ");
472 //for (int i = Math.max(0, classData.length - 10); i < classData.length; i++) {
473 // System.err.print(classData[i] + " ");
474 //}
475 //System.err.println();
476 out.writeInt(classData.length);
477 out.write(classData, 0, classData.length);
478 }
471 AgentRemoteClassData classData = locateClass(className);
472 classData.write(out);
479473 out.flush();
480474 break;
481475
551545 return status;
552546 }
553547
554 private byte[] locateClass(String name) {
548 private AgentRemoteClassData locateClass(String name) {
555549 //System.err.println("locateClass: " + name);
556550 if (classPath != null) {
557551 String cname = name.replace('.', '/') + ".class";
561555 data = readFromDir(cname, classPath[i]);
562556 else
563557 data = readFromJar(cname, classPath[i]);
564 if (data != null)
565 return data;
566 }
567 }
568
569 return null;
558 if (data != null) {
559 String codeSource = "";
560 try {
561 codeSource = classPath[i].toURI().toURL().getPath();
562 } catch (IOException e) {
563 //codeSource will not be set
564 }
565 AgentRemoteClassData classData = new AgentRemoteClassData(name, codeSource, data);
566 return classData;
567 }
568 }
569 }
570
571 return AgentRemoteClassData.NO_CLASS_DATA;
570572 }
571573
572574 private byte[] locateData(String name) {
662664
663665 private File[] classPath;
664666 private boolean sharedCl;
667 private int timeout = 0;
665668 private Hashtable zips = new Hashtable();
666669 }
667670
181181 AgentManager mgr = AgentManager.access();
182182 ActiveAgentPool pool = mgr.getActiveAgentPool();
183183
184 // this line does not function correctly on locales
185 // other than English, it produces garbage as the
186 // thousands separator
187 //Integer p = new Integer(pool.getPort());
188 // warning: line below is not really i18n compliant
189 String p = Integer.toString(pool.getPort());
190 throw new Fault(i18n, "cmgr.listenOn.err", new Object[] {p,e});
184 throw new Fault(i18n, "cmgr.listenOn.err", new Object[] {pool.getPort(), e});
191185 }
192186 }
193187
785785
786786 for (int i = 0; i < modeOptions.length; i++) {
787787 ModeOptions m = modeOptions[i];
788 modeChoice.addItem(m.getModeName());
789 modeDeck.add(m);
788 if (m != null) {
789 modeChoice.addItem(m.getModeName());
790 modeDeck.add(m);
791 }
790792 }
791793
792794 // choices added later by modeOption objects
0 /*
1 * $Id$
2 *
3 * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 *
6 * This code is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 2 only, as
8 * published by the Free Software Foundation. Oracle designates this
9 * particular file as subject to the "Classpath" exception as provided
10 * by Oracle in the LICENSE file that accompanied this code.
11 *
12 * This code is distributed in the hope that it will be useful, but WITHOUT
13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 * version 2 for more details (a copy is included in the LICENSE file that
16 * accompanied this code).
17 *
18 * You should have received a copy of the GNU General Public License version
19 * 2 along with this work; if not, write to the Free Software Foundation,
20 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
21 *
22 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
23 * or visit www.oracle.com if you need additional information or have any
24 * questions.
25 */
26 package com.sun.javatest.agent;
27
28 import java.io.DataInputStream;
29 import java.io.DataOutputStream;
30 import java.io.IOException;
31
32 /**
33 * Class data to send from JT to Agent.
34 *
35 * @since 5.0
36 */
37 class AgentRemoteClassData {
38
39 private String className;
40 private String codeSource;
41 private byte[] byteData;
42
43 static final AgentRemoteClassData NO_CLASS_DATA = new AgentRemoteClassData();
44
45 private AgentRemoteClassData() {
46 }
47
48 AgentRemoteClassData(String className, String codeSource, byte[] byteData) {
49 this.className = className;
50 this.codeSource = codeSource;
51 this.byteData = byteData;
52 }
53
54 AgentRemoteClassData(DataInputStream in) throws IOException, ClassNotFoundException {
55
56 className = in.readUTF();
57
58 if (className == null || className.isEmpty()) {
59 throw new ClassNotFoundException("no class data in the InputStream");
60 }
61
62 codeSource = in.readUTF();
63
64 int size = in.readInt();
65 if (size == 0)
66 throw new ClassNotFoundException(className);
67
68 byteData = new byte[size];
69 int offset = 0;
70 while (offset < byteData.length) {
71 int n = in.read(byteData, offset, byteData.length - offset);
72 if (n == -1)
73 throw new ClassNotFoundException(className + ": EOF while reading class data");
74 else
75 offset += n;
76 }
77
78 }
79
80 public void write(DataOutputStream out) throws IOException {
81 if (className == null || className.isEmpty() ||
82 byteData == null || byteData.length == 0) {
83 out.writeUTF("");
84 } else {
85 out.writeUTF(className);
86 out.writeUTF(codeSource);
87 out.writeInt(byteData.length);
88 out.write(byteData, 0, byteData.length);
89 }
90 }
91
92 public String getCodeSource() {
93 return codeSource;
94 }
95
96 public byte[] getByteData() {
97 return byteData;
98 }
99
100 public String toString() {
101 StringBuilder sb = new StringBuilder();
102 sb.append(" {")
103 .append(" className: ").append(className)
104 .append(" codeSource: ").append(codeSource)
105 .append(" data.length: ").append(byteData == null ? 0 : byteData.length)
106 .append(" }");
107 return sb.toString();
108 }
109
110 }
0 /*
1 * $Id$
2 *
3 * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 *
6 * This code is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 2 only, as
8 * published by the Free Software Foundation. Oracle designates this
9 * particular file as subject to the "Classpath" exception as provided
10 * by Oracle in the LICENSE file that accompanied this code.
11 *
12 * This code is distributed in the hope that it will be useful, but WITHOUT
13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 * version 2 for more details (a copy is included in the LICENSE file that
16 * accompanied this code).
17 *
18 * You should have received a copy of the GNU General Public License version
19 * 2 along with this work; if not, write to the Free Software Foundation,
20 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
21 *
22 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
23 * or visit www.oracle.com if you need additional information or have any
24 * questions.
25 */
26 package com.sun.javatest.agent;
27
28 /**
29 * Abstract class to implement in the Agent ClassLoaders.
30 * This will indicate that ClassLoader Object could create a new one with
31 * the other parent ClassLoader.
32 */
33 public abstract class InstantiationClassLoader extends ClassLoader {
34
35 public InstantiationClassLoader(ClassLoader classLoader) {
36 super(classLoader);
37 }
38
39 /**
40 * Create ClassLoader object with the specified parent ClassLoader
41 *
42 * @param parent ClassLoader to be the new parent ClassLoader
43 * @return New ClassLoader object with new parent ClassLoader
44 * @throws InstantiationStateException if the state of the ClassLoader is not available
45 * to create a new instance (if sharedCL option is used the only one instance of
46 * the current ClassLoader could exist.
47 */
48 public abstract ClassLoader newClassLoaderInstance(ClassLoader parent) throws InstantiationStateException;
49
50 /**
51 * This exception is thrown when the ClassLoader object could not create a new instance
52 */
53 public class InstantiationStateException extends Exception {
54 public InstantiationStateException(String msg) {
55 super(msg);
56 }
57 }
58
59 }
3232 import java.lang.reflect.Constructor;
3333 import java.lang.reflect.InvocationTargetException;
3434 import java.net.URL;
35 import java.nio.charset.StandardCharsets;
3536 import java.util.Enumeration;
3637 import java.util.Vector;
3738 import com.sun.javatest.util.StringArray;
9596 * @throws IOException if any errors occurred reading the URL
9697 */
9798 public static Map readURL(URL u) throws IOException {
98 return new Map(new InputStreamReader(u.openStream()));
99 return new Map(new InputStreamReader(u.openStream(), StandardCharsets.UTF_8.name()));
99100 }
100101
101102
181182 }
182183
183184 /**
185 * Creates a map from the specified <code>java.util.Map</code>.
186 *
187 * @param map the java.util.Map instance to take key-value pairs from
188 */
189 public Map(java.util.Map<String, String> map) {
190 fromValues = new String[map.size()];
191 toValues = new String[map.size()];
192 int index = 0;
193 for (java.util.Map.Entry<String, String> entry : map.entrySet()) {
194 fromValues[index] = entry.getKey();
195 toValues[index] = entry.getValue();
196 index++;
197 }
198 }
199
200 /**
184201 * Enumerate the entries of the map.
185202 * @return an enumeration of the translation entries within the map
186203 */
6969 String host = null;
7070 int port = -1;
7171 String tag = null;
72 int timeout = 0;
7273 boolean localizeArgs = false;
7374
7475 // analyze options
9596 }
9697 else if ((args[i].equals("-t") || args[i].equals("-tag")) && i+1 < args.length) {
9798 tag = args[++i];
99 }
100 else if ((args[i].equals("-ct") || args[i].equals("-commandTimeout")) && i+1 < args.length) {
101 try {
102 timeout = Integer.parseInt(args[++i]);
103 }
104 catch (NumberFormatException e) {
105 return Status.error("bad commandTimeout number: " + args[i]);
106 }
98107 }
99108 else
100109 return Status.error("Unrecognized option: " + args[i]);
132141 t.setClassPath(classPath);
133142
134143 t.setSharedClassLoader(sharedCl);
144 t.setAgentCommandTimeout(timeout);
135145
136146 err.println("Executing command via " + t.getConnection().getName());
137147
33
44 Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
55 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6
6
77 This code is free software; you can redistribute it and/or modify it
88 under the terms of the GNU General Public License version 2 only, as
99 published by the Free Software Foundation. Oracle designates this
1010 particular file as subject to the "Classpath" exception as provided
1111 by Oracle in the LICENSE file that accompanied this code.
12
12
1313 This code is distributed in the hope that it will be useful, but WITHOUT
1414 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1515 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
1616 version 2 for more details (a copy is included in the LICENSE file that
1717 accompanied this code).
18
18
1919 You should have received a copy of the GNU General Public License version
2020 2 along with this work; if not, write to the Free Software Foundation,
2121 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
22
22
2323 Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2424 or visit www.oracle.com if you need additional information or have any
2525 questions.
2929 PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp Index Version 1.0//EN"
3030 "http://java.sun.com/products/javahelp/index_1_0.dtd">
3131
32 <index version="2.0">
33 <!-- A -->
34 <indexitem text="active agent" target="activeAgent.glossary"/>
35 <indexitem text="agent" target="agent.glossary"/>
36 <indexitem text="Agent Monitor" target="agentMonitor.glossary"/>
37 <indexitem text="agent pool" target="agentPool.glossary" />
32 <index version="1.0">
3833
34 <!-- A -->
35 <indexitem text="Active Agent" target="glossary.ActiveAgent"/>
36 <indexitem text="Agent" target="glossary.Agent"/>
37 <indexitem text="Agent Monitor" target="glossary.AgentMonitor"/>
38 <indexitem text="Agent Pool" target="glossary.AgentPool"/>
3939
40 <!-- P -->
41 <indexitem text="passive agent" target="passiveAgent.glossary"/>
40 <!-- B -->
4241
42 <!-- C -->
4343
44 <!-- S -->
45 <indexitem text="serial agent" target="serialAgent.glossary"/>
44 <!-- D -->
4645
46 <!-- E -->
4747
48 <!-- T -->
49 <indexitem text="test manager" target="testManager.glossary"/>
50 <indexitem text="test suite" target="testSuite.glossary"/>
48 <!-- F -->
5149
52 <!-- W -->
53 <indexitem text="work directory" target="workDirectory.glossary"/>
50 <!-- G -->
5451
52 <!-- H -->
53
54 <!-- I -->
55
56 <!-- J -->
57
58 <!-- K -->
59
60 <!-- L -->
61
62 <!-- M -->
63
64 <!-- N -->
65
66 <!-- O -->
67
68 <!-- P -->
69 <indexitem text="Parameters" target="glossary.Parameters"/>
70 <indexitem text="Passive Agent" target="glossary.PassiveAgent"/>
71
72 <!-- Q -->
73
74 <!-- R -->
75
76 <!-- S -->
77 <indexitem text="Serial Agent" target="glossary.SerialAgent"/>
78
79 <!-- T -->
80 <indexitem text="Test Manager" target="glossary.TestManager"/>
81 <indexitem text="Test Suite" target="glossary.TestSuite"/>
82
83 <!-- U -->
84
85 <!-- V -->
86
87 <!-- W -->
88 <indexitem text="Work Directory" target="glossary.WorkDirectory"/>
5589 </index>
33
44 Copyright (c) 2001, 2009, Oracle and/or its affiliates. All rights reserved.
55 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6
6
77 This code is free software; you can redistribute it and/or modify it
88 under the terms of the GNU General Public License version 2 only, as
99 published by the Free Software Foundation. Oracle designates this
1010 particular file as subject to the "Classpath" exception as provided
1111 by Oracle in the LICENSE file that accompanied this code.
12
12
1313 This code is distributed in the hope that it will be useful, but WITHOUT
1414 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1515 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
1616 version 2 for more details (a copy is included in the LICENSE file that
1717 accompanied this code).
18
18
1919 You should have received a copy of the GNU General Public License version
2020 2 along with this work; if not, write to the Free Software Foundation,
2121 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
22
22
2323 Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2424 or visit www.oracle.com if you need additional information or have any
2525 questions.
2929 PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp Index Version 1.0//EN"
3030 "http://java.sun.com/products/javahelp/index_1_0.dtd">
3131
32 <index version="2.0">
33
34
35 <!-- A -->
36 <indexitem text="active agents, troubleshooting" target="agent.troubleshootingActive"/>
37 <indexitem text="active host (active agent), setting" target="agent.configureActiveAgents.host"/>
38 <indexitem text="Agent Monitor" target="agent.window.csh"/>
39 <indexitem text="agent pool" target="agent.agentPool"/>
40 <indexitem text="auto-start the agent" target="agent.additionalOptions.autoStart"/>
41
42
43 <!-- B -->
44
45
46 <!-- C -->
47
48 <indexitem text="concurrency values (agents), setting" target="agent.additionalOptions.concurrency"/>
49 <indexitem text="creating a map file (agents)" target="agent.mapFile"/>
50
51
52 <!-- D -->
53 <indexitem text="displaying command-line help (agents)" target="agent.additionalOptions.help"/>
54
55 <!-- E -->
56
57
58 <!-- F -->
59
60 <indexitem text="file, specifying a map" target="agent.additionalOptions.mapFile"/>
61 <indexitem text="files, creating map" target="agent.mapFile"/>
62
63
64 <!-- G -->
65
66 <!-- H -->
67 <indexitem text="help, agent command-line" target="agent.additionalOptions.help"/>
68
69 <!-- M -->
70 <indexitem text="map files, specifying" target="agent.additionalOptions.mapFile"/>
71 <indexitem text="map file, creating a (agents)" target="agent.mapFile"/>
72 <indexitem text="Monitor, Agent" target="agent.window.csh"/>
73
74 <indexitem text="monitoring JT Harness Agents" target="agent.monitoring"/>
75
76
77 <!-- P -->
78 <indexitem text="passive agents, troubleshooting" target="agent.troubleshootingPassive"/>
79 <indexitem text="pool, agent" target="agent.window.csh"/>
80 <indexitem text="port number (active agents), setting" target="agent.configureActiveAgents.port"/>
81
82
83 <!-- S -->
84 <indexitem text="set tracing (agents)" target="agent.additionalOptions.tracing"/>
85 <indexitem text="setting the active host (active agents)" target="agent.configureActiveAgents.host"/>
86 <indexitem text="setting concurrency (agents)" target="agent.additionalOptions.concurrency"/>
87 <indexitem text="setting tasks in history (active agents)" target="agent.additionalOptions.history"/>
88 <indexitem text="specifying a map file (agents)" target="agent.additionalOptions.mapFile"/>
89
90
91 <!-- T -->
92
93 <indexitem text="tasks in history, setting (agents)" target="agent.additionalOptions.history"/>
94
95 <indexitem text="tracing agent activity, set " target="agent.additionalOptions.tracing"/>
96
97 <indexitem text="troubleshooting active agents" target="agent.troubleshootingActive"/>
98 <indexitem text="troubleshooting JT Harness Agents" target="agent.troubleshooting"/>
99 <indexitem text="troubleshooting passive agents" target="agent.troubleshootingPassive"/>
100
101
32 <index version="1.0">
33 <indexitem text="active agent" target="index.agentConfigureActiveAgentsConfigureActiveAgentsPort" />
34 <indexitem text="active agents" target="index.agentTroubleshootingActiveMonitoring" />
35 <indexitem text="additional options" target="index.agentAdditionalOptionsAdditionalOptionsTracing" />
36 <indexitem text="Agent" target="index.agentUsingAgentsUsingAgents" />
37 <indexitem text="agent applet" target="index.agentStartAppletsStartAppletsOptions" />
38 <indexitem text="agent application" target="index.agentStartApplicationStartApplicationAppOptions" />
39 <indexitem text="agent classes" target="index.agentStartApplicationStartApplicationClassPathsAgentPaths" />
40 <indexitem text="agent GUI" target="index.agentTaskPaneTaskPane" />
41 <indexitem text="Agent Monitor window" target="index.agentWindowWindowAgentInUse" />
42 <indexitem text="agent pool" target="index.agentWindowWindowAgentPool" />
43 <indexitem text="agents currently used" target="index.agentWindowWindowAgentInUse" />
44 <indexitem text="applet" target="index.agentStartAgentStartAgentApplet" />
45 <indexitem text="applet tag" target="index.agentStartAppletsStartAppletsOptions" />
46 <indexitem text="application" target="index.agentStartAgentStartAgentApplication" />
47 <indexitem text="autoStart the agent" target="index.agentAdditionalOptionsAdditionalOptionsAutostart" />
48 <indexitem text="choosing type of" target="index.agentChoosingAgentsConfigureActiveAgents" />
49 <indexitem text="choosing type of agent" target="index.agentChoosingAgentsConfigureActiveAgents" />
50 <indexitem text="classes" target="index.agentStartGUIStartGUIClassPaths" />
51 <indexitem text="configure an agent" target="index.agentStartGUIStartGUIConfigure" />
52 <indexitem text="creating" target="index.agentMapFileMapFile" />
53 <indexitem text="creating a map file" target="index.agentMapFileMapFile" />
54 <indexitem text="display help" target="index.agentStartGUIStartGUIHelp" />
55 <indexitem text="GUI" target="index.agentStartAgentStartAgentGui" />
56 <indexitem text="help" target="index.agentAdditionalOptionsAdditionalOptionsHelp" />
57 <indexitem text="history tabbed pane" target="index.agentHistoryPaneHistoryPane" />
58 <indexitem text="history tabbed pane, agent GUI" target="index.agentHistoryPaneHistoryPane" />
59 <indexitem text="host" target="index.agentConfigureActiveAgentsConfigureActiveAgentsHost" />
60 <indexitem text="installing" target="index.agentLoadingClassesConfigurePassiveAgents" />
61 <indexitem text="installing agent classes" target="index.agentLoadingClassesConfigurePassiveAgents" />
62 <indexitem text="JT Harness" target="index.agentUsingAgentsUsingAgents" />
63 <indexitem text="JT Harness agent" target="index.agentStartAgentStartAgentGui" />
64 <indexitem text="JT Harness Agents" target="index.agentMonitoringMonitoring" />
65 <indexitem text="map file" target="index.agentMapFileMapFile" />
66 <indexitem text="mode" target="index.agentConfigureSerialAgentsConfigureSerialAgentsMode" />
67 <indexitem text="monitor" target="index.agentMonitoringMonitoring" />
68 <indexitem text="monitor JT Harness agents" target="index.agentMonitoringMonitoring" />
69 <indexitem text="options" target="index.agentStartGUIStartGUIConfigure" />
70 <indexitem text="passive agent" target="index.agentConfigurePassiveAgentsConfigurePassiveAgentsPort" />
71 <indexitem text="passive agents" target="index.agentTroubleshootingPassiveMonitoring" />
72 <indexitem text="port" target="index.agentConfigureSerialAgentsConfigureSerialAgentsPort" />
73 <indexitem text="required class paths" target="index.agentStartApplicationStartApplicationAppClass" />
74 <indexitem text="run and monitor the Agent" target="index.agentAdditionalOptionsAdditionalOptionsBoth" />
75 <indexitem text="run tests using an agent" target="index.agentRunTestsRunTests" />
76 <indexitem text="serial agent" target="index.agentConfigureSerialAgentsConfigureSerialAgentsPort" />
77 <indexitem text="set concurrency" target="index.agentAdditionalOptionsAdditionalOptionsConcurrencyValue" />
78 <indexitem text="set in the command line" target="index.agentStartGUIStartGUIOnly" />
79 <indexitem text="set maximum number" target="index.agentAdditionalOptionsAdditionalOptionsTaskHistory" />
80 <indexitem text="set tracing" target="index.agentAdditionalOptionsAdditionalOptionsTracing" />
81 <indexitem text="setting" target="index.agentConfigureSerialAgentsConfigureSerialAgentsPort" />
82 <indexitem text="setting parameters" target="index.agentStartAppletsStartAppletsOptions" />
83 <indexitem text="setting parameters in the applet tag" target="index.agentStartAppletsStartAppletsOptions" />
84 <indexitem text="start" target="index.agentStartApplicationStartApplicationAppOptions" />
85 <indexitem text="start an agent application" target="index.agentStartApplicationStartApplicationAppOptions" />
86 <indexitem text="starting" target="index.agentStartGUIStartGUIClassPaths" />
87 <indexitem text="starting a JT Harness agent" target="index.agentStartAgentStartAgentApplet" />
88 <indexitem text="starting an agent applet" target="index.agentStartAppletsStartAppletsAppletTag" />
89 <indexitem text="starting an agent GUI" target="index.agentStartGUIStartGUIConfigure" />
90 <indexitem text="statistics tabbed pane" target="index.agentStatisticsPaneStatisticsPane" />
91 <indexitem text="statistics tabbed pane, agent GUI" target="index.agentStatisticsPaneStatisticsPane" />
92 <indexitem text="task tabbed pane" target="index.agentTaskPaneTaskPane" />
93 <indexitem text="task tabbed pane, agent GUI" target="index.agentTaskPaneTaskPane" />
94 <indexitem text="tasks in history pane" target="index.agentAdditionalOptionsAdditionalOptionsTaskHistory" />
95 <indexitem text="test classes" target="index.agentStartApplicationStartApplicationClassPathsTestPaths" />
96 <indexitem text="to configure an agent" target="index.agentStartGUIStartGUIConfigure" />
97 <indexitem text="to run the agent" target="index.agentStartGUIStartGUIBoth" />
98 <indexitem text="troubleshooting" target="index.agentTroubleshootingPassiveMonitoring" />
99 <indexitem text="troubleshooting active agents" target="index.agentTroubleshootingActiveMonitoring" />
100 <indexitem text="troubleshooting JT Harness agents" target="index.agentTroubleshootingTroubleshooting" />
101 <indexitem text="troubleshooting passive agents" target="index.agentTroubleshootingPassiveMonitoring" />
102 <indexitem text="window, Agent Monitor" target="index.agentWindowWindow" />
102103 </index>
33
44 Copyright (c) 2002, 2009, Oracle and/or its affiliates. All rights reserved.
55 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6
6
77 This code is free software; you can redistribute it and/or modify it
88 under the terms of the GNU General Public License version 2 only, as
99 published by the Free Software Foundation. Oracle designates this
1010 particular file as subject to the "Classpath" exception as provided
1111 by Oracle in the LICENSE file that accompanied this code.
12
12
1313 This code is distributed in the hope that it will be useful, but WITHOUT
1414 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1515 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
1616 version 2 for more details (a copy is included in the LICENSE file that
1717 accompanied this code).
18
18
1919 You should have received a copy of the GNU General Public License version
2020 2 along with this work; if not, write to the Free Software Foundation,
2121 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
22
22
2323 Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2424 or visit www.oracle.com if you need additional information or have any
2525 questions.
2828 <!DOCTYPE map
2929 PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp Map Version 1.0//EN"
3030 "http://java.sun.com/products/javahelp/map_1_0.dtd">
31
3231 <map version="1.0">
33
34 <!-- Icons used in TOC -->
35
36 <mapID target="chapter" url="../images/chapter.gif" />
37 <mapID target="topic" url="../images/topic.gif"/>
38 <mapID target="openbook" url="../images/openbook.gif" />
39 <mapID target="closedbook" url="../images/closedbook.gif" />
40
41 <mapID target="agent.runTests" url="agent/runTests.html" />
42
43 <!-- Using Agents -->
44 <mapID target="agent.window.csh" url="agent/window.html" />
45
46 <!-- Agent Monitor window -->
47 <mapID target="agent.usingAgents" url="agent/usingAgents.html" />
48 <mapID target="agent.choosingAgents" url="agent/choosingAgents.html" />
49 <mapID target="agent.startAgent" url="agent/startAgent.html" />
50 <mapID target="agent.startApplication" url="agent/startApplication.html" />
51 <mapID target="agent.startApplets" url="agent/startApplets.html" />
52 <mapID target="agent.configureActiveAgents" url="agent/configureActiveAgents.html" />
53 <mapID target="agent.configurePassiveAgents" url="agent/configurePassiveAgents.html" />
54 <mapID target="agent.configureSerialAgents" url="agent/configureSerialAgents.html" />
55 <mapID target="agent.additionalOptions" url="agent/additionalOptions.html" />
56 <mapID target="agent.monitoring" url="agent/monitoring.html" />
57 <mapID target="agent.statisticsPane" url="agent/statisticsPane.html" />
58 <mapID target="agent.historyPane" url="agent/historyPane.html" />
59 <mapID target="agent.taskPane" url="agent/taskPane.html" />
60 <mapID target="agent.troubleshooting" url="agent/troubleshooting.html" />
61 <mapID target="agent.troubleshootingActive" url="agent/troubleshootingActive.html" />
62 <mapID target="agent.troubleshootingPassive" url="agent/troubleshootingPassive.html" />
63 <mapID target="agent.loadingAgents" url="agent/loadingClasses.html" />
64 <mapID target="agent.AgentFrame" url="agent/classDepLists/AgentFrame.html" />
65 <mapID target="agent.AgentMain" url="agent/classDepLists/AgentMain.html" />
66 <mapID target="agent.AgentApplet" url="agent/classDepLists/AgentApplet.html" />
67 <mapID target="agent.mapFile" url="agent/mapFile.html" />
68
69 <!-- Glossary IDs -->
70 <!-- generated automatically by build -->
71
72 <!-- Anchor points used in the index -->
73 <!-- generated automatically by build -->
74
32 <mapID target="agent.AgentApplet" url="agent/classDepLists/AgentApplet.html" />
33 <mapID target="agent.AgentFrame" url="agent/classDepLists/AgentFrame.html" />
34 <mapID target="agent.AgentMain" url="agent/classDepLists/AgentMain.html" />
35 <mapID target="agent.additionalOptions" url="agent/additionalOptions.html" />
36 <mapID target="agent.choosingAgents" url="agent/choosingAgents.html" />
37 <mapID target="agent.configureActiveAgents" url="agent/configureActiveAgents.html" />
38 <mapID target="agent.configurePassiveAgents" url="agent/configurePassiveAgents.html" />
39 <mapID target="agent.configureSerialAgents" url="agent/configureSerialAgents.html" />
40 <mapID target="agent.historyPane" url="agent/historyPane.html" />
41 <mapID target="agent.loadingAgents" url="agent/loadingClasses.html" />
42 <mapID target="agent.mapFile" url="agent/mapFile.html" />
43 <mapID target="agent.monitoring" url="agent/monitoring.html" />
44 <mapID target="agent.runTests" url="agent/runTests.html" />
45 <mapID target="agent.startAgent" url="agent/startAgent.html" />
46 <mapID target="agent.startApplets" url="agent/startApplets.html" />
47 <mapID target="agent.startApplication" url="agent/startApplication.html" />
48 <mapID target="agent.statisticsPane" url="agent/statisticsPane.html" />
49 <mapID target="agent.taskPane" url="agent/taskPane.html" />
50 <mapID target="agent.troubleshooting" url="agent/troubleshooting.html" />
51 <mapID target="agent.troubleshootingActive" url="agent/troubleshootingActive.html" />
52 <mapID target="agent.troubleshootingPassive" url="agent/troubleshootingPassive.html" />
53 <mapID target="agent.usingAgents" url="agent/usingAgents.html" />
54 <mapID target="agent.window.csh" url="agent/window.html" />
55 <mapID target="chapter" url="../images/chapter.gif" />
56 <mapID target="closedbook" url="../images/closedbook.gif" />
57 <mapID target="glossary.ActiveAgent" url="/Users/alekseyof/javatest_os/jtharness/src/com/sun/javatest/agent/help/default/glossary/activeAgent.html" />
58 <mapID target="glossary.Agent" url="/Users/alekseyof/javatest_os/jtharness/src/com/sun/javatest/agent/help/default/glossary/agent.html" />
59 <mapID target="glossary.AgentMonitor" url="/Users/alekseyof/javatest_os/jtharness/src/com/sun/javatest/agent/help/default/glossary/agentMonitor.html" />
60 <mapID target="glossary.AgentPool" url="/Users/alekseyof/javatest_os/jtharness/src/com/sun/javatest/agent/help/default/glossary/agentPool.html" />
61 <mapID target="glossary.Parameters" url="/Users/alekseyof/javatest_os/jtharness/src/com/sun/javatest/agent/help/default/glossary/parameters.html" />
62 <mapID target="glossary.PassiveAgent" url="/Users/alekseyof/javatest_os/jtharness/src/com/sun/javatest/agent/help/default/glossary/passiveAgent.html" />
63 <mapID target="glossary.SerialAgent" url="/Users/alekseyof/javatest_os/jtharness/src/com/sun/javatest/agent/help/default/glossary/serialAgent.html" />
64 <mapID target="glossary.TestManager" url="/Users/alekseyof/javatest_os/jtharness/src/com/sun/javatest/agent/help/default/glossary/testManager.html" />
65 <mapID target="glossary.TestSuite" url="/Users/alekseyof/javatest_os/jtharness/src/com/sun/javatest/agent/help/default/glossary/testSuite.html" />
66 <mapID target="glossary.WorkDirectory" url="/Users/alekseyof/javatest_os/jtharness/src/com/sun/javatest/agent/help/default/glossary/workDirectory.html" />
67 <mapID target="index.agentAdditionalOptionsAdditionalOptionsAutostart" url="agent/additionalOptions.html#additionalOptions.autostart" />
68 <mapID target="index.agentAdditionalOptionsAdditionalOptionsBoth" url="agent/additionalOptions.html#additionalOptions.both" />
69 <mapID target="index.agentAdditionalOptionsAdditionalOptionsConcurrencyValue" url="agent/additionalOptions.html#additionalOptions.concurrencyValue" />
70 <mapID target="index.agentAdditionalOptionsAdditionalOptionsHelp" url="agent/additionalOptions.html#additionalOptions.help" />
71 <mapID target="index.agentAdditionalOptionsAdditionalOptionsTaskHistory" url="agent/additionalOptions.html#additionalOptions.taskHistory" />
72 <mapID target="index.agentAdditionalOptionsAdditionalOptionsTracing" url="agent/additionalOptions.html#additionalOptions.tracing" />
73 <mapID target="index.agentChoosingAgentsConfigureActiveAgents" url="agent/choosingAgents.html#configureActiveAgents" />
74 <mapID target="index.agentConfigureActiveAgentsConfigureActiveAgentsHost" url="agent/configureActiveAgents.html#configureActiveAgents.host" />
75 <mapID target="index.agentConfigureActiveAgentsConfigureActiveAgentsPort" url="agent/configureActiveAgents.html#configureActiveAgents.port" />
76 <mapID target="index.agentConfigurePassiveAgentsConfigurePassiveAgentsPort" url="agent/configurePassiveAgents.html#configurePassiveAgents.port" />
77 <mapID target="index.agentConfigureSerialAgentsConfigureSerialAgentsMode" url="agent/configureSerialAgents.html#configureSerialAgents.mode" />
78 <mapID target="index.agentConfigureSerialAgentsConfigureSerialAgentsPort" url="agent/configureSerialAgents.html#configureSerialAgents.port" />
79 <mapID target="index.agentHistoryPaneHistoryPane" url="agent/historyPane.html#historyPane" />
80 <mapID target="index.agentLoadingClassesConfigurePassiveAgents" url="agent/loadingClasses.html#configurePassiveAgents" />
81 <mapID target="index.agentMapFileMapFile" url="agent/mapFile.html#mapFile" />
82 <mapID target="index.agentMonitoringMonitoring" url="agent/monitoring.html#monitoring" />
83 <mapID target="index.agentRunTestsRunTests" url="agent/runTests.html#runTests" />
84 <mapID target="index.agentStartAgentStartAgentApplet" url="agent/startAgent.html#startAgent.applet" />
85 <mapID target="index.agentStartAgentStartAgentApplication" url="agent/startAgent.html#startAgent.application" />
86 <mapID target="index.agentStartAgentStartAgentGui" url="agent/startAgent.html#startAgent.gui" />
87 <mapID target="index.agentStartAppletsStartAppletsAppletTag" url="agent/startApplets.html#startApplets.appletTag" />
88 <mapID target="index.agentStartAppletsStartAppletsOptions" url="agent/startApplets.html#startApplets.options" />
89 <mapID target="index.agentStartApplicationStartApplicationAppClass" url="agent/startApplication.html#startApplication.appClass" />
90 <mapID target="index.agentStartApplicationStartApplicationAppOptions" url="agent/startApplication.html#startApplication.appOptions" />
91 <mapID target="index.agentStartApplicationStartApplicationClassPathsAgentPaths" url="agent/startApplication.html#startApplication.classPaths.agentPaths" />
92 <mapID target="index.agentStartApplicationStartApplicationClassPathsTestPaths" url="agent/startApplication.html#startApplication.classPaths.testPaths" />
93 <mapID target="index.agentStartGUIStartGUIBoth" url="agent/startGUI.html#startGUI.both" />
94 <mapID target="index.agentStartGUIStartGUIClassPaths" url="agent/startGUI.html#startGUI.classPaths" />
95 <mapID target="index.agentStartGUIStartGUIConfigure" url="agent/startGUI.html#startGUI.configure" />
96 <mapID target="index.agentStartGUIStartGUIHelp" url="agent/startGUI.html#startGUI.help" />
97 <mapID target="index.agentStartGUIStartGUIOnly" url="agent/startGUI.html#startGUI.only" />
98 <mapID target="index.agentStatisticsPaneStatisticsPane" url="agent/statisticsPane.html#statisticsPane" />
99 <mapID target="index.agentTaskPaneTaskPane" url="agent/taskPane.html#taskPane" />
100 <mapID target="index.agentTroubleshootingActiveMonitoring" url="agent/troubleshootingActive.html#monitoring" />
101 <mapID target="index.agentTroubleshootingPassiveMonitoring" url="agent/troubleshootingPassive.html#monitoring" />
102 <mapID target="index.agentTroubleshootingTroubleshooting" url="agent/troubleshooting.html#troubleshooting" />
103 <mapID target="index.agentUsingAgentsUsingAgents" url="agent/usingAgents.html#usingAgents" />
104 <mapID target="index.agentWindowWindow" url="agent/window.html#window" />
105 <mapID target="index.agentWindowWindowAgentInUse" url="agent/window.html#window.agentInUse" />
106 <mapID target="index.agentWindowWindowAgentPool" url="agent/window.html#window.agentPool" />
107 <mapID target="openbook" url="../images/openbook.gif" />
108 <mapID target="topic" url="../images/topic.gif" />
75109 </map>
3939 cmgr.help.monitorAgent.desc=Start the Agent Monitor tool
4040 cmgr.help.startAgentPool.name=-startAgentPool
4141 cmgr.help.startAgentPool.desc=Start the Active Agent Pool
42 cmgr.listenOn.err=Error when starting active agent pool on port number {0}.\n{1}
42 cmgr.listenOn.err=Error when starting active agent pool on port number {0,number,#####}.\n{1}
4343 cmgr.missingArg.err=Argument missing
4444
4545 tmgr.openMonitor.act=Agent Monitor...
3737 import java.awt.event.HierarchyListener;
3838 import java.io.File;
3939 import java.util.Map;
40 import javax.help.CSH;
4140 import javax.swing.BorderFactory;
4241 import javax.swing.JLabel;
4342 import javax.swing.JMenu;
4847 import javax.swing.event.ChangeEvent;
4948 import javax.swing.event.ChangeListener;
5049
50 import com.sun.javatest.tool.jthelp.ContextHelpManager;
5151 import com.sun.javatest.InterviewParameters;
5252 import com.sun.javatest.TestSuite;
5353 import com.sun.javatest.WorkDirectory;
183183 tabs.addChangeListener(new ChangeListener() {
184184 public void stateChanged(ChangeEvent e) {
185185 Component c = tabs.getSelectedComponent();
186 CSH.setHelpIDString(tabs, CSH.getHelpIDString(c));
186 ContextHelpManager.setHelpIDString(tabs, ContextHelpManager.getHelpIDString(c));
187187 }
188188 });
189 CSH.setHelpIDString(tabs, CSH.getHelpIDString(panes[0]));
189 ContextHelpManager.setHelpIDString(tabs, ContextHelpManager.getHelpIDString(panes[0]));
190190
191191 add(tabs, BorderLayout.CENTER);
192192
2525 */
2626 package com.sun.javatest.audit;
2727
28 import javax.help.CSH;
28 import com.sun.javatest.tool.jthelp.ContextHelpManager;
2929
3030 import com.sun.javatest.tool.UIFactory;
3131
3232 class BadChecksumPane extends ListPane {
3333 BadChecksumPane(UIFactory uif) {
3434 super("badChecksum", uif);
35 CSH.setHelpIDString(this, "audit.badChecksumTab.csh");
35 ContextHelpManager.setHelpIDString(this, "audit.badChecksumTab.csh");
3636 }
3737
3838 void show(Audit audit) {
2727
2828 import com.sun.javatest.tool.UIFactory;
2929
30 import javax.help.CSH;
30 import com.sun.javatest.tool.jthelp.ContextHelpManager;
3131
3232
3333 class BadTestCaseTestsPane extends ListPane {
3434 BadTestCaseTestsPane(UIFactory uif) {
3535 super("badTestCaseTests", uif);
36 CSH.setHelpIDString(this, "audit.badTestCasesTab.csh");
36 ContextHelpManager.setHelpIDString(this, "audit.badTestCasesTab.csh");
3737 }
3838
3939 void show(Audit audit) {
2525 */
2626 package com.sun.javatest.audit;
2727
28 import javax.help.CSH;
28 import com.sun.javatest.tool.jthelp.ContextHelpManager;
2929
3030 import com.sun.javatest.tool.UIFactory;
3131
3333 class BadTestDescriptionPane extends ListPane {
3434 BadTestDescriptionPane(UIFactory uif) {
3535 super("badTestDesc", uif);
36 CSH.setHelpIDString(this, "audit.badTestDescriptionTab.csh");
36 ContextHelpManager.setHelpIDString(this, "audit.badTestDescriptionTab.csh");
3737 }
3838
3939 void show(Audit audit) {
2525 */
2626 package com.sun.javatest.audit;
2727
28 import javax.help.CSH;
28 import com.sun.javatest.tool.jthelp.ContextHelpManager;
2929
3030 import com.sun.javatest.tool.UIFactory;
3131
3333 class BadTestsPane extends ListPane {
3434 BadTestsPane(UIFactory uif) {
3535 super("badTests", uif);
36 CSH.setHelpIDString(this, "audit.badResultFileTab.csh");
36 ContextHelpManager.setHelpIDString(this, "audit.badResultFileTab.csh");
3737 }
3838
3939 void show(Audit audit) {
2828 import java.io.IOException;
2929 import java.io.StringWriter;
3030 import java.util.Date;
31 import javax.help.CSH;
3231 import javax.swing.BorderFactory;
3332 import javax.swing.JEditorPane;
3433 import javax.swing.JScrollPane;
3534
35 import com.sun.javatest.tool.jthelp.ContextHelpManager;
3636 import com.sun.javatest.Status;
3737 import com.sun.javatest.TestDescription;
3838 import com.sun.javatest.TestResult;
5555 JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
5656 setBody(sp);
5757
58 CSH.setHelpIDString(this, "audit.summaryTab.csh");
58 ContextHelpManager.setHelpIDString(this, "audit.summaryTab.csh");
5959
6060 OK = uif.getI18NString("smry.state.OK");
6161 ERROR = uif.getI18NString("smry.state.error");
9494 private CustomFilter filter = new CustomFilterAdapter();
9595
9696 void setCustomFilter(String filterClassName) throws ClassNotFoundException, InstantiationException, IllegalAccessException {
97 Class c = Class.forName(filterClassName);
97 Class c = Class.forName(filterClassName, true, ClassLoader.getSystemClassLoader());
9898 filter = (CustomFilter) c.newInstance();
9999 }
100100
2525 */
2626 package com.sun.javatest.cof;
2727
28 import java.io.BufferedReader;
29 import java.io.File;
30 import java.io.FileReader;
31 import java.io.IOException;
28 import java.io.*;
29 import java.nio.charset.StandardCharsets;
3230 import java.util.ArrayList;
3331 import java.util.HashMap;
3432 import java.util.List;
5149 table = new HashMap<String, ArrayList<String>>();
5250 BufferedReader r = null;
5351 try {
54 r = new BufferedReader(new FileReader(mtl));
52 r = new BufferedReader(new InputStreamReader(new FileInputStream(mtl), StandardCharsets.UTF_8));
5553 String line;
5654 while ((line = r.readLine()) != null) {
5755 StringTokenizer st = new StringTokenizer(line);
2626 package com.sun.javatest.cof;
2727
2828 import com.sun.javatest.InterviewParameters;
29 import java.io.BufferedInputStream;
30 import java.io.BufferedOutputStream;
31 import java.io.File;
32 import java.io.FileInputStream;
33 import java.io.FileNotFoundException;
34 import java.io.FileOutputStream;
35 import java.io.FileWriter;
36 import java.io.IOException;
37 import java.io.InputStream;
38 import java.io.OutputStream;
39 import java.io.PrintWriter;
29
30 import java.io.*;
4031 import java.nio.channels.FileChannel;
32 import java.nio.charset.StandardCharsets;
4133 import java.util.Vector;
4234
4335 import com.sun.javatest.TestSuite;
364356 public void writeReport(Report r, File outputFile) throws Fault {
365357 // creating report
366358 try {
367 XMLWriter out = new XMLWriter(new FileWriter(outputFile));
359 XMLWriter out = new XMLWriter(new BufferedWriter(new OutputStreamWriter(new FileOutputStream(outputFile), StandardCharsets.UTF_8)));
368360 r.write(out);
369361 out.close();
370362 } catch (IOException e) {
5757 import javax.swing.table.TableColumn;
5858 import javax.swing.table.TableModel;
5959
60 import javax.help.CSH;
61
60 import com.sun.javatest.tool.jthelp.ContextHelpManager;
6261 import com.sun.javatest.TestFilter;
6362 import com.sun.javatest.TestResult;
6463 import com.sun.javatest.TestResultTable;
9594 super("fo", uif, bpm, ttm, "br.fo");
9695
9796 init();
98 CSH.setHelpIDString(this, "browse.filteredOutTab.csh");
97 ContextHelpManager.setHelpIDString(this, "browse.filteredOutTab.csh");
9998
10099 cacheWatcher = new CacheObserver();
101100 }
3838 import java.awt.image.BufferedImage;
3939 import java.util.Arrays;
4040
41 import javax.help.CSH;
42
4341 import javax.swing.BorderFactory;
4442 import javax.swing.Box;
4543 import javax.swing.Icon;
6260 import com.sun.javatest.tool.PieChart;
6361 import com.sun.javatest.tool.UIFactory;
6462 import com.sun.javatest.util.Debug;
63 import com.sun.javatest.tool.jthelp.ContextHelpManager;
6564
6665 /**
6766 * Subpanel of BranchPanel. This panel displays a summary of tests below the given
8483 pieColors[pieColors.length - 1] = I18NUtils.getStatusColor(I18NUtils.FILTERED_OUT);
8584 }
8685
87 CSH.setHelpIDString(this, "browse.summaryTab.csh");
86 ContextHelpManager.setHelpIDString(this, "browse.summaryTab.csh");
8887
8988 JPanel bodyPanel = uif.createPanel("br.summ.body", false);
9089 bodyPanel.setLayout(new GridBagLayout());
6565 import javax.swing.table.TableColumn;
6666 import javax.swing.table.TableModel;
6767
68 import javax.help.CSH;
69
7068 import com.sun.javatest.Harness;
7169 import com.sun.javatest.JavaTestError;
7270 import com.sun.javatest.Status;
7876 import com.sun.javatest.util.Debug;
7977 import com.sun.javatest.util.I18NResourceBundle;
8078 import com.sun.javatest.util.StringArray;
79 import com.sun.javatest.tool.jthelp.ContextHelpManager;
8180 import java.awt.datatransfer.Clipboard;
8281
8382 /**
109108 // the enableHelp lines below are checked during the build
110109 switch (state) {
111110 case Status.PASSED:
112 CSH.setHelpIDString(this, "browse.passedTab.csh");
111 ContextHelpManager.setHelpIDString(this, "browse.passedTab.csh");
113112 break;
114113 case Status.FAILED:
115 CSH.setHelpIDString(this, "browse.failedTab.csh");
114 ContextHelpManager.setHelpIDString(this, "browse.failedTab.csh");
116115 break;
117116 case Status.ERROR:
118 CSH.setHelpIDString(this, "browse.errorTab.csh");
117 ContextHelpManager.setHelpIDString(this, "browse.errorTab.csh");
119118 break;
120119 case Status.NOT_RUN:
121 CSH.setHelpIDString(this, "browse.notRunTab.csh");
120 ContextHelpManager.setHelpIDString(this, "browse.notRunTab.csh");
122121 break;
123122 case BranchPanel.STATUS_FILTERED:
124 CSH.setHelpIDString(this, "browse.filteredOutTab.csh");
123 ContextHelpManager.setHelpIDString(this, "browse.filteredOutTab.csh");
125124 break;
126125 } // switch
127126
3131 import java.awt.event.ComponentListener;
3232 import java.awt.event.ComponentEvent;
3333
34 import javax.help.CSH;
3534 import javax.swing.BorderFactory;
3635 import javax.swing.JComponent;
3736 import javax.swing.JPanel;
5049 import com.sun.javatest.TestFilter;
5150 import com.sun.javatest.TestResult;
5251 import com.sun.javatest.TestResultTable;
52 import com.sun.javatest.tool.jthelp.ContextHelpManager;
5353
5454 import com.sun.javatest.tool.IconFactory;
5555 import com.sun.javatest.tool.UIFactory;
177177 */
178178
179179 currPanel = summPanel;
180 CSH.setHelpIDString(bPane, CSH.getHelpIDString(currPanel));
180 ContextHelpManager.setHelpIDString(bPane, ContextHelpManager.getHelpIDString(currPanel));
181181
182182 setLayout(new BorderLayout());
183183 add(bPane, BorderLayout.CENTER);
223223
224224 if (newPanel != currPanel) {
225225 // update help for tabbed pane to reflect help for selected panel
226 CSH.setHelpIDString(bPane, CSH.getHelpIDString(newPanel));
226 ContextHelpManager.setHelpIDString(bPane, ContextHelpManager.getHelpIDString(newPanel));
227227 currPanel = newPanel;
228228 }
229229
3030 import java.io.File;
3131 import java.io.IOException;
3232 import java.util.Arrays;
33 import javax.help.CSH;
3433 import javax.swing.JComboBox;
3534 import javax.swing.JFileChooser;
3635 import javax.swing.JLabel;
3837 import javax.swing.event.ListDataEvent;
3938 import javax.swing.event.ListDataListener;
4039
40 import com.sun.javatest.tool.jthelp.ContextHelpManager;
4141 import com.sun.javatest.InterviewParameters;
4242 import com.sun.javatest.TestEnvironment;
4343 import com.sun.javatest.Parameters.EnvParameters;
5151 {
5252 CE_EnvironmentPane(UIFactory uif, InterviewParameters config) {
5353 super(uif, config, "env");
54 CSH.setHelpIDString(this, "confEdit.envTab.csh");
54 ContextHelpManager.setHelpIDString(this, "confEdit.envTab.csh");
5555
5656 // save this value, so we can make files test-suite-relative later
5757 testSuite = config.getTestSuite();
3737 import java.net.URL;
3838 import java.text.DateFormat;
3939 import java.util.Date;
40 import javax.help.CSH;
4140 import javax.swing.BorderFactory;
4241 import javax.swing.ButtonGroup;
4342 import javax.swing.JButton;
5150 import javax.swing.event.ChangeEvent;
5251 import javax.swing.event.ChangeListener;
5352
53 import com.sun.javatest.tool.jthelp.ContextHelpManager;
5454 import com.sun.javatest.InterviewParameters;
5555 import com.sun.javatest.Parameters.ExcludeListParameters;
5656 import com.sun.javatest.Parameters.MutableExcludeListParameters;
176176 }
177177
178178 private void initGUI() {
179 CSH.setHelpIDString(this, "confEdit.excludeTab.csh");
179 ContextHelpManager.setHelpIDString(this, "confEdit.excludeTab.csh");
180180
181181 JPanel p = uif.createPanel("ce.excl", new BorderLayout(), false);
182182
2929 import java.awt.GridBagLayout;
3030 import java.text.NumberFormat;
3131 import java.text.ParsePosition;
32 import javax.help.CSH;
3332 import javax.swing.JLabel;
3433 import javax.swing.JPanel;
3534 import javax.swing.JTextField;
3635
36 import com.sun.javatest.tool.jthelp.ContextHelpManager;
3737 import com.sun.javatest.InterviewParameters;
3838 import com.sun.javatest.Parameters.ConcurrencyParameters;
3939 import com.sun.javatest.Parameters.MutableConcurrencyParameters;
180180 }
181181
182182 private void initGUI() {
183 CSH.setHelpIDString(this, "confEdit.execTab.csh");
183 ContextHelpManager.setHelpIDString(this, "confEdit.execTab.csh");
184184
185185 JPanel p = uif.createPanel("ce.exec", new GridBagLayout(), false);
186186
3030 import java.awt.GridBagLayout;
3131 import java.awt.event.ActionEvent;
3232 import java.awt.event.ActionListener;
33 import javax.help.CSH;
34 import javax.help.Map;
35 import javax.help.JHelpContentViewer;
3633 import javax.swing.JButton;
3734 import javax.swing.JLabel;
3835 import javax.swing.JMenu;
4845 import com.sun.interview.wizard.WizPane;
4946 import com.sun.javatest.InterviewParameters;
5047 import com.sun.javatest.tool.UIFactory;
48 import com.sun.javatest.tool.jthelp.HelpID;
49 import com.sun.javatest.tool.jthelp.JHelpContentViewer;
50 import com.sun.javatest.tool.jthelp.ContextHelpManager;
5151
5252 class CE_FullView extends CE_View
5353 {
100100
101101 private void initGUI() {
102102 setName(FULL);
103 CSH.setHelpIDString(this, "confEdit.fullView.csh");
103 ContextHelpManager.setHelpIDString(this, "confEdit.fullView.csh");
104104
105105 String[] searchMenuItems = { FIND, FIND_NEXT };
106106 searchMenu = uif.createMenu("ce.search", searchMenuItems, localListener);
171171 if (q instanceof ErrorQuestion)
172172 return;
173173
174 Map.ID id = Help.getHelpID(q);
174 HelpID helpId = Help.getHelpID(q);
175175 // uugh
176 if (id == null)
176 if (helpId == null)
177177 System.err.println("WARNING: no help for " + q.getKey());
178178 else
179 showInfo(id);
179 showInfo(helpId);
180180 }
181181
182182 private class Listener
2929 import java.awt.GridBagConstraints;
3030 import java.awt.GridBagLayout;
3131 import java.io.File;
32 import javax.help.CSH;
3332 import javax.swing.ButtonGroup;
3433 import javax.swing.JLabel;
3534 import javax.swing.JPanel;
4241 import com.sun.javatest.tool.EditableFileList;
4342 import com.sun.javatest.tool.FileChooser;
4443 import com.sun.javatest.tool.UIFactory;
44 import com.sun.javatest.tool.jthelp.ContextHelpManager;
4545
4646 /**
4747 * Standard values view, known failures list (KFL) panel.
114114 }
115115
116116 private void initGUI() {
117 CSH.setHelpIDString(this, "confEdit.kflTab.csh");
117 ContextHelpManager.setHelpIDString(this, "confEdit.kflTab.csh");
118118
119119 JPanel p = uif.createPanel("ce.kfl", new BorderLayout(), false);
120120 initToolBar();
3838 import java.awt.event.ItemListener;
3939 import java.util.Arrays;
4040 import java.util.HashSet;
41 import javax.help.CSH;
4241 import javax.swing.BorderFactory;
4342 import javax.swing.Icon;
4443 import javax.swing.JButton;
6362 import com.sun.javatest.Parameters.KeywordsParameters;
6463 import com.sun.javatest.Parameters.MutableKeywordsParameters;
6564 import com.sun.javatest.tool.UIFactory;
65 import com.sun.javatest.tool.jthelp.ContextHelpManager;
6666 import java.awt.Container;
6767 import java.awt.Dialog;
6868 import java.awt.Frame;
194194 }
195195
196196 private void initGUI() {
197 CSH.setHelpIDString(this, "confEdit.keywordsTab.csh");
197 ContextHelpManager.setHelpIDString(this, "confEdit.keywordsTab.csh");
198198
199199 JPanel p = uif.createPanel("ce.keywords", new BorderLayout(), false);
200200
2727
2828 import java.awt.GridBagConstraints;
2929 import java.awt.GridBagLayout;
30 import javax.help.CSH;
3130 import javax.swing.BorderFactory;
3231 import javax.swing.JCheckBox;
3332 import javax.swing.JLabel;
4039 import com.sun.javatest.Parameters.PriorStatusParameters;
4140 import com.sun.javatest.Status;
4241 import com.sun.javatest.tool.UIFactory;
42 import com.sun.javatest.tool.jthelp.ContextHelpManager;
4343
4444 class CE_PriorStatusPane extends CE_StdPane
4545 {
121121 }
122122
123123 private void initGUI() {
124 CSH.setHelpIDString(this, "confEdit.statusTab.csh");
124 ContextHelpManager.setHelpIDString(this, "confEdit.statusTab.csh");
125125
126126 JPanel p = uif.createPanel("ce.status", new GridBagLayout(),
127127 false);
3535 import java.awt.GridBagLayout;
3636 import java.awt.Insets;
3737 import java.awt.event.ActionListener;
38 import javax.help.CSH;
39 import javax.help.HelpSet;
40 import javax.help.JHelpContentViewer;
41 import javax.help.Map;
4238 import javax.swing.BorderFactory;
4339 import javax.swing.JButton;
4440 import javax.swing.JPanel;
5248 import com.sun.javatest.InterviewParameters;
5349 import com.sun.javatest.tool.ToolDialog;
5450 import com.sun.javatest.tool.UIFactory;
51 import com.sun.javatest.tool.jthelp.HelpID;
52 import com.sun.javatest.tool.jthelp.HelpSet;
53 import com.sun.javatest.tool.jthelp.JHelpContentViewer;
54 import com.sun.javatest.tool.jthelp.ContextHelpManager;
5555
5656 class CE_StdView extends CE_View
5757 {
166166
167167 private void initGUI() {
168168 setName(STD);
169 CSH.setHelpIDString(this, "confEdit.stdView.csh");
169 ContextHelpManager.setHelpIDString(this, "confEdit.stdView.csh");
170170
171171 setLayout(new BorderLayout());
172172 initBody();
248248 }
249249
250250 private void showInfoForTab(CE_StdPane p) {
251 Map.ID id = (Map.ID) (p.getClientProperty(this));
252 if (id == null) {
251 HelpID helpId = (HelpID) (p.getClientProperty(this));
252 if (helpId == null) {
253253 String s = "ConfigEditor.stdValues." + p.getName();
254254 HelpSet configHelpSet = Help.getHelpSet(config);
255255 if (configHelpSet != null) {
256 Map map = configHelpSet.getCombinedMap();
257 if (map.isValidID(s, configHelpSet)) {
258 id = Map.ID.create(s, configHelpSet);
259 p.putClientProperty(this, id);
260 }
256 helpId = HelpID.create(s, configHelpSet);
257 p.putClientProperty(this, helpId);
261258 }
262259 }
263 if (id == null)
260 if (helpId == null)
264261 System.err.println("CESV: no help for " + p);
265262 else
266 showInfo(id);
263 showInfo(helpId);
267264 }
268265
269266 private JTabbedPane tabs;
296293
297294 private void updateCSHAndInfo() {
298295 CE_StdPane p = (CE_StdPane) (tabs.getSelectedComponent());
299 CSH.setHelpIDString(tabs, CSH.getHelpIDString(p));
296 ContextHelpManager.setHelpIDString(tabs, ContextHelpManager.getHelpIDString(p));
300297 if (isInfoVisible())
301298 showInfoForTab(p);
302299 }
2929 import java.awt.GridBagLayout;
3030 import java.awt.event.ActionEvent;
3131 import java.awt.event.ActionListener;
32 import java.io.BufferedReader;
33 import java.io.File;
34 import java.io.FileNotFoundException;
35 import java.io.FileReader;
36 import java.io.IOException;
32 import java.io.*;
33 import java.nio.charset.StandardCharsets;
3734 import java.util.HashSet;
3835 import java.util.Set;
39 import javax.help.CSH;
4036 import javax.swing.ButtonGroup;
4137 import javax.swing.JButton;
4238 import javax.swing.JFileChooser;
5349 import com.sun.javatest.tool.FileChooser;
5450 import com.sun.javatest.tool.TestTreeSelectionPane;
5551 import com.sun.javatest.tool.UIFactory;
52 import com.sun.javatest.tool.jthelp.ContextHelpManager;
5653 import java.util.ArrayList;
5754
5855 /**
129126 }
130127
131128 private void initGUI() {
132 CSH.setHelpIDString(this, "confEdit.testsTab.csh");
129 ContextHelpManager.setHelpIDString(this, "confEdit.testsTab.csh");
133130
134131 JPanel p = uif.createPanel("ce.tests", new GridBagLayout(), false);
135132
199196 FileReader fr = null;
200197 BufferedReader in = null;
201198 try {
202 fr = new FileReader(file);
203 in = new BufferedReader(fr);
199 in = new BufferedReader(new InputStreamReader(new FileInputStream(file), StandardCharsets.UTF_8));
204200 String line;
205201 while ((line = in.readLine()) != null) {
206202 line = line.trim();
2626 package com.sun.javatest.exec;
2727
2828 import java.awt.event.ActionListener;
29 import javax.help.InvalidHelpSetContextException;
30 import javax.help.JHelpContentViewer;
31 import javax.help.Map;
3229 import javax.swing.JPanel;
3330
3431 import com.sun.javatest.InterviewParameters;
35 import com.sun.javatest.JavaTestError;
3632 import com.sun.javatest.tool.ToolDialog;
3733 import com.sun.javatest.tool.UIFactory;
34 import com.sun.javatest.tool.jthelp.HelpID;
35 import com.sun.javatest.tool.jthelp.JHelpContentViewer;
3836
3937 abstract class CE_View extends JPanel
4038 {
6866 return (infoPanel != null);
6967 }
7068
71 protected void showInfo(Map.ID id) {
72 try {
73 // Note: infoPanel may be null if no help set found when creating ConfigEditor
74 if (infoPanel != null)
75 infoPanel.setCurrentID(id);
76 }
77 catch (InvalidHelpSetContextException e) {
78 JavaTestError.unexpectedException(e);
79 }
69 protected void showInfo(HelpID helpId) {
70 // Note: infoPanel may be null if no help set found when creating ConfigEditor
71 if (infoPanel != null)
72 infoPanel.setCurrentID(helpId);
8073 }
8174
8275 protected ToolDialog toolDialog;
2929 import java.awt.event.ActionListener;
3030 import java.awt.event.ComponentAdapter;
3131 import java.awt.event.ComponentEvent;
32 import java.io.BufferedWriter;
33 import java.io.File;
34 import java.io.FileNotFoundException;
35 import java.io.FileWriter;
36 import java.io.IOException;
37 import java.io.StringWriter;
38 import java.io.Writer;
32 import java.io.*;
3933 import javax.swing.JButton;
4034 import javax.swing.JComponent;
4135 import javax.swing.JFileChooser;
5246 import com.sun.javatest.tool.ToolDialog;
5347 import com.sun.javatest.tool.UIFactory;
5448 import java.awt.Dimension;
49 import java.nio.charset.StandardCharsets;
5550 import javax.swing.BorderFactory;
5651
5752 class ChecklistBrowser extends ToolDialog
226221 }
227222 }
228223
229 FileWriter fw = null;
224 Writer fw = null;
230225 Writer out = null;
231226 try {
232 fw = new FileWriter(file);
227 fw = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file), StandardCharsets.UTF_8));
233228 out = new BufferedWriter(fw);
234229 TextPane pane = (TextPane)body.getMediaPane(body.TEXT);
235230 out.write(pane.getText());
00 /*
11 * $Id$
22 *
3 * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
3 * Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved.
44 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55 *
66 * This code is free software; you can redistribute it and/or modify it
3838 * This method is called by the harness and it indicates to the viewer that it should
3939 * check the given TestResult object for changes.<br>
4040 * There can be three possible cases:
41 * <ul>
4142 * <li>TestResult is a different test, therefore the viewer should fully update the panel</li>
4243 * <li>TestResult is the current test, the viewer should check the result for updates</li>
4344 * <li>TestResult is null. There is no selected test.</li>
45 * </ul>
4446 * @param currTestResult Test result object which should be rendered in this
4547 * panel immediately. May or may not be the one currently displayed.
4648 */
2929 import java.awt.Frame;
3030 import java.awt.GridBagConstraints;
3131 import java.awt.GridBagLayout;
32 import java.net.URL;
33 import javax.help.HelpModel;
34 import javax.help.JHelpContentViewer;
35 import javax.help.Map;
36 import javax.help.event.HelpModelEvent;
37 import javax.help.event.HelpModelListener;
3832 import javax.swing.BorderFactory;
3933 import javax.swing.JDialog;
4034 import javax.swing.JLabel;
4438
4539 import com.sun.interview.Interview;
4640 import com.sun.interview.Question;
41 import com.sun.javatest.tool.jthelp.JHelpContentViewer;
4742
4843 class DetailsBrowser extends JDialog {
4944 DetailsBrowser(Component parent, Interview interview, JHelpContentViewer infoPanel) {
6055 c.gridwidth = GridBagConstraints.REMAINDER;
6156 c.weightx = 1;
6257
63 Listener listener = new Listener();
58 //Listener listener = new Listener();
6459
6560 GridBagConstraints lc = new GridBagConstraints();
6661 lc.anchor = GridBagConstraints.EAST;
9186 qp.add(keyField, fc);
9287
9388 update(interview.getCurrentQuestion());
94 interview.addObserver(listener);
89 //interview.addObserver(listener);
9590
9691 p.add(qp, c);
9792
120115 urlField.setEditable(false);
121116 mp.add(urlField, fc);
122117
123 HelpModel m = infoPanel.getModel();
124 update(m.getCurrentID(), m.getCurrentURL());
125 m.addHelpModelListener(listener);
118 //HelpModel m = infoPanel.getModel();
119 //update(m.getCurrentID(), m.getCurrentURL());
120 //m.addHelpModelListener(listener);
126121
127122 p.add(mp, c);
128123 }
145140 try {
146141 if (helpSet != null) {
147142 try {
148 Map.ID mid = Map.ID.create(q.getKey(), helpSet);
143 Map.HelpID mid = Map.HelpID.create(q.getKey(), helpSet);
149144 URL u = helpSet.getLocalMap().getURLFromID(mid);
150145 urlField.setText(u.toString());
151146 }
165160 keyField.setText(q.getKey());
166161 }
167162
168 private void update(Map.ID id, URL u) {
163 /*private void update(Map.HelpID id, URL u) {
169164 hsField.setText(id.getHelpSet().getTitle());
170165 idField.setText(id.getIDString());
171166 urlField.setText(u.toString());
172 }
167 }*/
173168
174169 private static Frame getFrameParent(Component c) {
175170 return (Frame)(SwingUtilities.getAncestorOfClass(Frame.class, c));
182177 private JTextField idField;
183178 private JTextField urlField;
184179
185 private class Listener
180 /*private class Listener
186181 implements HelpModelListener, Interview.Observer
187182 {
188183 // HelpModelListener
198193 }
199194
200195 public void finished() { }
201 }
196 }*/
202197 }
2929 import com.sun.javatest.tool.Tool;
3030 import com.sun.javatest.tool.ToolAction;
3131 import com.sun.javatest.tool.UIFactory;
32 import com.sun.javatest.tool.jthelp.HelpBroker;
3233 import java.awt.event.ActionEvent;
3334 import java.util.ArrayList;
3435 import java.util.List;
3536 import java.util.Map;
36 import javax.help.HelpBroker;
3737 import javax.swing.Action;
3838 import javax.swing.JMenu;
3939
100100 public void actionPerformed(ActionEvent e) {
101101 HelpBroker b = tool.getHelpBroker();
102102 if (b != null) {
103 b.setCurrentID("browse.window.csh");
104 b.setDisplayed(true);
103 b.displayCurrentID("browse.window.csh");
105104 } else {
106105 // could internationalize this, but the error isn't that helpful because a
107106 // end-user probably can't fix the problem
2828 import java.awt.EventQueue;
2929
3030 import javax.accessibility.AccessibleContext;
31 import javax.help.CSH;
3231
3332 import javax.swing.BorderFactory;
3433 import javax.swing.Icon;
3736
3837 import com.sun.javatest.tool.UIFactory;
3938 import com.sun.javatest.util.I18NResourceBundle;
39 import com.sun.javatest.tool.jthelp.ContextHelpManager;
4040
4141 class ElapsedTimeMonitor extends Monitor implements MonitorState.Observer {
4242 ElapsedTimeMonitor(MonitorState ms, UIFactory uif) {
137137 uif.setToolTip(this, "et.sm");
138138 AccessibleContext ac = getAccessibleContext();
139139 ac.setAccessibleName(uif.getI18NString("et.sm.name"));
140 CSH.setHelpIDString(this, "run.testProgress");
140 ContextHelpManager.setHelpIDString(this, "run.testProgress");
141141
142142 update();
143143 }
580580 }
581581 } else {
582582 if (testSuiteName == null)
583 if (workDirPath != null) {
584 setI18NTitle("exec.title.wd.txt", workDirPath);
585 } else
586 setI18NTitle("exec.title.noTsName.txt");
583 // workDirPath == null is verified
584 setI18NTitle("exec.title.wd.txt", workDirPath);
587585 else {
588586 setShortTitle(testSuiteName);
589587 setI18NTitle("exec.title.tsName_wd.txt", new Object[]{testSuiteName, workDirPath});
00 /*
11 * $Id$
22 *
3 * Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved.
3 * Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved.
44 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55 *
66 * This code is free software; you can redistribute it and/or modify it
272272 if (QuickStartWizard.isQswDisabled()) {
273273 return new Action[0];
274274 } else {
275 return new Action[] {openQuickStartAction};
275 return new Action[] {openTMQSWAction};
276276 }
277277 }
278278 @Override
363363 public Tool startTool() {
364364 showQSW();
365365 return null;
366 /*
366 /*
367367 Desktop d = getDesktop();
368368 Tool[] tools = d.getTools();
369369 if (tools != null) {
377377 Tool t = new EmptyTool(this, "empty");
378378 d.addTool(t);
379379 return t;
380 */
380 */
381381 }
382382
383383 /**
626626 }
627627 };
628628
629 private Action openTMQSWAction = new ToolAction(i18n, "mgr.openTMQSW") {
630 public void actionPerformed(ActionEvent e) {
631 showQSW();
632 }
633 };
634
629635 //-------------------------------------------------------------------------
630636
631637 private Action openTestSuiteAction = new ToolAction(i18n, "mgr.openTestSuite") {
4343 import java.util.Map;
4444 import java.util.Set;
4545 import java.util.TreeSet;
46 import javax.help.BadIDException;
47 import javax.help.InvalidHelpSetContextException;
48 import javax.help.JHelpContentViewer;
49 import javax.help.Map.ID;
5046 import javax.swing.BorderFactory;
5147 import javax.swing.ButtonGroup;
5248 import javax.swing.JCheckBoxMenuItem;
6965 import com.sun.interview.Interview;
7066 import com.sun.interview.Question;
7167 import com.sun.javatest.InterviewParameters;
72 import com.sun.javatest.JavaTestError;
7368 import com.sun.javatest.TestSuite;
7469 import com.sun.javatest.WorkDirectory;
7570 import com.sun.javatest.exec.WorkDirChooseTool.ExecModelStub;
7974 import com.sun.javatest.tool.Preferences;
8075 import com.sun.javatest.tool.ToolDialog;
8176 import com.sun.javatest.tool.UIFactory;
77 import com.sun.javatest.tool.jthelp.HelpID;
78 import com.sun.javatest.tool.jthelp.JHelpContentViewer;
8279 import com.sun.javatest.util.Debug;
8380 import java.util.ArrayList;
8481 import java.util.List;
205202 * Starts editing new config. Supposed to be called outside.
206203 */
207204 public void newConfig() {
208 viewConfig.clear();
205 try {
206 InterviewParameters newConfig = viewConfig.getTestSuite().createInterview();
207 copy(newConfig, viewConfig);
208 } catch (TestSuite.Fault e) {
209 uif.showError("ce.show.error", e.getMessage());
210 } catch (Interview.Fault e) {
211 uif.showError("ce.show.error", e.getMessage());
212 }
209213 show(FULL_MODE);
210214 }
211215
10721076 }
10731077
10741078 private void showInfoForQuestion(Question q) {
1075 try {
1076 ID id = Help.getHelpID(q);
1077 // uugh
1078 if (id == null)
1079 System.err.println("WARNING: no help for " + q.getKey());
1080 else
1081 infoPanel.setCurrentID(id);
1082 }
1083 catch (BadIDException e) {
1079 HelpID helpId = Help.getHelpID(q);
1080 // uugh
1081 if (helpId == null)
10841082 System.err.println("WARNING: no help for " + q.getKey());
1085 }
1086 catch (InvalidHelpSetContextException e) {
1087 JavaTestError.unexpectedException(e);
1088 }
1083 else
1084 infoPanel.setCurrentID(helpId);
10891085 }
10901086
10911087
3636 import java.awt.event.ComponentEvent;
3737 import java.awt.event.ComponentListener;
3838 import java.util.ResourceBundle;
39
40 import javax.help.CSH;
4139
4240 import javax.swing.JButton;
4341 import javax.swing.JComboBox;
5957 import com.sun.javatest.TestResult;
6058 import com.sun.javatest.tool.Preferences;
6159 import com.sun.javatest.tool.UIFactory;
60 import com.sun.javatest.tool.jthelp.ContextHelpManager;
6261
6362 /**
6463 * The panel at the bottom of exec tool.
225224 return c;
226225 }
227226 });
228 CSH.setHelpIDString(selector, "run.testProgress");
227 ContextHelpManager.setHelpIDString(selector, "run.testProgress");
229228
230229 GridBagConstraints gbc = new GridBagConstraints();
231230 gbc.weightx = 2.0d;
4040 import java.awt.event.ActionListener;
4141 import java.awt.print.PageFormat;
4242 import java.awt.print.Printable;
43 import java.io.BufferedReader;
44 import java.io.File;
45 import java.io.FileReader;
46 import java.io.IOException;
47 import java.io.Reader;
48 import java.io.StringWriter;
43 import java.io.*;
4944 import java.net.MalformedURLException;
5045 import java.net.URL;
46 import java.nio.charset.StandardCharsets;
5147 import java.util.HashMap;
5248 import java.util.Iterator;
5349 import javax.imageio.ImageIO;
646642 if (loadManually && "file".equals(url.getProtocol())) {
647643 File file = new File(url.getFile());
648644 try {
649 Reader r = new BufferedReader(new FileReader(file));
645 Reader r = new BufferedReader(new InputStreamReader(new FileInputStream(file), StandardCharsets.UTF_8));
650646 read(r, url);
651647 r.close();
652648 }
3131 import java.awt.event.ComponentListener;
3232 import java.awt.event.ComponentEvent;
3333
34 import javax.help.CSH;
3534 import javax.swing.BorderFactory;
3635 import javax.swing.DefaultListModel;
3736 import javax.swing.JList;
3938 import javax.swing.JScrollPane;
4039
4140 import com.sun.javatest.tool.UIFactory;
41 import com.sun.javatest.tool.jthelp.ContextHelpManager;
4242
4343 import com.sun.javatest.util.Debug;
4444
132132 }
133133 };
134134 addComponentListener(cl);
135 CSH.setHelpIDString(this, "browse.multiselectionTab.csh");
135 ContextHelpManager.setHelpIDString(this, "browse.multiselectionTab.csh");
136136 }
137137
138138 protected void updatePanel(Object[] nodes) {
00 /*
11 * $Id$
22 *
3 * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
3 * Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
44 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55 *
66 * This code is free software; you can redistribute it and/or modify it
2828 import java.awt.GridBagConstraints;
2929 import java.awt.GridBagLayout;
3030 import java.util.Map;
31 import javax.help.HelpBroker;
3231
3332 import javax.swing.BorderFactory;
3433 import javax.swing.Box;
34 import javax.swing.ButtonGroup;
3535 import javax.swing.JCheckBox;
3636 import javax.swing.JLabel;
3737 import javax.swing.JPanel;
38 import javax.swing.JRadioButton;
3839 import javax.swing.JTextArea;
3940 import javax.swing.JTextField;
4041
4243 import com.sun.javatest.tool.Preferences;
4344 import com.sun.javatest.tool.PreferencesPane;
4445 import com.sun.javatest.tool.UIFactory;
46 import com.sun.javatest.tool.jthelp.HelpBroker;
47
4548 import java.awt.Font;
49
4650
4751
4852 class PrefsPane extends PreferencesPane
5458
5559 @Override
5660 public PreferencesPane[] getChildPanes() {
57 if (configEditorPane == null)
61 if (configEditorPane == null) {
5862 configEditorPane = new ConfigEditorPane();
59 if (reportingPane == null)
63 }
64
65 if (reportingPane == null) {
6066 reportingPane = new ReportingPane();
67 }
68
69 if (runPane == null) {
70 runPane = new RunPane();
71 }
6172
6273 if (childPanes == null)
63 childPanes = new PreferencesPane[] { configEditorPane, reportingPane };
74 childPanes = new PreferencesPane[] { configEditorPane, reportingPane, runPane };
6475 return childPanes;
6576 }
6677
7586 toolBarChk.setSelected(p == null || p.equals("true"));
7687 p = (String) (m.get(ExecTool.FILTER_WARN_PREF));
7788 filterWarnChk.setSelected(p == null || p.equals("true"));
78 p = (String) (m.get(ExecTool.TESTS2RUN_PREF));
79 tests2RunChk.setSelected((p == null ? false : p.equals("true")));
80 p = (String) (m.get("javatest.sortExecution"));
81 testSortingChk.setSelected((p == null ? false : p.equals("false")));
8289 p = (String) (m.get(TP_OutputSubpanel.LINE_WRAP_PREF));
8390 // selected by default
8491 wrapResChk.setSelected((p == null ? true : p.equals("true")));
8996 super.save(m);
9097 m.put(ExecTool.TOOLBAR_PREF, String.valueOf(toolBarChk.isSelected()));
9198 m.put(ExecTool.FILTER_WARN_PREF, String.valueOf(filterWarnChk.isSelected()));
92 m.put(ExecTool.TESTS2RUN_PREF, String.valueOf(tests2RunChk.isSelected()));
93 m.put("javatest.sortExecution", Boolean.toString(!testSortingChk.isSelected()));
9499 m.put(TP_OutputSubpanel.LINE_WRAP_PREF, String.valueOf(wrapResChk.isSelected()));
95100 }
96101
104109
105110 add(createToolBarPanel(), c);
106111 add(createFilterPanel(), c);
107 add(createExecutionPanel(), c);
108112 add(createTestRunMsgPanel(), c);
109113
110114 c.weighty = 1;
139143 return p;
140144 }
141145
142 private JPanel createExecutionPanel() {
143 JPanel p = uif.createPanel("exec.prefs.exec", new GridBagLayout(), false);
144 GridBagConstraints c = new GridBagConstraints();
145 c.anchor = GridBagConstraints.WEST;
146 c.weightx = 1;
147 p.setBorder(uif.createTitledBorder("ep.exec"));
148
149 tests2RunChk= uif.createCheckBox("ep.tests2run", true);
150 // override default a11y name
151 uif.setAccessibleName(tests2RunChk, "ep.tests2run");
152 p.add(tests2RunChk, c);
153
154 testSortingChk = uif.createCheckBox("ep.sorttests", true);
155 c.gridy = GridBagConstraints.PAGE_END;
156 p.add(testSortingChk, c);
157 return p;
158 }
159
160146 private JPanel createTestRunMsgPanel() {
161147 JPanel p = uif.createPanel("exec.prefs.testrun", new GridBagLayout(), false);
162148 GridBagConstraints c = new GridBagConstraints();
173159 private UIFactory uif;
174160 private JCheckBox toolBarChk;
175161 private JCheckBox filterWarnChk;
176 private JCheckBox tests2RunChk;
177 private JCheckBox testSortingChk; // deceptive name, see i18n description
178162 private JCheckBox wrapResChk;
179163 private ConfigEditorPane configEditorPane;
180164 private ReportingPane reportingPane;
165 private RunPane runPane;
181166 private PreferencesPane[] childPanes;
182167
183168 private class ConfigEditorPane extends PreferencesPane {
286271
287272 JPanel p = new JPanel(new GridBagLayout());
288273 JLabel lbl = uif.createLabel("ep.rpt.url");
289 //JTextArea infoTa = uif.createMessageArea("ep.rpt.url");
290 //lbl.setOpaque(false);
291274 p.add(lbl, c);
292275
293276 bugUrlTf = uif.createInputField("ep.rpt.url", lbl);
312295
313296 private JTextField bugUrlTf;
314297 }
298
299 private class RunPane extends PreferencesPane {
300 RunPane() {
301 initGUI();
302 }
303
304 public String getText() {
305 return uif.getI18NString("ep.run.title");
306 }
307
308 @Override
309 public void load(Map m) {
310 String mp = (String) (m.get("javatest.executionOrder"));
311 if (mp == null) {
312 mp = "default";
313 }
314
315 if (mp.equals("reverse")) {
316 reverseRadio.setSelected(true);
317 }
318 else if (mp.equals("random")) {
319 randomRadio.setSelected(true);
320 }
321 else {
322 defaultRadio.setSelected(true);
323 }
324
325 mp = (String) (m.get(ExecTool.TESTS2RUN_PREF));
326 tests2RunChk.setSelected((mp == null ? false : mp.equals("true")));
327 mp = (String) (m.get("javatest.sortExecution"));
328 testSortingChk.setSelected((mp == null ? false : mp.equals("false")));
329 }
330
331 @Override
332 public void save(Map m) {
333 m.put(ExecTool.TESTS2RUN_PREF, String.valueOf(tests2RunChk.isSelected()));
334 m.put("javatest.sortExecution", Boolean.toString(!testSortingChk.isSelected()));
335
336 String sequence = ".default";
337 if (reverseRadio.isSelected()) {
338 sequence = reverseRadio.getName();
339 }
340 else if (randomRadio.isSelected()) {
341 sequence = randomRadio.getName();
342 }
343 else {
344 sequence = defaultRadio.getName();
345 }
346
347 m.put("javatest.executionOrder", sequence.substring(sequence.lastIndexOf(".") + 1));
348 }
349
350 private void initGUI() {
351 setLayout(new GridBagLayout());
352
353 GridBagConstraints c = new GridBagConstraints();
354 c.fill = GridBagConstraints.HORIZONTAL;
355 c.gridwidth = GridBagConstraints.REMAINDER;
356 c.weightx = 1;
357
358 add(createExecutionPanel(), c);
359 add(createOrderPanel(), c);
360
361 c.weighty = 1;
362 add(Box.createVerticalGlue(), c);
363 }
364
365 private JPanel createExecutionPanel() {
366 JPanel p = uif.createPanel("exec.prefs.run", new GridBagLayout(), false);
367 GridBagConstraints c = new GridBagConstraints();
368 c.anchor = GridBagConstraints.WEST;
369 c.weightx = 1;
370 p.setBorder(uif.createTitledBorder("ep.exec"));
371
372 tests2RunChk = uif.createCheckBox("ep.tests2run", true);
373 // override default a11y name
374 uif.setAccessibleName(tests2RunChk, "ep.tests2run");
375 p.add(tests2RunChk, c);
376
377 testSortingChk = uif.createCheckBox("ep.sorttests", true);
378 c.gridy = GridBagConstraints.PAGE_END;
379 p.add(testSortingChk, c);
380 return p;
381 }
382
383 private JPanel createOrderPanel() {
384 GridBagConstraints c = new GridBagConstraints();
385 c.anchor = GridBagConstraints.LINE_START;
386 c.gridwidth = 1;
387 c.weighty = c.weightx = 1;
388 JPanel p = uif.createPanel("exec.prefs.exec", new GridBagLayout(), false);
389 p.setBorder(uif.createTitledBorder("ep.run"));
390
391 sequenceButtons = new ButtonGroup();
392
393 defaultRadio = uif.createRadioButton("ep.run.order.default", sequenceButtons);
394 randomRadio = uif.createRadioButton("ep.run.order.random", sequenceButtons);
395 reverseRadio = uif.createRadioButton("ep.run.order.reverse", sequenceButtons);
396
397 p.add(defaultRadio, c);
398 p.add(randomRadio, c);
399 p.add(reverseRadio, c);
400 return p;
401 }
402
403 private JTextField bugUrlTf;
404 private JCheckBox tests2RunChk;
405 private JCheckBox testSortingChk; // deceptive name, see i18n description
406 private JRadioButton defaultRadio;
407 private JRadioButton reverseRadio;
408 private JRadioButton randomRadio;
409 private ButtonGroup sequenceButtons;
410 }
315411 }
2929 import java.awt.GridBagConstraints;
3030 import java.awt.GridBagLayout;
3131 import java.io.File;
32 import javax.help.CSH;
3332 import javax.swing.BorderFactory;
3433 import javax.swing.JButton;
3534 import javax.swing.JComponent;
4241 import com.sun.javatest.InterviewParameters;
4342 import com.sun.javatest.TestSuite;
4443 import com.sun.javatest.WorkDirectory;
44 import com.sun.javatest.finder.TestFinderDecorator;
4545 import com.sun.javatest.tool.ToolDialog;
4646 import com.sun.javatest.tool.UIFactory;
4747 import com.sun.javatest.util.StringArray;
48 import com.sun.javatest.tool.jthelp.ContextHelpManager;
4849
4950 class PropertiesBrowser extends ToolDialog
5051 {
9798 tabs.addChangeListener(new ChangeListener() {
9899 public void stateChanged(ChangeEvent e) {
99100 Component t = tabs.getSelectedComponent();
100 CSH.setHelpIDString(tabs, CSH.getHelpIDString(t));
101 ContextHelpManager.setHelpIDString(tabs, ContextHelpManager.getHelpIDString(t));
101102 }
102103 });
103104
104105 Component t = tabs.getSelectedComponent();
105 CSH.setHelpIDString(tabs, CSH.getHelpIDString(t));
106 ContextHelpManager.setHelpIDString(tabs, ContextHelpManager.getHelpIDString(t));
106107
107108 return tabs;
108109 }
191192 private class TestSuitePane extends Pane {
192193 TestSuitePane() {
193194 super("props.ts");
194 CSH.setHelpIDString(this, "execProps.testSuiteTab.csh");
195 ContextHelpManager.setHelpIDString(this, "execProps.testSuiteTab.csh");
195196 path = addLabelledField("props.ts.path");
196197 name = addLabelledField("props.ts.name");
197198 id = addLabelledField("props.ts.id");
218219 private class WorkDirectoryPane extends Pane {
219220 WorkDirectoryPane() {
220221 super("props.wd");
221 CSH.setHelpIDString(this, "execProps.workDirTab.csh");
222 ContextHelpManager.setHelpIDString(this, "execProps.workDirTab.csh");
222223 path = addLabelledField("props.wd.path");
223224 // test results?
224225 // id?
234235 private class ConfigurationPane extends Pane {
235236 ConfigurationPane() {
236237 super("props.cfg");
237 CSH.setHelpIDString(this, "execProps.configTab.csh");
238 ContextHelpManager.setHelpIDString(this, "execProps.configTab.csh");
238239 path = addLabelledField("props.cfg.path");
239240 configName = addLabelledField("props.cfg.name");
240241 configDesc = addLabelledField("props.cfg.desc");
261262 //setField(configDesc, (env == null ? null : env.getDescription()));
262263 setField(configName, config.getName());
263264 setField(configDesc, config.getDescription());
264 setField(state, config == null ? null :
265 config.isFinishable() ? completed : incomplete);
265 setField(state, config.isFinishable() ? completed : incomplete);
266266 }
267267
268268 if (config != null)
289289 private class PluginsPane extends Pane {
290290 PluginsPane() {
291291 super("props.pi");
292 CSH.setHelpIDString(this, "execProps.pluginsTab.csh");
292 ContextHelpManager.setHelpIDString(this, "execProps.pluginsTab.csh");
293293 testSuiteClassName = addLabelledField("props.pi.testSuite");
294294 testFinderClassName = addLabelledField("props.pi.testFinder");
295295 testRunnerClassName = addLabelledField("props.pi.testRunner");
304304 }
305305 else {
306306 setField(testSuiteClassName, testSuite.getClass().getName());
307 setField(testFinderClassName,
308 testSuite.getTestFinder().getClass().getName());
307 String testFinderClassNameValue = testSuite.getTestFinder() instanceof TestFinderDecorator ?
308 ((TestFinderDecorator) testSuite.getTestFinder()).getCurrentTestFinder().getClass().getName() :
309 testSuite.getTestFinder().getClass().getName();
310 setField(testFinderClassName, testFinderClassNameValue);
309311 setField(testRunnerClassName,
310312 testSuite.createTestRunner().getClass().getName());
311313
3131 import java.awt.event.ComponentEvent;
3232 import java.awt.EventQueue;
3333 import java.awt.Dimension;
34 import java.io.BufferedWriter;
35 import java.io.File;
36 import java.io.FileNotFoundException;
37 import java.io.FileWriter;
38 import java.io.IOException;
39 import java.io.StringWriter;
40 import java.io.Writer;
34 import java.io.*;
35 import java.nio.charset.StandardCharsets;
4136 import javax.swing.BorderFactory;
4237 import javax.swing.JButton;
4338 import javax.swing.JComponent;
210205 }
211206
212207 try {
213 Writer out = new BufferedWriter(new FileWriter(file));
208 Writer out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file), StandardCharsets.UTF_8));
214209 out.write(((JEditorPane)body.getMediaPane(body.TEXT)).getText());
215210 out.close();
216211 }
2929 import java.awt.event.ActionEvent;
3030 import java.awt.event.ActionListener;
3131
32 import javax.help.CSH;
33
3432 import javax.swing.BorderFactory;
3533 import javax.swing.Icon;
3634 import javax.swing.JComponent;
4038 //import com.sun.javatest.Status;
4139 //import com.sun.javatest.tool.I18NUtils;
4240 import com.sun.javatest.tool.UIFactory;
41 import com.sun.javatest.tool.jthelp.ContextHelpManager;
4342
4443 /**
4544 * Progress bars for test run.
8382 smMeter.setBorder(BorderFactory.createCompoundBorder(
8483 BorderFactory.createEmptyBorder(3,5,3,5),
8584 BorderFactory.createLineBorder(Color.black)));
86 CSH.setHelpIDString(smMeter, "run.testProgress");
85 ContextHelpManager.setHelpIDString(smMeter, "run.testProgress");
8786
8887 return smMeter;
8988 }
00 /*
11 * $Id$
22 *
3 * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
3 * Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
44 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55 *
66 * This code is free software; you can redistribute it and/or modify it
309309 }
310310
311311 final Preferences p = Preferences.access();
312 boolean useTests2Run = p.getPreference(ExecTool.TESTS2RUN_PREF, "false").equals("true");
312 boolean useTests2Run = p.getPreference(ExecTool.TESTS2RUN_PREF, "true").equals("true");
313313
314314 if (!useTests2Run) {
315315 // alter tests in interview
2626 package com.sun.javatest.exec;
2727
2828 import java.util.Iterator;
29 import javax.help.CSH;
29 import com.sun.javatest.tool.jthelp.ContextHelpManager;
3030 import com.sun.javatest.TestDescription;
3131 import com.sun.javatest.TestResult;
3232 import com.sun.javatest.tool.UIFactory;
3838 class TP_DescSubpanel extends TP_PropertySubpanel {
3939 TP_DescSubpanel(UIFactory uif) {
4040 super(uif, "desc");
41 CSH.setHelpIDString(this, "browse.testDescriptionTab.csh");
41 ContextHelpManager.setHelpIDString(this, "browse.testDescriptionTab.csh");
4242 }
4343
4444 protected void updateSubpanel(TestResult currTest) {
2525 */
2626 package com.sun.javatest.exec;
2727
28 import javax.help.CSH;
29
3028 import java.awt.EventQueue;
3129 import com.sun.javatest.TestResult;
3230 import com.sun.javatest.tool.UIFactory;
31 import com.sun.javatest.tool.jthelp.ContextHelpManager;
3332
3433 /**
3534 * A subpanel of TestPanel that displays the test environment for a test result.
4039 {
4140 TP_EnvSubpanel(UIFactory uif) {
4241 super(uif, "env");
43 CSH.setHelpIDString(this, "browse.testEnvironmentTab.csh");
42 ContextHelpManager.setHelpIDString(this, "browse.testEnvironmentTab.csh");
4443 }
4544
4645 protected void updateSubpanel(TestResult currTest) {
2929 import java.awt.EventQueue;
3030 import java.net.URL;
3131
32 import javax.help.CSH;
3332 import javax.swing.SwingUtilities;
3433
3534 import com.sun.javatest.tool.UIFactory;
3635 import com.sun.javatest.TestDescription;
3736 import com.sun.javatest.TestResult;
37 import com.sun.javatest.tool.jthelp.ContextHelpManager;
3838
3939 /**
4040 * Show the source and other files for the test.
4444 TP_FilesSubpanel(UIFactory uif) {
4545 super(uif, "files");
4646 setLayout(new BorderLayout());
47 CSH.setHelpIDString(this, "browse.filesTab.csh");
47 ContextHelpManager.setHelpIDString(this, "browse.filesTab.csh");
4848
4949 filesPane = new FilesPane(uif);
5050
3232 import java.awt.EventQueue;
3333 import java.io.IOException;
3434 import java.io.StringWriter;
35 import javax.help.CSH;
3635 import javax.swing.BorderFactory;
3736 import javax.swing.DefaultListCellRenderer;
3837 import javax.swing.DefaultListModel;
6261 import com.sun.javatest.tool.UIFactory;
6362 import com.sun.javatest.report.HTMLWriterEx;
6463 import com.sun.javatest.util.StringArray;
64 import com.sun.javatest.tool.jthelp.ContextHelpManager;
6565
6666 /**
6767 * Show the output sections for a particular test result.
155155 sp.setResizeWeight(0); // all excess space to right hand side
156156 add(sp);
157157
158 CSH.setHelpIDString(this, "browse.outputTab.csh");
158 ContextHelpManager.setHelpIDString(this, "browse.outputTab.csh");
159159 initIcons();
160160 }
161161
2727
2828 import java.awt.EventQueue;
2929 import java.util.Enumeration;
30 import javax.help.CSH;
30 import com.sun.javatest.tool.jthelp.ContextHelpManager;
3131 import com.sun.javatest.TestResult;
3232 import com.sun.javatest.tool.UIFactory;
3333
4141
4242 TP_ResultsSubpanel(UIFactory uif) {
4343 super(uif, "rslt");
44 CSH.setHelpIDString(this, "browse.resultPropertiesTab.csh");
44 ContextHelpManager.setHelpIDString(this, "browse.resultPropertiesTab.csh");
4545 }
4646
4747 protected synchronized void updateSubpanel(TestResult currTest) {
3535 import java.beans.PropertyChangeEvent;
3636 import java.beans.PropertyChangeListener;
3737 import java.util.Map;
38 import javax.help.CSH;
38 import com.sun.javatest.tool.jthelp.ContextHelpManager;
3939 import javax.swing.JPanel;
4040 import javax.swing.JTabbedPane;
4141 import javax.swing.JTextField;
108108
109109 if (newPanel != currPanel) {
110110 // update help for tabbed pane to reflect help for selected panel
111 CSH.setHelpIDString(tabs, CSH.getHelpIDString(newPanel));
111 ContextHelpManager.setHelpIDString(tabs, ContextHelpManager.getHelpIDString(newPanel));
112112 currPanel = newPanel;
113113 }
114114
298298 });
299299
300300 currPanel = outputPanel;
301 CSH.setHelpIDString(tabs, CSH.getHelpIDString(currPanel));
301 ContextHelpManager.setHelpIDString(tabs, ContextHelpManager.getHelpIDString(currPanel));
302302
303303 statusField = uif.createOutputField("test.status");
304304 statusField.setEnabled(false);
13941394 TestResultTable.TreeNode node = item.getNode();
13951395
13961396 // switch event format if the node is the root
1397 if (node.isRoot()) {
1397 if (node.isRoot() && getRoot() != null) {
13981398 e = new TreeModelEvent(this, new Object[]{getRoot()}, (int[]) null, (Object[]) null);
13991399 } else {
14001400 // full path to the node, inclusive
14161416 }
14171417 }
14181418
1419 // dispatch event
1420 notifyModelListeners(e, Notifier.CHANGE);
1421
1422 if (debug > 0)
1423 Debug.println("NodeCache done for " + item.getNode().getName());
1419 if (e != null) {
1420 // dispatch event
1421 notifyModelListeners(e, Notifier.CHANGE);
1422
1423 if (debug > 0) {
1424 Debug.println("NodeCache done for " + item.getNode().getName());
1425 }
1426 }
14241427 }
14251428 private volatile boolean paused;
14261429 private volatile boolean stopping;
12031203 } catch (Exception ignore) {
12041204 }
12051205 }
1206
1207 Preferences.access().addObserver("javatest.executionOrder", new Preferences.Observer() {
1208 @Override
1209 public void updated(String name, String newValue) {
1210
1211 treeModel.getTestResultTable().updateTestExecutionOrderOnTheFly();
1212
1213 try {
1214 WorkDirectory wd = execModel.getWorkDirectory();
1215 TestResultTable trt = getTestResultTable();
1216 if(trt != null && !wd.isTRTSet()) {
1217 wd.setTestResultTable(trt);
1218 }
1219 applyParameters(true);
1220 } catch (Exception ee) {
1221 ee.printStackTrace();
1222 }
1223
1224 }
1225 });
12061226 }
12071227
12081228 private void ensureTreeSelection() {
11 # $Id$
22 #
33 #
4 # Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
4 # Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
55 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
66 #
77 # This code is free software; you can redistribute it and/or modify it
804804 ep.rpt.url.name=Bug prefix URL
805805 ep.rpt.url.lbl=Bug prefix URL
806806 ep.rpt.url.txt=(Ex. http://bugs.mydomain.com/bug?show=)
807 ep.run.bdr=Test Sequencing
808 ep.run.title=Test Sequencing
809 ep.run.order.backwards=Backwards (Reverse Traditional)
810 ep.run.order.default.rb=Default (Traditional)
811 ep.run.order.default.mne=D
812 ep.run.order.default.tip=Use default order of tests.
813 ep.run.order.random.mne=R
814 ep.run.order.random.rb=Random
815 ep.run.order.random.tip=Random execution order.
816 ep.run.order.reverse.mne=R
817 ep.run.order.reverse.rb=Reverse
818 ep.run.order.reverse.tip=Reverse execution order.
807819 ep.title=Test Manager
808820 ep.toolbar.bdr=Tool Bar
809821 ep.toolbar.ckb=Displayed
12551267 mgr.errorOpeningWorkDirectory=An error occurred while opening the work directory: {0}\n{1}
12561268 mgr.openQuickStart.act=Open Quick Start Wizard ...
12571269 mgr.openQuickStart.mne=Q
1270 mgr.openTMQSW.act=Test Manager...
1271 mgr.openTMQSW.mne=T
1272 mgr.openTMQSW.tip=Open a new test manager tool instance to run/view tests.
12581273 mgr.openQuickStart.tip=Open a wizard to set up a new test manager window
12591274 mgr.openTestSuite.act=Test Suite ...
12601275 mgr.openTestSuite.mne=T
15311546 qsw.ts.cantCreateInterview.err=An error occurred while trying to access the test suite''s interview.\n{0}
15321547 qsw.ts.cantFindFile.err=Cannot find the specified file
15331548 qsw.ts.cantLoadConfig.err=An error occurred while trying to load the configuration file that you specified.\n{0}
1534 qsw.ts.cantOpen.err=An error occurred while trying to open the work directory, {0}.\n{1}
1549 qsw.ts.cantOpen.err=An error occurred while trying to open the work directory, {0}.\n\n\n{1}
15351550 qsw.ts.configMismatch.err=The configuration file that you specified cannot be used with the test suite that you specified.
15361551 qsw.ts.templateMismatch.err=The template file that you specified cannot be used with the test suite that you specified.
15371552 qsw.ts.file.browse.btn=Browse...
2525 */
2626 package com.sun.javatest.finder;
2727
28 import java.io.BufferedReader;
29 import java.io.File;
30 import java.io.FileNotFoundException;
31 import java.io.FileReader;
32 import java.io.IOException;
28 import java.io.*;
29 import java.nio.charset.StandardCharsets;
3330 import java.util.Comparator;
3431 import java.util.Hashtable;
3532 import java.util.SortedSet;
158155 }
159156 });
160157
161 FileReader fr = null;
162158 BufferedReader in = null;
163159 try {
164 fr = new FileReader(file);
165 in = new BufferedReader(fr);
160 in = new BufferedReader(new InputStreamReader(new FileInputStream(file), StandardCharsets.UTF_8));
166161 String line;
167162 int lineNum = 0;
168163 while ((line = in.readLine()) != null) {
197192 // followed by the underlying writer for leak prevention
198193 if (in != null){
199194 try { in.close(); } catch (IOException e) { }
200 }
201
202 if (fr != null){
203 try { fr.close(); } catch (IOException e) { }
204195 }
205196 }
206197
2525 */
2626 package com.sun.javatest.finder;
2727
28 import java.io.BufferedReader;
29 import java.io.FileReader;
30 import java.io.File;
31 import java.io.FileNotFoundException;
32 import java.io.IOException;
33 import java.io.Reader;
28 import java.io.*;
29 import java.nio.charset.StandardCharsets;
3430 import java.util.Hashtable;
3531 import java.util.Vector;
3632
183179 namesInFile.clear();
184180
185181 try {
186 input = new BufferedReader(new FileReader(file));
182 input = new BufferedReader(new InputStreamReader(new FileInputStream(file), StandardCharsets.UTF_8));
187183 currFile = file;
188184 line = 1;
189185 nextCh();
275271 else if (tag.equals("amp"))
276272 replace = "&";
277273 else if (tag.equals("copy"))
278 replace = "©";
274 replace = "�";
279275 if (replace == null)
280276 replace = "&" + tag + ((char) c);
281277 }
0 /*
1 * $Id$
2 *
3 * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 *
6 * This code is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 2 only, as
8 * published by the Free Software Foundation. Oracle designates this
9 * particular file as subject to the "Classpath" exception as provided
10 * by Oracle in the LICENSE file that accompanied this code.
11 *
12 * This code is distributed in the hope that it will be useful, but WITHOUT
13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 * version 2 for more details (a copy is included in the LICENSE file that
16 * accompanied this code).
17 *
18 * You should have received a copy of the GNU General Public License version
19 * 2 along with this work; if not, write to the Free Software Foundation,
20 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
21 *
22 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
23 * or visit www.oracle.com if you need additional information or have any
24 * questions.
25 */
26 package com.sun.javatest.finder;
27
28 import java.io.File;
29 import java.util.Arrays;
30 import java.util.Collections;
31
32 import com.sun.javatest.TestDescription;
33 import com.sun.javatest.TestFinder;
34
35 /**
36 * A test finder that reads tests from a delegate, and returns the
37 * results in the random order. This is primarily for debugging
38 * and testing purposes.
39 */
40 public class RandomTestFinder extends TestFinder {
41
42 /**
43 * Constructor to create RandomTestFinder object when the
44 * original TestFinder instance is already created and initialized.
45 * Finders created with this constructor do not require the init() method
46 * to be invoked.
47 *
48 * @param delegate - the real test finder object.
49 */
50 public RandomTestFinder(TestFinder delegate) {
51 this.delegate = delegate;
52 }
53
54 public File getRoot() {
55 return delegate.getRoot();
56 }
57
58 public File getRootDir() {
59 return delegate.getRootDir();
60 }
61
62 public void read(File file) {
63 delegate.read(file);
64 }
65
66 public TestDescription[] getTests() {
67 TestDescription[] tds = delegate.getTests();
68 Collections.shuffle(Arrays.asList(tds));
69 return tds;
70 }
71
72 public File[] getFiles() {
73 File[] fs = delegate.getFiles();
74 Collections.shuffle(Arrays.asList(fs));
75 return fs;
76 }
77
78 protected void scan(File file) {
79 throw new Error("should not be called!");
80 }
81
82 private TestFinder delegate;
83
84 }
7575 TestEnvironment env) throws Fault {
7676 String delegateClassName = args[0];
7777 try {
78 Class delegateClass = Class.forName(delegateClassName);
78 Class delegateClass = Class.forName(delegateClassName, true, ClassLoader.getSystemClassLoader());
7979 delegate = (TestFinder)(delegateClass.newInstance());
8080 args = shift(args, 1);
8181 delegate.init(args, testSuiteRoot, env);
3030 import java.io.FileOutputStream;
3131 import java.io.IOException;
3232 import java.io.PrintStream;
33 import java.nio.charset.StandardCharsets;
3334 import java.util.Iterator;
3435
3536 import com.sun.javatest.TestDescription;
201202 if (outFile == null)
202203 out = System.out;
203204 else
204 out = new PrintStream(new BufferedOutputStream(new FileOutputStream(outFile)));
205 out = new PrintStream(new BufferedOutputStream(new FileOutputStream(outFile)), true, StandardCharsets.UTF_8.name());
205206
206207 // read the tests and write them to output
207208 list(initialFile);
2525 */
2626 package com.sun.javatest.finder;
2727
28 import java.io.BufferedReader;
29 import java.io.FileReader;
30 import java.io.File;
28 import java.io.*;
29 import java.nio.charset.StandardCharsets;
3130 import java.util.Map;
32 import java.io.FileNotFoundException;
33 import java.io.IOException;
3431 import java.util.HashMap;
3532
3633 import com.sun.javatest.TestFinder;
272269 }
273270
274271 try {
275 cs.init(new BufferedReader(new FileReader(file)));
272 cs.init(new BufferedReader(new InputStreamReader(new FileInputStream(file), StandardCharsets.UTF_8)));
276273 if (fastScan)
277274 cs.setFastScan(true);
278275
0 /*
1 * $Id$
2 *
3 * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 *
6 * This code is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 2 only, as
8 * published by the Free Software Foundation. Oracle designates this
9 * particular file as subject to the "Classpath" exception as provided
10 * by Oracle in the LICENSE file that accompanied this code.
11 *
12 * This code is distributed in the hope that it will be useful, but WITHOUT
13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 * version 2 for more details (a copy is included in the LICENSE file that
16 * accompanied this code).
17 *
18 * You should have received a copy of the GNU General Public License version
19 * 2 along with this work; if not, write to the Free Software Foundation,
20 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
21 *
22 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
23 * or visit www.oracle.com if you need additional information or have any
24 * questions.
25 */
26 package com.sun.javatest.finder;
27
28 import java.io.File;
29 import java.util.*;
30
31 import com.sun.javatest.*;
32 import com.sun.javatest.tool.Preferences;
33
34 /**
35 * A test finder decorator that reads tests from a delegate, and returns the
36 * results in the reverse/random order. This is primarily for debugging
37 * and testing purposes.
38 */
39 public class TestFinderDecorator extends TestFinder {
40 private TestFinder origTestFinder;
41 private TestFinder currentTestFinder;
42
43 /**
44 * Default constructor
45 */
46 public TestFinderDecorator(TestFinder testFinder) {
47 origTestFinder = testFinder;
48 setCurrentTestFinder();
49
50 Preferences.access().addObserver("javatest.executionOrder", new Preferences.Observer() {
51
52 @Override
53 public void updated(String name, String newValue) {
54 setCurrentTestFinder();
55 }
56 });
57 }
58
59 private void setCurrentTestFinder() {
60 String value = Preferences.access().getPreference("javatest.executionOrder");
61
62 String sysValue = (System.getProperties().getProperty("javatest.executionOrder"));
63 if (sysValue != null && !sysValue.isEmpty()) {
64 value = sysValue;
65 }
66
67 if ("reverse".equals(value)) {
68 currentTestFinder = new ReverseTestFinder(origTestFinder);
69 } else if ("random".equals(value)) {
70 currentTestFinder = new RandomTestFinder(origTestFinder);
71 } else {
72 currentTestFinder = origTestFinder;
73 }
74 }
75
76 public File getRoot() {
77 return currentTestFinder.getRoot();
78 }
79
80 public File getRootDir() {
81 return currentTestFinder.getRootDir();
82 }
83
84 public void read(File file) {
85 currentTestFinder.read(file);
86 }
87
88 public TestDescription[] getTests() {
89 return currentTestFinder.getTests();
90 }
91
92 public File[] getFiles() {
93 return currentTestFinder.getFiles();
94 }
95
96 public Comparator getComparator() {
97 return currentTestFinder.getComparator();
98 }
99
100 public void setComparator(Comparator c) {
101 currentTestFinder.setComparator(c);
102 }
103
104 public TestFinder getCurrentTestFinder(){
105 return currentTestFinder;
106 }
107
108 public long lastModified(File f) {
109 return currentTestFinder.lastModified(f);
110 }
111
112 public boolean isFolder(File path) {
113 return currentTestFinder.isFolder(path);
114 }
115
116 protected void scan(File file) {
117 throw new Error("should not be called!");
118 }
119
120 }
121
11 <!--
22 $Id$
33
4 Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
4 Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
55 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
66
77 This code is free software; you can redistribute it and/or modify it
8181 available agents, an error will occur in the test run.</p>
8282 <p>
8383 The default
84 range of values used by the harness is from <code>1</code> to <code>50</code>. If
84 range of values used by the harness is from <code>1</code> to <code>256</code>. If
8585 unexpected test failures occur, run the tests again, one at a time. Some test
8686 suites may not work correctly if tests run concurrently. </p>
8787 <p>
8888 For the first test run, set the value in this field to <code>1</code>. After
8989 the tests run properly, incrementally increase this value. Unless the test
9090 suite restricts concurrency, the maximum <em>number</em> of threads
91 specified by the <code>concurrency</code> command is <code>50</code>. See the
91 specified by the <code>concurrency</code> command is <code>256</code>. See the
9292 test suite documentation for additional information about using concurrency values
9393 greater than <code>1</code>.</p>
9494 <p>
130130
131131 <hr>
132132
133 <p><a href="../copyright.html">Copyright</a> &copy; 2006, 2011, Oracle and/or its affiliates. All rights reserved.</p>
133 <p><a href="../copyright.html">Copyright</a> &copy; 2006, 2015, Oracle and/or its affiliates. All rights reserved.</p>
134134 </BODY>
135135 </HTML>
136136
11 <!--
22 $Id$
33
4 Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
4 Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
55 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
66
77 This code is free software; you can redistribute it and/or modify it
7878 Use the <code>allTests</code> filter option (corresponds to All Tests in the GUI) to select test results status for all tests in the work directory, including any tests that were excluded from the last test run.
7979 </p>
8080
81 <H2>Using the <code>-enableKFL</code> Option</H2>
82 <p>
83 This option requests that the harness attempt to generate the KFL section of the report(s).
84 </p>
85
86 <p>
87 By default, the harness in command line mode will pull this setting from Preferences, which is stored on a per-user basis, and controlled by the GUI Preferences.
88 Using this flag will ask the reporting system to override this Preference to generate the report. Currently, there are no sub-options to specify the detailed
89 settings available in the GUI Preferences.
90 </p>
91
92 <p>
93 <!--CopyOff--><IMG SRC="../../images/hg_note.gif" ALT="The following text is a note" longdesc="writeReports.html"><br><!--CopyOn-->
94 The flag <code>-kfl</code> is also accepted, but usage of it is not recommended because it may be confused with the top-level <code>-kfl</code> flag.
95 </p>
96
97
8198 <H2>Detailed Example of <code>writeReport</code> Command</H2>
8299 <P>In the following example, <EM>my-work-dir</EM> represents a work directory name that might exist on your system, and two known failure lists are specified.</P>
83100 <P><B>Command Options Format Example:</B></P>
84101 <P class="indent2">
85102 <a href="aboutExamples.html"><EM>&gt; jtharness</EM></A>
86 <CODE></CODE>-workdirectory <em>myworkdirectory</em> <code>-config foo.jti -kfl foo.kfl -writeReport -type html -filter allTests </code><em>myReportDir</em></P>
103 <CODE></CODE>-workdirectory <em>myworkdirectory</em> <code>-config foo.jti -kfl foo.kfl -writeReport -enableKFL -type html -filter allTests </code><em>myReportDir</em></P>
87104 <P>See <a href="formatCommands.html">Formatting a Command</A> for descriptions and examples of other command formats that you can use.</P>
88105
89106 <hr>
90 <p><a href="../copyright.html">Copyright</a> &copy; 2002, 2012, Oracle and/or its affiliates. All rights reserved.</p>
107 <p><a href="../copyright.html">Copyright</a> &copy; 2002, 2015, Oracle and/or its affiliates. All rights reserved.</p>
91108 </BODY>
92109 </HTML>
93110
11 <!--
22 $Id$
33
4 Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
4 Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
55 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
66
77 This code is free software; you can redistribute it and/or modify it
9494 <p>
9595 If you have unexpected test failures, run the tests again, one at a time. Some
9696 test suites may not work correctly if you run tests concurrently. The default
97 range of values used by the harness is from <code>1</code> to <code>50</code>.</p>
97 range of values used by the harness is from <code>1</code> to <code>256</code>.</p>
9898 <p>
9999 For your first test run, leave this field set to <code>1</code>. After the tests
100100 run properly, you can increase this value. Unless your test
101101 suite restricts concurrency, the maximum <em>number</em> of threads
102 specified by the <code>concurrency</code> command is <code>50</code>. See your test suite
102 specified by the <code>concurrency</code> command is <code>256</code>. See your test suite
103103 documentation for additional information about using concurrency values greater
104104 than <code>1</code>.</p>
105105 <p>
140140
141141 <hr>
142142
143 <p><a href="../copyright.html">Copyright</a> &copy; 2002, 2011, Oracle and/or its affiliates. All rights reserved.</p>
143 <p><a href="../copyright.html">Copyright</a> &copy; 2002, 2015, Oracle and/or its affiliates. All rights reserved.</p>
144144 </BODY>
145145 </HTML>
146146
1010 <body>
1111 <p><b>Copyright Notice</b></p>
1212 <p>
13 Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
13 Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
1414 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
1515 </p>
1616 <p>
77
88 Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
99 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
10
10
1111 This code is free software; you can redistribute it and/or modify it
1212 under the terms of the GNU General Public License version 2 only, as
1313 published by the Free Software Foundation. Oracle designates this
1414 particular file as subject to the "Classpath" exception as provided
1515 by Oracle in the LICENSE file that accompanied this code.
16
16
1717 This code is distributed in the hope that it will be useful, but WITHOUT
1818 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1919 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
2020 version 2 for more details (a copy is included in the LICENSE file that
2121 accompanied this code).
22
22
2323 You should have received a copy of the GNU General Public License version
2424 2 along with this work; if not, write to the Free Software Foundation,
2525 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
26
26
2727 Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2828 or visit www.oracle.com if you need additional information or have any
2929 questions.
3131
3232
3333 <index version="1.0">
34 <!-- A -->
34 <indexitem text=".jtb Files" target="glossary.JtbFiles"/>
35 <indexitem text=".jte Files" target="glossary.JteFiles"/>
36 <indexitem text=".jti Files" target="glossary.JtiFiles"/>
37 <indexitem text=".jtp Files" target="glossary.JtpFiles"/>
38 <indexitem text=".jtr File" target="glossary.JtrFile"/>
39 <indexitem text=".jtx Files" target="glossary.JtxFiles"/>
40 <indexitem text=".kfl Files" target="glossary.KflFiles"/>
3541
36 <indexitem text="All Tests View Filter" target="allTests.glossary" />
42 <!-- A -->
43 <indexitem text="All Tests View Filter" target="glossary.AllTestsViewFilter"/>
3744
45 <!-- B -->
46 <indexitem text="Batch Mode" target="glossary.BatchMode"/>
3847
39 <!-- B -->
40 <indexitem text="batch mode" target="batchMode.glossary" />
48 <!-- C -->
49 <indexitem text="Class" target="glossary.Class"/>
50 <indexitem text="Command File" target="glossary.CommandFile"/>
51 <indexitem text="Configuration" target="glossary.Configuration"/>
52 <indexitem text="Configuration Editor" target="glossary.ConfigurationEditor"/>
53 <indexitem text="Configuration File" target="glossary.ConfigurationFile"/>
54 <indexitem text="Configuration Value" target="glossary.ConfigurationValue"/>
55 <indexitem text="Current Configuration" target="glossary.CurrentConfiguration"/>
56 <indexitem text="Current Configuration Filter" target="glossary.CurrentConfigurationFilter"/>
4157
42 <!-- C -->
43 <indexitem text="class" target="class.glossary"/>
44 <indexitem text="command file" target="batchfileFile.glossary" />
45 <indexitem text="configuration" target="configuration.glossary"/>
46 <indexitem text="Configuration Editor" target="configurationEditor.glossary" />
47 <indexitem text="configuration file" target="configurationFile.glossary" />
48 <indexitem text="configuration values" target="configurationValues.glossary" />
49 <indexitem text="current configuration" target="currentConfiguration.glossary"/>
50 <indexitem text="Current Configuration view filter" target="currentConfigFilter.glossary"/>
51 <indexitem text="Custom view filter" target="customFilter.glossary"/>
58 <!-- D -->
59 <indexitem text="Desktop" target="glossary.Desktop"/>
5260
61 <!-- E -->
62 <indexitem text="EditJTI" target="glossary.EditJTI"/>
63 <indexitem text="Environment" target="glossary.Environment"/>
64 <indexitem text="Environment Entry" target="glossary.EnvironmentEntry"/>
65 <indexitem text="Environment Files" target="glossary.EnvironmentFiles"/>
66 <indexitem text="Error" target="glossary.Error"/>
67 <indexitem text="Exclude List" target="glossary.ExcludeList"/>
5368
54 <!-- D -->
55 <indexitem text="desktop" target="desktop.glossary"/>
69 <!-- F -->
70 <indexitem text="Fail" target="glossary.Fail"/>
71 <indexitem text="Filtered Out" target="glossary.FilteredOut"/>
72 <indexitem text="Filters" target="glossary.Filters"/>
5673
74 <!-- G -->
75 <indexitem text="Glossary" target="glossary.Glossary"/>
5776
58 <!-- E -->
59 <indexitem text="EditJTI" target="editJTI.glossary"/>
60 <indexitem text="environment" target="environment.glossary"/>
61 <indexitem text="environment entry" target="environmentVariables.glossary"/>
62 <indexitem text="environment file" target="environmentFiles.glossary"/>
63 <indexitem text="error" target="error.glossary"/>
64 <indexitem text="exclude list" target="excludeList.glossary"/>
77 <!-- H -->
78 <indexitem text="HTTP Server" target="glossary.HTTPServer"/>
6579
80 <!-- I -->
81 <indexitem text="Interview" target="glossary.Interview"/>
82 <indexitem text="Interview File" target="glossary.InterviewFile"/>
6683
67 <!-- F -->
68 <indexitem text="fail" target="fail.glossary"/>
69 <indexitem text="filtered out" target="filteredOut.glossary"/>
70 <indexitem text="filters" target="filters.glossary"/>
84 <!-- J -->
85 <indexitem text="JT Harness Preferences" target="glossary.JTHarnessPreferences"/>
86 <indexitem text="JTI" target="glossary.JTI"/>
7187
88 <!-- K -->
89 <indexitem text="Keywords" target="glossary.Keywords"/>
90 <indexitem text="Known Failures List Files" target="glossary.KnownFailuresListFiles"/>
7291
73 <!-- G -->
74 <indexitem text="glossary" target="glossary.glossary"/>
92 <!-- L -->
93 <indexitem text="Last Test Run View Filter" target="glossary.LastTestRunViewFilter"/>
94 <indexitem text="Log Level" target="glossary.LogLevel"/>
7595
76 <!-- H -->
77 <indexitem text="HTTP server" target="httpServer.glossary"/>
96 <!-- M -->
7897
98 <!-- N -->
99 <indexitem text="Not Run" target="glossary.NotRun"/>
79100
80 <!-- I -->
81 <indexitem text="interview" target="interview.glossary"/>
82 <indexitem text="interview file" target="interviewFile.glossary"/>
101 <!-- O -->
102 <indexitem text="Observer" target="glossary.Observer"/>
83103
84 <!-- J -->
85 <indexitem text=".jtb files" target="jtbFile.glossary" />
86 <indexitem text=".jte files" target="jteFile.glossary"/>
87 <indexitem text=".jti files" target="jtiFile.glossary"/>
88 <indexitem text=".jtr files" target="jtrFile.glossary"/>
89 <indexitem text=".jtx files" target="jtxFile.glossary"/>
104 <!-- P -->
105 <indexitem text="Parameter Files" target="glossary.ParameterFiles"/>
106 <indexitem text="Pass" target="glossary.Pass"/>
107 <indexitem text="Port Number" target="glossary.PortNumber"/>
108 <indexitem text="Prior Status" target="glossary.PriorStatus"/>
109 <indexitem text="Progress Monitor" target="glossary.ProgressMonitor"/>
90110
91 <!-- K -->
92 <indexitem text="keywords" target="keywords.glossary"/>
93 <indexitem text=".kfl files" target="kflFile.glossary"/>
94 <indexitem text="Known Failures List (KFL)" target="knownFailuresList.glossary"/>
111 <!-- Q -->
95112
113 <!-- R -->
114 <indexitem text="Report Directory" target="glossary.ReportDirectory"/>
96115
97 <!-- L -->
98 <indexitem text="Last Test Run View Filter" target="lasttestFilter.glossary"/>
99 <indexitem text="log level" target="loglevel.glossary"/>
116 <!-- S -->
117 <indexitem text="Standard Values" target="glossary.StandardValues"/>
118 <indexitem text="System Properties" target="glossary.SystemProperties"/>
100119
120 <!-- T -->
121 <indexitem text="Tabbed" target="glossary.Tabbed"/>
122 <indexitem text="Test Case" target="glossary.TestCase"/>
123 <indexitem text="Test Description" target="glossary.TestDescription"/>
124 <indexitem text="Test Environment" target="glossary.TestEnvironment"/>
125 <indexitem text="Test Manager" target="glossary.TestManager"/>
126 <indexitem text="Test Paths" target="glossary.TestPaths"/>
127 <indexitem text="Test Result Files" target="glossary.TestResultFiles"/>
128 <indexitem text="Test Run Filters" target="glossary.TestRunFilters"/>
129 <indexitem text="Test Script" target="glossary.TestScript"/>
130 <indexitem text="Test Suite" target="glossary.TestSuite"/>
131 <indexitem text="Test Tree" target="glossary.TestTree"/>
101132
102 <!-- N -->
103 <indexitem text="Not Run" target="initialFiles.glossary"/>
133 <!-- U -->
104134
135 <!-- V -->
136 <indexitem text="View Filters" target="glossary.ViewFilters"/>
105137
106 <!-- O -->
107 <indexitem text="observer" target="observer.glossary"/>
108
109
110 <!-- P -->
111 <indexitem text="parameter files" target="parameterFiles.glossary" />
112 <indexitem text="pass" target="pass.glossary"/>
113 <indexitem text="port number" target="portNumber.glossary"/>
114 <indexitem text="preferences" target="preferences.glossary"/>
115 <indexitem text="Prior Status" target="priorStatus.glossary"/>
116 <indexitem text="Progress Monitor" target="progressMonitor.glossary"/>
117
118
119 <!-- R -->
120 <indexitem text="report directory" target="reportDirectory.glossary"/>
121 <indexitem text="run filters" target="runFilters.glossary" />
122
123 <!-- S -->
124 <indexitem text="standard values" target="standardValues.glossary" />
125 <indexitem text="system properties" target="systemProperties.glossary"/>
126
127
128 <!-- T -->
129 <indexitem text="Tabbed" target="tabbedStyle.glossary"/>
130 <indexitem text="test case" target="testCase.glossary"/>
131 <indexitem text="test description" target="testDescription.glossary"/>
132 <indexitem text="test environment" target="testEnvironment.glossary"/>
133 <indexitem text="Test Manager" target="testManager.glossary"/>
134 <indexitem text="test paths" target="testPaths.glossary"/>
135 <indexitem text="test result files" target="testResult.glossary"/>
136 <indexitem text="test script" target="testScript.glossary"/>
137 <indexitem text="test suite" target="testSuite.glossary"/>
138 <indexitem text="test tree" target="testTree.glossary"/>
139
140
141 <!-- V -->
142 <indexitem text="view filters" target="viewFilters.glossary"/>
143
144
145 <!-- W -->
146 <indexitem text="work directory" target="workDirectory.glossary"/>
147
148
138 <!-- W -->
139 <indexitem text="Work Directory" target="glossary.WorkDirectory"/>
149140 </index>
33
44 Copyright (c) 2001, 2009, Oracle and/or its affiliates. All rights reserved.
55 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6
6
77 This code is free software; you can redistribute it and/or modify it
88 under the terms of the GNU General Public License version 2 only, as
99 published by the Free Software Foundation. Oracle designates this
1010 particular file as subject to the "Classpath" exception as provided
1111 by Oracle in the LICENSE file that accompanied this code.
12
12
1313 This code is distributed in the hope that it will be useful, but WITHOUT
1414 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1515 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
1616 version 2 for more details (a copy is included in the LICENSE file that
1717 accompanied this code).
18
18
1919 You should have received a copy of the GNU General Public License version
2020 2 along with this work; if not, write to the Free Software Foundation,
2121 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
22
22
2323 Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2424 or visit www.oracle.com if you need additional information or have any
2525 questions.
3535 <indexitem text=".jtr files" target="index.commandBrowseJTRTestresult" />
3636 <indexitem text=".jtx file" target="index.commandParameterCommandsParameterCommandsJtx" />
3737 <indexitem text=".jtx files" target="index.confEditExcludeListExcludeList" />
38 <indexitem text="accessing help" target="index.jthelpJthelpaccessing" />
39 <indexitem text="Agent Monitor window" target="index.uiAgentMonitorWindowAgentInUse" />
40 <indexitem text="agent pool" target="index.uiAgentMonitorWindowAgentPool" >
38 <indexitem text=".kfl files" target="index.confEditKflKfl" />
39 <indexitem text="508" target="index.commandSettingColorsAY" />
40 <indexitem text="a11y" target="index.commandSettingColorsAY" />
41 <indexitem text="accessibility" target="index.commandSettingColorsAY" />
42 <indexitem text="add Exclude List files" target="index.adminExcludeTabTEExcludeListTE" />
43 <indexitem text="adding a test environment file" target="index.adminEnvTabTEEnvironmentTE" />
44 <indexitem text="Agent Monitor tool" target="index.uiAgentMonitorWindow" />
45 <indexitem text="agent pool" >
4146 <indexitem text="setting port number" target="index.commandHarnessSettingsSettingsAgentPoolPort" />
4247 <indexitem text="setting timeout" target="index.commandHarnessSettingsSettingsAgentPoolTimeout" />
4348 <indexitem text="starting" target="index.commandHarnessSettingsSettingsStartAgentPool" />
4449 </indexitem>
45 <indexitem text="agents currently used" target="index.uiAgentMonitorWindowAgentInUse" />
46 <indexitem text="All Tests View Filter" target="index.browseAllTestsAllTests" />
50 <indexitem text="All Tests View Filter" target="index.uiAllTestsAllTests" />
4751 <indexitem text="appearance preferences" >
48 <indexitem text="JavaTest desktop" target="index.uiAppearancePrefsAppearancePrefs" />
49 </indexitem>
50 <indexitem text="Bad Checksum panel" >
51 </indexitem>
52 <indexitem text="Bad Result File panel" >
53 </indexitem>
54 <indexitem text="Bad Test Cases panel" >
55 </indexitem>
56 <indexitem text="Bad Test Description panel" >
52 <indexitem text="desktop" target="index.uiAppearancePrefsAppearancePrefs" />
5753 </indexitem>
5854 <indexitem text="batch command" target="index.commandBatchModeRunTests" />
5955 <indexitem text="Bookmarks" target="index.confEditSetMarkersKeywords" />
7672 <indexitem text="test result files" target="index.commandBrowseJTRTestresult" />
7773 </indexitem>
7874 <indexitem text="browsing test information" target="index.browseBrowsingBrowsingTest" />
79 <indexitem text="button bar (same as toolbar)" target="index.uiToolBarToolBar" />
80 <indexitem text="changing configuration values" target="index.confEditOtherValuesEditConfiguration" />
81 <indexitem text="changing window styles" target="index.uiAppearancePrefsAppearancePrefsStyles" />
75 <indexitem text="bug prefix URL" target="index.uiTestManagerTestManagerReporting" />
76 <indexitem text="button bar (tool bar)" target="index.uiToolBarToolBar" />
77 <indexitem text="changing configuration values" target="index.confEditEditConfigurationEditConfiguration" />
78 <indexitem text="changing tests to run" target="index.adminTestsTabTEInitialFilesTE" />
8279 <indexitem text="Clear Results" >
83 <indexitem text="test tree popup menu" target="index.browsePopupmenuPopupMenuClear" />
80 <indexitem text="test tree pop-up menu" target="index.uiPopupmenuPopupMenuClear" />
81 </indexitem>
82 <indexitem text="color preferences" >
83 <indexitem text="input text" target="index.uiColorPrefsColorPrefs" />
8484 </indexitem>
8585 <indexitem text="command" >
8686 <indexitem text="batch" target="index.commandBatchModeRunTests" />
9090 <indexitem text="envFiles" target="index.commandTestenvFileEnvFile" />
9191 <indexitem text="excludeList" target="index.commandExcludeListExcludeList" />
9292 <indexitem text="keywords" target="index.commandKeywordKeywords" />
93 <indexitem text="kfl" target="index.commandKnownFailureAnalysisWriteReportsKFL" />
94 <indexitem text="laf" target="index.commandSettingColorsSettingLAF" />
9395 <indexitem text="observer" target="index.commandObserverRunTests" />
9496 <indexitem text="open" target="index.commandOpenOpen" />
9597 <indexitem text="priorStatus" target="index.commandPriorPrior" />
114116 <indexitem text="parameter" target="index.commandParameterCommandsParameterCommands" />
115117 <indexitem text="setup" target="index.commandSetupCommandsSetupCommands" />
116118 <indexitem text="task" target="index.commandTaskCommandsEditConfig" />
119 <indexitem text="work directory" target="index.commandWorkdirWorkdirOpen" />
117120 <indexitem text="workDir" target="index.commandWorkdirWorkdir" >
118121 <indexitem text="create" target="index.commandWorkdirWorkdirCreate" />
119122 <indexitem text="overwrite" target="index.commandWorkdirWorkdirClearResults" />
120123 </indexitem>
121 <indexitem text="workdirectory" target="index.commandWorkdirWorkdirOpen" />
124 <indexitem text="workDirectory" >
125 <indexitem text="create" target="index.commandWorkdirWorkdirCreate" />
126 <indexitem text="overwrite" target="index.commandWorkdirWorkdirClearResults" />
127 </indexitem>
122128 </indexitem>
123129 <indexitem text="concurrency command" target="index.commandConcurrencyConcurrency" />
124130 <indexitem text="config command" target="index.commandConfigConfig" />
125131 <indexitem text="configuration" >
126132 <indexitem text="creating a new" target="index.confEditCreateConfigurationCreateConfiguration" />
127 <indexitem text="creating a template" target="index.confEditTemplateDialogCreateConfigurationTemplate" />
133 <indexitem text="creating a template" target="index.adminCreateTemplateCreateTemplate" />
128134 <indexitem text="test manager properties" target="index.execPropsDialogExecPropsDialogConfig" />
129135 </indexitem>
130136 <indexitem text="configuration checklist" target="index.confEditChecklistChecklist" />
131137 <indexitem text="Configuration Editor" >
132138 <indexitem text="Question Mode" target="index.confEditFullViewDialogFullViewDialog" >
133 <indexitem text="configuration history" target="index.confEditFullViewDialogFullViewDialogHistory" />
134139 <indexitem text="File menu" target="index.confEditFullViewDialogFullViewDialogFilemenu" />
135140 <indexitem text="Help menu" target="index.confEditFullViewDialogFullViewDialogHelpmenu" />
136141 <indexitem text="index pane" target="index.confEditFullViewDialogFullViewDialogIndexPane" />
137142 <indexitem text="More Info pane" target="index.confEditFullViewDialogFullViewDialogMoreInfoPane" />
138143 <indexitem text="question pane" target="index.confEditFullViewDialogFullViewDialogQuestionPane" />
144 <indexitem text="Recent Configuration" target="index.confEditFullViewDialogFullViewDialogHistory" />
139145 <indexitem text="Search menu" target="index.confEditFullViewDialogFullViewDialogSearchmenu" />
140146 <indexitem text="View menu" target="index.confEditFullViewDialogFullViewDialogViewmenu" />
141147 </indexitem>
152158 </indexitem>
153159 </indexitem>
154160 <indexitem text="configuration file" >
155 <indexitem text="changing values" target="index.confEditOtherValuesEditConfiguration" />
161 <indexitem text="changing values" target="index.confEditEditConfigurationEditConfiguration" />
156162 <indexitem text="changing values in" target="index.commandEditConfigEditConfig" />
163 <indexitem text="editing values" target="index.confEditEditQuickSetEditix" />
157164 </indexitem>
158165 <indexitem text="configuration values" >
159166 <indexitem text="setting" target="index.commandOtherConfigValuesOtherConfigValues" />
160167 </indexitem>
161 <indexitem text="Configure menu" target="index.uiConfigureMenuConfigureMenu" >
162 <indexitem text="configuration history" target="index.uiConfigureMenuConfigureMenu" />
163 </indexitem>
168 <indexitem text="Configure menu" target="index.uiConfigureMenuConfigureMenu" />
164169 <indexitem text="configuring a test run" target="index.confEditOverviewConfEditOverview" />
170 <indexitem text="Create Report tabbed panes" target="index.mergeReportsReportMergePrefsDialog" />
165171 <indexitem text="create work directory" target="index.commandWorkdirWorkdirCreate" />
166172 <indexitem text="creating a configuration" target="index.confEditCreateConfigurationCreateConfiguration" />
167 <indexitem text="creating a configuration template" target="index.confEditTemplateDialogCreateConfigurationTemplate" />
173 <indexitem text="creating a template" target="index.adminCreateTemplateCreateTemplate" />
174 <indexitem text="creating merged reports" target="index.mergeReportsMergeReportsPrefsDialog" />
168175 <indexitem text="creating test reports" target="index.reportNewReportsNewReports" />
169 <indexitem text="Current Configuration view filter" target="index.browseCurrentConfigurationCurrentConfiguration" />
170 <indexitem text="Custom view filter" target="index.browseCustomFiltersCustomFilters" >
171 <indexitem text="edit" target="index.browseCustomFiltersCustomFiltersEdit" />
172 <indexitem text="specify tests" target="index.browseCustomFiltersCustomFiltersInitialFiles" />
173 <indexitem text="use exclude lists" target="index.browseCustomFiltersCustomFiltersExcludeList" />
174 <indexitem text="use keywords" target="index.browseCustomFiltersCustomFiltersKeywords" />
175 <indexitem text="use prior status" target="index.browseCustomFiltersCustomFiltersStatus" />
176 <indexitem text="use test suite filter" target="index.browseCustomFiltersCustomFiltersSpecial" />
177 <indexitem text="using" target="index.browseCustomFiltersCustomFiltersUse" />
178 </indexitem>
176 <indexitem text="Current Configuration view filter" target="index.uiCurrentConfigurationCurrentConfiguration" />
177 <indexitem text="Current Template view filter" target="index.uiCurrentTemplateCurrentTemplate" />
178 <indexitem text="Custom view filter" target="index.uiCustomFiltersCustomFilters" >
179 <indexitem text="edit" target="index.uiCustomFiltersCustomFiltersEdit" />
180 <indexitem text="specify tests" target="index.uiCustomFiltersCustomFiltersInitialFiles" />
181 <indexitem text="use exclude lists" target="index.uiCustomFiltersCustomFiltersExcludeList" />
182 <indexitem text="use keywords" target="index.uiCustomFiltersCustomFiltersKeywords" />
183 <indexitem text="use prior status" target="index.uiCustomFiltersCustomFiltersStatus" />
184 <indexitem text="use test suite filter" target="index.uiCustomFiltersCustomFiltersSpecial" />
185 <indexitem text="using" target="index.uiCustomFiltersCustomFiltersUse" />
186 </indexitem>
187 <indexitem text="deleting a test environment file" target="index.adminEnvTabTEEnvironmentTE" />
179188 <indexitem text="desktop" >
180 <indexitem text="GUI" target="index.uiUiUi" />
181 </indexitem>
182 <indexitem text="desktop menus" target="index.uiDesktopMenusDesktopMenus" />
189 <indexitem text="appearance preferences" target="index.uiAppearancePrefsAppearancePrefs" />
190 </indexitem>
183191 <indexitem text="displaying" >
184192 <indexitem text="configuration checklist" target="index.confEditChecklistChecklist" />
185193 <indexitem text="online information" target="index.uiOpenHelpOpenHelp" />
186194 <indexitem text="Question Log" target="index.confEditQuestionLogQuestionLog" />
187195 <indexitem text="test manager properties" target="index.execPropsDialogExecPropsDialog" />
188 <indexitem text="test tree popup menu" target="index.browsePopupmenuPopupMenu" />
189 </indexitem>
196 <indexitem text="test tree pop-up menu" target="index.uiPopupmenuPopupMenu" />
197 </indexitem>
198 <indexitem text="displaying document information" target="index.jthelpJthelpNavigation" />
190199 <indexitem text="displaying reports" target="index.reportReportBrowserReportBrowser" />
200 <indexitem text="editing Quick Set values" target="index.confEditEditQuickSetEditix" />
191201 <indexitem text="EditJTI command format" target="index.commandEditConfigEditConfig" />
192202 <indexitem text="EditLinks command format" target="index.commandMoveReportsEditConfig" />
203 <indexitem text="enabling propagation" target="index.templatesEnablePropFromTemplateConfeditEnablingPropagation" />
193204 <indexitem text="env command" target="index.commandTestEnvEnv" />
194205 <indexitem text="envFiles command" target="index.commandTestenvFileEnvFile" />
195206 <indexitem text="environment files" target="index.confEditEnvironmentEnvironment" />
196207 <indexitem text="environment variable" >
197208 <indexitem text="setting" target="index.commandHarnessSettingsSettingsEnvVariable" />
198209 </indexitem>
199 <indexitem text="example" >
200 <indexitem text="runtests command" target="index.commandRunTestsRunTestsExample" />
201 </indexitem>
210 <indexitem text="example, runtests command" target="index.commandRunTestsRunTestsExample" />
202211 <indexitem text="examples" >
203212 <indexitem text="creating a new work directory" target="index.commandWorkdirWorkdirExamples" />
204213 <indexitem text="replacing a work directory" target="index.commandWorkdirWorkdirExamples" />
208217 <indexitem text="latest" target="index.confEditExcludeListExcludeListLatest" />
209218 <indexitem text="other" target="index.confEditExcludeListExcludeListOther" />
210219 </indexitem>
211 <indexitem text="Exclude List browser" target="index.exclDialogExcludeListBrowser" >
212 <indexitem text="opening" target="index.exclBrowsingExclBrowsingExcl" />
213 </indexitem>
220 <indexitem text="Exclude List browser" target="index.exclDialogExcludeListBrowser" />
214221 <indexitem text="Exclude List contents" target="index.exclDialogExcludeListBrowser" />
215222 <indexitem text="Exclude List file" target="index.commandParameterCommandsParameterCommandsJtx" />
216223 <indexitem text="Exclude List files" target="index.confEditExcludeListExcludeList" />
219226 <indexitem text="specifying" target="index.commandExcludeListExcludeList" />
220227 </indexitem>
221228 <indexitem text="excludeList command" target="index.commandExcludeListExcludeList" />
229 <indexitem text="execution order" target="index.uiTestManagerTestExecOrder" />
222230 <indexitem text="file" >
223231 <indexitem text=".jte" target="index.confEditEnvironmentEnvironment" />
224232 <indexitem text=".jtp" target="index.commandParameterCommandsParameterCommandsJtp" />
230238 <indexitem text="viewing" target="index.browseFilesTabFilesTab" />
231239 </indexitem>
232240 <indexitem text="filters" >
233 <indexitem text="browser" >
234241 <indexitem text="view" target="index.browseViewFiltersViewFilter" />
235242 </indexitem>
236 </indexitem>
237 <indexitem text="folder icons" target="index.browseFolderIconsFolderIcons" />
243 <indexitem text="folder icons" target="index.uiFolderIconsFolderIcons" />
238244 <indexitem text="folder information" >
239245 <indexitem text="Test Manager" target="index.browseFolderInfoFolderInfo" />
240246 </indexitem>
241 <indexitem text="folder result status icon" target="index.browseFolderIconsFolderIconsResultstatus" />
242 <indexitem text="folder run status icon" target="index.browseFolderIconsFolderIconsRunstatus" />
243 <indexitem text="formatting configuration values" target="index.commandConfigValuesTimeout" />
244 <indexitem text="getting started" target="index.uiUsingJTUsingJT" />
247 <indexitem text="folder result status icon" target="index.uiFolderIconsFolderIconsResultstatus" />
248 <indexitem text="folder run status icon" target="index.uiFolderIconsFolderIconsRunstatus" />
249 <indexitem text="getting started" >
250 <indexitem text="GUI" target="index.uiUsingJTUsingJT" />
251 </indexitem>
245252 <indexitem text="GUI" target="index.uiUsingJTUsingJT" >
246 <indexitem text="desktop" target="index.uiUiUi" />
247 </indexitem>
248 <indexitem text="help" >
249 <indexitem text="accessing" target="index.jthelpJthelpaccessing" />
250 <indexitem text="F1 key" target="index.uiOpenHelpOpenHelpF" />
251 <indexitem text="navigation" target="index.jthelpJthelpNavigation" />
252 </indexitem>
253 <indexitem text="tools" target="index.uiUiUi" />
254 </indexitem>
255 <indexitem text="GUI layout styles" target="index.uiDesktopStylesDesktopStyles" />
256 <indexitem text="Help" >
257 <indexitem text="button" target="index.uiOpenHelpOpenHelpButtons" />
258 <indexitem text="menu" target="index.uiOpenHelpOpenHelpMenu" />
259 </indexitem>
260 <indexitem text="help F1 key" target="index.uiOpenHelpOpenHelpF" />
253261 <indexitem text="Help menu" target="index.uiDesktopMenusDesktopMenusHelp" />
254 <indexitem text="help, context sensitive" target="index.uiOpenHelpOpenHelpF" />
262 <indexitem text="HTML Files tab" target="index.reportNewReportsHtmlFilesTab" />
263 <indexitem text="HTML report options" target="index.reportNewReportsHtmlopt" />
255264 <indexitem text="HTTP Server" target="index.commandHttpServerHttpServer" />
256265 <indexitem text="icons" >
257 <indexitem text="folder" target="index.browseFolderIconsFolderIcons" >
258 <indexitem text="result status" target="index.browseFolderIconsFolderIconsResultstatus" />
259 <indexitem text="run status" target="index.browseFolderIconsFolderIconsRunstatus" />
260 </indexitem>
261 <indexitem text="test" target="index.browseTestIconsTestIcons" >
262 <indexitem text="result status" target="index.browseTestIconsTestIconsTestresultstatus" />
263 <indexitem text="run status" target="index.browseTestIconsTestIconsRunstatus" />
266 <indexitem text="folder" target="index.uiFolderIconsFolderIcons" >
267 <indexitem text="result status" target="index.uiFolderIconsFolderIconsResultstatus" />
268 <indexitem text="run status" target="index.uiFolderIconsFolderIconsRunstatus" />
269 </indexitem>
270 <indexitem text="test" target="index.uiTestIconsTestIcons" >
271 <indexitem text="result status" target="index.uiTestIconsTestIconsTestresultstatus" />
272 <indexitem text="run status" target="index.uiTestIconsTestIconsRunstatus" />
264273 </indexitem>
265274 </indexitem>
266275 <indexitem text="increasing the timeout" target="index.commandTimeoutTimeout" />
276 <indexitem text="information area" >
277 <indexitem text="Test Manager" target="index.uiInfoPaneFolderInfo" />
278 </indexitem>
267279 <indexitem text="Information Commands" target="index.commandDisplayHelpDisplayHelp" />
268280 <indexitem text="initial files" target="index.confEditInitialFilesInitialFiles" />
269281 <indexitem text="initial set-up commands" target="index.commandBasicContextBasicContext" />
270 <indexitem text="JavaTest Desktop" target="index.uiUiUi" />
271 <indexitem text="JavaTest GUI" target="index.uiUsingJTUsingJT" />
272 <indexitem text="JavaTest online help" target="index.jthelpJthelp" />
273 <indexitem text="JavaTest Preferences dialog box" target="index.uiPrefsDialogPrefsDialog" />
282 <indexitem text="JT Harness" >
283 <indexitem text="ExcludeBrowser servlet" target="index.commandBrowseJTXExcludeList" />
284 <indexitem text="ResultBrowser servlet" target="index.commandBrowseJTRTestresult" />
285 </indexitem>
274286 <indexitem text="Keywords" >
275287 <indexitem text="run filter" target="index.confEditKeywordsKeywords" />
276288 </indexitem>
279291 <indexitem text="Configuration Editor" >
280292 <indexitem text="Question Mode view" target="index.confEditKeywordsKeywords" />
281293 </indexitem>
282 </indexitem>
283 <indexitem text="Last Test Run View Filter" target="index.browseLastRunAllTests" />
294 <indexitem text="Template Editor" target="index.adminKeywordsTabTEKeywordsTE" />
295 </indexitem>
296 <indexitem text="KFL" target="index.reportNewReportsSpecKFL" />
297 <indexitem text="KFL files" target="index.confEditKflKfl" />
298 <indexitem text="KFL report bug prefix" target="index.uiTestManagerTestManagerReporting" />
299 <indexitem text="KFL reports" target="index.reportNewReportsUnrelerr" />
300 <indexitem text="known failure analysis" target="index.reportNewReportsKfanalysis" />
301 <indexitem text="known failures list" target="index.commandKnownFailureAnalysisWriteReportsKFL" />
302 <indexitem text="Last Test Run View Filter" target="index.uiLastRunAllTests" />
284303 <indexitem text="latest exclude list" target="index.confEditExcludeListExcludeListLatest" />
304 <indexitem text="layout styles" target="index.uiDesktopStylesDesktopStyles" />
305 <indexitem text="lite harness" target="index.commandLiteLiteHarness" />
306 <indexitem text="log viewer" target="index.uiLogViewerLogViewerUI" />
307 <indexitem text="look and feel command" target="index.commandSettingColorsSettingLAF" />
285308 <indexitem text="markers" target="index.confEditSetMarkersKeywords" />
286 <indexitem text="MDI window style" target="index.uiAppearancePrefsAppearancePrefsMdi" />
287309 <indexitem text="menu" >
288 <indexitem text="Configure" target="index.uiConfigureMenuConfigureMenu" >
289 <indexitem text="configuration history" target="index.uiConfigureMenuConfigureMenu" />
290 </indexitem>
310 <indexitem text="Configure" target="index.uiConfigureMenuConfigureMenu" />
291311 <indexitem text="desktop" >
292312 <indexitem text="File" target="index.uiDesktopMenusDesktopMenusFile" />
293313 <indexitem text="Help" target="index.uiDesktopMenusDesktopMenusHelp" />
314 <indexitem text="Tool" target="index.uiDesktopMenusDesktopMenusTool" />
294315 <indexitem text="Windows" target="index.uiDesktopMenusDesktopMenusWindow" />
295316 </indexitem>
296 <indexitem text="Help" target="index.uiOpenHelpOpenHelpMenu" />
297 <indexitem text="test tree popup" target="index.browsePopupmenuPopupMenu" >
298 <indexitem text="clear previous test results" target="index.browsePopupmenuPopupMenuClear" />
299 <indexitem text="execute" target="index.browsePopupmenuPopupMenuExecute" />
300 <indexitem text="refresh test suite contents" target="index.browsePopupmenuPopupMenuRefresh" />
301 </indexitem>
302 <indexitem text="View" target="index.browseViewMenuViewMenu" >
303 <indexitem text="Filters" target="index.browseViewMenuViewMenuFilters" />
304 <indexitem text="Properties" target="index.browseViewMenuViewMenuProperties" />
305 <indexitem text="Test Suite Errors" target="index.browseViewMenuViewMenuErrors" />
306 </indexitem>
307 </indexitem>
308 <indexitem text="menus" >
309 <indexitem text="desktop" target="index.uiDesktopMenusDesktopMenus" />
310 </indexitem>
311 <indexitem text="monitor a test run" >
312 <indexitem text="remote" target="index.commandHttpServerHttpServer" />
313 </indexitem>
317 <indexitem text="test tree pop-up" target="index.uiPopupmenuPopupMenu" >
318 <indexitem text="clear previous test results" target="index.uiPopupmenuPopupMenuClear" />
319 <indexitem text="execute" target="index.uiPopupmenuPopupMenuExecute" />
320 <indexitem text="override current configuration" target="index.uiPopupmenuPopupMenuExecute" />
321 <indexitem text="refresh test suite contents" target="index.uiPopupmenuPopupMenuRefresh" />
322 </indexitem>
323 </indexitem>
324 <indexitem text="menus" target="index.uiDesktopMenusDesktopMenus" />
325 <indexitem text="monitor a test run, remote" target="index.commandHttpServerHttpServer" />
314326 <indexitem text="monitor test progress" target="index.commandVerboseRunTests" />
315327 <indexitem text="monitor, progress" target="index.runProgressMonitorProgressMonitor" />
316328 <indexitem text="monitoring a test run" target="index.runMonitoringMonitoring" />
329 <indexitem text="monitoring output logs" target="index.runLogViewerLogViewerwindow" />
330 <indexitem text="monitoring servicess" target="index.runSvcViewerSvcViewerwindow" />
317331 <indexitem text="Multi-Selection Tab" target="index.browseMultiselectionTabMultiSelectionTab" />
318332 <indexitem text="multiple configurations" target="index.confEditMultipleMultiple" />
319 <indexitem text="navigating help" target="index.jthelpJthelpNavigation" />
320333 <indexitem text="number of" >
321334 <indexitem text="failed tests" target="index.browseSummaryTabSummaryTabFailed" />
322335 <indexitem text="passed tests" target="index.browseSummaryTabSummaryTabPassed" />
329342 <indexitem text="total" target="index.browseSummaryTabSummaryTabTotal" />
330343 </indexitem>
331344 <indexitem text="observer command" target="index.commandObserverRunTests" />
332 <indexitem text="online help" >
333 <indexitem text="accessing" target="index.jthelpJthelpNavigation" />
334 </indexitem>
335 <indexitem text="online information" >
336 <indexitem text="displaying" target="index.uiOpenHelpOpenHelp" />
337 </indexitem>
345 <indexitem text="online documentation" >
346 <indexitem text="accessing" target="index.jthelpJthelpAccessing" />
347 </indexitem>
348 <indexitem text="online information" target="index.jthelpJthelpAccessing" />
349 <indexitem text="online User's Guide" target="index.jthelpJthelp" />
338350 <indexitem text="open command" target="index.commandOpenOpen" />
339 <indexitem text="option" >
340 <indexitem text="verbose" target="index.commandVerboseRunTests" />
341 </indexitem>
342 <indexitem text="options" >
343 <indexitem text="tool tip" target="index.uiAppearancePrefsAppearancePrefsTooltips" />
344 </indexitem>
351 <indexitem text="options, tool tip" target="index.uiAppearancePrefsAppearancePrefsTooltips" />
352 <indexitem text="order" target="index.uiTestManagerTestExecOrder" />
345353 <indexitem text="parameter commands" target="index.commandParameterCommandsParameterCommands" />
346354 <indexitem text="parameter file" target="index.commandParameterCommandsParameterCommandsJtp" />
347355 <indexitem text="plug-ins" >
348356 <indexitem text="test manager properties" target="index.execPropsDialogExecPropsDialogPlugins" />
349357 </indexitem>
358 <indexitem text="Preferences dialog box" target="index.uiPrefsDialogPrefsDialog" />
350359 <indexitem text="prior test status" target="index.commandPriorPrior" />
351360 <indexitem text="priorStatus command" target="index.commandPriorPrior" />
352 <indexitem text="progress indicator" target="index.runProgressMeterProgressMeter" >
361 <indexitem text="progress indicator" target="index.runProgressMeterProgressMeterBar" >
353362 <indexitem text="elapsed time" target="index.runProgressMeterProgressMeterTime" />
354 <indexitem text="progress bar" target="index.runProgressMeterProgressMeterBar" />
355363 </indexitem>
356364 <indexitem text="Progress Monitor" target="index.runProgressMonitorProgressMonitor" >
357365 <indexitem text="Memory" target="index.runProgressMonitorProgressMonitorMemory" />
359367 <indexitem text="Tests in Progress" target="index.runProgressMonitorProgressMonitorTest" />
360368 <indexitem text="Time" target="index.runProgressMonitorProgressMonitorTime" />
361369 </indexitem>
362 <indexitem text="Properties" >
363 <indexitem text="Test Manager" target="index.browseViewMenuViewMenuProperties" />
364 </indexitem>
365370 <indexitem text="Question Log" target="index.confEditQuestionLogQuestionLog" />
366371 <indexitem text="Question Mode view" >
367372 <indexitem text="setting" >
370375 </indexitem>
371376 </indexitem>
372377 <indexitem text="Quick Pick test execution" >
373 <indexitem text="test tree popup menu" target="index.browsePopupmenuPopupMenuExecute" />
378 <indexitem text="test tree pop-up menu" target="index.uiPopupmenuPopupMenuExecute" />
374379 </indexitem>
375380 <indexitem text="Quick Set Mode" target="index.confEditStdViewDialogStdViewDialog" />
376 <indexitem text="Quick Start Wizard" target="index.startQuickStartQuickStart" />
381 <indexitem text="Quick Start" target="index.startQuickStartQuickStart" />
377382 <indexitem text="Refresh Test Suite Contents" >
378 <indexitem text="test tree popup menu" target="index.browsePopupmenuPopupMenuRefresh" />
383 <indexitem text="test tree pop-up menu" target="index.uiPopupmenuPopupMenuRefresh" />
379384 </indexitem>
380385 <indexitem text="remotely monitor and control a test run" target="index.commandHttpServerHttpServer" />
386 <indexitem text="remove Exclude List files" target="index.adminExcludeTabTEExcludeListTE" />
381387 <indexitem text="replace existing work directory" target="index.commandWorkdirWorkdirClearResults" />
382388 <indexitem text="Report Browser" target="index.reportReportBrowserReportBrowser" />
389 <indexitem text="Report Converter options" target="index.uiReportMergePrefsDialog" />
390 <indexitem text="Report Converter Tool" target="index.mergeReportsWindowPrefsDialog" />
391 <indexitem text="Report Converter Tool window" target="index.mergeReportsReportMergeViewerPrefsDialog" />
392 <indexitem text="report directory" target="index.reportNewReportsReportFiles" />
393 <indexitem text="report files" target="index.reportNewReportsReportFiles" />
394 <indexitem text="report type" target="index.commandWriteReportsWriteReportType" />
383395 <indexitem text="reports" >
396 <indexitem text="KFL" >
397 <indexitem text="New Passed" target="index.reportNewReportsFailtopass" />
398 </indexitem>
384399 <indexitem text="moving" target="index.commandMoveReportsEditConfig" />
385 <indexitem text="test" target="index.reportUsingReportsUsingReports" >
386 <indexitem text="creating" target="index.reportNewReportsNewReports" />
387 </indexitem>
400 <indexitem text="test" target="index.reportUsingReportsUsingReports" />
388401 <indexitem text="writing" target="index.commandWriteReportsWriteReports" />
389402 </indexitem>
403 <indexitem text="resolving configuration-template conflicts" target="index.templatesResolveConflictsResolveConflict" />
404 <indexitem text="Restore Tools State on Start" target="index.uiAppearancePrefsAppearancePrefsRestore" />
390405 <indexitem text="run filter" >
391406 <indexitem text="Keywords" target="index.confEditKeywordsKeywords" />
392407 </indexitem>
397412 <indexitem text="Test Manager window" target="index.runRunningRunning" />
398413 </indexitem>
399414 <indexitem text="runtests command" target="index.commandRunTestsRunTests" />
400 <indexitem text="SDI window style" target="index.uiAppearancePrefsAppearancePrefsSdi" />
415 <indexitem text="section 508" target="index.commandSettingColorsAY" />
401416 <indexitem text="servlet" >
402 <indexitem text="JavaTest ExcludeBrowser" target="index.commandBrowseJTXExcludeList" />
403 <indexitem text="JavaTest ResultBrowser" target="index.commandBrowseJTRTestresult" />
417 <indexitem text="JT Harness ExcludeBrowser" target="index.commandBrowseJTXExcludeList" />
418 <indexitem text="JT Harness ResultBrowser" target="index.commandBrowseJTRTestresult" />
404419 </indexitem>
405420 <indexitem text="set command" target="index.commandSettingValuesSettingValues" >
406421 <indexitem text="examples" target="index.commandSettingValuesSettingValuesExamples" />
415430 <indexitem text="time factor" target="index.confEditExecutionExecutionTimeFactor" />
416431 </indexitem>
417432 <indexitem text="setting concurrency" target="index.commandConcurrencyConcurrency" />
418 <indexitem text="setting JavaTest preferences" target="index.uiPrefsDialogPrefsDialog" />
433 <indexitem text="setting preferences" target="index.uiPrefsDialogPrefsDialog" />
419434 <indexitem text="setting specific configuration values" target="index.commandOtherConfigValuesOtherConfigValues" />
420435 <indexitem text="setup commands" target="index.commandSetupCommandsSetupCommands" >
421436 <indexitem text="additional" target="index.commandHarnessSettingsSettings" />
422437 </indexitem>
423 <indexitem text="site administration" target="index.confEditTemplateDialogCreateConfigurationTemplate" />
438 <indexitem text="shutdown options" target="index.uiAppearancePrefsAppearancePrefsShutdown" />
439 <indexitem text="site administration" target="index.templatesUsingTemplateCreateConfigurationTemplate" />
424440 <indexitem text="specify" >
425441 <indexitem text="a work directory" target="index.commandWorkdirWorkdir" />
426442 <indexitem text="configuration file" target="index.commandConfigConfig" />
427443 <indexitem text="directories of tests" target="index.commandTestDirTestDir" />
444 <indexitem text="existing work directory" target="index.commandWorkdirWorkdirOpen" />
428445 <indexitem text="tests to run" target="index.commandTestDirTestDir" />
429 <indexitem text="work directory" >
430 <indexitem text="existing" target="index.commandWorkdirWorkdirOpen" />
431 </indexitem>
432446 </indexitem>
433447 <indexitem text="specify tests to run" target="index.confEditInitialFilesInitialFiles" />
434448 <indexitem text="specifying a test environment" target="index.confEditEnvironmentEnvironment" />
455469 <indexitem text="passed" target="index.browseSummaryTabSummaryTabPassed" />
456470 </indexitem>
457471 </indexitem>
458 <indexitem text="Summary panel" >
459 </indexitem>
460472 <indexitem text="system properties" >
461473 <indexitem text="setting" target="index.commandHarnessSettingsSettingsSystemProperties" />
462474 </indexitem>
463 <indexitem text="Tabbed window style" target="index.uiAppearancePrefsAppearancePrefsFull" />
464475 <indexitem text="Task Commands" target="index.commandTaskCommandsEditConfig" />
476 <indexitem text="template" >
477 <indexitem text="enabling propagation" target="index.templatesEnablePropFromTemplateConfeditEnablingPropagation" />
478 <indexitem text="Tests pane" target="index.adminTestsTabTEInitialFilesTE" />
479 </indexitem>
480 <indexitem text="Template Bookmarks" target="index.adminSetMarkersTEBookmarksTE" />
481 <indexitem text="Template Editor" >
482 <indexitem text="editing test execution values" target="index.adminExecTabTEExecutionTE" />
483 <indexitem text="Keywords pane" target="index.adminKeywordsTabTEKeywordsTE" />
484 <indexitem text="Question Mode" target="index.adminQuestionModeTEFullTemplateEditor" >
485 <indexitem text="File menu" target="index.adminQuestionModeTEQuestionModeTEFilemenu" />
486 <indexitem text="Help menu" target="index.adminQuestionModeTEQuestionModeTEHelpmenu" />
487 <indexitem text="index pane" target="index.adminQuestionModeTEQuestionModeTEIndexPane" />
488 <indexitem text="More Info pane" target="index.adminQuestionModeTEQuestionModeTEMoreInfoPane" />
489 <indexitem text="question pane" target="index.adminQuestionModeTEQuestionModeTEQuestionPane" />
490 <indexitem text="Recent Configuration" target="index.confEditFullViewDialogQuestionModeTEHistory" />
491 <indexitem text="Search menu" target="index.adminQuestionModeTEQuestionModeTESearchmenu" />
492 <indexitem text="View menu" target="index.adminQuestionModeTEQuestionModeTEViewmenu" />
493 </indexitem>
494 <indexitem text="Quick Set Mode" target="index.adminQuickSetTETemplateQuickSet" />
495 <indexitem text="setting" >
496 <indexitem text="concurrency" target="index.adminExecTabTEExecutionConcurrencyTE" />
497 <indexitem text="time factor" target="index.adminExecTabTEExecutionTimeFactorTE" />
498 </indexitem>
499 <indexitem text="Test Environment pane" target="index.adminEnvTabTEEnvironmentTE" />
500 </indexitem>
501 <indexitem text="Template Editor window" >
502 <indexitem text="Question Mode" >
503 <indexitem text="Bookmarks menu" target="index.adminQuestionModeTEQuestionModeTEMarkermenu" />
504 </indexitem>
505 </indexitem>
506 <indexitem text="templates" target="index.templatesUsingTemplateCreateConfigurationTemplate" />
507 <indexitem text="templates, editing" target="index.adminEditTemplateEditingTemplate" />
508 <indexitem text="templates, loading" target="index.templatesLoadTemplateEditingTemplate" />
465509 <indexitem text="Test Description tab" target="index.browseTestDescriptionTabTestDescriptionTab" />
466510 <indexitem text="Test Environment browser" target="index.envDialogTestEnvBrowser" >
467511 <indexitem text="defined in environment" target="index.envDialogTestEnvBrowserEnv" />
469513 <indexitem text="Entry Name" target="index.envDialogTestEnvBrowserKey" />
470514 <indexitem text="Value" target="index.envDialogTestEnvBrowserValue" />
471515 </indexitem>
472 <indexitem text="test icons" target="index.browseTestIconsTestIcons" />
516 <indexitem text="test icons" target="index.uiTestIconsTestIcons" />
473517 <indexitem text="test information" >
474518 <indexitem text="Test view" target="index.browseTestInfoTestInfo" />
475519 </indexitem>
479523 <indexitem text="Failed test results" target="index.browseStatusTabsStatusTabsFailed" />
480524 <indexitem text="Filtered Out tests" target="index.browseStatusTabsStatusTabsNotRun" />
481525 <indexitem text="folder view" target="index.browseFolderInfoFolderInfo" />
526 <indexitem text="information area" target="index.uiInfoPaneFolderInfo" />
482527 <indexitem text="Not Run tests" target="index.browseStatusTabsStatusTabsNotRun" />
483528 <indexitem text="Passed test results" target="index.browseStatusTabsStatusTabsPassed" />
484529 <indexitem text="Summary information" target="index.browseSummaryTabSummaryTab" >
491536 <indexitem text="total" target="index.browseSummaryTabSummaryTabTotal" />
492537 </indexitem>
493538 <indexitem text="Test Run Messages" target="index.browseMessagesTabMessagesTab" >
494 <indexitem text="message area" target="index.browseMessagesTabMessagesTabMessagePane" />
495539 <indexitem text="message list" target="index.browseMessagesTabMessagesTabListPane" />
496 <indexitem text="Output Summary message" target="index.browseMessagesTabMessagesTabOutput" />
497540 <indexitem text="Result message" target="index.browseMessagesTabMessagesTabOutput" />
498 <indexitem text="summary message" target="index.browseMessagesTabMessagesTabSummary" />
499 <indexitem text="Test Result message" target="index.browseMessagesTabMessagesTabResult" />
500541 </indexitem>
501542 <indexitem text="Test view" target="index.browseTestInfoTestInfo" />
502543 </indexitem>
503 <indexitem text="Test Manager window" target="index.uiWindowUiWindow" >
544 <indexitem text="Test Manager status line" target="index.uiTestManagerStatusTMstatus" />
545 <indexitem text="Test Manager tool" target="index.uiWindowUiWindow" />
546 <indexitem text="Test Manager window" >
504547 <indexitem text="browsing test information" target="index.browseBrowsingBrowsingTest" />
505548 <indexitem text="progress indicator" target="index.runProgressMeterProgressMeter" >
506549 <indexitem text="elapsed time" target="index.runProgressMeterProgressMeterTime" />
507550 <indexitem text="progress bar" target="index.runProgressMeterProgressMeterBar" />
508551 </indexitem>
509552 <indexitem text="running tests" target="index.runRunningRunning" />
510 <indexitem text="status message" target="index.uiWindowUiWindowStatusMessage" />
511553 <indexitem text="Test Description tab" target="index.browseTestDescriptionTabTestDescriptionTab" />
512554 <indexitem text="Test Run Details tab" target="index.browseDetailsTabDetailsTab" >
513555 <indexitem text="property names" target="index.browseDetailsTabDetailsTabName" />
514556 <indexitem text="values" target="index.browseDetailsTabDetailsTabValue" />
515557 </indexitem>
516 <indexitem text="test tree" target="index.browseUsingtreeUsingtree" />
517 <indexitem text="View menu" target="index.browseViewMenuViewMenu" >
518 <indexitem text="Filters" target="index.browseViewMenuViewMenuFilters" />
519 <indexitem text="Properties" target="index.browseViewMenuViewMenuProperties" />
520 <indexitem text="Test Suite Errors" target="index.browseViewMenuViewMenuErrors" />
521 </indexitem>
558 <indexitem text="test tree" target="index.uiUsingtreeUsingtree" />
522559 </indexitem>
523560 <indexitem text="test reports" target="index.reportUsingReportsUsingReports" />
524561 <indexitem text="test result files" target="index.commandBrowseJTRTestresult" />
525 <indexitem text="test result status icon" target="index.browseTestIconsTestIconsTestresultstatus" />
526 <indexitem text="test results" >
562 <indexitem text="test result status icon" target="index.uiTestIconsTestIconsTestresultstatus" />
527563 <indexitem text="test run" >
528564 <indexitem text="monitoring" target="index.runMonitoringMonitoring" />
529565 <indexitem text="start" target="index.runStartingStarting" />
537573 <indexitem text="summary message" target="index.browseMessagesTabMessagesTabSummary" />
538574 <indexitem text="Test Result message" target="index.browseMessagesTabMessagesTabResult" />
539575 </indexitem>
540 <indexitem text="test run status icon" target="index.browseTestIconsTestIconsRunstatus" />
576 <indexitem text="test run status icon" target="index.uiTestIconsTestIconsRunstatus" />
541577 <indexitem text="test status" >
542578 <indexitem text="Error" target="index.browseStatusTabsStatusTabsError" />
543579 <indexitem text="Failed" target="index.browseStatusTabsStatusTabsFailed" />
550586 <indexitem text="test manager properties" target="index.execPropsDialogExecPropsDialogTestSuite" />
551587 </indexitem>
552588 <indexitem text="Test Suite Errors" >
553 <indexitem text="Test Manager window" >
554 <indexitem text="View menu" target="index.browseViewMenuViewMenuErrors" />
555 </indexitem>
556589 <indexitem text="viewing" target="index.browseTestSuiteErrorsTestSuiteErrors" />
557590 </indexitem>
558 <indexitem text="test tree" target="index.browseUsingtreeUsingtree" />
591 <indexitem text="test tree" target="index.uiUsingtreeUsingtree" />
559592 <indexitem text="Test view" target="index.browseTestInfoTestInfo" />
560593 <indexitem text="tests" >
561594 <indexitem text="running" target="index.runRunningRunning" />
563596 <indexitem text="tests command" target="index.commandTestDirTestDir" />
564597 <indexitem text="testSuite command" target="index.commandTestsuiteTestsuite" />
565598 <indexitem text="timeoutFactor command" target="index.commandTimeoutTimeout" />
599 <indexitem text="tool" >
600 <indexitem text="Test Manager" target="index.uiWindowUiWindow" />
601 </indexitem>
566602 <indexitem text="tool bar" target="index.uiToolBarToolBar" />
603 <indexitem text="Tool menu" target="index.uiDesktopMenusDesktopMenusTool" />
567604 <indexitem text="tool tip options" target="index.uiAppearancePrefsAppearancePrefsTooltips" />
605 <indexitem text="tool, Agent Monitor" target="index.uiAgentMonitorWindow" />
606 <indexitem text="tools" >
607 <indexitem text="GUI" target="index.uiUiUi" />
608 </indexitem>
568609 <indexitem text="troubleshooting" target="index.conceptsTroubleshootingTroubleshooting" >
569610 <indexitem text="exit codes" target="index.commandTroubleshootingTroubleshootingExitcodes" />
570611 <indexitem text="output overflow" target="index.conceptsTroubleshootingOutputOverflow" />
577618 <indexitem text="tests that fail" target="index.conceptsTroubleshootingTroubleshootingFailed" />
578619 <indexitem text="tests with errors" target="index.conceptsTroubleshootingTroubleshootingErrors" />
579620 </indexitem>
580 <indexitem text="running the JavaTest harness" target="index.conceptsTroubleshootingTroubleshootingStarting" />
621 <indexitem text="running the harness" target="index.conceptsTroubleshootingTroubleshootingStarting" />
622 <indexitem text="verbose" >
623 <indexitem text="mangled output" target="index.commandTroubleshootingTroubleshootingCodepage" />
624 </indexitem>
581625 <indexitem text="viewing test results" target="index.conceptsTroubleshootingTroubleshootingViewing" />
582626 </indexitem>
583627 <indexitem text="troubleshooting a test run" target="index.runTroubleshootingRunTroubleshooting" />
586630 <indexitem text="EditJTI" target="index.commandEditConfigEditConfig" />
587631 </indexitem>
588632 <indexitem text="verbose option" target="index.commandVerboseRunTests" />
589 <indexitem text="view filter" >
590 <indexitem text="All Tests" target="index.browseAllTestsAllTests" />
591 <indexitem text="Current Configuration" target="index.browseCurrentConfigurationCurrentConfiguration" />
592 <indexitem text="Custom" target="index.browseCustomFiltersCustomFilters" />
593 <indexitem text="Last Run" target="index.browseLastRunAllTests" />
594 </indexitem>
595 <indexitem text="view filters" target="index.browseViewFiltersViewFilter" />
596 <indexitem text="View menu" target="index.browseViewMenuViewMenu" />
633 <indexitem text="view filter" target="index.browseViewFiltersViewFilter" >
634 <indexitem text="All Tests" target="index.uiAllTestsAllTests" />
635 <indexitem text="Current Configuration" target="index.uiCurrentConfigurationCurrentConfiguration" />
636 <indexitem text="Current Template" target="index.uiCurrentTemplateCurrentTemplate" />
637 <indexitem text="Custom" target="index.uiCustomFiltersCustomFilters" />
638 <indexitem text="Last Run" target="index.uiLastRunAllTests" />
639 </indexitem>
640 <indexitem text="viewing configuration-template updates" target="index.templatesViewConflictsViewConflict" />
597641 <indexitem text="viewing source file list" target="index.browseFilesTabFilesTab" />
598642 <indexitem text="viewing Test Suite Errors" target="index.browseTestSuiteErrorsTestSuiteErrors" />
599 <indexitem text="web server" >
600 <indexitem text="JavaTest" target="index.commandHttpServerHttpServer" />
601 </indexitem>
602 <indexitem text="window" >
603 <indexitem text="MDI style" target="index.uiAppearancePrefsAppearancePrefsMdi" />
604 <indexitem text="SDI style" target="index.uiAppearancePrefsAppearancePrefsSdi" />
605 <indexitem text="Tabbed style" target="index.uiAppearancePrefsAppearancePrefsFull" />
606 <indexitem text="Test Manager" target="index.uiWindowUiWindow" >
607 <indexitem text="status message" target="index.uiWindowUiWindowStatusMessage" />
608 </indexitem>
609 </indexitem>
610 <indexitem text="window, Agent Monitor" target="index.uiAgentMonitorWindow" />
643 <indexitem text="web server, JT Harness" target="index.commandHttpServerHttpServer" />
611644 <indexitem text="Windows menu" target="index.uiDesktopMenusDesktopMenusWindow" />
612645 <indexitem text="work directory" >
613646 <indexitem text="create new" target="index.commandWorkdirWorkdirCreate" />
614647 <indexitem text="replace existing" target="index.commandWorkdirWorkdirClearResults" />
615 <indexitem text="specify" target="index.commandWorkdirWorkdir" >
616 <indexitem text="existing" target="index.commandWorkdirWorkdirOpen" />
617 </indexitem>
648 <indexitem text="specify" target="index.commandWorkdirWorkdir" />
649 <indexitem text="specify existing" target="index.commandWorkdirWorkdirOpen" />
618650 <indexitem text="test manager properties" target="index.execPropsDialogExecPropsDialogWorkDir" />
619651 </indexitem>
652 <indexitem text="work directory status line" target="index.uiWorkDirStatusWorkDirStatus" />
620653 <indexitem text="writereport command" target="index.commandWriteReportsWriteReports" />
621654 <indexitem text="writing reports" target="index.commandWriteReportsWriteReports" />
622655 </index>
33
44 Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
55 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6
6
77 This code is free software; you can redistribute it and/or modify it
88 under the terms of the GNU General Public License version 2 only, as
99 published by the Free Software Foundation. Oracle designates this
1010 particular file as subject to the "Classpath" exception as provided
1111 by Oracle in the LICENSE file that accompanied this code.
12
12
1313 This code is distributed in the hope that it will be useful, but WITHOUT
1414 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1515 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
1616 version 2 for more details (a copy is included in the LICENSE file that
1717 accompanied this code).
18
18
1919 You should have received a copy of the GNU General Public License version
2020 2 along with this work; if not, write to the Free Software Foundation,
2121 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
22
22
2323 Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2424 or visit www.oracle.com if you need additional information or have any
2525 questions.
2828 <!DOCTYPE map
2929 PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp Map Version 1.0//EN"
3030 "http://java.sun.com/products/javahelp/map_1_0.dtd">
31
3231 <map version="1.0">
33
34 <!--for testing -- rearrange and delete as necessary -->
35 <mapID target="home" url="home.html" />
36
37 <!-- Default Help ID also default for desktop F1 key -->
38 <mapID target="jthelp.csh" url="jthelp.html" />
39
40 <!-- context sensitive help targets not used in the std displayed help -->
41
42 <mapID target="confEdit.envTab.csh" url="confEdit/environment.html" />
43 <!-- mapID target="templates.enablePropFromTemplate.csh" url="templates/enablePropFromTemplate.html" -->
44 <!-- mapID target="templates.resolveConflict.csh" url="templates/resolveConflicts.html" -->
45 <!-- mapID target="templates.viewConflict.csh" url="templates/viewConflicts.html" -->
46
47 <!-- Desktop default -->
48
49
50 <!-- Icons used in TOC -->
51 <mapID target="chapter" url="../images/chapter.gif" />
52 <mapID target="topic" url="../images/topic.gif"/>
53 <mapID target="openbook" url="../images/openbook.gif" />
54 <mapID target="closedbook" url="../images/closedbook.gif" />
55
56 <!-- copyright -->
57 <mapID target="copyright" url="copyright.html" />
58
59 <!-- Important Security Information -->
60 <mapID target="securityInfo" url="security_info.html" />
61
62 <!-- JT Harness intro -->
63 <mapID target="jtIntro" url="jt_intro.html" />
64 <mapID target="qsw.window.csh" url="start/quickStart.html" />
65 <mapID target="start.quickStart" url="start/quickStart.html" />
66 <mapID target="start.openTestSuite" url="start/openTestSuite.html" />
67 <mapID target="start.openDirectory" url="start/openDirectory.html" />
68 <mapID target="start.createDirectory" url="start/createDirectory.html" />
69
70 <!-- JT Harness GUI -->
71 <mapID target="ui.usingJT" url="ui/usingJT.html" />
72 <mapID target="ui.desktopStyles" url="ui/desktopStyles.html" />
73 <mapID target="ui.desktopMenus" url="ui/desktopMenus.html" />
74 <mapID target="agent.window.csh" url="ui/agentMonitor.html" />
75
76 <!-- Preferences dialog -->
77 <mapID target="ui.prefs.dialog.csh" url="ui/prefsDialog.html" />
78 <mapID target="ui.prefs.appearance.csh" url="ui/appearancePrefs.html" /> <!-- Preferences dialog: Appearances -->
79 <mapID target="ui.prefs.testManager" url="ui/testManager.html" />
80 <mapID target="ui.prefs.confEditorView" url="ui/confEditorView.html" />
81 <mapID target="ui.openHelp" url="ui/openHelp.html" />
82 <mapID target="ui.keyboardAccess" url="ui/keyboardAccess.html" />
83 <mapID target="ui.ui" url="ui/ui.html" />
84
85 <!-- Agent Monitor tool -->
86 <mapID target="ui.agentMonitor" url="ui/agentMonitor.html" />
87
88 <!-- Test Manager tool -->
89 <mapID target="browse.window.csh" url="ui/window.html" />
90 <mapID target="ui.configureMenu" url="ui/configureMenu.html" />
91 <mapID target="ui.runMenu" url="ui/runMenu.html" />
92 <mapID target="ui.reportMenu" url="ui/reportMenu.html" />
93 <mapID target="ui.viewMenu" url="ui/viewMenu.html" />
94 <mapID target="ui.toolBar" url="ui/toolBar.html" />
95 <mapID target="browse.testMonitor.csh" url="run/progressMonitor.html" />
96 <mapID target="run.testProgress" url="run/progressMeter.html" />
97 <mapID target="ui.infoArea" url="ui/infoPane.html" />
98
99 <mapID target="ui.usingtree" url="ui/usingtree.html" />
100 <mapID target="ui.folderIcons" url="ui/folderIcons.html" />
101 <mapID target="ui.testIcons" url="ui/testIcons.html" />
102 <mapID target="ui.popupmenu" url="ui/popupmenu.html" />
103
104 <mapID target="browse.viewFilters" url="browse/viewFilters.html" />
105 <mapID target="ui.currentConfiguration" url="ui/currentConfiguration.html" />
106 <mapID target="ui.currentTemplate" url="ui/currentTemplate.html" />
107 <mapID target="ui.allTests" url="ui/allTests.html" />
108 <mapID target="execFilters.dialog.csh" url="ui/customFilters.html" /><!-- Exec Filter Dialog Box -->
109 <mapID target="ui.lastRun" url="ui/lastRun.html" />
110
111 <mapID target="ui.workDirStatus" url="ui/workDirStatus.html" />
112 <mapID target="ui.statusMessage" url="ui/testManagerStatus.html" />
113
114 <mapID target="confEdit.openConfEd" url="confEdit/openConfEd.html"/>
115 <mapID target="confEdit.fullView.csh" url="confEdit/fullViewDialog.html"/>
116 <mapID target="confEdit.stdView.csh" url="confEdit/stdViewDialog.html"/>
117 <mapID target="admin.openTemplateEditor" url="admin/openTemplateEditor.html"/>
118 <mapID target="admin.questionModeTE.csh" url="admin/questionModeTE.html"/>
119 <mapID target="admin.quickSetTE.csh" url="admin/quickSetTE.html"/>
120 <mapID target="logFileViewer.logViewer.csh" url="ui/logViewer.html"/>
121
122 <!-- Report Merge tool -->
123 <mapID target="mergeReports.window.csh" url="mergeReports/window.html" />
124 <mapID target="mergeReports.reportWindow" url="mergeReports/reportMergeViewer.html" />
125 <mapID target="mergeReports.reportMerge" url="mergeReports/reportMerge.html" />
126
127 <!-- Configuring a Test Run -->
128 <mapID target="confEdit.window.csh" url="confEdit/overview.html"/>
129 <mapID target="confEdit.editConfiguration" url="confEdit/editConfiguration.html"/>
130 <mapID target="confEdit.editQuickSet" url="confEdit/editQuickSet.html"/>
131 <mapID target="confEdit.testsTab.csh" url="confEdit/initialFiles.html"/>
132 <mapID target="confEdit.excludeTab.csh" url="confEdit/excludeList.html"/>
133 <mapID target="confEdit.keywordsTab.csh" url="confEdit/keywords.html"/>
134 <mapID target="confEdit.kflTab.csh" url="confEdit/kfl.html"/>
135 <mapID target="confEdit.statusTab.csh" url="confEdit/status.html"/>
136 <mapID target="confEdit.execTab.csh" url="confEdit/execution.html"/>
137 <mapID target="confEdit.createConfiguration" url="confEdit/createConfiguration.html"/>
138 <mapID target="confEdit.saveConfiguration" url="confEdit/saveConfiguration.html"/>
139 <mapID target="confEdit.loadConfiguration" url="confEdit/loadConfiguration.html"/>
140 <mapID target="confEdit.marker" url="confEdit/setMarkers.html"/>
141 <mapID target="confEdit.search.csh" url="confEdit/searchConfiguration.html"/>
142 <mapID target="confEdit.multiple.csh" url="confEdit/multiple.html"/>
143
144 <!-- Creating and Editing Templates -->
145 <mapID target="confEdit.templateDialog.csh" url="admin/templateDialog.html"/>
146 <mapID target="admin.createTemplate" url="admin/createTemplate.html" />
147 <mapID target="admin.editTemplate" url="admin/editTemplate.html" />
148 <mapID target="admin.testsTabTE.csh" url="admin/testsTabTE.html" />
149 <mapID target="admin.excludeTabTE.csh" url="admin/excludeTabTE.html" />
150 <mapID target="admin.keywordsTabTE.csh" url="admin/keywordsTabTE.html" />
151 <mapID target="admin.statusTabTE.csh" url="admin/statusTabTE.html" />
152 <mapID target="admin.execTabTE.csh" url="admin/execTabTE.html" />
153 <mapID target="templates.resolveConflict.csh" url="templates/resolveConflicts.html" />
154 <mapID target="admin.setMarkersTE" url="admin/setMarkersTE.html" />
155 <mapID target="admin.searchTemplateTE" url="admin/searchTemplateTE.html" />
156
157 <!-- Working with Templates -->
158 <mapID target="templates.loadTemplate" url="templates/loadTemplate.html" />
159
160 <!-- Running Tests -->
161 <mapID target="run.running" url="run/running.html" />
162 <mapID target="run.starting" url="run/starting.html" />
163 <mapID target="run.monitoring" url="run/monitoring.html" />
164 <mapID target="run.testTree" url="run/testTree.html" />
165 <mapID target="run.viewFilter" url="run/viewFilters.html" />
166 <mapID target="browse.logViewer.csh" url="run/logViewer.html"/> <!-- Log Viewer dialog box -->
167 <mapID target="run.svcViewer" url="run/svcViewer.html" />
168 <mapID target="run.stopping" url="run/stopping.html" />
169 <mapID target="run.troubleshooting" url="run/troubleshooting.html" />
170
171 <!-- Browsing Tests -->
172 <mapID target="browse.browsing" url="browse/browsing.html" />
173 <mapID target="browse.folderInfo" url="browse/folderInfo.html" />
174 <mapID target="browse.summaryTab.csh" url="browse/summaryTab.html" /> <!-- Test Manager Summary tab -->
175 <mapID target="browse.statusTabs" url="browse/statusTabs.html" />
176 <mapID target="browse.passedTab.csh" url="browse/statusTabs.html#passed" /> <!-- Test Manager Test Run Details tab -->
177 <mapID target="browse.failedTab.csh" url="browse/statusTabs.html#failed" /> <!-- Test Manager Failed tab -->
178 <mapID target="browse.notRunTab.csh" url="browse/statusTabs.html#notRun" /> <!-- Test Manager Not Run tab -->
179 <mapID target="browse.errorTab.csh" url="browse/statusTabs.html#error" /> <!-- Test Manager Error tab -->
180 <mapID target="browse.filteredOutTab.csh" url="browse/statusTabs.html#filteredOut" /> <!-- Test Manager Filtered Out tab -->
181 <mapID target="browse.multiselectionTab.csh" url="browse/multiselectionTab.html" /> <!-- Test Manager Multi-Selection tab -->
182 <mapID target="browse.testInfo" url="browse/testInfo.html" />
183 " />
184 <mapID target="browse.testDescriptionTab.csh" url="browse/testDescriptionTab.html" /> <!-- Test Manager Test Description tab -->
185 <mapID target="browse.filesTab.csh" url="browse/filesTab.html" /> <!-- Test Manager Files tab -->
186 <mapID target="browse.testEnvironmentTab.csh" url="browse/configurationTab.html" /> <!-- Test Manager Configuration tab -->
187 <mapID target="browse.resultPropertiesTab.csh" url="browse/detailsTab.html" /> <!-- Test Manager Test Run Details tab -->
188 <mapID target="browse.outputTab.csh" url="browse/messagesTab.html" /> <!-- Test Manager Test Run Messages tab -->
189
190 <!-- Displaying Configuration Information -->
191 <mapID target="confEdit.displayInfo" url="confEdit/displayInfo.html" />
192 <mapID target="checklist.window.csh" url="confEdit/checklist.html"/> <!-- Configuration Checklist -->
193 <mapID target="env.window.csh" url="env/dialog.html" /> <!-- Test Environment dialog box -->
194 <mapID target="exclList.window.csh" url="excl/dialog.html" /> <!-- Exclude List dialog box -->
195 <mapID target="quLog.window.csh" url="confEdit/questionLog.html" /> <!-- Question Log -->
196
197 <!-- new Test Manager Properties dialog box -->
198 <mapID target="execProps.dialog.csh" url="execProps/dialog.html"/>
199 <mapID target="execProps.configTab.csh" url="execProps/dialog.html#config"/>
200 <mapID target="execProps.pluginsTab.csh" url="execProps/dialog.html#plugins"/>
201 <mapID target="execProps.testSuiteTab.csh" url="execProps/dialog.html#testSuite"/>
202 <mapID target="execProps.workDirTab.csh" url="execProps/dialog.html#workDir"/>
203
204 <!-- Test Suite Errors dialog box -->
205 <mapID target="browse.testSuiteErrors.csh" url="browse/testSuiteErrors.html" />
206
207 <!-- Report Tool -->
208 <mapID target="report.usingReports" url="report/usingReports.html" />
209 <mapID target="report.newReport.csh" url="report/newReports.html" />
210 <mapID target="report.reportBrowser.csh" url="report/reportBrowser.html" />
211
212 <!-- Merge Reports Tool -->
213 <mapID target="mergeReports.mergingReports" url="mergeReports/mergeReports.html" />
214
215 <!-- Troubleshooting JT Harness -->
216 <mapID target="concepts.troubleshooting" url="concepts/troubleshooting.html" />
217
218 <!-- JT Harness Command Line Interface -->
219 <mapID target="command.intro.csh" url="command/intro.html" />
220 <mapID target="command.commandLine" url="command/commandLine.html" />
221 <mapID target="command.aboutExamples" url="command/aboutExamples.html" />
222 <mapID target="command.formatCommands" url="command/formatCommands.html" />
223 <mapID target="command.using.commandfile" url="command/commandFile.html" />
224 <mapID target="command.create.commandfile" url="command/creatingCommandFile.html" />
225 <mapID target="command.examples.commandfile" url="command/examplesCommandFile.html" />
226 <mapID target="command.examples.settingValues" url="command/settingValues.html" />
227 <mapID target="command.configValues" url="command/configValues.html" />
228 <mapID target="command.compoundExamples" url="command/compoundExamples.html" />
229 <mapID target="command.availableCommands" url="command/availableCommands.html" />
230 <mapID target="command.setup" url="command/setupCommands.html" />
231 <mapID target="command.basicContext" url="command/basicContext.html" />
232 <mapID target="command.open" url="command/open.html" />
233 <mapID target="command.config" url="command/config.html" />
234 <mapID target="command.testsuite" url="command/testsuite.html" />
235 <mapID target="command.workdir" url="command/workdir.html" />
236 <mapID target="command.otherValues" url="command/otherConfigValues.html" />
237 <mapID target="command.concurrency" url="command/concurrency.html" />
238 <mapID target="command.excludeList" url="command/excludeList.html" />
239 <mapID target="command.keyword" url="command/keyword.html" />
240 <mapID target="command.knownFailureAnalysis" url="command/knownFailureAnalysis.html" />
241 <mapID target="command.prior" url="command/prior.html" />
242 <mapID target="command.testDir" url="command/testDir.html" />
243 <mapID target="command.timeout" url="command/timeout.html" />
244 <mapID target="command.harnessSettings" url="command/harnessSettings.html" />
245 <mapID target="command.task" url="command/taskCommands.html" />
246 <mapID target="command.runTests" url="command/runTests.html" />
247 <mapID target="command.verbose" url="command/verbose.html" />
248 <mapID target="command.batchMode" url="command/batchMode.html" />
249 <mapID target="command.observer" url="command/observer.html" />
250 <mapID target="command.writeReports" url="command/writeReports.html" />
251 <mapID target="command.desktop" url="command/desktopCommands.html" />
252 <mapID target="command.newDesktop" url="command/newDesktop.html" />
253 <mapID target="command.settingColors" url="command/settingColors.html" />
254 <mapID target="command.displayHelp" url="command/displayHelp.html" />
255 <mapID target="command.commandHelp" url="command/commandHelp.html" />
256 <mapID target="command.versionInfo" url="command/versionInfo.html" />
257 <mapID target="command.onlineHelp" url="command/onlineHelp.html" />
258 <mapID target="command.legacyCommands" url="command/legacyCommands.html" />
259 <mapID target="command.parameterCommands" url="command/parameterCommands.html" />
260 <mapID target="command.lite" url="command/lite.html" />
261
262
263 <!-- JT Harness Utilities -->
264 <mapID target="command.utilities" url="command/utilities.html" />
265 <mapID target="command.httpServer" url="command/httpServer.html" />
266 <mapID target="command.htmlOutput" url="command/htmlOutput.html" />
267 <mapID target="command.textOutput" url="command/textOutput.html" />
268 <mapID target="command.editConfig" url="command/editConfig.html" />
269 <mapID target="command.examplesedit" url="command/editFile.html" />
270 <mapID target="command.examplesgenerateLog" url="command/generateLog.html" />
271 <mapID target="command.examplespreview" url="command/preview.html" />
272 <mapID target="command.examplesechoResults" url="command/echoResults.html" />
273 <mapID target="command.examplesshowPaths" url="command/showPaths.html" />
274 <mapID target="command.exampleschange" url="command/change.html" />
275 <mapID target="command.exampleschangePort" url="command/changePort.html" />
276 <mapID target="command.examplesescapeShell" url="command/escapeShell.html" />
277 <mapID target="command.textEditor" url="command/textEditor.html" />
278 <mapID target="command.moveReports" url="command/moveReports.html" />
279 <mapID target="command.troubleshooting" url="command/troubleshooting.html" />
280
281
282
283 <!-- Anchor points used in the index -->
284 <!-- no longer required here; automagically generated....
285
286 .... end of automagically generated entries -->
287
288
289 <!-- Glossary IDs -->
290 <!-- no longer required here; automagically generated....
291
292 .... end of automagically generated entries -->
293
294
32 <mapID target="admin.createTemplate" url="admin/createTemplate.html" />
33 <mapID target="admin.editTemplate" url="admin/editTemplate.html" />
34 <mapID target="admin.excludeTabTE.csh" url="admin/excludeTabTE.html" />
35 <mapID target="admin.execTabTE.csh" url="admin/execTabTE.html" />
36 <mapID target="admin.keywordsTabTE.csh" url="admin/keywordsTabTE.html" />
37 <mapID target="admin.openTemplateEditor" url="admin/openTemplateEditor.html" />
38 <mapID target="admin.questionModeTE.csh" url="admin/questionModeTE.html" />
39 <mapID target="admin.quickSetTE.csh" url="admin/quickSetTE.html" />
40 <mapID target="admin.searchTemplateTE" url="admin/searchTemplateTE.html" />
41 <mapID target="admin.setMarkersTE" url="admin/setMarkersTE.html" />
42 <mapID target="admin.statusTabTE.csh" url="admin/statusTabTE.html" />
43 <mapID target="admin.testsTabTE.csh" url="admin/testsTabTE.html" />
44 <mapID target="agent.window.csh" url="ui/agentMonitor.html" />
45 <mapID target="browse.browsing" url="browse/browsing.html" />
46 <mapID target="browse.errorTab.csh" url="browse/statusTabs.html#error" />
47 <mapID target="browse.failedTab.csh" url="browse/statusTabs.html#failed" />
48 <mapID target="browse.filesTab.csh" url="browse/filesTab.html" />
49 <mapID target="browse.filteredOutTab.csh" url="browse/statusTabs.html#filteredOut" />
50 <mapID target="browse.folderInfo" url="browse/folderInfo.html" />
51 <mapID target="browse.logViewer.csh" url="run/logViewer.html" />
52 <mapID target="browse.multiselectionTab.csh" url="browse/multiselectionTab.html" />
53 <mapID target="browse.notRunTab.csh" url="browse/statusTabs.html#notRun" />
54 <mapID target="browse.outputTab.csh" url="browse/messagesTab.html" />
55 <mapID target="browse.passedTab.csh" url="browse/statusTabs.html#passed" />
56 <mapID target="browse.resultPropertiesTab.csh" url="browse/detailsTab.html" />
57 <mapID target="browse.statusTabs" url="browse/statusTabs.html" />
58 <mapID target="browse.summaryTab.csh" url="browse/summaryTab.html" />
59 <mapID target="browse.testDescriptionTab.csh" url="browse/testDescriptionTab.html" />
60 <mapID target="browse.testEnvironmentTab.csh" url="browse/configurationTab.html" />
61 <mapID target="browse.testInfo" url="browse/testInfo.html" />
62 <mapID target="browse.testMonitor.csh" url="run/progressMonitor.html" />
63 <mapID target="browse.testSuiteErrors.csh" url="browse/testSuiteErrors.html" />
64 <mapID target="browse.viewFilters" url="browse/viewFilters.html" />
65 <mapID target="browse.window.csh" url="ui/window.html" />
66 <mapID target="chapter" url="../images/chapter.gif" />
67 <mapID target="checklist.window.csh" url="confEdit/checklist.html" />
68 <mapID target="closedbook" url="../images/closedbook.gif" />
69 <mapID target="command.aboutExamples" url="command/aboutExamples.html" />
70 <mapID target="command.availableCommands" url="command/availableCommands.html" />
71 <mapID target="command.basicContext" url="command/basicContext.html" />
72 <mapID target="command.batchMode" url="command/batchMode.html" />
73 <mapID target="command.commandHelp" url="command/commandHelp.html" />
74 <mapID target="command.commandLine" url="command/commandLine.html" />
75 <mapID target="command.compoundExamples" url="command/compoundExamples.html" />
76 <mapID target="command.concurrency" url="command/concurrency.html" />
77 <mapID target="command.config" url="command/config.html" />
78 <mapID target="command.configValues" url="command/configValues.html" />
79 <mapID target="command.create.commandfile" url="command/creatingCommandFile.html" />
80 <mapID target="command.desktop" url="command/desktopCommands.html" />
81 <mapID target="command.displayHelp" url="command/displayHelp.html" />
82 <mapID target="command.editConfig" url="command/editConfig.html" />
83 <mapID target="command.examples.commandfile" url="command/examplesCommandFile.html" />
84 <mapID target="command.examples.settingValues" url="command/settingValues.html" />
85 <mapID target="command.exampleschange" url="command/change.html" />
86 <mapID target="command.exampleschangePort" url="command/changePort.html" />
87 <mapID target="command.examplesechoResults" url="command/echoResults.html" />
88 <mapID target="command.examplesedit" url="command/editFile.html" />
89 <mapID target="command.examplesescapeShell" url="command/escapeShell.html" />
90 <mapID target="command.examplesgenerateLog" url="command/generateLog.html" />
91 <mapID target="command.examplespreview" url="command/preview.html" />
92 <mapID target="command.examplesshowPaths" url="command/showPaths.html" />
93 <mapID target="command.excludeList" url="command/excludeList.html" />
94 <mapID target="command.formatCommands" url="command/formatCommands.html" />
95 <mapID target="command.harnessSettings" url="command/harnessSettings.html" />
96 <mapID target="command.htmlOutput" url="command/htmlOutput.html" />
97 <mapID target="command.httpServer" url="command/httpServer.html" />
98 <mapID target="command.intro.csh" url="command/intro.html" />
99 <mapID target="command.keyword" url="command/keyword.html" />
100 <mapID target="command.knownFailureAnalysis" url="command/knownFailureAnalysis.html" />
101 <mapID target="command.legacyCommands" url="command/legacyCommands.html" />
102 <mapID target="command.lite" url="command/lite.html" />
103 <mapID target="command.moveReports" url="command/moveReports.html" />
104 <mapID target="command.newDesktop" url="command/newDesktop.html" />
105 <mapID target="command.observer" url="command/observer.html" />
106 <mapID target="command.onlineHelp" url="command/onlineHelp.html" />
107 <mapID target="command.open" url="command/open.html" />
108 <mapID target="command.otherValues" url="command/otherConfigValues.html" />
109 <mapID target="command.parameterCommands" url="command/parameterCommands.html" />
110 <mapID target="command.prior" url="command/prior.html" />
111 <mapID target="command.runTests" url="command/runTests.html" />
112 <mapID target="command.settingColors" url="command/settingColors.html" />
113 <mapID target="command.setup" url="command/setupCommands.html" />
114 <mapID target="command.task" url="command/taskCommands.html" />
115 <mapID target="command.testDir" url="command/testDir.html" />
116 <mapID target="command.testsuite" url="command/testsuite.html" />
117 <mapID target="command.textEditor" url="command/textEditor.html" />
118 <mapID target="command.textOutput" url="command/textOutput.html" />
119 <mapID target="command.timeout" url="command/timeout.html" />
120 <mapID target="command.troubleshooting" url="command/troubleshooting.html" />
121 <mapID target="command.using.commandfile" url="command/commandFile.html" />
122 <mapID target="command.utilities" url="command/utilities.html" />
123 <mapID target="command.verbose" url="command/verbose.html" />
124 <mapID target="command.versionInfo" url="command/versionInfo.html" />
125 <mapID target="command.workdir" url="command/workdir.html" />
126 <mapID target="command.writeReports" url="command/writeReports.html" />
127 <mapID target="concepts.troubleshooting" url="concepts/troubleshooting.html" />
128 <mapID target="confEdit.createConfiguration" url="confEdit/createConfiguration.html" />
129 <mapID target="confEdit.displayInfo" url="confEdit/displayInfo.html" />
130 <mapID target="confEdit.editConfiguration" url="confEdit/editConfiguration.html" />
131 <mapID target="confEdit.editQuickSet" url="confEdit/editQuickSet.html" />
132 <mapID target="confEdit.envTab.csh" url="confEdit/environment.html" />
133 <mapID target="confEdit.excludeTab.csh" url="confEdit/excludeList.html" />
134 <mapID target="confEdit.execTab.csh" url="confEdit/execution.html" />
135 <mapID target="confEdit.fullView.csh" url="confEdit/fullViewDialog.html" />
136 <mapID target="confEdit.keywordsTab.csh" url="confEdit/keywords.html" />
137 <mapID target="confEdit.kflTab.csh" url="confEdit/kfl.html" />
138 <mapID target="confEdit.loadConfiguration" url="confEdit/loadConfiguration.html" />
139 <mapID target="confEdit.marker" url="confEdit/setMarkers.html" />
140 <mapID target="confEdit.multiple.csh" url="confEdit/multiple.html" />
141 <mapID target="confEdit.openConfEd" url="confEdit/openConfEd.html" />
142 <mapID target="confEdit.saveConfiguration" url="confEdit/saveConfiguration.html" />
143 <mapID target="confEdit.search.csh" url="confEdit/searchConfiguration.html" />
144 <mapID target="confEdit.statusTab.csh" url="confEdit/status.html" />
145 <mapID target="confEdit.stdView.csh" url="confEdit/stdViewDialog.html" />
146 <mapID target="confEdit.templateDialog.csh" url="admin/templateDialog.html" />
147 <mapID target="confEdit.testsTab.csh" url="confEdit/initialFiles.html" />
148 <mapID target="confEdit.window.csh" url="confEdit/overview.html" />
149 <mapID target="copyright" url="copyright.html" />
150 <mapID target="env.window.csh" url="env/dialog.html" />
151 <mapID target="exclList.window.csh" url="excl/dialog.html" />
152 <mapID target="execFilters.dialog.csh" url="ui/customFilters.html" />
153 <mapID target="execProps.configTab.csh" url="execProps/dialog.html#config" />
154 <mapID target="execProps.dialog.csh" url="execProps/dialog.html" />
155 <mapID target="execProps.pluginsTab.csh" url="execProps/dialog.html#plugins" />
156 <mapID target="execProps.testSuiteTab.csh" url="execProps/dialog.html#testSuite" />
157 <mapID target="execProps.workDirTab.csh" url="execProps/dialog.html#workDir" />
158 <mapID target="glossary.AllTestsViewFilter" url="glossary/allTests.html" />
159 <mapID target="glossary.BatchMode" url="glossary/batchMode.html" />
160 <mapID target="glossary.Class" url="glossary/class.html" />
161 <mapID target="glossary.CommandFile" url="glossary/batchFile.html" />
162 <mapID target="glossary.Configuration" url="glossary/configuration.html" />
163 <mapID target="glossary.ConfigurationEditor" url="glossary/configurationEditor.html" />
164 <mapID target="glossary.ConfigurationFile" url="glossary/configurationFile.html" />
165 <mapID target="glossary.ConfigurationValue" url="glossary/configurationValues.html" />
166 <mapID target="glossary.CurrentConfiguration" url="glossary/currentConfiguration.html" />
167 <mapID target="glossary.CurrentConfigurationFilter" url="glossary/currentConfigFilter.html" />
168 <mapID target="glossary.Desktop" url="glossary/desktop.html" />
169 <mapID target="glossary.EditJTI" url="glossary/editJTI.html" />
170 <mapID target="glossary.Environment" url="glossary/environment.html" />
171 <mapID target="glossary.EnvironmentEntry" url="glossary/environmentVariables.html" />
172 <mapID target="glossary.EnvironmentFiles" url="glossary/environmentFiles.html" />
173 <mapID target="glossary.Error" url="glossary/error.html" />
174 <mapID target="glossary.ExcludeList" url="glossary/excludeList.html" />
175 <mapID target="glossary.Fail" url="glossary/fail.html" />
176 <mapID target="glossary.FilteredOut" url="glossary/filteredOut.html" />
177 <mapID target="glossary.Filters" url="glossary/filters.html" />
178 <mapID target="glossary.Glossary" url="glossary/glossary.html" />
179 <mapID target="glossary.HTTPServer" url="glossary/httpServer.html" />
180 <mapID target="glossary.Interview" url="glossary/interview.html" />
181 <mapID target="glossary.InterviewFile" url="glossary/interviewFile.html" />
182 <mapID target="glossary.JTHarnessPreferences" url="glossary/preferences.html" />
183 <mapID target="glossary.JTI" url="glossary/JTI.html" />
184 <mapID target="glossary.JtbFiles" url="glossary/jtbFiles.html" />
185 <mapID target="glossary.JteFiles" url="glossary/jteFiles.html" />
186 <mapID target="glossary.JtiFiles" url="glossary/jtiFiles.html" />
187 <mapID target="glossary.JtpFiles" url="glossary/jtpFiles.html" />
188 <mapID target="glossary.JtrFile" url="glossary/jtrFiles.html" />
189 <mapID target="glossary.JtxFiles" url="glossary/jtxFiles.html" />
190 <mapID target="glossary.Keywords" url="glossary/keywords.html" />
191 <mapID target="glossary.KflFiles" url="glossary/kflFile.html" />
192 <mapID target="glossary.KnownFailuresListFiles" url="glossary/knownFailuresList.html" />
193 <mapID target="glossary.LastTestRunViewFilter" url="glossary/lasttestFilter.html" />
194 <mapID target="glossary.LogLevel" url="glossary/loglevel.html" />
195 <mapID target="glossary.NotRun" url="glossary/notRun.html" />
196 <mapID target="glossary.Observer" url="glossary/observer.html" />
197 <mapID target="glossary.ParameterFiles" url="glossary/parameterFiles.html" />
198 <mapID target="glossary.Pass" url="glossary/pass.html" />
199 <mapID target="glossary.PortNumber" url="glossary/portNumber.html" />
200 <mapID target="glossary.PriorStatus" url="glossary/priorStatus.html" />
201 <mapID target="glossary.ProgressMonitor" url="glossary/progressMonitor.html" />
202 <mapID target="glossary.ReportDirectory" url="glossary/reportDirectory.html" />
203 <mapID target="glossary.StandardValues" url="glossary/standardValues.html" />
204 <mapID target="glossary.SystemProperties" url="glossary/systemProperties.html" />
205 <mapID target="glossary.Tabbed" url="glossary/tabbedStyle.html" />
206 <mapID target="glossary.TestCase" url="glossary/testCase.html" />
207 <mapID target="glossary.TestDescription" url="glossary/testDescription.html" />
208 <mapID target="glossary.TestEnvironment" url="glossary/testEnvironment.html" />
209 <mapID target="glossary.TestManager" url="glossary/testManager.html" />
210 <mapID target="glossary.TestPaths" url="glossary/testPaths.html" />
211 <mapID target="glossary.TestResultFiles" url="glossary/testResult.html" />
212 <mapID target="glossary.TestRunFilters" url="glossary/runFilters.html" />
213 <mapID target="glossary.TestScript" url="glossary/testScript.html" />
214 <mapID target="glossary.TestSuite" url="glossary/testSuite.html" />
215 <mapID target="glossary.TestTree" url="glossary/testTree.html" />
216 <mapID target="glossary.ViewFilters" url="glossary/viewFilters.html" />
217 <mapID target="glossary.WorkDirectory" url="glossary/workDirectory.html" />
218 <mapID target="home" url="home.html" />
219 <mapID target="index.adminCreateTemplateCreateTemplate" url="admin/createTemplate.html#createTemplate" />
220 <mapID target="index.adminEditTemplateEditingTemplate" url="admin/editTemplate.html#editingTemplate" />
221 <mapID target="index.adminEnvTabTEEnvironmentTE" url="admin/envTabTE.html#environmentTE" />
222 <mapID target="index.adminExcludeTabTEExcludeListTE" url="admin/excludeTabTE.html#excludeListTE" />
223 <mapID target="index.adminExecTabTEExecutionConcurrencyTE" url="admin/execTabTE.html#execution.concurrencyTE" />
224 <mapID target="index.adminExecTabTEExecutionTE" url="admin/execTabTE.html#executionTE" />
225 <mapID target="index.adminExecTabTEExecutionTimeFactorTE" url="admin/execTabTE.html#execution.timeFactorTE" />
226 <mapID target="index.adminKeywordsTabTEKeywordsTE" url="admin/keywordsTabTE.html#keywordsTE" />
227 <mapID target="index.adminQuestionModeTEFullTemplateEditor" url="admin/questionModeTE.html#fullTemplateEditor" />
228 <mapID target="index.adminQuestionModeTEQuestionModeTEFilemenu" url="admin/questionModeTE.html#questionModeTE.filemenu" />
229 <mapID target="index.adminQuestionModeTEQuestionModeTEHelpmenu" url="admin/questionModeTE.html#questionModeTE.helpmenu" />
230 <mapID target="index.adminQuestionModeTEQuestionModeTEIndexPane" url="admin/questionModeTE.html#questionModeTE.indexPane" />
231 <mapID target="index.adminQuestionModeTEQuestionModeTEMarkermenu" url="admin/questionModeTE.html#questionModeTE.markermenu" />
232 <mapID target="index.adminQuestionModeTEQuestionModeTEMoreInfoPane" url="admin/questionModeTE.html#questionModeTE.moreInfoPane" />
233 <mapID target="index.adminQuestionModeTEQuestionModeTEQuestionPane" url="admin/questionModeTE.html#questionModeTE.questionPane" />
234 <mapID target="index.adminQuestionModeTEQuestionModeTESearchmenu" url="admin/questionModeTE.html#questionModeTE.searchmenu" />
235 <mapID target="index.adminQuestionModeTEQuestionModeTEViewmenu" url="admin/questionModeTE.html#questionModeTE.viewmenu" />
236 <mapID target="index.adminQuickSetTETemplateQuickSet" url="admin/quickSetTE.html#templateQuickSet" />
237 <mapID target="index.adminSetMarkersTEBookmarksTE" url="admin/setMarkersTE.html#bookmarksTE" />
238 <mapID target="index.adminTestsTabTEInitialFilesTE" url="admin/testsTabTE.html#initialFilesTE" />
239 <mapID target="index.browseBrowsingBrowsingTest" url="browse/browsing.html#browsingTest" />
240 <mapID target="index.browseConfigurationTabConfigurationTab" url="browse/configurationTab.html#configurationTab" />
241 <mapID target="index.browseDetailsTabDetailsTab" url="browse/detailsTab.html#detailsTab" />
242 <mapID target="index.browseDetailsTabDetailsTabName" url="browse/detailsTab.html#detailsTab.name" />
243 <mapID target="index.browseDetailsTabDetailsTabValue" url="browse/detailsTab.html#detailsTab.value" />
244 <mapID target="index.browseFilesTabFilesTab" url="browse/filesTab.html#filesTab" />
245 <mapID target="index.browseFolderInfoFolderInfo" url="browse/folderInfo.html#folderInfo" />
246 <mapID target="index.browseMessagesTabMessagesTab" url="browse/messagesTab.html#messagesTab" />
247 <mapID target="index.browseMessagesTabMessagesTabListPane" url="browse/messagesTab.html#messagesTab.listPane" />
248 <mapID target="index.browseMessagesTabMessagesTabMessagePane" url="browse/messagesTab.html#messagesTab.messagePane" />
249 <mapID target="index.browseMessagesTabMessagesTabOutput" url="browse/messagesTab.html#messagesTab.output" />
250 <mapID target="index.browseMessagesTabMessagesTabResult" url="browse/messagesTab.html#messagesTab.result" />
251 <mapID target="index.browseMessagesTabMessagesTabSummary" url="browse/messagesTab.html#messagesTab.summary" />
252 <mapID target="index.browseMultiselectionTabMultiSelectionTab" url="browse/multiselectionTab.html#MultiSelectionTab" />
253 <mapID target="index.browseStatusTabsStatusTabs" url="browse/statusTabs.html#statusTabs" />
254 <mapID target="index.browseStatusTabsStatusTabsError" url="browse/statusTabs.html#statusTabs.error" />
255 <mapID target="index.browseStatusTabsStatusTabsFailed" url="browse/statusTabs.html#statusTabs.failed" />
256 <mapID target="index.browseStatusTabsStatusTabsNotRun" url="browse/statusTabs.html#statusTabs.notRun" />
257 <mapID target="index.browseStatusTabsStatusTabsPassed" url="browse/statusTabs.html#statusTabs.passed" />
258 <mapID target="index.browseSummaryTabSummaryTab" url="browse/summaryTab.html#summaryTab" />
259 <mapID target="index.browseSummaryTabSummaryTabError" url="browse/summaryTab.html#summaryTab.error" />
260 <mapID target="index.browseSummaryTabSummaryTabFailed" url="browse/summaryTab.html#summaryTab.failed" />
261 <mapID target="index.browseSummaryTabSummaryTabFilteredOut" url="browse/summaryTab.html#summaryTab.filteredOut" />
262 <mapID target="index.browseSummaryTabSummaryTabNotRun" url="browse/summaryTab.html#summaryTab.notRun" />
263 <mapID target="index.browseSummaryTabSummaryTabPassed" url="browse/summaryTab.html#summaryTab.passed" />
264 <mapID target="index.browseSummaryTabSummaryTabSubtotal" url="browse/summaryTab.html#summaryTab.subtotal" />
265 <mapID target="index.browseSummaryTabSummaryTabTotal" url="browse/summaryTab.html#summaryTab.total" />
266 <mapID target="index.browseTestDescriptionTabTestDescriptionTab" url="browse/testDescriptionTab.html#testDescriptionTab" />
267 <mapID target="index.browseTestInfoTestInfo" url="browse/testInfo.html#testInfo" />
268 <mapID target="index.browseTestSuiteErrorsTestSuiteErrors" url="browse/testSuiteErrors.html#testSuiteErrors" />
269 <mapID target="index.browseViewFiltersViewFilter" url="browse/viewFilters.html#viewFilter" />
270 <mapID target="index.commandBasicContextBasicContext" url="command/basicContext.html#basicContext" />
271 <mapID target="index.commandBatchModeRunTests" url="command/batchMode.html#runTests" />
272 <mapID target="index.commandBrowseJTRTestresult" url="command/browseJTR.html#testresult" />
273 <mapID target="index.commandBrowseJTXExcludeList" url="command/browseJTX.html#excludeList4" />
274 <mapID target="index.commandCommandLineCommandLine" url="command/commandLine.html#commandLine" />
275 <mapID target="index.commandConcurrencyConcurrency" url="command/concurrency.html#concurrency" />
276 <mapID target="index.commandConfigConfig" url="command/config.html#config" />
277 <mapID target="index.commandDisplayHelpDisplayHelp" url="command/displayHelp.html#displayHelp" />
278 <mapID target="index.commandEditConfigEditConfig" url="command/editConfig.html#editConfig" />
279 <mapID target="index.commandExcludeListExcludeList" url="command/excludeList.html#excludeList" />
280 <mapID target="index.commandHarnessSettingsSettings" url="command/harnessSettings.html#settings" />
281 <mapID target="index.commandHarnessSettingsSettingsAgentPoolPort" url="command/harnessSettings.html#settings.agentPoolPort" />
282 <mapID target="index.commandHarnessSettingsSettingsAgentPoolTimeout" url="command/harnessSettings.html#settings.agentPoolTimeout" />
283 <mapID target="index.commandHarnessSettingsSettingsEnvVariable" url="command/harnessSettings.html#settings.envVariable" />
284 <mapID target="index.commandHarnessSettingsSettingsStartAgentPool" url="command/harnessSettings.html#settings.startAgentPool" />
285 <mapID target="index.commandHarnessSettingsSettingsSystemProperties" url="command/harnessSettings.html#settings.systemProperties" />
286 <mapID target="index.commandHttpServerHttpServer" url="command/httpServer.html#httpServer" />
287 <mapID target="index.commandIntroCommandLineIntro" url="command/intro.html#commandLineIntro" />
288 <mapID target="index.commandKeywordKeywords" url="command/keyword.html#keywords" />
289 <mapID target="index.commandKnownFailureAnalysisWriteReportsKFL" url="command/knownFailureAnalysis.html#writeReportsKFL" />
290 <mapID target="index.commandLiteLiteHarness" url="command/lite.html#liteHarness" />
291 <mapID target="index.commandMoveReportsEditConfig" url="command/moveReports.html#editConfig" />
292 <mapID target="index.commandObserverRunTests" url="command/observer.html#runTests" />
293 <mapID target="index.commandOpenOpen" url="command/open.html#open" />
294 <mapID target="index.commandOtherConfigValuesOtherConfigValues" url="command/otherConfigValues.html#otherConfigValues" />
295 <mapID target="index.commandParameterCommandsParameterCommands" url="command/parameterCommands.html#parameterCommands" />
296 <mapID target="index.commandParameterCommandsParameterCommandsJtp" url="command/parameterCommands.html#parameterCommands.jtp" />
297 <mapID target="index.commandParameterCommandsParameterCommandsJtx" url="command/parameterCommands.html#parameterCommands.jtx" />
298 <mapID target="index.commandPriorPrior" url="command/prior.html#prior" />
299 <mapID target="index.commandRunTestsRunTests" url="command/runTests.html#runTests" />
300 <mapID target="index.commandRunTestsRunTestsExample" url="command/runTests.html#runTests.example" />
301 <mapID target="index.commandSelectingTestsConcurrency" url="command/selectingTests.html#concurrency" />
302 <mapID target="index.commandSettingColorsAY" url="command/settingColors.html#a11y" />
303 <mapID target="index.commandSettingColorsSettingColors" url="command/settingColors.html#settingColors" />
304 <mapID target="index.commandSettingColorsSettingLAF" url="command/settingColors.html#settingLAF" />
305 <mapID target="index.commandSettingValuesSettingValues" url="command/settingValues.html#settingValues" />
306 <mapID target="index.commandSettingValuesSettingValuesExamples" url="command/settingValues.html#settingValues.examples" />
307 <mapID target="index.commandSetupCommandsSetupCommands" url="command/setupCommands.html#setupCommands" />
308 <mapID target="index.commandTaskCommandsEditConfig" url="command/taskCommands.html#editConfig" />
309 <mapID target="index.commandTestDirTestDir" url="command/testDir.html#testDir" />
310 <mapID target="index.commandTestEnvEnv" url="command/testEnv.html#env" />
311 <mapID target="index.commandTestenvFileEnvFile" url="command/testenvFile.html#envFile" />
312 <mapID target="index.commandTestsuiteTestsuite" url="command/testsuite.html#testsuite" />
313 <mapID target="index.commandTimeoutTimeout" url="command/timeout.html#timeout" />
314 <mapID target="index.commandTroubleshootingTroubleshootingCodepage" url="command/troubleshooting.html#troubleshooting.codepage" />
315 <mapID target="index.commandTroubleshootingTroubleshootingExitcodes" url="command/troubleshooting.html#troubleshooting.exitcodes" />
316 <mapID target="index.commandVerboseRunTests" url="command/verbose.html#runTests" />
317 <mapID target="index.commandWorkdirWorkdir" url="command/workdir.html#workdir" />
318 <mapID target="index.commandWorkdirWorkdirClearResults" url="command/workdir.html#workdir.clearResults" />
319 <mapID target="index.commandWorkdirWorkdirCreate" url="command/workdir.html#workdir.create" />
320 <mapID target="index.commandWorkdirWorkdirExamples" url="command/workdir.html#workdir.examples" />
321 <mapID target="index.commandWorkdirWorkdirOpen" url="command/workdir.html#workdir.open" />
322 <mapID target="index.commandWriteReportsWriteReportType" url="command/writeReports.html#writeReportType" />
323 <mapID target="index.commandWriteReportsWriteReports" url="command/writeReports.html#writeReports" />
324 <mapID target="index.conceptsTroubleshootingOutputOverflow" url="concepts/troubleshooting.html#output.overflow" />
325 <mapID target="index.conceptsTroubleshootingTroubleshooting" url="concepts/troubleshooting.html#troubleshooting" />
326 <mapID target="index.conceptsTroubleshootingTroubleshootingErrors" url="concepts/troubleshooting.html#troubleshooting.errors" />
327 <mapID target="index.conceptsTroubleshootingTroubleshootingFailed" url="concepts/troubleshooting.html#troubleshooting.failed" />
328 <mapID target="index.conceptsTroubleshootingTroubleshootingMoving" url="concepts/troubleshooting.html#troubleshooting.moving" />
329 <mapID target="index.conceptsTroubleshootingTroubleshootingRunning" url="concepts/troubleshooting.html#troubleshooting.running" />
330 <mapID target="index.conceptsTroubleshootingTroubleshootingStarting" url="concepts/troubleshooting.html#troubleshooting.starting" />
331 <mapID target="index.conceptsTroubleshootingTroubleshootingViewing" url="concepts/troubleshooting.html#troubleshooting.viewing" />
332 <mapID target="index.conceptsTroubleshootingTroubleshootingViewingReport" url="concepts/troubleshooting.html#troubleshooting.viewingReport" />
333 <mapID target="index.conceptsTroubleshootingTroubleshootingWriting" url="concepts/troubleshooting.html#troubleshooting.writing" />
334 <mapID target="index.confEditChecklistChecklist" url="confEdit/checklist.html#checklist" />
335 <mapID target="index.confEditCreateConfigurationCreateConfiguration" url="confEdit/createConfiguration.html#createConfiguration" />
336 <mapID target="index.confEditEditConfigurationEditConfiguration" url="confEdit/editConfiguration.html#editConfiguration" />
337 <mapID target="index.confEditEditQuickSetEditix" url="confEdit/editQuickSet.html#editix" />
338 <mapID target="index.confEditEnvironmentEnvironment" url="confEdit/environment.html#environment" />
339 <mapID target="index.confEditExcludeListExcludeList" url="confEdit/excludeList.html#excludeList" />
340 <mapID target="index.confEditExcludeListExcludeListLatest" url="confEdit/excludeList.html#excludeList.latest" />
341 <mapID target="index.confEditExcludeListExcludeListOther" url="confEdit/excludeList.html#excludeList.other" />
342 <mapID target="index.confEditExecutionExecution" url="confEdit/execution.html#execution" />
343 <mapID target="index.confEditExecutionExecutionConcurrency" url="confEdit/execution.html#execution.concurrency" />
344 <mapID target="index.confEditExecutionExecutionTimeFactor" url="confEdit/execution.html#execution.timeFactor" />
345 <mapID target="index.confEditFullViewDialogFullViewDialog" url="confEdit/fullViewDialog.html#fullViewDialog" />
346 <mapID target="index.confEditFullViewDialogFullViewDialogFilemenu" url="confEdit/fullViewDialog.html#fullViewDialog.filemenu" />
347 <mapID target="index.confEditFullViewDialogFullViewDialogHelpmenu" url="confEdit/fullViewDialog.html#fullViewDialog.helpmenu" />
348 <mapID target="index.confEditFullViewDialogFullViewDialogHistory" url="confEdit/fullViewDialog.html#fullViewDialog.history" />
349 <mapID target="index.confEditFullViewDialogFullViewDialogIndexPane" url="confEdit/fullViewDialog.html#fullViewDialog.indexPane" />
350 <mapID target="index.confEditFullViewDialogFullViewDialogMarkermenu" url="confEdit/fullViewDialog.html#fullViewDialog.markermenu" />
351 <mapID target="index.confEditFullViewDialogFullViewDialogMoreInfoPane" url="confEdit/fullViewDialog.html#fullViewDialog.moreInfoPane" />
352 <mapID target="index.confEditFullViewDialogFullViewDialogQuestionPane" url="confEdit/fullViewDialog.html#fullViewDialog.questionPane" />
353 <mapID target="index.confEditFullViewDialogFullViewDialogSearchmenu" url="confEdit/fullViewDialog.html#fullViewDialog.searchmenu" />
354 <mapID target="index.confEditFullViewDialogFullViewDialogViewmenu" url="confEdit/fullViewDialog.html#fullViewDialog.viewmenu" />
355 <mapID target="index.confEditFullViewDialogQuestionModeTEHistory" url="confEdit/fullViewDialog.html#questionModeTE.history" />
356 <mapID target="index.confEditInitialFilesInitialFiles" url="confEdit/initialFiles.html#initialFiles" />
357 <mapID target="index.confEditKeywordsKeywords" url="confEdit/keywords.html#keywords" />
358 <mapID target="index.confEditKflKfl" url="confEdit/kfl.html#kfl" />
359 <mapID target="index.confEditMultipleMultiple" url="confEdit/multiple.html#multiple" />
360 <mapID target="index.confEditOverviewConfEditOverview" url="confEdit/overview.html#confEdit.overview" />
361 <mapID target="index.confEditQuestionLogQuestionLog" url="confEdit/questionLog.html#questionLog" />
362 <mapID target="index.confEditSetMarkersKeywords" url="confEdit/setMarkers.html#keywords" />
363 <mapID target="index.confEditStdViewDialogStdViewDialog" url="confEdit/stdViewDialog.html#stdViewDialog" />
364 <mapID target="index.envDialogTestEnvBrowser" url="env/dialog.html#testEnvBrowser" />
365 <mapID target="index.envDialogTestEnvBrowserEnv" url="env/dialog.html#testEnvBrowser.env" />
366 <mapID target="index.envDialogTestEnvBrowserFile" url="env/dialog.html#testEnvBrowser.file" />
367 <mapID target="index.envDialogTestEnvBrowserKey" url="env/dialog.html#testEnvBrowser.key" />
368 <mapID target="index.envDialogTestEnvBrowserValue" url="env/dialog.html#testEnvBrowser.value" />
369 <mapID target="index.exclDialogExcludeListBrowser" url="excl/dialog.html#excludeListBrowser2" />
370 <mapID target="index.execPropsDialogExecPropsDialog" url="execProps/dialog.html#execProps.dialog" />
371 <mapID target="index.execPropsDialogExecPropsDialogConfig" url="execProps/dialog.html#execProps.dialog.config" />
372 <mapID target="index.execPropsDialogExecPropsDialogPlugins" url="execProps/dialog.html#execProps.dialog.plugins" />
373 <mapID target="index.execPropsDialogExecPropsDialogTestSuite" url="execProps/dialog.html#execProps.dialog.testSuite" />
374 <mapID target="index.execPropsDialogExecPropsDialogWorkDir" url="execProps/dialog.html#execProps.dialog.workDir" />
375 <mapID target="index.jthelpJthelp" url="jthelp.html#jthelp" />
376 <mapID target="index.jthelpJthelpAccessing" url="jthelp.html#jthelp.accessing" />
377 <mapID target="index.jthelpJthelpNavigation" url="jthelp.html#jthelp.navigation" />
378 <mapID target="index.mergeReportsMergeReportsPrefsDialog" url="mergeReports/mergeReports.html#prefsDialog" />
379 <mapID target="index.mergeReportsReportMergePrefsDialog" url="mergeReports/reportMerge.html#prefsDialog" />
380 <mapID target="index.mergeReportsReportMergeViewerPrefsDialog" url="mergeReports/reportMergeViewer.html#prefsDialog" />
381 <mapID target="index.mergeReportsWindowPrefsDialog" url="mergeReports/window.html#prefsDialog" />
382 <mapID target="index.reportNewReportsFailtopass" url="report/newReports.html#failtopass" />
383 <mapID target="index.reportNewReportsHtmlFilesTab" url="report/newReports.html#htmlFilesTab" />
384 <mapID target="index.reportNewReportsHtmlopt" url="report/newReports.html#htmlopt" />
385 <mapID target="index.reportNewReportsKfanalysis" url="report/newReports.html#kfanalysis" />
386 <mapID target="index.reportNewReportsNewReports" url="report/newReports.html#newReports" />
387 <mapID target="index.reportNewReportsReportFiles" url="report/newReports.html#reportFiles" />
388 <mapID target="index.reportNewReportsSpecKFL" url="report/newReports.html#specKFL" />
389 <mapID target="index.reportNewReportsUnrelerr" url="report/newReports.html#unrelerr" />
390 <mapID target="index.reportReportBrowserReportBrowser" url="report/reportBrowser.html#reportBrowser" />
391 <mapID target="index.reportUsingReportsUsingReports" url="report/usingReports.html#usingReports" />
392 <mapID target="index.runLogViewerLogViewerwindow" url="run/logViewer.html#LogViewerwindow" />
393 <mapID target="index.runMonitoringMonitoring" url="run/monitoring.html#monitoring" />
394 <mapID target="index.runProgressMeterProgressMeter" url="run/progressMeter.html#progressMeter" />
395 <mapID target="index.runProgressMeterProgressMeterBar" url="run/progressMeter.html#progressMeter.bar" />
396 <mapID target="index.runProgressMeterProgressMeterTime" url="run/progressMeter.html#progressMeter.time" />
397 <mapID target="index.runProgressMonitorProgressMonitor" url="run/progressMonitor.html#progressMonitor" />
398 <mapID target="index.runProgressMonitorProgressMonitorMemory" url="run/progressMonitor.html#progressMonitor.memory" />
399 <mapID target="index.runProgressMonitorProgressMonitorProgress" url="run/progressMonitor.html#progressMonitor.progress" />
400 <mapID target="index.runProgressMonitorProgressMonitorTest" url="run/progressMonitor.html#progressMonitor.test" />
401 <mapID target="index.runProgressMonitorProgressMonitorTime" url="run/progressMonitor.html#progressMonitor.time" />
402 <mapID target="index.runRunningRunning" url="run/running.html#running" />
403 <mapID target="index.runStartingStarting" url="run/starting.html#starting" />
404 <mapID target="index.runStoppingStopping" url="run/stopping.html#stopping" />
405 <mapID target="index.runSvcViewerSvcViewerwindow" url="run/svcViewer.html#SvcViewerwindow" />
406 <mapID target="index.runTroubleshootingRunTroubleshooting" url="run/troubleshooting.html#run.troubleshooting" />
407 <mapID target="index.startQuickStartQuickStart" url="start/quickStart.html#quickStart" />
408 <mapID target="index.templatesEnablePropFromTemplateConfeditEnablingPropagation" url="templates/enablePropFromTemplate.html#confedit.enablingPropagation" />
409 <mapID target="index.templatesLoadTemplateEditingTemplate" url="templates/loadTemplate.html#editingTemplate" />
410 <mapID target="index.templatesResolveConflictsResolveConflict" url="templates/resolveConflicts.html#resolveConflict" />
411 <mapID target="index.templatesUsingTemplateCreateConfigurationTemplate" url="templates/usingTemplate.html#createConfigurationTemplate" />
412 <mapID target="index.templatesViewConflictsViewConflict" url="templates/viewConflicts.html#viewConflict" />
413 <mapID target="index.uiAgentMonitorWindow" url="ui/agentMonitor.html#window" />
414 <mapID target="index.uiAllTestsAllTests" url="ui/allTests.html#allTests" />
415 <mapID target="index.uiAppearancePrefsAppearancePrefs" url="ui/appearancePrefs.html#appearancePrefs" />
416 <mapID target="index.uiAppearancePrefsAppearancePrefsRestore" url="ui/appearancePrefs.html#appearancePrefs.restore" />
417 <mapID target="index.uiAppearancePrefsAppearancePrefsShutdown" url="ui/appearancePrefs.html#appearancePrefs.shutdown" />
418 <mapID target="index.uiAppearancePrefsAppearancePrefsTooltips" url="ui/appearancePrefs.html#appearancePrefs.tooltips" />
419 <mapID target="index.uiColorPrefsColorPrefs" url="ui/colorPrefs.html#colorPrefs" />
420 <mapID target="index.uiConfigureMenuConfigureMenu" url="ui/configureMenu.html#configureMenu" />
421 <mapID target="index.uiCurrentConfigurationCurrentConfiguration" url="ui/currentConfiguration.html#currentConfiguration" />
422 <mapID target="index.uiCurrentTemplateCurrentTemplate" url="ui/currentTemplate.html#currentTemplate" />
423 <mapID target="index.uiCustomFiltersCustomFilters" url="ui/customFilters.html#customFilters" />
424 <mapID target="index.uiCustomFiltersCustomFiltersEdit" url="ui/customFilters.html#customFilters.edit" />
425 <mapID target="index.uiCustomFiltersCustomFiltersExcludeList" url="ui/customFilters.html#customFilters.excludeList" />
426 <mapID target="index.uiCustomFiltersCustomFiltersInitialFiles" url="ui/customFilters.html#customFilters.initialFiles" />
427 <mapID target="index.uiCustomFiltersCustomFiltersKeywords" url="ui/customFilters.html#customFilters.keywords" />
428 <mapID target="index.uiCustomFiltersCustomFiltersSpecial" url="ui/customFilters.html#customFilters.special" />
429 <mapID target="index.uiCustomFiltersCustomFiltersStatus" url="ui/customFilters.html#customFilters.status" />
430 <mapID target="index.uiCustomFiltersCustomFiltersUse" url="ui/customFilters.html#customFilters.use" />
431 <mapID target="index.uiDesktopMenusDesktopMenus" url="ui/desktopMenus.html#desktopMenus" />
432 <mapID target="index.uiDesktopMenusDesktopMenusFile" url="ui/desktopMenus.html#desktopMenus.file" />
433 <mapID target="index.uiDesktopMenusDesktopMenusHelp" url="ui/desktopMenus.html#desktopMenus.help" />
434 <mapID target="index.uiDesktopMenusDesktopMenusTool" url="ui/desktopMenus.html#desktopMenus.tool" />
435 <mapID target="index.uiDesktopMenusDesktopMenusWindow" url="ui/desktopMenus.html#desktopMenus.window" />
436 <mapID target="index.uiDesktopStylesDesktopStyles" url="ui/desktopStyles.html#desktopStyles" />
437 <mapID target="index.uiFolderIconsFolderIcons" url="ui/folderIcons.html#folderIcons" />
438 <mapID target="index.uiFolderIconsFolderIconsResultstatus" url="ui/folderIcons.html#folderIcons.resultstatus" />
439 <mapID target="index.uiFolderIconsFolderIconsRunstatus" url="ui/folderIcons.html#folderIcons.runstatus" />
440 <mapID target="index.uiInfoPaneFolderInfo" url="ui/infoPane.html#folderInfo" />
441 <mapID target="index.uiLastRunAllTests" url="ui/lastRun.html#allTests" />
442 <mapID target="index.uiLogViewerLogViewerUI" url="ui/logViewer.html#logViewerUI" />
443 <mapID target="index.uiOpenHelpOpenHelp" url="ui/openHelp.html#openHelp" />
444 <mapID target="index.uiOpenHelpOpenHelpButtons" url="ui/openHelp.html#openHelp.buttons" />
445 <mapID target="index.uiOpenHelpOpenHelpF" url="ui/openHelp.html#openHelp.F1" />
446 <mapID target="index.uiOpenHelpOpenHelpMenu" url="ui/openHelp.html#openHelp.menu" />
447 <mapID target="index.uiPopupmenuPopupMenu" url="ui/popupmenu.html#popupMenu" />
448 <mapID target="index.uiPopupmenuPopupMenuClear" url="ui/popupmenu.html#popupMenu.clear" />
449 <mapID target="index.uiPopupmenuPopupMenuExecute" url="ui/popupmenu.html#popupMenu.execute" />
450 <mapID target="index.uiPopupmenuPopupMenuRefresh" url="ui/popupmenu.html#popupMenu.refresh" />
451 <mapID target="index.uiPrefsDialogPrefsDialog" url="ui/prefsDialog.html#prefsDialog" />
452 <mapID target="index.uiReportMergePrefsDialog" url="ui/reportMerge.html#prefsDialog" />
453 <mapID target="index.uiTestIconsTestIcons" url="ui/testIcons.html#testIcons" />
454 <mapID target="index.uiTestIconsTestIconsRunstatus" url="ui/testIcons.html#testIcons.runstatus" />
455 <mapID target="index.uiTestIconsTestIconsTestresultstatus" url="ui/testIcons.html#testIcons.Testresultstatus" />
456 <mapID target="index.uiTestManagerStatusTMstatus" url="ui/testManagerStatus.html#TMstatus" />
457 <mapID target="index.uiTestManagerTestExecOrder" url="ui/testManager.html#testExecOrder" />
458 <mapID target="index.uiTestManagerTestManagerReporting" url="ui/testManager.html#testManager.reporting" />
459 <mapID target="index.uiToolBarToolBar" url="ui/toolBar.html#toolBar" />
460 <mapID target="index.uiUiUi" url="ui/ui.html#ui" />
461 <mapID target="index.uiUsingJTUsingJT" url="ui/usingJT.html#usingJT" />
462 <mapID target="index.uiUsingtreeUsingtree" url="ui/usingtree.html#usingtree" />
463 <mapID target="index.uiWindowUiWindow" url="ui/window.html#ui.window" />
464 <mapID target="index.uiWorkDirStatusWorkDirStatus" url="ui/workDirStatus.html#workDirStatus" />
465 <mapID target="jtIntro" url="jt_intro.html" />
466 <mapID target="jthelp.csh" url="jthelp.html" />
467 <mapID target="logFileViewer.logViewer.csh" url="ui/logViewer.html" />
468 <mapID target="mergeReports.mergingReports" url="mergeReports/mergeReports.html" />
469 <mapID target="mergeReports.reportMerge" url="mergeReports/reportMerge.html" />
470 <mapID target="mergeReports.reportWindow" url="mergeReports/reportMergeViewer.html" />
471 <mapID target="mergeReports.window.csh" url="mergeReports/window.html" />
472 <mapID target="openbook" url="../images/openbook.gif" />
473 <mapID target="qsw.window.csh" url="start/quickStart.html" />
474 <mapID target="quLog.window.csh" url="confEdit/questionLog.html" />
475 <mapID target="report.newReport.csh" url="report/newReports.html" />
476 <mapID target="report.reportBrowser.csh" url="report/reportBrowser.html" />
477 <mapID target="report.usingReports" url="report/usingReports.html" />
478 <mapID target="run.monitoring" url="run/monitoring.html" />
479 <mapID target="run.running" url="run/running.html" />
480 <mapID target="run.starting" url="run/starting.html" />
481 <mapID target="run.stopping" url="run/stopping.html" />
482 <mapID target="run.svcViewer" url="run/svcViewer.html" />
483 <mapID target="run.testProgress" url="run/progressMeter.html" />
484 <mapID target="run.testTree" url="run/testTree.html" />
485 <mapID target="run.troubleshooting" url="run/troubleshooting.html" />
486 <mapID target="run.viewFilter" url="run/viewFilters.html" />
487 <mapID target="securityInfo" url="security_info.html" />
488 <mapID target="start.createDirectory" url="start/createDirectory.html" />
489 <mapID target="start.openDirectory" url="start/openDirectory.html" />
490 <mapID target="start.openTestSuite" url="start/openTestSuite.html" />
491 <mapID target="start.quickStart" url="start/quickStart.html" />
492 <mapID target="templates.loadTemplate" url="templates/loadTemplate.html" />
493 <mapID target="templates.resolveConflict.csh" url="templates/resolveConflicts.html" />
494 <mapID target="topic" url="../images/topic.gif" />
495 <mapID target="ui.agentMonitor" url="ui/agentMonitor.html" />
496 <mapID target="ui.allTests" url="ui/allTests.html" />
497 <mapID target="ui.configureMenu" url="ui/configureMenu.html" />
498 <mapID target="ui.currentConfiguration" url="ui/currentConfiguration.html" />
499 <mapID target="ui.currentTemplate" url="ui/currentTemplate.html" />
500 <mapID target="ui.desktopMenus" url="ui/desktopMenus.html" />
501 <mapID target="ui.desktopStyles" url="ui/desktopStyles.html" />
502 <mapID target="ui.folderIcons" url="ui/folderIcons.html" />
503 <mapID target="ui.infoArea" url="ui/infoPane.html" />
504 <mapID target="ui.keyboardAccess" url="ui/keyboardAccess.html" />
505 <mapID target="ui.lastRun" url="ui/lastRun.html" />
506 <mapID target="ui.openHelp" url="ui/openHelp.html" />
507 <mapID target="ui.popupmenu" url="ui/popupmenu.html" />
508 <mapID target="ui.prefs.appearance.csh" url="ui/appearancePrefs.html" />
509 <mapID target="ui.prefs.confEditorView" url="ui/confEditorView.html" />
510 <mapID target="ui.prefs.dialog.csh" url="ui/prefsDialog.html" />
511 <mapID target="ui.prefs.testManager" url="ui/testManager.html" />
512 <mapID target="ui.reportMenu" url="ui/reportMenu.html" />
513 <mapID target="ui.runMenu" url="ui/runMenu.html" />
514 <mapID target="ui.statusMessage" url="ui/testManagerStatus.html" />
515 <mapID target="ui.testIcons" url="ui/testIcons.html" />
516 <mapID target="ui.toolBar" url="ui/toolBar.html" />
517 <mapID target="ui.ui" url="ui/ui.html" />
518 <mapID target="ui.usingJT" url="ui/usingJT.html" />
519 <mapID target="ui.usingtree" url="ui/usingtree.html" />
520 <mapID target="ui.viewMenu" url="ui/viewMenu.html" />
521 <mapID target="ui.workDirStatus" url="ui/workDirStatus.html" />
295522 </map>
11 <!--
22 $Id$
33
4 Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
4 Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
55 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
66
77 This code is free software; you can redistribute it and/or modify it
111111 index.html~1~
112112 reportdir.dat
113113 text/
114 text~1~/<pre></td></tr></table>
114 text~1~/</pre></td></tr></table>
115115
116116 <p>The harness maintains the specified number of backup copies by deleting the oldest copy when the limit of backups is reached for a specific report. Changing this or any other setting
117117 in the report dialog box does not affect any previously saved backup reports.
198198 <p><b>Optional files/sections to generate</b>:</p>
199199 <p>These options are set to Yes by default.</p>
200200 <ul>
201 <li><p>List tests which are expected to fail and are still failing. See <a href="#failtofail">Old Failures</a> (<code>kfl_fail2fail.html</code>).</p></li>
201 <li><p>List tests which are expected to fail and are still failing. See <a href="#failtofail">Old Failure</a> (<code>kfl_fail2fail.html</code>).</p></li>
202202 <li><p>List tests which were expect to fail but resulted in error instead. See <a href="#failtoerror">Unexpected Error</a> (<code>kfl_fail2error.html</code>).</p></li>
203203 <li><p>Report on tests in KFL which are now missing.</p></li></ul>
204204
239239
240240 <a name="knownFailureListReports"><!--index:KFL reports--><!--reports: KFL: creating--></a></p>
241241 <h3>Known Failures List Reports</h3>
242 <p>If you specified a known failures list in the configuration editor, the HTML report will include a section titled Known Failure Analysis. When you create a report you can check the HTML Option "Known Failures" to create the <a href="#failtopass">New Passed</a>, <a href="#failtonotrun">Missing (not run)</a>, and <a href="#newfailures">New Failures</a> reports. The options on the KFL Options tab generate reports for <a href="#failtopass">New Passed</a>, <a href="#failtomissing">Missing (test not found)</a> and <a href="#failtofail">Old Failures</a>.</p>
242 <p>If you specified a known failures list in the configuration editor, the HTML report will include a section titled Known Failure Analysis. When you create a report you can check the HTML Option "Known Failures" to create the <a href="#failtopass">New Passed</a>, <a href="#failtonotrun">Missing (not run)</a>, and <a href="#newfailures">New Failures</a> reports. The options on the KFL Options tab generate reports for <a href="#failtopass">New Passed</a>, <a href="#failtomissing">Missing (test not found)</a> and <a href="#failtofail">Old Failure</a>.</p>
243243
244244 <a name="kfanalysis"> <!--index:known failure analysis--></a>
245245 <h3><a name="Known Failure Analysis">Known Failure Analysis</a></h3>
278278 <p>The results for a test listed in the KFL are missing. Because the test was listed in the KFL, it was expected to exist and Fail. A missing test may not indicate a problem, but should be investigated. This section can be disabled by deselecting the appropriate option in the HTML KFL report options in the Create Report dialog.</p>
279279
280280 <a name="newfailures"><!-- index:KFL reports --><!-- reports: KFL: New Failures --></a>
281 <h4>New Failures</h4>
281 <h4>New Failure</h4>
282282 <p>Any test or test case which has a Failed status in the current results but does not appear in the KFL.</p>
283283
284284 <a name="failtofail"><!-- index:KFL reports--><!--reports: KFL: Old Failures --></a>
285 <h4>Old Failures</h4>
285 <h4>Old Failure</h4>
286286 <p>The lists of tests and test cases which failed and were expected to fail. This is not a discrepancy and is provided for informational purposes.</p>
287287
288288 <a name="unrelerr"><!-- index:KFL reports--><!--reports: KFL: Unrelated Errors --></a>
289 <h4>Unrelated Errors</h4>
289 <h4>Unrelated Error</h4>
290290 <p>Error results present in the results being reported upon, which do not correspond to any entries on the KFL list(s) supplied. This is a convenience listing so that errors can be examined at the same time as known failure list discrepancies.</p>
291291
292292 <a name="reportFiles"><!-- index:report files --><!-- index:report directory --></a>
332332 <tr valign="top">
333333 <th scope="col" class="left">HTML Report</th><th scope="col" class="left">File Names</th></tr>
334334 <tr><td>New Passed</td><td><code>kfl_fail2pass.html</code>, <code>kfl_tc_fail2pass.html</code></td></tr>
335 <tr>
336 <td>Unexpected Error</td><td><code>kfl_fail2error.html</code>, <code>kfl_tc_fail2error.html</code></td></tr>
337
338 <tr><td>Missing (Not run)</td>
335 <tr><td>Unexpected Error</td><td><code>kfl_fail2error.html</code>, <code>kfl_tc_fail2error.html</code></td></tr>
336 <tr><td>Unrelated Error</td><td><code>kfl_fail2error.html</code>, <code>kfl_otherErrors.html</code></td></tr>
337
338 <tr><td>Missing (not run)</td>
339339 <td><code>kfl_fail2notrun.html</code>, <code>kfl_tc_fail2notrun.html</code></td></tr>
340340
341341 <tr><td>Missing (test not found)</td>
342342 <td><code>kfl_fail2missing.html</code>, <code>kfl_tc_fail2missing.html</code></td></tr>
343343
344 <tr><td>New Failures</td><td><code>kfl_newfailures.html</code>, <code>kfl_tc_newfailures.html</code></td></tr>
345
346 <tr><td>Old Failures</td><td><code>kfl_fail2fail.html</code>, <code>kfl_tc_fail2fail.html</code></td></tr>
344 <tr><td>New Failure</td><td><code>kfl_newfailures.html</code>, <code>kfl_tc_newfailures.html</code></td></tr>
345
346 <tr><td>Old Failure</td><td><code>kfl_fail2fail.html</code>, <code>kfl_tc_fail2fail.html</code></td></tr>
347347
348348 </table>
349349
364364 <td>Unexpected Error</td>
365365 <td><code>kfl_fail2error.txt</code>, <code>kfl_tc_fail2error.txt</code></td>
366366 </tr>
367 <tr>
368 <td>Missing (Not run)</td>
367 <tr>
368 <td>Unrelated Error</td>
369 <td><code>other_errors.txt</code>></td>
370 </tr>
371 <tr>
372 <td>Missing (not run)</td>
369373 <td><code>kfl_fail2notrun.txt</code>, <code>kfl_tc_fail2notrun.txt</code></td>
370374 </tr>
371375 <tr>
373377 <td><code>kfl_fail2missing.txt</code>, <code>kfl_tc_fail2missing.txt</code></td>
374378 </tr>
375379 <tr>
376 <td>New Failures</td>
380 <td>New Failure</td>
377381 <td><code>kfl_newfailures.txt</code>, <code>kfl_tc_newfailures.txt</code></td>
378382 </tr>
379383 <tr>
380 <td>Old Failures</td>
384 <td>Old Failure</td>
381385 <td><code>kfl_fail2fail.txt</code>, <code>kfl_tc_fail2fail.txt</code></td>
382386 </tr>
383387 </table>
384388 <p>The files whose names begin with <code>tc_</code> are present only if the test suite supports test case identification. </p>
385389 <hr>
386390
387 <p><a href="../copyright.html">Copyright</a> &copy; 2002, 2014, Oracle and/or its affiliates. All rights reserved.</p>
391 <p><a href="../copyright.html">Copyright</a> &copy; 2002, 2015, Oracle and/or its affiliates. All rights reserved.</p>
388392 </BODY>
389393 </HTML>
390394
3232 import java.io.OutputStreamWriter;
3333 import java.io.PrintWriter;
3434 import java.net.Socket;
35 import java.nio.charset.StandardCharsets;
3536 import java.util.Hashtable;
3637
3738 import com.sun.javatest.util.I18NResourceBundle;
6970 buf.setLength(0);
7071 }
7172
72 out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(soc.getOutputStream())));
73 in = new LineNumberReader(new InputStreamReader(soc.getInputStream()));
73 out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(soc.getOutputStream(), StandardCharsets.UTF_8)));
74 in = new LineNumberReader(new InputStreamReader(soc.getInputStream(), StandardCharsets.UTF_8));
7475
7576
7677 request = in.readLine();
11 # $Id$
22 #
33 #
4 # Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
4 # Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
55 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
66 #
77 # This code is free software; you can redistribute it and/or modify it
162162 harness.errorNotifyStart=An error occurred when notifying the test suite that the test run is starting.
163163 harness.incompleteParameters=The configuration parameters you specified are incomplete or invalid.\n{0}
164164 harness.interrupted=Interrupted!
165 harness.noTests=No tests found or selected for execution. Check your configuration settings - these settings directly affect the selection criteria.\n\nThe following settings from the configuration were used to select tests:\n{0}
165 harness.noTests=No tests found or selected for execution. Check your configuration settings - these settings directly affect the selection criteria.\n\nThe following settings from the configuration were used to select tests:\n{0}\n\n{1} Tests rejected by these filters:\n{2}
166166 harness.starting=Starting test run
167167 harness.testsuiteError={0}
168168 harness.tooManyErrors=Test run aborted because too many tests failed in succession.
245245
246246 keywordsFilter.description=Select tests according to their keywords
247247 keywordsFilter.name=Keywords
248 keywordsFilter.reason=Test does not match the given keyword expression
248 keywordsFilter.reason=Test(s) do not match the given keyword expression: {0}
249249
250250 kfl.badEntry=Failed to read KFL entry: {0}
251251 kfl.cantListCase=Overlapping KFL test/test case: {0}
286286 rslt.badLine=Result file format not recognized; unexpected line `{0}''.
287287 rslt.badHeader=Result file format not recognized: bad header on first line: {0}
288288 rslt.badHeaderVersion=Error while parsing result file: bad version number in header.\n{0}
289 rslt.badRuntimeErr=Error while reading result file {0},\n\t{1}
289290 rslt.empty=Result file empty: {0}
290291 rslt.fileNotFound=Result file not found: {0}
291292 rslt.noOutputTitle=An output title could not be found.
345346 statusFilter.description=Select tests according to their prior result status
346347 statusFilter.name=Prior Status
347348 statusFilter.noStatus=No prior status found for test {0}
348 statusFilter.reason=Test does not match the given status criteria
349 statusFilter.reason=Test does not match the given status criteria.
349350
350351 tec.cantFindFile=Cannot find specified file {0}.
351352 #tec.interviewClassAccess=Problem accessing interview class specified in file {0}.\n{1}
365366
366367 #trc.abort=Cache update action aborted due to shutdown signal.
367368 #trc.badtr=An unrecoverable error occurred while trying to read a result file, the error was {0}.
368 trc.badjtr=Result cache could not reload {0}, deleting it and continuing!
369 trc.badjtr=Result cache could not reload {0}, deleting it and continuing!\n{1}
369370 #trc.cantopen=An unrecoverable error occurred while trying to create/open file {0}, the error was: {1}.
370371 #trc.flushError=Error flushing results to the cache. File may be corrupted.
371372 trc.lockTimeout=Timeout waiting for test result cache lock
443444 #ts.logger.noworkdir=Can't create general purpose logger: work directory is null
444445 ts.noScript=Cannot determine script: No suitable environment entries
445446 ts.notASubtype={0}, defined in the {1} entry is not valid here - it is not a subtype of {2}
447 ts.compiledRecentVersion=The test suite has been compiled by a more recent version of the Java Runtime.\n\
448 Try to run JavaTest Harness by a more recent version of the Java Runtime.\n\n\
449 Current Runtime Version: {0}\nPath to the selected test suite: {1}
446450 ts.notTestSuiteFile=Path does not identify a valid test suite.\n{0}
447451
448452 wd.alreadyExists=Work directory already exists.
00 /*
11 * $Id$
22 *
3 * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
3 * Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
44 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55 *
66 * This code is free software; you can redistribute it and/or modify it
5252 * The test suite for which this interview applies should be set
5353 * with setTestSuite.
5454 * @param tag the tag used to qualify questions in this interview
55 * @throws Interview.Fault if there is a problem creating this object
55 * @throws com.sun.interview.Interview.Fault if there is a problem creating this object
5656 */
5757 protected BasicInterviewParameters(String tag)
5858 throws Fault
7676 * Create a BasicInterviewParameters object.
7777 * @param tag the tag used to qualify questions in this interview
7878 * @param ts The test suite to which this interview applies.
79 * @throws Interview.Fault if there is a problem creating this object
79 * @throws com.sun.interview.Interview.Fault if there is a problem creating this object
8080 */
8181 protected BasicInterviewParameters(String tag, TestSuite ts)
8282 throws Fault
361361 /**
362362 * Discover the maximum allowable concurrency value that should be accepted.
363363 * @return The maximum allowable concurrency value that should be accepted
364 * by the interview. Default value is 50 (legacy value). A reasonable
365 * long-term ongoing value would be
366 * Parameters.ConcurrencyParameters.MAX_CONCURRENCY.
364 * by the interview.
367365 * @see com.sun.javatest.Parameters.ConcurrencyParameters#MAX_CONCURRENCY
368366 */
369367 protected int getMaxConcurrency() {
370 // return Parameters.ConcurrencyParameters.MAX_CONCURRENCY;
371 return 50;
368 return Parameters.ConcurrencyParameters.MAX_CONCURRENCY;
372369 }
373370
374371 //--------------------------------------------------------------------------
00 /*
11 * $Id$
22 *
3 * Copyright (c) 2001, 2009, Oracle and/or its affiliates. All rights reserved.
3 * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
44 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55 *
66 * This code is free software; you can redistribute it and/or modify it
3737 {
3838 /**
3939 * Create a configuration interview for legacy tests suites.
40 * @throws Interview.Fault if there is a problem instantiating the
40 * @throws com.sun.interview.Interview.Fault if there is a problem instantiating the
4141 * interview.
4242 */
4343 public LegacyParameters()
5252 /**
5353 * Create a configuration interview for legacy tests suites.
5454 * @param testSuite The test suite for which this interview applies
55 * @throws Interview.Fault if there is a problem instantiating the
55 * @throws com.sun.interview.Interview.Fault if there is a problem instantiating the
5656 * interview.
5757 */
5858 public LegacyParameters(TestSuite testSuite)
00 /*
11 * $Id$
22 *
3 * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
3 * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
44 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55 *
66 * This code is free software; you can redistribute it and/or modify it
2525 */
2626 package com.sun.javatest.interview;
2727
28 import java.io.BufferedReader;
29 import java.io.File;
30 import java.io.FileNotFoundException;
31 import java.io.FileReader;
32 import java.io.IOException;
28 import java.io.*;
29 import java.nio.charset.StandardCharsets;
3330 import java.util.ArrayList;
3431 import java.util.Arrays;
3532 import java.util.TreeSet;
194191 private static final String TREE = "tree";
195192
196193 /**
197 * Represents Tests Selection Choice Question. Exctracted to separate class
194 * Represents Tests Selection Choice Question. Extracted to separate class
198195 * for extensibility purposes
199196 */
200197 public class TreeOrFileChoiceQuestion extends ChoiceQuestion{
205202 }
206203
207204 /**
208 * Should be overriden if more selection choices are needed
205 * Should be overridden if more selection choices are needed
209206 * @return array of test selection choices
210207 */
211208 protected String[] getTestSelectionChoices(){
252249 //
253250 // file
254251
255 private FileQuestion qTestFile = new FileQuestion(this, "testFile") {
252 protected FileQuestion qTestFile = new FileQuestion(this, "testFile") {
256253 @Override
257254 public boolean isValueValid() {
258255 return (value != null && value.getPath().length() > 0);
280277 }
281278 };
282279
283 private String[] getTests(File file) {
280 protected String[] getTests(File file) {
284281 ArrayList<String> paths = new ArrayList();
285282 try {
286 BufferedReader in = new BufferedReader(new FileReader(file));
283 BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(file), StandardCharsets.UTF_8));
287284 String line;
288285 while ((line = in.readLine()) != null) {
289286 line = line.trim();
330327 private TreeQuestion.Model model = new TreeQuestion.Model() {
331328 @Override
332329 public Object getRoot() {
333 return parent.getWorkDirectory().getTestResultTable().getRoot();
330 // all the extra checks here because we know nulls can appear
331 if (parent == null || parent.getWorkDirectory() == null) {
332 return null;
333 }
334
335 WorkDirectory wd = parent.getWorkDirectory();
336 if (wd.getTestResultTable() == null) {
337 return null;
338 }
339
340 return wd.getTestResultTable().getRoot();
334341 }
335342
336343 @Override
518525 };
519526
520527 private String[] cachedTestsValue;
521 private Question cachedTestsError;
528 protected Question cachedTestsError;
522529 private Object[] cachedTestsErrorArgs;
523530
524531 //----------------------------------------------------------------------------
3030 import com.sun.javatest.lib.MultiStatus;
3131 import java.lang.reflect.InvocationTargetException;
3232 import java.lang.reflect.Method;
33 import java.security.AccessController;
34 import java.security.PrivilegedAction;
3335 import java.util.Iterator;
3436 import java.util.Map;
3537 import java.util.Set;
131133 protected void getListAllJunitTestCases(){
132134 tests = new TreeMap<String,Method>();
133135 try {
134 Method[] methods = testCaseClass.getClass().getMethods();
136 Method[] methods = AccessController.doPrivileged(
137 new PrivilegedAction<Method[]>() {
138 public Method[] run() {
139 return testCaseClass.getClass().getMethods();
140 }
141 });
135142 for (Method m: methods){
136143 if(m == null || excludeTestCases.contains(m.getName())){
137144 continue;
7575 }
7676 }
7777
78 public ClassLoader getClassLoader() {
79 return cl;
80 }
81
8278 private ClassLoader cl;
8379 }
00 /*
11 * $Id$
22 *
3 * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
3 * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
44 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55 *
66 * This code is free software; you can redistribute it and/or modify it
153153 * set of options, each beginning with `-', to be
154154 * used by this object.
155155 * The options are
156 * <dl>
156157 * <dt>
157158 * <dt>-v
158159 * <dd> verbose mode
4040 import java.io.InputStreamReader;
4141 import java.io.IOException;
4242 import java.net.URL;
43 import java.nio.charset.StandardCharsets;
4344 import javax.swing.JComponent;
4445 import javax.swing.JFrame;
4546 import javax.swing.JScrollPane;
5152 import javax.swing.text.Highlighter;
5253 import javax.swing.text.View;
5354 import javax.swing.text.html.HTMLDocument;
54
55 import com.sun.java.help.impl.ViewAwareComponent;
5655
5756 /**
5857 * A lightweight component that will show a text file, suitable for
8180 */
8281 public class ShowFile
8382 extends JComponent
84 implements ViewAwareComponent
8583 {
8684 public ShowFile() {
8785 addMouseListener(new MouseAdapter() {
8181 </p>
8282 <p>
8383 <IMG SRC="../../images/hg_see.gif" ALT="image"><b>Help topic:</b>
84 <object classid="java:com.sun.javatest.tool.HelpLink">
84 <object classid="com.sun.javatest.tool.HelpLink">
8585 <param name="text" value="Specifying Test Environment Files">
8686 <param name="target" value="confEdit.envTab.csh">
8787 </object>
3939 documentation for the correct method for your test suite.
4040 <p>
4141 <IMG SRC="../../images/hg_see.gif" ALT="image"><b>Help topic:</b>
42 <object classid="java:com.sun.javatest.tool.HelpLink">
42 <object classid="com.sun.javatest.tool.HelpLink">
4343 <param name="text" value="Using Exclude Lists">
4444 <param name="target" value="confEdit.excludeTab.csh">
4545 </object>
4949 </p>
5050 <p>
5151 <IMG SRC="../../images/hg_see.gif" ALT="image"><b>Help topic:</b>
52 <object classid="java:com.sun.javatest.tool.HelpLink">
52 <object classid="com.sun.javatest.tool.HelpLink">
5353 <param name="text" value="Setting Test Execution Parameters">
5454 <param name="target" value="confEdit.execTab.csh">
5555 </object>
4343 documentation describes how to use these keywords.
4444 <p>
4545 <IMG SRC="../../images/hg_see.gif" ALT="image"><b>Help topic:</b>
46 <object classid="java:com.sun.javatest.tool.HelpLink">
46 <object classid="com.sun.javatest.tool.HelpLink">
4747 <param name="text" value="Using Keywords as Filters">
4848 <param name="target" value="confEdit.keywordsTab.csh">
4949 </object>
4141
4242 <p>
4343 <IMG SRC="../../images/hg_see.gif" ALT="image"><b>Help topic:</b>
44 <object classid="java:com.sun.javatest.tool.HelpLink">
44 <object classid="com.sun.javatest.tool.HelpLink">
4545 <param name="text" value="KFL Options in HTML Reports">
4646 <param name="target" value="confEdit.kflTab.csh">
4747 </object>
4545 </p>
4646 <p>
4747 <IMG SRC="../../images/hg_see.gif" ALT="image"><b>Help topic:</b>
48 <object classid="java:com.sun.javatest.tool.HelpLink">
48 <object classid="com.sun.javatest.tool.HelpLink">
4949 <param name="text" value="Using Prior Status as a Filter">
5050 <param name="target" value="confEdit.statusTab.csh">
5151 </object>
4747 </p>
4848 <p>
4949 <IMG SRC="../../images/hg_see.gif" ALT="image"><b>Help topic:</b>
50 <object classid="java:com.sun.javatest.tool.HelpLink">
50 <object classid="com.sun.javatest.tool.HelpLink">
5151 <param name="text" value="Specifying Tests to Run">
5252 <param name="target" value="confEdit.testsTab.csh">
5353 </object>
4343 distributed as part of a test suite (unlike an exclude list).</p>
4444 <p>
4545 <IMG SRC="../../images/hg_see.gif" ALT="image"><b>Help topic:</b>
46 <object classid="java:com.sun.javatest.tool.HelpLink">
46 <object classid="com.sun.javatest.tool.HelpLink">
4747 <param name="text" value="Creating Reports">
4848 <param name="target" value="report.newReport.csh">
4949 </object>
4545 </p>
4646 <p>
4747 <IMG SRC="../../images/hg_see.gif" ALT="image"><b>Help topic:</b>
48 <object classid="java:com.sun.javatest.tool.HelpLink">
48 <object classid="com.sun.javatest.tool.HelpLink">
4949 <param name="text" value="Using Prior Status as a Filter">
5050 <param name="target" value="confEdit.statusTab.csh">
5151 </object>
3838 </p>
3939 <p>
4040 <IMG SRC="../../images/hg_see.gif" ALT="image"><b>Help topic:</b>
41 <object classid="java:com.sun.javatest.tool.HelpLink">
41 <object classid="com.sun.javatest.tool.HelpLink">
4242 <param name="text" value="Specifying Tests to Run">
4343 <param name="target" value="confEdit.testsTab.csh">
4444 </object>
4747 </p>
4848 <p>
4949 <IMG SRC="../../images/hg_see.gif" ALT="image"><b>Help topic:</b>
50 <object classid="java:com.sun.javatest.tool.HelpLink">
50 <object classid="com.sun.javatest.tool.HelpLink">
5151 <param name="text" value="Specifying Tests to Run">
5252 <param name="target" value="confEdit.testsTab.csh">
5353 </object>
5050
5151 <p>
5252 <IMG SRC="../../images/hg_see.gif" ALT="image"><b>Help topic:</b>
53 <object classid="java:com.sun.javatest.tool.HelpLink">
53 <object classid="com.sun.javatest.tool.HelpLink">
5454 <param name="text" value="Specifying Tests to Run">
5555 <param name="target" value="confEdit.testsTab.csh">
5656 </object>
3434 import java.awt.event.ActionEvent;
3535 import java.awt.event.ItemEvent;
3636 import java.awt.event.ItemListener;
37 import java.io.BufferedReader;
38 import java.io.File;
39 import java.io.FileReader;
40 import java.io.IOException;
41 import java.io.StringWriter;
37 import java.io.*;
4238 import java.net.MalformedURLException;
4339 import java.net.URL;
40 import java.nio.charset.StandardCharsets;
4441 import java.util.Vector;
4542
4643 import javax.swing.Action;
308305 && !url.getFile().endsWith(".htm")
309306 && !url.getFile().endsWith(".html")) {
310307 textArea.setContentType("text/plain");
311 FileReader r = null;
312308 try {
313 r = new FileReader(file);
314 BufferedReader br = new BufferedReader(r);
309 BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(file), StandardCharsets.UTF_8));
315310 textArea.read(br, url);
316311 br.close();
317312 }
318313 catch (IOException e) {
319314 uif.showError("fp.load.error", new Object[] { url, e });
320 }
321 finally {
322 try {
323 if (r != null) r.close();
324 }
325 catch(IOException e2) {
326 // ignore since this is just from closing the file
327 }
328315 }
329316
330317 }
3535 import java.awt.event.ComponentAdapter;
3636 import java.awt.event.ComponentEvent;
3737 import java.awt.event.KeyEvent;
38 import java.io.BufferedReader;
39 import java.io.File;
40 import java.io.FileReader;
38 import java.io.*;
39 import java.nio.charset.StandardCharsets;
4140 import java.util.ArrayList;
4241 import java.util.List;
4342
5756 import java.awt.event.FocusEvent;
5857 import java.awt.event.FocusListener;
5958 import java.awt.event.KeyListener;
60 import java.io.IOException;
6159 import javax.swing.filechooser.FileView;
6260
6361 class FilesPane extends JPanel {
380378 String formatVersion = "formatVersion=\"v1\"";
381379
382380 if (!f.getName().endsWith(".xml")) return false;
383 FileReader fr = null;
381 BufferedReader r = null;
384382 try {
385 fr = new FileReader(f);
386 BufferedReader r = new BufferedReader(fr);
383 r = new BufferedReader(new InputStreamReader(new FileInputStream(f), StandardCharsets.UTF_8));
387384 boolean hasSchema, hasVersion = false;
388385
389386 // line 1
400397 return false;
401398 } finally {
402399 try {
403 if (fr != null) fr.close();
400 if (r != null) r.close();
404401 } catch (IOException ex) {
405402 // nothing...
406403 }
00 /*
11 * $Id$
22 *
3 * Copyright (c) 2002, 2009, Oracle and/or its affiliates. All rights reserved.
3 * Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
44 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55 *
66 * This code is free software; you can redistribute it and/or modify it
5656 tool.updateGUI();
5757 }
5858 });
59 setHelp("report.options.csh");
59 setHelp("mergeReports.window.csh");
6060 }
6161
6262 String getResultPath() {
3737 import java.awt.event.HierarchyListener;
3838 import java.awt.event.ItemEvent;
3939 import java.awt.event.ItemListener;
40 import java.io.BufferedReader;
41 import java.io.File;
42 import java.io.FileReader;
43 import java.io.IOException;
44 import java.io.Reader;
45 import java.io.StringWriter;
40 import java.io.*;
4641 import java.net.MalformedURLException;
4742 import java.net.URL;
43 import java.nio.charset.StandardCharsets;
4844 import java.util.Map;
4945
5046 import javax.swing.BorderFactory;
576572 && !url.getFile().endsWith(".html")) {
577573 textArea.setContentType("text/plain");
578574 try {
579 Reader r = new BufferedReader(new FileReader(file));
575 Reader r = new BufferedReader(new InputStreamReader(new FileInputStream(file), StandardCharsets.UTF_8));
580576 textArea.read(r, url);
581577 r.close();
582578 } catch (IOException e) {
115115 throws SAXException {
116116 if (qualifiedName.equals(Scheme.TR)) {
117117 String url = attributes.getValue(Scheme.TR_URL);
118 int id = (Integer.valueOf(attributes.getValue(Scheme.TR_WDID)))
119 .intValue();
118 int id = Integer.parseInt(attributes.getValue(Scheme.TR_WDID));
120119 String status = attributes.getValue(Scheme.TR_STATUS);
121120 map.put(url, new TestResultDescr(status, id, time));
122121 }
00 /*
11 * $Id$
22 *
3 * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
3 * Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved.
44 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55 *
66 * This code is free software; you can redistribute it and/or modify it
2929 import com.sun.javatest.util.I18NResourceBundle;
3030 import java.io.BufferedWriter;
3131 import java.io.File;
32 import java.io.FileWriter;
32 import java.io.FileOutputStream;
3333 import java.io.IOException;
34 import java.io.OutputStreamWriter;
3435 import java.io.Writer;
36 import java.nio.charset.Charset;
3537 import java.util.ArrayList;
3638 import java.util.Collections;
3739 import java.util.List;
4143 * HTML format of the report.
4244 */
4345 public class HTMLReport implements ReportFormat {
44
4546 @Override
4647 public ReportLink write(ReportSettings s, File dir) throws IOException {
4748 reportDir = dir;
49 initCharset();
4850 setKflData(s.getKflSorter());
4951 setResults(s.getSortedResults());
5052
128130 ReportWriter.initializeDirectory(reportDir);
129131 if (writer != null) {
130132 ReportWriter out = new ReportWriter(writer,
131 i18n.getString("report.title"), i18n);
133 i18n.getString("report.title"), i18n, reportCharset);
132134
133135 // test suite name
134136 String testSuiteName = s.getInterview().getTestSuite().getName();
136138 out.startTag(HTMLWriterEx.H2);
137139 out.writeI18N("report.testSuite", testSuiteName);
138140 out.endTag(HTMLWriterEx.H2);
141 }
142
143 if (s.getTestFilter() != null && s.getTestFilter().getName() != null) {
144 out.startTag(HTMLWriterEx.H3);
145 out.writeI18N("report.filter", s.getTestFilter().getName());
146 out.endTag(HTMLWriterEx.H3);
139147 }
140148
141149 // info from sections for main report
226234 }
227235
228236 Writer openWriter(File reportDir, int code) throws IOException {
229 return new BufferedWriter(new FileWriter(new File(reportDir, files[code])));
237 File fout = new File(reportDir, files[code]);
238 OutputStreamWriter osw =
239 new OutputStreamWriter(new FileOutputStream(fout), reportCharset);
240 //FileWriter fw = new FileWriter(new File(reportDir, files[code]));
241 return new BufferedWriter(osw);
230242 }
231243
232244 public void setResults(TreeSet[] results) {
243255
244256 // ----------------------------------------------------------------------
245257
258 private void initCharset() {
259 String userCS = System.getProperty("javatest.report.html.charset");
260 if (userCS != null && Charset.isSupported(userCS)) {
261 try {
262 reportCharset = Charset.forName(userCS);
263 } catch (Exception e) {
264 }
265 }
266
267 // next, attempt JT preferred charset
268 if (reportCharset == null && Charset.isSupported(DEFAULT_CHARSET)) {
269 try {
270 reportCharset = Charset.forName(DEFAULT_CHARSET);
271 } catch (Exception e) {
272 }
273 }
274
275 // default if still not set
276 if (reportCharset == null) {
277 reportCharset = Charset.defaultCharset();
278 }
279 }
280
246281 private static final String ID = "html";
282
283 /**
284 * The charset to request for the report output.
285 * Defaulted to UTF-8, if this is not available at runtime, code will use
286 * the default charset provided by the runtime.
287 * @see java.nio.charset.Charset#defaultCharset
288 */
289 protected Charset reportCharset;
290
291 /**
292 * Default charset to use. This is checked against the runtime availability
293 * before being used.
294 */
295 protected String DEFAULT_CHARSET = "UTF-8";
247296
248297 File reportDir;
249298
00 /*
11 * $Id$
22 *
3 * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
3 * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
44 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55 *
66 * This code is free software; you can redistribute it and/or modify it
9595
9696 /**
9797 * Write Content-Type meta tag using default charset:
98 * <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
99 * This must go inside the <head> element!
98 * This must go inside the &lt;head&gt; element!
10099 */
101100 public void writeContentMeta() throws IOException {
102101 closePrevTag();
103102 writeRaw(String.format(META_CONTENT, Charset.defaultCharset()));
104103 }
105104
105 /**
106 * Write Content-Type meta tag using given charset:
107 * This must go inside the &lt;head&gt; element! The Charset provided should be
108 * available on the current runtime. If the Charset provided is null, the
109 * runtime default charset will be used - by calling the no-param
110 * version of this method.
111 * @param charSet Character set to use, must not be null.
112 */
113 public void writeContentMeta(Charset charSet) throws IOException {
114 // sanity check
115 if (charSet == null) {
116 writeContentMeta();
117 return;
118 }
119
120 closePrevTag();
121 writeRaw(String.format(META_CONTENT, charSet));
122 }
123
106124 private static final String META_CONTENT = "\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=%s\">\n";
107125 }
2727
2828 import com.sun.javatest.KnownFailuresList;
2929 import com.sun.javatest.TestResult;
30 import java.io.File;
31 import java.io.FileWriter;
32 import java.io.IOException;
33 import java.io.Writer;
30
31 import java.io.*;
32 import java.nio.charset.StandardCharsets;
3433 import java.util.HashSet;
3534 import java.util.TreeSet;
3635
6968 private void writeTestSet(String f, String id, TreeSet<KflSorter.TestDiff> tests) {
7069 // add file validation
7170 try {
72 FileWriter out = new FileWriter(new File(dir, f));
71 Writer out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(new File(dir, f)), StandardCharsets.UTF_8));
7372 out.write("# ");
7473 out.write(f);
7574 out.write("\n");
2525 */
2626 package com.sun.javatest.report;
2727
28 import java.io.BufferedWriter;
29 import java.io.File;
30 import java.io.FileWriter;
31 import java.io.IOException;
32 import java.io.Writer;
28 import java.io.*;
29 import java.nio.charset.StandardCharsets;
3330 import java.util.HashSet;
3431 import java.util.SortedSet;
3532
409406 }
410407
411408 Writer openWriter(String file) throws IOException {
412 return new BufferedWriter(new FileWriter(new File(reportDir, file)));
409 return new BufferedWriter(new OutputStreamWriter(new FileOutputStream(new File(reportDir, file)), StandardCharsets.UTF_8));
413410 }
414411
415412 /*
593593 continue;
594594 }
595595 Status stat = Status.parse(m.group(2));
596 result.put(tcName, stat);
596 if (result.containsKey(tcName)){
597 // testcases with the same name are marked as passed
598 // only if all these testcases are passed
599 if (!stat.isPassed()){
600 result.put(tcName, stat);
601 }
602 }
603 else {
604 result.put(tcName, stat);
605 }
597606 }
598607 s = reader.readLine();
599608 }
3131 import com.sun.javatest.TestResultTable;
3232 import com.sun.javatest.util.I18NResourceBundle;
3333 import com.sun.javatest.util.TextWriter;
34 import java.io.BufferedWriter;
35 import java.io.File;
36 import java.io.FileWriter;
37 import java.io.IOException;
38 import java.io.Writer;
34
35 import java.io.*;
36 import java.nio.charset.StandardCharsets;
3937 import java.util.Collections;
4038 import java.util.Iterator;
4139 import java.util.List;
126124 }
127125
128126 private Writer openWriter(File reportDir, String filename) throws IOException {
129 return new BufferedWriter(new FileWriter(new File(reportDir, filename)));
127 return new BufferedWriter(new OutputStreamWriter(new FileOutputStream(new File(reportDir, filename)), StandardCharsets.UTF_8));
130128 }
131129
132130 // these fields must have synchronized indexes
3232 import com.sun.javatest.tool.Preferences;
3333 import com.sun.javatest.util.BackupUtil;
3434 import com.sun.javatest.util.I18NResourceBundle;
35 import java.io.BufferedReader;
36 import java.io.BufferedWriter;
37 import java.io.File;
38 import java.io.FileInputStream;
39 import java.io.FileWriter;
40 import java.io.IOException;
41 import java.io.InputStreamReader;
42 import java.io.Writer;
35
36 import java.io.*;
37 import java.nio.charset.StandardCharsets;
4338 import java.text.SimpleDateFormat;
4439 import java.util.ArrayList;
4540 import java.util.Arrays;
169164 * from the preferences will be used.
170165 * @throws IllegalArgumentException if the type parameter does not
171166 * identify a proper report type.
172 * @param type The report type identifier, may be a custom type.
167 * @param types The report type identifiers, may be a custom type.
173168 * null for default generated reports
174169 * @throws java.io.IOException If an error occurs writing any of the files.
175170 */
176 public void writeReport(String type) throws IOException {
171 public void writeReport(String... types) throws IOException {
177172 // make a settings object - default settings
178173 //Settings settings = new Settings(params);
179174 ReportSettings settings = getSettingsPrefs();
180175 settings.setInterview(params);
181176
182177 String[] typesToGen;
183 if (type == null) {
178 if (types == null) {
184179 // if type is not specified generate html and plain text
185180 typesToGen = new String[] {"html", "txt"};
186181 } else {
187 typesToGen = new String[] {type};
182 typesToGen = Arrays.copyOf(types, types.length);
188183 }
189184
190185 // this setting can originate in a legacy constructor
212207 doCLReport(rf, settings, typesToGen, links);
213208 }
214209 if (links.isEmpty()) {
215 throw new IllegalArgumentException("Unknown report type: " + type);
210 throw new IllegalArgumentException("Unknown report types: " + Arrays.toString(types));
211 }
212 if (links.size() != typesToGen.length) {
213 throw new IllegalArgumentException("Not all report types are known: " + Arrays.toString(types));
216214 }
217215
218216 updateStaffFiles(reportDir, settings, links);
357355 StringBuilder content = new StringBuilder();
358356 BufferedReader r = null;
359357 try {
360 r = new BufferedReader(new InputStreamReader(new FileInputStream(index)));
358 r = new BufferedReader(new InputStreamReader(new FileInputStream(index), StandardCharsets.UTF_8));
361359 String line;
362360 while( (line = r.readLine()) != null ) {
363361 content.append(line);
416414 StringBuilder sb = new StringBuilder();
417415 BufferedReader r = null;
418416 try {
419 r = new BufferedReader(new InputStreamReader(new FileInputStream(index)));
417 r = new BufferedReader(new InputStreamReader(new FileInputStream(index), StandardCharsets.UTF_8));
420418 String line;
421419 while( (line = r.readLine()) != null ) {
422420 sb.append(line);
460458
461459 Writer writer = null;
462460 try {
463 writer = new BufferedWriter(new FileWriter(index));
461 writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(index), StandardCharsets.UTF_8));
464462 writer.write(sb.toString());
465463 writer.flush();
466464 writer.close();
504502 private void fillIndexFile(File index, ReportSettings s, List<ReportLink> links) {
505503 Writer writer = null;
506504 try {
507 writer = new BufferedWriter(new FileWriter(index));
505 writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(index), StandardCharsets.UTF_8));
508506 HTMLWriterEx out = new HTMLWriterEx(writer);
509507 out.setI18NResourceBundle(i18n);
510508
00 /*
11 * $Id$
22 *
3 * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
3 * Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved.
44 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55 *
66 * This code is free software; you can redistribute it and/or modify it
2727
2828 import java.io.File;
2929 import java.io.IOException;
30 import java.util.Iterator;
31 import java.util.ListIterator;
30 import java.util.*;
3231
3332 import com.sun.javatest.AllTestsFilter;
3433 import com.sun.javatest.CompositeFilter;
3938 import com.sun.javatest.tool.Command;
4039 import com.sun.javatest.tool.CommandContext;
4140 import com.sun.javatest.tool.CommandManager;
41 import com.sun.javatest.tool.Preferences;
4242 import com.sun.javatest.util.HelpTree;
4343 import com.sun.javatest.util.I18NResourceBundle;
4444 import com.sun.javatest.util.StringArray;
135135 else if (arg.equals("-type")) {
136136 if (!argIter.hasNext())
137137 throw new Fault(i18n, "rm.writeReport.missingArg");
138 type = nextArg(argIter);
138 if (types == null) {
139 types = new ArrayList<String>();
140 }
141 types.add(nextArg(argIter));
142 }
143 else if (arg.equalsIgnoreCase("-kfl") ||
144 arg.equalsIgnoreCase("-enableKFL")) {
145 // allow user to turn on KFL section by overriding Preferences
146 Preferences.access().setPreference("rps.html.kfl", "true");
139147 }
140148 else if (arg.equals("-filter")) {
141149 if (!argIter.hasNext())
226234 // TEMP add p.getFilters -- in time, Report API should
227235 // provide more flexible reporting options
228236 Report r = new Report(p, path, filterO);
229 r.writeReport(type);
237 String[] typesArgs = types == null ? null : types.toArray(new String[types.size()]);
238 r.writeReport(typesArgs);
230239
231240 File cPath;
232241 try {
246255
247256 private File path;
248257 private boolean createFlag;
249 private String type;
258 private List<String> types;
250259 private String filter;
251260 }
252261
00 /*
11 * $Id$
22 *
3 * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
3 * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
44 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55 *
66 * This code is free software; you can redistribute it and/or modify it
2525 */
2626 package com.sun.javatest.report;
2727
28 import java.io.File;
29 import java.io.FileWriter;
30 import java.io.IOException;
31 import java.io.Writer;
28 import java.io.*;
29 import java.nio.charset.Charset;
30 import java.nio.charset.StandardCharsets;
3231 import java.text.DateFormat;
3332 import java.util.Date;
3433
5049 * Creates a new ReportWriter.
5150 * @param out the output stream
5251 */
53 ReportWriter(Writer out, String title, I18NResourceBundle i18n) throws IOException {
52 ReportWriter(Writer out, String title, I18NResourceBundle i18n)
53 throws IOException {
54 this(out, title, i18n, Charset.defaultCharset());
55 }
56
57 ReportWriter(Writer out, String title, I18NResourceBundle i18n, Charset cs)
58 throws IOException {
5459 super(out, "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">", i18n);
5560 this.i18n = i18n;
5661
5762 startTag(HTMLWriterEx.HTML);
5863 startTag(HTMLWriterEx.HEAD);
59 writeContentMeta();
64 writeContentMeta(cs);
6065 startTag(HTMLWriterEx.TITLE);
6166 writeI18N("reportWriter.product.name", new Object[] {
6267 ProductInfo.getName(), title } );
107112 File cssFile = new File(dir, CSS_FILENAME);
108113
109114 if (dir.exists() && dir.canWrite() && !cssFile.exists()) {
110 FileWriter fw = new FileWriter(cssFile);
115 Writer fw = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(cssFile), StandardCharsets.UTF_8));
111116
112117 fw.write("h1 {font-size: 18pt;\n");
113118 fw.write(" font-family: SansSerif;\n");
11 # $Id$
22 #
33 #
4 # Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
4 # Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
55 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
66 #
77 # This code is free software; you can redistribute it and/or modify it
111111 kfl.new.summary=New Failure
112112
113113 kfl.errors.notes=The tests listed are errors, but not listed on the known failures list. This list is for informational purposes - the is no problem as far as the known failures list is concerned.
114 kfl.errors.heading=Unrelated Errors
115 kfl.errors.title=Unrelated Errors
116 kfl.errors.summary=Unrelated Errors
114 kfl.errors.heading=Unrelated Error
115 kfl.errors.title=Unrelated Error
116 kfl.errors.summary=Unrelated Error
117117
118118 kfl.f2nr.summary=Missing (not run)
119119 kfl.f2nr.heading=Missing (not run)
120 kfl.f2nr.title=KFL Failures Missing - Now report as Not Run
120 kfl.f2nr.title=KFL Failures Missing - Now reported as Not Run
121121 kfl.f2nr.notes=The tests listed were failing but are now not being run.
122122
123123 ## ---test cases
132132 kfl.tc_f2m.title=Known Failures - Failed Test Cases Now Missing
133133
134134 kfl.tc_f2e.summary=Fail to Error
135 kfl.tc_f2e.heading=Unexpected Test Case Errors
135 kfl.tc_f2e.heading=Unexpected Test Case Error
136136 kfl.tc_f2e.notes=The test cases listed were expected failures which are now resulting in errors.
137 kfl.tc_f2e.title=Known Failures - Unexpected Test Case Errors
137 kfl.tc_f2e.title=Known Failures - Unexpected Test Case Error
138138
139139 kfl.tc_new.notes=The test cases listed were not failing before but currently are.
140140 kfl.tc_new.heading=New Failures
165165 report.testResult.err=Report - bad initial tests in configuration settings, cannot continue.
166166 report.writing.err=Report - error during writing test result
167167 report.testSuite=TestSuite: {0}
168 report.filter=Filter: {0}
168169
169170 reportWriter.generatedOn=Report generated on {0,date} {0,time}
170171 reportWriter.keyValue.separator={0}: {1};
191192 rm.help.report.desc=(Deprecated) Specify directory for automatic report if no actions are given
192193 rm.help.report.name=-report <dir>
193194 rm.help.writeReport.desc=Write a report on the results of the tests in the workdir. Default types: html and txt. Default filter: currentConfig.
194 rm.help.writeReport.name=-writeReport [-create] [-type <html|xml|txt|...>] [-filter <lastRun|currentConfig|allTests>] <dir>
195 rm.help.writeReport.name=-writeReport [-create] [-type <html|xml|txt|...>] [-enableKFL] [-filter <lastRun|currentConfig|allTests>] <dir>
195196 rm.report.missingArg=argument missing
196197 rm.writeReport.badArg=bad argument for writeReport command ({0})
197198 rm.writeReport.cantCreate=cannot create directory for report ({0})
2626 package com.sun.javatest.services;
2727
2828 import com.sun.javatest.TestSuite;
29 import java.io.File;
30 import java.io.FileReader;
31 import java.io.IOException;
29
30 import java.io.*;
31 import java.nio.charset.StandardCharsets;
3232 import java.util.HashSet;
3333 import java.util.Map;
3434 import java.util.Properties;
9696 props = new Properties();
9797
9898 try {
99 props.load(new FileReader(propFile));
99 props.load(new BufferedReader(new InputStreamReader(new FileInputStream(propFile), StandardCharsets.UTF_8)));
100100 } catch (IOException ex) {
101101 }
102102 }
2525 */
2626 package com.sun.javatest.servlets;
2727
28 import java.io.File;
29 import java.io.IOException;
30 import java.io.PrintWriter;
28 import java.io.*;
29 import java.nio.charset.StandardCharsets;
3130 import java.util.Iterator;
3231 import javax.servlet.ServletException;
3332 import javax.servlet.http.HttpServlet;
7170 String bugLink = getInitParameter("bugLink");
7271
7372 res.setContentType("text/html");
74 PrintWriter out = new PrintWriter(res.getOutputStream());
73 PrintWriter out = new PrintWriter(new OutputStreamWriter(res.getOutputStream(), StandardCharsets.UTF_8), true);
7574 out.println("<html>");
7675 out.println("<head>");
7776 out.println("<title>" + file + "</title>");
2727
2828 import java.io.File;
2929 import java.io.IOException;
30 import java.io.OutputStreamWriter;
3031 import java.io.PrintWriter;
32 import java.nio.charset.StandardCharsets;
3133 import java.util.Enumeration;
3234 import java.util.Iterator;
3335 import java.util.Map;
6567 }
6668
6769 res.setContentType("text/html");
68 PrintWriter out = new PrintWriter(res.getOutputStream());
70 PrintWriter out = new PrintWriter(new OutputStreamWriter(res.getOutputStream(), StandardCharsets.UTF_8), true);
6971 out.println("<html>");
7072 out.println("<head>");
7173 out.println("<title>" + file + "</title>");
3434 import java.awt.event.ActionListener;
3535 import java.awt.event.WindowAdapter;
3636 import java.awt.event.WindowEvent;
37 import java.awt.event.KeyEvent;
3738 import java.io.FileNotFoundException;
3839 import java.util.Collection;
3940 import java.util.Iterator;
4041 import java.util.List;
4142 import java.util.Map;
4243 import java.util.Vector;
43 import javax.help.HelpBroker;
4444 import javax.accessibility.AccessibleContext;
4545 import javax.swing.Action;
4646 import javax.swing.JFrame;
5151 import javax.swing.SwingUtilities;
5252 import javax.swing.event.MenuEvent;
5353 import javax.swing.event.MenuListener;
54 import javax.swing.KeyStroke;
55 import javax.swing.JComponent;
56
57 import com.sun.javatest.tool.jthelp.ContextHelpManager;
58 import com.sun.javatest.tool.jthelp.HelpBroker;
5459 import com.sun.javatest.util.ExitCount;
5560 import com.sun.javatest.util.I18NResourceBundle;
5661 import com.sun.javatest.util.PrefixMap;
308313
309314 frame.setJMenuBar(mb);
310315
311 HelpBroker helpBroker = desktop.getHelpBroker();
312 if (helpBroker != null) {
313 helpBroker.enableHelpKey(frame.getRootPane(), "jthelp.csh", null);
314 Desktop.addHelpDebugListener(frame);
315 }
316 final HelpBroker helpBroker = desktop.getHelpBroker();
317 JRootPane rootPane = frame.getRootPane();
318 KeyStroke keystroke = KeyStroke.getKeyStroke(KeyEvent.VK_F1, 0, false);
319 rootPane.registerKeyboardAction(new ActionListener(){
320 @Override
321 public void actionPerformed(ActionEvent e) {
322 helpBroker.displayCurrentID(ContextHelpManager.getHelpIDString(getSelectedTool()));
323 }
324 }, keystroke,
325 JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
316326
317327 Desktop.addPreferredSizeDebugListener(frame);
318328
5555 import java.util.Properties;
5656 import java.util.Set;
5757 import java.util.Vector;
58 import javax.help.DefaultHelpBroker;
59 import javax.help.HelpBroker;
60 import javax.help.HelpSet;
61 import javax.help.HelpSetException;
62 import javax.help.JHelp;
63 import javax.help.WindowPresentation;
6458 import javax.swing.BorderFactory;
6559 import javax.swing.Icon;
6660 import javax.swing.JButton;
7973 import com.sun.javatest.InterviewParameters;
8074 import com.sun.javatest.JavaTestError;
8175 import com.sun.javatest.TestSuite;
76 import com.sun.javatest.tool.jthelp.ContextHelpManager;
77 import com.sun.javatest.tool.jthelp.HelpBroker;
78 import com.sun.javatest.tool.jthelp.HelpSet;
79 import com.sun.javatest.tool.jthelp.JTHelpBroker;
8280 import com.sun.javatest.util.BackupPolicy;
8381 import com.sun.javatest.report.HTMLWriterEx;
8482 import com.sun.javatest.util.I18NResourceBundle;
855853 n++;
856854 }
857855
858 if (helpBroker != null) {
859 p.put("help.visible", String.valueOf(helpBroker.isDisplayed()));
860 if (helpBroker.getCurrentView() != null)
861 p.put("help.view", helpBroker.getCurrentView());
862 if (helpBroker.getCurrentID() != null)
863 p.put("help.id", helpBroker.getCurrentID().id);
864 }
865
866856 try {
867857 File dir = f.getParentFile();
868858 if (dir != null && !dir.exists())
926916 }
927917
928918 restoreHistory(p);
929
930 if (helpBroker != null) {
931 try {
932 String view = (String) (p.get("help.view"));
933 if (view != null)
934 helpBroker.setCurrentView(view);
935 String id = (String) (p.get("help.id"));
936 if (id != null)
937 helpBroker.setCurrentID(id);
938 helpBroker.setDisplayed("true".equals(p.get("help.visible")));
939 }
940 catch (IllegalArgumentException e) {
941 // ignore
942 // this exception can arise if the view name is bad
943 // (e.g. glossary, in a version that does not support glossary)
944 }
945 }
946919
947920 // ALERT!! NEEDS FIXING!
948921 // should use saved view info
11771150 public void dispose() {
11781151 if (currView != null)
11791152 currView.dispose();
1180
1181 if (helpBroker != null && helpBroker.isDisplayed()) {
1182 helpBroker.setDisplayed(false);
1183 }
11841153 }
11851154
11861155 /**
14631432 }
14641433
14651434 if (u != null) {
1466 try {
1467 HelpSet helpSet = new HelpSet(theLoader, u);
1468 //helpBroker = helpSet.createHelpBroker();
1469 helpBroker = new DefaultHelpBroker(helpSet);
1470
1471 // Not safe to run initPresentation in a background
1472 // thread, despite the JavaHelp specification.
1473 // so run it synchronously instead.
1474 // don't even run it synchronously
1475 //helpBroker.initPresentation();
1476 /*
1477 // launch background thread to init help in the
1478 // background, per JavaHelp suggestions
1479 Runnable r = new Runnable() {
1480 public void run() {
1481 helpBroker.initPresentation();
1482 }
1483 };
1484 Thread t = new Thread(r);
1485 t.setPriority(Thread.MIN_PRIORITY + 1); // not lowest, but pretty low
1486 t.start();
1487 *
1488 */
1489
1490 }
1491 catch (HelpSetException e) {
1492 // TO DO...
1493 }
1494 }
1495 }
1496
1497 private JHelp getJHelp() {
1498 WindowPresentation wp = helpBroker.getWindowPresentation();
1499 wp.createHelpWindow();
1500 JFrame f = (JFrame) (wp.getHelpWindow());
1501 Container p = f.getContentPane();
1502 for (int i = 0; i < p.getComponentCount(); i++) {
1503 Component c = p.getComponent(i);
1504 if (c instanceof JHelp)
1505 return (JHelp) c;
1506 }
1507 return null;
1435 //HelpSet helpSet = new HelpSet(theLoader, u);
1436 //helpBroker = helpSet.createHelpBroker();
1437 helpBroker = new JTHelpBroker();
1438
1439 // Not safe to run initPresentation in a background
1440 // thread, despite the JavaHelp specification.
1441 // so run it synchronously instead.
1442 // don't even run it synchronously
1443 //helpBroker.initPresentation();
1444 /*
1445 // launch background thread to init help in the
1446 // background, per JavaHelp suggestions
1447 Runnable r = new Runnable() {
1448 public void run() {
1449 helpBroker.initPresentation();
1450 }
1451 };
1452 Thread t = new Thread(r);
1453 t.setPriority(Thread.MIN_PRIORITY + 1); // not lowest, but pretty low
1454 t.start();
1455 *
1456 */
1457 }
15081458 }
15091459
15101460 private void initToolManagers() {
15871537 Component comp = javax.swing.SwingUtilities.findFocusOwner(src);
15881538 System.err.println("ALT-F2: source=" + src);
15891539 System.err.println("ALT-F2: focus=" + comp);
1590 System.err.println("ALT-F2: helpId=" + (comp == null ? "(none)" : javax.help.CSH.getHelpIDString(comp)));
1540 String helpId = comp == null ? "(none)" : ContextHelpManager.getHelpIDString(comp);
1541 helpId = helpId == null ? ContextHelpManager.getHelpIDString(src) : helpId;
1542 System.err.println("ALT-F2: helpId=" + helpId);
15911543 }
15921544 };
15931545
16741626 private PreferencesPane prefsPane;
16751627 private PreferencesPane colorPane;
16761628 private ToolManager[] toolManagers;
1677 private DefaultHelpBroker helpBroker;
1629 private HelpBroker helpBroker;
16781630 private LogFile logFile;
16791631 private boolean firstTime;
16801632 private boolean saveOnExit;
00 /*
11 * $Id$
22 *
3 * Copyright (c) 2004, 2009, Oracle and/or its affiliates. All rights reserved.
3 * Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved.
44 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55 *
66 * This code is free software; you can redistribute it and/or modify it
132132 throw new Fault(i18n, "dt.opts.laf.badArg", new Object[] {lafName});
133133 }
134134
135 addArg(lafName);
136
135137 ctx.setPreferredLookAndFeel(laf);
136138 }
137139
2727 package com.sun.javatest.tool;
2828
2929 import java.awt.event.ActionListener;
30 import java.io.BufferedReader;
31 import java.io.BufferedWriter;
32 import java.io.File;
33 import java.io.FileReader;
34 import java.io.FileWriter;
35 import java.io.IOException;
30 import java.io.*;
3631 import java.lang.ref.WeakReference;
32 import java.nio.charset.StandardCharsets;
3733 import java.util.Date;
3834 import java.util.HashMap;
3935 import java.util.Iterator;
222218
223219 if (historyFile.exists()) {
224220 try {
225 BufferedReader br = new BufferedReader(new FileReader(historyFile));
221 BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(historyFile), StandardCharsets.UTF_8));
226222 String line;
227223 while ((line = br.readLine()) != null) {
228224 String p = line.trim();
243239
244240 private void writeEntries() {
245241 try {
246 BufferedWriter bw = new BufferedWriter(new FileWriter(historyFile));
242 BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(historyFile), StandardCharsets.UTF_8));
247243 bw.write("# Configuration File History");
248244 bw.newLine();
249245 bw.write("# written at " + (new Date()));
3939 import java.awt.event.WindowEvent;
4040 import java.beans.PropertyChangeEvent;
4141 import java.beans.PropertyChangeListener;
42 import java.io.BufferedWriter;
43 import java.io.FileWriter;
44 import java.io.OutputStreamWriter;
45 import java.io.Writer;
46 import java.io.IOException;
42 import java.io.*;
43 import java.nio.charset.StandardCharsets;
4744 import java.util.Iterator;
4845 import java.util.Set;
4946 import java.util.Vector;
5047 import java.beans.PropertyChangeListener;
5148 import javax.accessibility.AccessibleContext;
52 import javax.help.JHelpContentViewer;
5349 import javax.swing.AbstractAction;
5450 import javax.swing.Action;
5551 import javax.swing.ActionMap;
7874 import javax.swing.event.MenuListener;
7975 import javax.swing.text.Document;
8076 import javax.swing.text.JTextComponent;
77 import com.sun.javatest.tool.jthelp.JHelpContentViewer;
8178
8279 class FocusMonitor
8380 {
154151 };
155152 }
156153 else
157 out = new BufferedWriter(new FileWriter(reportFile, true));
154 out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(reportFile, true), StandardCharsets.UTF_8));
158155
159156 out.write("---------------------------------------");
160157 out.write(NEWLINE);
2525 */
2626 package com.sun.javatest.tool;
2727
28 import com.sun.javatest.tool.jthelp.HelpBroker;
29 import com.sun.javatest.tool.jthelp.JHelpContentViewer;
30
2831 import java.awt.event.MouseAdapter;
2932 import java.awt.event.MouseEvent;
3033 import java.io.BufferedReader;
3134 import java.io.InputStreamReader;
3235 import java.lang.reflect.Method;
33 import javax.help.HelpBroker;
34 import javax.help.JHelpContentViewer;
3536 import javax.swing.SwingUtilities;
3637
3738 /**
5657 if (!openUrl(getTarget())) {
5758 JHelpContentViewer cv = (JHelpContentViewer) SwingUtilities.getAncestorOfClass(JHelpContentViewer.class, e.getComponent());
5859 HelpBroker hb = (HelpBroker) (cv.getClientProperty(HELPBROKER_FOR_HELPLINK));
59 hb.setCurrentID(getTarget());
60 hb.setDisplayed(true);
60 hb.displayCurrentID(getTarget());
6161 }
6262 }
6363 });
2424 * questions.
2525 */
2626 package com.sun.javatest.tool;
27
28 import com.sun.javatest.tool.jthelp.HelpBroker;
29 import com.sun.javatest.tool.jthelp.JHelpContentViewer;
2730
2831 import java.awt.Color;
2932 import java.awt.Cursor;
3639
3740 import javax.accessibility.Accessible;
3841 import javax.accessibility.AccessibleContext;
39 import javax.help.HelpBroker;
40 import javax.help.JHelpContentViewer;
4142 import javax.swing.JComponent;
4243 import javax.swing.SwingUtilities;
4344
7475 public void mousePressed(MouseEvent e) {
7576 JHelpContentViewer cv = (JHelpContentViewer) SwingUtilities.getAncestorOfClass(JHelpContentViewer.class, e.getComponent());
7677 HelpBroker hb = (HelpBroker) (cv.getClientProperty(HELPBROKER_FOR_HELPLINK));
77 hb.setCurrentID(target);
78 hb.setDisplayed(true);
78 hb.displayCurrentID(target);
7979 }
8080 });
8181 setCursor(new Cursor(Cursor.HAND_CURSOR));
3939 import java.util.ListIterator;
4040 import java.util.TreeMap;
4141
42 import javax.help.DefaultHelpBroker;
43 import javax.help.HelpSet;
44 import javax.help.HelpSetException;
45 import javax.help.JHelpSearchNavigator;
46 import javax.swing.JFrame;
47 import javax.swing.JTextField;
48
4942 import com.sun.javatest.Harness;
5043 import com.sun.javatest.ProductInfo;
51 import com.sun.javatest.util.ExitCount;
44 import com.sun.javatest.tool.jthelp.HelpBroker;
45 import com.sun.javatest.tool.jthelp.HelpSet;
46 import com.sun.javatest.tool.jthelp.JTHelpBroker;
5247 import com.sun.javatest.util.HelpTree;
5348 import com.sun.javatest.util.I18NResourceBundle;
5449 import com.sun.javatest.util.WrapWriter;
288283 }
289284
290285 if (u != null) {
291 try {
292 HelpSet helpSet = new HelpSet(theLoader, u);
293 CustomHelpBroker b = new CustomHelpBroker(helpSet);
294 if (onlineHelpQuery != null && onlineHelpQuery.length() > 0) {
295 b.search(onlineHelpQuery);
296 }
297 else {
298 b.setCurrentID("command.intro.csh");
299 }
300 b.setDisplayed(true);
301 }
302 catch (HelpSetException e) {
303 // TO DO...
286 HelpSet helpSet = new HelpSet(theLoader, u);
287 //CustomHelpBroker b = new CustomHelpBroker(helpSet);
288 HelpBroker b = new JTHelpBroker();
289 if (onlineHelpQuery != null && onlineHelpQuery.length() > 0) {
290 b.displayCurrentID(onlineHelpQuery);
291 }
292 else {
293 b.displayCurrentID("command.intro.csh");
304294 }
305295 }
306296 }
351341
352342 private static I18NResourceBundle i18n = I18NResourceBundle.getBundleForClass(HelpManager.class);
353343
354 private static class CustomHelpBroker
344 /*private static class CustomHelpBroker
355345 extends DefaultHelpBroker
356346 {
357347 CustomHelpBroker(HelpSet hs) {
410400 private Window getHelpWindow() {
411401 return getWindowPresentation().getHelpWindow();
412402 }
413 }
403 }*/
414404 }
3939 import java.util.TreeSet;
4040 import java.util.WeakHashMap;
4141
42 import javax.help.DefaultHelpBroker;
43 import javax.help.HelpBroker;
44 import javax.help.HelpSet;
45
4642 import javax.swing.JButton;
4743 import javax.swing.JComponent;
4844 import javax.swing.JDialog;
6157 import com.sun.javatest.Harness;
6258 import com.sun.javatest.ProductInfo;
6359 import com.sun.javatest.TestSuite;
60 import com.sun.javatest.tool.jthelp.HelpBroker;
61 import com.sun.javatest.tool.jthelp.HelpSet;
62 import com.sun.javatest.tool.jthelp.JTHelpBroker;
6463
6564
6665 class HelpMenu extends JMenu
253252 private void showHelpSet(HelpSet hs) {
254253 HelpBroker hb = getHelpBroker(hs);
255254 if (hb != null) {
256 hb.setDisplayed(true);
257 if (hb instanceof DefaultHelpBroker)
258 ((DefaultHelpBroker) hb).getWindowPresentation().getHelpWindow().toFront();
255 //hb.setDisplayed(true);
256 //if (hb instanceof DefaultHelpBroker)
257 // ((DefaultHelpBroker) hb).getWindowPresentation().getHelpWindow().toFront();
259258 }
260259 else {
261260 // could internationalize this, but the error isn't that helpful because a
267266 private HelpBroker getHelpBroker(HelpSet hs) {
268267 HelpBroker hb = (HelpBroker) (helpBrokerTable.get(hs));
269268 if (hb == null) {
270 int dpi = uif.getDotsPerInch();
271269 //hb = hs.createHelpBroker(); // pres. attributes work with this on JH 2.0_02
272 hb = new DefaultHelpBroker(hs); // needed for pres. attributes in JH 2.0
273 hb.setSize(new Dimension(7*dpi, 9*dpi));
270 hb = new JTHelpBroker();
274271 helpBrokerTable.put(hs, hb);
275272 }
276273 return hb;
401398 else if (cmd.equals(HELP)) {
402399 HelpBroker helpBroker = desktop.getHelpBroker();
403400 if (helpBroker != null) {
404 helpBroker.setCurrentID("jthelp.csh");
405 helpBroker.setDisplayed(true);
406 if (helpBroker instanceof DefaultHelpBroker)
407 ((DefaultHelpBroker) helpBroker).getWindowPresentation().getHelpWindow().toFront();
401 helpBroker.displayCurrentID("jthelp.csh");
408402 }
409403 else {
410404 // could internationalize this, but the error isn't that helpful because a
2525 */
2626 package com.sun.javatest.tool;
2727
28 import java.io.File;
29 import java.io.FileWriter;
30 import java.io.BufferedWriter;
31 import java.io.IOException;
32 import java.io.PrintWriter;
28 import java.io.*;
29 import java.nio.charset.StandardCharsets;
3330 import java.util.ListIterator;
3431
3532 import com.sun.javatest.util.HelpTree;
9491 PrintWriter newLog;
9592
9693 try {
97 FileWriter w = new FileWriter(file);
98 newLog = new PrintWriter(new BufferedWriter(w));
94 newLog = new PrintWriter(new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file), StandardCharsets.UTF_8)));
9995 }
10096 catch (IOException e) {
10197 throw new Fault(i18n, "logm.log.cantOpenFile", e);
00 /*
11 * $Id$
22 *
3 * Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.
3 * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
44 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55 *
66 * This code is free software; you can redistribute it and/or modify it
9393 */
9494 public static void main(String[] args) {
9595 tracing = Boolean.getBoolean("javatest.trace.startup");
96
9697 if (tracing)
9798 traceStartTime = System.currentTimeMillis();
9899
100 if (Boolean.getBoolean("javatest.trace.printargs")) {
101 StringBuilder fullCmd = new StringBuilder();
102 StringBuilder incrementalCmd = new StringBuilder();
103
104 for (String a : args) {
105 fullCmd.append(a);
106 fullCmd.append(" ");
107
108 incrementalCmd.append("// ");
109 incrementalCmd.append(a);
110 incrementalCmd.append("\n");
111 } // for
112
113 System.out.println(fullCmd.toString().trim());
114 System.out.println(incrementalCmd.toString());
115 }
116
99117 String javaVersion = System.getProperty("java.version");
100118 if (javaVersion != null) {
101 String[] oldVersions = {"1.0", "1.1", "1.2", "1.3", "1.4", "1.5"};
119 String[] oldVersions = {"1.0", "1.1", "1.2", "1.3", "1.4", "1.5", "1.6"};
102120 for (int i = 0; i < oldVersions.length; i++) {
103121 if (javaVersion.startsWith(oldVersions[i])) {
104122 // I18N?
105 System.err.println("Please use Java(TM) Standard Edition, Version 6.0 or better to run the JT Harness(TM) harness.");
123 System.err.println("Please use Java(TM) Standard Edition, Version 7.0 or better to run the JT Harness(TM) harness.");
106124 System.exit(1);
107125 }
108126 }
109 }
110
111 try {
112 Class t = Class.forName("javax.help.AbstractHelpAction");
113 }
114 catch (ClassNotFoundException e) {
115 System.err.println("JavaHelp 2.x is required to run the harness, please add it to the classpath or available libraries.");
116 System.exit(1);
117127 }
118128
119129 main0(args);
00 /*
11 * $Id$
22 *
3 * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
3 * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
44 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55 *
66 * This code is free software; you can redistribute it and/or modify it
2525 */
2626 package com.sun.javatest.tool;
2727
28 import com.sun.javatest.util.DynamicArray;
29 import com.sun.javatest.util.I18NResourceBundle;
30 import com.sun.javatest.util.SortedProperties;
2831 import java.io.BufferedInputStream;
2932 import java.io.BufferedOutputStream;
3033 import java.io.File;
3134 import java.io.FileInputStream;
35 import java.io.FileNotFoundException;
3236 import java.io.FileOutputStream;
33 import java.io.FileNotFoundException;
37 import java.io.IOException;
3438 import java.io.InputStream;
35 import java.io.IOException;
3639 import java.io.OutputStream;
37 import java.util.Collection;
3840 import java.util.Enumeration;
3941 import java.util.Hashtable;
40 import java.util.Map;
4142 import java.util.Properties;
42 import java.util.Set;
43
44 import javax.help.HelpBroker;
45 import javax.swing.JFrame;
46 import com.sun.javatest.util.DynamicArray;
47 import com.sun.javatest.util.I18NResourceBundle;
48 import com.sun.javatest.util.SortedProperties;
4943
5044 /**
5145 * A class which provides a collection of user preferences,
8074 return theOne;
8175 }
8276
83 static File getPrefsDir() {
77 public static File getPrefsDir() {
8478 File userDir = new File(System.getProperty("user.home"));
8579 String prefDir = System.getProperty("javatest.preferences.dir", ".javatest");
8680 return new File(userDir, prefDir);
4040 import java.util.Properties;
4141 import java.util.Set;
4242
43 import javax.help.CSH;
44 import javax.help.HelpBroker;
4543 import javax.swing.BorderFactory;
4644 import javax.swing.JButton;
4745 import javax.swing.JComponent;
5755 import javax.swing.tree.TreeModel;
5856 import javax.swing.tree.TreeSelectionModel;
5957 import javax.swing.tree.TreePath;
60 import com.sun.javatest.util.I18NResourceBundle;
58 import com.sun.javatest.tool.jthelp.HelpBroker;
59 import com.sun.javatest.tool.jthelp.ContextHelpManager;
60
6161 import java.awt.event.KeyEvent;
6262 import javax.swing.AbstractAction;
6363 import javax.swing.ActionMap;
9696 * @see PreferencesPane#showDialog
9797 */
9898 protected void setHelp(String helpID) {
99 CSH.setHelpIDString(this, helpID);
99 ContextHelpManager.setHelpIDString(this, helpID);
100100 }
101101
102102 /**
196196 //prefsTreeLeafIcon = uif.createIcon("prefs.leaf");
197197 setName("prefs");
198198 setTitle(uif.getI18NString("prefs.title"));
199 if (helpBroker != null) {
200 helpBroker.enableHelpKey(getRootPane(), "ui.prefs.dialog.csh", null);
201 }
199 KeyStroke keystroke = KeyStroke.getKeyStroke(KeyEvent.VK_F1, 0, false);
200 getRootPane().registerKeyboardAction(new ActionListener() {
201 @Override
202 public void actionPerformed(ActionEvent e) {
203 if (helpBroker != null) {
204 helpBroker.displayCurrentID(ContextHelpManager.getHelpIDString(getRootPane()));
205 }
206 }
207 }, keystroke, JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
208 ContextHelpManager.setHelpIDString(getRootPane(), "ui.prefs.dialog.csh");
202209 Desktop.addHelpDebugListener(this);
203210 uif.setAccessibleDescription(this, "prefs");
204211
3232
3333 import com.sun.javatest.TestSuite;
3434 import com.sun.javatest.WorkDirectory;
35 import com.sun.javatest.tool.jthelp.JTHelpBroker;
3536 import com.sun.javatest.util.FileInfoCache;
3637 import com.sun.javatest.util.I18NResourceBundle;
37 import javax.help.DefaultHelpBroker;
38
3938 /**
4039 *
4140 */
321320 private Component parent;
322321 private boolean approveOpenSelection_dirExists = false;
323322
324 private UIFactory uif = new UIFactory(SelectedWorkDirApprover.class, new DefaultHelpBroker());
323 private UIFactory uif = new UIFactory(SelectedWorkDirApprover.class, new JTHelpBroker());
325324 private static I18NResourceBundle i18n = I18NResourceBundle.getBundleForClass(SelectedWorkDirApprover.class);
326325
327326 private boolean allowNoTemplate = false;
4343 import java.util.Map;
4444 import java.util.Set;
4545
46 import javax.help.CSH;
47
4846 import javax.swing.Action;
4947 import javax.swing.JDialog;
5048 import javax.swing.JFrame;
6159 import javax.swing.event.MenuListener;
6260
6361 import com.sun.javatest.util.PrefixMap;
62 import com.sun.javatest.tool.jthelp.ContextHelpManager;
6463
6564 /**
6665 * A container that presents the current desktop tools in a tabbed pane.
228227 // hands on the new selected tool (if any)
229228 if (selectedTool == null) {
230229 mainFrame.setTitle(uif.getI18NString("dt.title.txt"));
231 CSH.setHelpIDString(contents, null);
230 ContextHelpManager.setHelpIDString(contents, null);
232231 }
233232 else {
234233 //OLD addToolMenuItemsToBasicMenuBar(selectedTool);
235234 addToolMenuItemsToFrameMenuBar(mainFrame, selectedTool);
236235 selectedTool.addObserver(listener);
237236 mainFrame.setTitle(uif.getI18NString("dt.title.tool.txt", selectedTool.getTitle()));
238 CSH.setHelpIDString(contents, CSH.getHelpIDString(selectedTool));
237 ContextHelpManager.setHelpIDString(contents, ContextHelpManager.getHelpIDString(selectedTool));
239238 contents.setSelectedComponent(selectedTool);
240239 }
241240
158158 uif.showError("tsc.cantFindTestSuite", e.getMessage());
159159 }
160160 catch (TestSuite.Fault e) {
161 uif.showError("tsc.notATestSuite", e.getMessage());
161 uif.showError("tsc.unableToOpen", e.getMessage());
162162 }
163163 }
164164
3333 import java.util.List;
3434 import java.util.Map;
3535
36 import javax.help.HelpBroker;
37
3836 import javax.swing.JDialog;
3937 import javax.swing.JMenuBar;
4038 import javax.swing.JPanel;
4139
4240 import com.sun.javatest.TestSuite;
4341 import com.sun.javatest.WorkDirectory;
42 import com.sun.javatest.tool.jthelp.ContextHelpManager;
43 import com.sun.javatest.tool.jthelp.HelpBroker;
4444 import com.sun.javatest.util.DynamicArray;
4545
4646 /**
273273 protected Tool(ToolManager m, String uiKey, String helpID) {
274274 this(m, uiKey);
275275
276 HelpBroker b = getHelpBroker();
277 if (b != null)
278 b.enableHelp(this, helpID, null);
276 ContextHelpManager.setHelpIDString(this, helpID);
279277 }
280278
281279 /**
359357 if (comp instanceof JDialog) {
360358 JDialog d = (JDialog) comp;
361359 Desktop.addHelpDebugListener(d);
362 b.enableHelpKey(d.getRootPane(), helpID, null);
360 b.enableHelpKey(d.getRootPane(), helpID);
361 ContextHelpManager.setHelpIDString(d.getRootPane(), helpID);
362 } else {
363 b.enableHelpKey(comp, helpID);
364 ContextHelpManager.setHelpIDString(comp, helpID);
363365 }
364 else
365 b.enableHelp(comp, helpID, null);
366366 }
367367 }
368368
376376 protected void setHelpOnButton(Component comp, String helpID) {
377377 HelpBroker b = getHelpBroker();
378378 if (b != null)
379 b.enableHelpOnButton(comp, helpID, null);
379 b.enableHelpKey(comp, helpID);
380380 }
381381
382382 /**
3939 import java.awt.Window;
4040 import java.awt.event.ActionEvent;
4141 import java.awt.event.ActionListener;
42 import java.awt.event.KeyEvent;
4243 import java.net.URL;
4344 import java.util.MissingResourceException;
44
45 import javax.help.HelpBroker;
4645
4746 import javax.accessibility.Accessible;
4847 import javax.accessibility.AccessibleContext;
9493 import javax.swing.table.TableModel;
9594
9695 import com.sun.javatest.ProductInfo;
96 import com.sun.javatest.tool.jthelp.ContextHelpManager;
97 import com.sun.javatest.tool.jthelp.HelpBroker;
9798 import com.sun.javatest.util.I18NResourceBundle;
9899 import java.awt.Dialog;
99100 import java.util.Enumeration;
550551 * @param helpID the help ID identifying the context sensitive help for
551552 * the component
552553 */
553 public void setHelp(Component comp, String helpID) {
554 public void setHelp(final Component comp, final String helpID) {
554555 if (helpID == null)
555556 throw new NullPointerException();
556557
557 if (helpBroker != null) {
558 if (comp instanceof JDialog) {
559 JDialog d = (JDialog) comp;
560 Desktop.addHelpDebugListener(d);
561 helpBroker.enableHelpKey(d.getRootPane(), helpID, null);
558 ContextHelpManager.setHelpIDString(comp, helpID);
559
560 if (comp instanceof JDialog) {
561 JDialog d = (JDialog) comp;
562 ContextHelpManager.setHelpIDString(d.getRootPane(), helpID);
563 Desktop.addHelpDebugListener(d);
564
565 final JComponent rootPane = d.getRootPane();
566 KeyStroke keystroke = KeyStroke.getKeyStroke(KeyEvent.VK_F1, 0, false);
567 rootPane.registerKeyboardAction(new ActionListener(){
568 @Override
569 public void actionPerformed(ActionEvent e) {
570 if (helpBroker != null){
571 helpBroker.displayCurrentID(ContextHelpManager.getHelpIDString(rootPane));
572 }
573 }
574 }, keystroke, JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
575
576 }
577 else{
578 if (comp instanceof JComponent){
579 KeyStroke keystroke = KeyStroke.getKeyStroke(KeyEvent.VK_F1, 0, false);
580 ((JComponent)comp).registerKeyboardAction(new ActionListener(){
581
582 @Override
583 public void actionPerformed(ActionEvent e) {
584 if (helpBroker != null){
585 helpBroker.displayCurrentID(ContextHelpManager.getHelpIDString(comp));
586 }
587 }
588 }, keystroke, JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
562589 }
563 else
564 helpBroker.enableHelp(comp, helpID, null);
565 }
590
591 }
592
566593 }
567594
568595 /**
926953 * @return the button that was created
927954 * @see #createButton
928955 */
929 public JButton createHelpButton(String uiKey, String helpID) {
956 public JButton createHelpButton(String uiKey, final String helpID) {
930957 JButton hb = createButton(uiKey);
931 if (helpBroker == null)
932 hb.setEnabled(false);
933 else
934 helpBroker.enableHelpOnButton(hb, helpID, null);
958 hb.addActionListener(new ActionListener() {
959 @Override
960 public void actionPerformed(ActionEvent e) {
961 if (helpBroker != null) {
962 helpBroker.displayCurrentID(helpID);
963 }
964 }
965 });
966
935967 return hb;
936968 }
937969
17001732 * @return the button that was created
17011733 * @see #createButton
17021734 */
1703 public JMenuItem createHelpMenuItem(String uiKey, String helpID) {
1735 public JMenuItem createHelpMenuItem(String uiKey, final String helpID) {
17041736 JMenuItem mi = new JMenuItem(getI18NString(uiKey + ".mit"));
17051737 setMnemonic(mi, uiKey);
1706 if (helpBroker == null)
1707 mi.setEnabled(false);
1708 else
1709 helpBroker.enableHelpOnButton(mi, helpID, null);
1738 mi.addActionListener(new ActionListener() {
1739 @Override
1740 public void actionPerformed(ActionEvent e) {
1741 if (helpBroker != null) {
1742 helpBroker.displayCurrentID(helpID);
1743 }
1744 }
1745 });
1746
17101747 return mi;
17111748 }
17121749
11 # $Id$
22 #
33 #
4 # Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
4 # Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
55 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
66 #
77 # This code is free software; you can redistribute it and/or modify it
226226 dt.logo.icon=images/jtlogo.png
227227 dt.menuBar.desc=Menus for available for use in all JT Harness windows
228228 dt.menuBar.name=Menu Bar
229 dt.opts.name=Desktop
229 dt.opts.name=Desktop
230230 dt.opts.desc=Options for starting the JT Harness graphical user interface
231231 dt.opts.cleanDesktop.desc=(Old) See -newDesktop
232232 dt.opts.cleanDesktop.name=-cleanDesktop
237237 dt.opts.laf.desc=Use specific LookAndFeel for JavaTest graphical user interface. Currently supported: system, sys, metal, nimbus, default (nimbus)
238238 dt.opts.laf.name=-laf
239239 dt.opts.laf.missingArg=Argument for LookAndField (-laf) command. Currently supported: system, sys, metal, nimbus, default (nimbus)
240 dt.opts.laf.badArg=Bas argument for LookAndField (-laf) command. Currently supported: system, sys, metal, nimbus, default (nimbus), found: {0}
240 dt.opts.laf.badArg=Bad argument for LookAndField (-laf) command. Currently supported: system, sys, metal, nimbus, default (nimbus), found: {0}
241241 #dt.prefs.mdi.mne=M
242242 #dt.prefs.mdi.rb=MDI
243243 #dt.prefs.mdi.tip=JT Harness tools are contained within a common frame
292292 dv.restore.cantRestoreTool=Cannot restore tool "{1}" from saved desktop file.\n\nNote: JT Harness restores the last saved state on start up. To prevent this in the future, go to "File" -> "Preferences" -> "Appearance" and deselect the "Save Desktop State on Exit" feature.
293293 dv.restore.cantRestoreTool.err=Cannot restore tool "{0}" from saved desktop file: {1}\n\nNote: JT Harness restores the last saved state on start up. To prevent this in the future, go to "File" -> "Preferences" -> "Appearance" and deselect the "Save Desktop State on Exit" feature.
294294 dv.restore.noMgr=Cannot find specified manager ({1})
295 dv.restore.noMgrClass=No manager specified
295 dv.restore.noMgrClass=No manager specified
296296
297297 env.name=Environment
298298 env.desc=Options for adding values into JT Harness environments
309309 fh.empty=(no previous files)
310310
311311 #help.cmd.ftBody= <test-suite>, <work-directory>, <config-file>
312 #help.cmd.ftHead=\nThe types of file that are recognized are:
312 #help.cmd.ftHead=\nThe types of file that are recognized are:
313313 #help.cmd.optHead=\nThe available options are:
314314
315315 help.cmd.files.desc=Types of files accepted as command line arguments
352352 help.cmd.syntax.string.desc=One or more commands can be put directly on the command line by enclosing them in quotation marks.
353353 help.cmd.syntax.string.name=command string
354354 help.cmd.tail=For complete details and examples, see the JT Harness online help. You can access this directly from the command line with "-onlineHelp <word>...", or you can start the JT Harness harness and use the Help menu. The online help is also available in PDF format in the JT Harness documentation directory.
355 help.copyright.txt=Copyright \u00a9 2005, 2014, Oracle and/or its affiliates. All rights reserved.
355 help.copyright.txt=Copyright \u00a9 2005, 2016, Oracle and/or its affiliates. All rights reserved.
356356 help.onlineHelp.pleaseWait=Opening online help; please wait...
357357 help.version.txt={0}, version {1} {2} {3} ({4}, {5})\nInstalled in {6}\nRunning on platform version {7} from {8}.\nBuilt with {9} on {10}.
358358 help.harnessType.full.txt=(Full)
371371 hm.aboutJava=Java(TM) {0}\n{1}\n{2}\n{3}
372372 hm.aboutJavaTest.mit=About the JT Harness
373373 hm.aboutJavaTest.mne=A
374 hm.aboutJavaTest={0} {1} {2} {3}\n{4}\n\nbuilt with {5}\nbuilt on {6}\n\nOnline help built with JavaHelp(TM) technology.
375 hm.aboutJavaTest.copy.txt=Copyright \u00a9 2005, 2014, Oracle and/or its affiliates. All rights reserved.\nDO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.\n\nThis 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.\n\nThis 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).\n\nYou 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.\n\n 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.
374 hm.aboutJavaTest={0} {1} {2} {3}\n{4}\n\nbuilt with {5}\nbuilt on {6}\n
375 hm.aboutJavaTest.copy.txt=Copyright \u00a9 2005, 2016, Oracle and/or its affiliates. All rights reserved.\nDO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.\n\nThis 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.\n\nThis 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).\n\nYou 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.\n\n 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.
376376 hm.aboutJavaTest.copy.desc=Long version of software copyright notice - multiple paragraphs.
377377 hm.aboutJavaTest.copy.name=Long copyright notice.
378378 hm.aboutJavaTest.text.desc=Build date, author, version, jar file name, copyright info.
404404 http.name=HTTP server
405405 http.desc=Options for the JT Harness HTTP server
406406 http.startHttp.name=-startHttp
407 http.startHttp.desc=Start the internal HTTP server
407 http.startHttp.desc=Start the internal HTTP server
408408
409409 list.add.btn=Add
410410 list.add.tip=Add a new entry to the list
488488 tsc.cantFindTestSuite.err=Cannot find the specified test suite: {0}
489489 tsc.ft=Test Suite
490490 tsc.notATestSuite.err=The file or directory you specified is not a valid test suite. The following error occurred when trying to open it:\n{0}
491 tsc.unableToOpen.err=JavaTest Harness is unable to open the specified test suite.\n\n{0}
491492 tsc.open.btn=Open
492493 tsc.open.tip=Open the selected test suite
493494 tsc.open.mne=O
0 /*
1 * $Id$
2 *
3 * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 *
6 * This code is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 2 only, as
8 * published by the Free Software Foundation. Oracle designates this
9 * particular file as subject to the "Classpath" exception as provided
10 * by Oracle in the LICENSE file that accompanied this code.
11 *
12 * This code is distributed in the hope that it will be useful, but WITHOUT
13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 * version 2 for more details (a copy is included in the LICENSE file that
16 * accompanied this code).
17 *
18 * You should have received a copy of the GNU General Public License version
19 * 2 along with this work; if not, write to the Free Software Foundation,
20 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
21 *
22 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
23 * or visit www.oracle.com if you need additional information or have any
24 * questions.
25 */
26 package com.sun.javatest.tool.jthelp;
27
28 import java.awt.Component;
29 import java.util.WeakHashMap;
30
31 public class ContextHelpManager {
32
33 private static WeakHashMap<Component, String> componentHelpMap = new WeakHashMap<Component, String>();
34
35 public static void setHelpIDString(Component component, String value){
36 componentHelpMap.put(component, value);
37 }
38
39 public static String getHelpIDString(Component component){
40 return componentHelpMap.get(component);
41 }
42
43 }
0 /*
1 * $Id$
2 *
3 * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 *
6 * This code is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 2 only, as
8 * published by the Free Software Foundation. Oracle designates this
9 * particular file as subject to the "Classpath" exception as provided
10 * by Oracle in the LICENSE file that accompanied this code.
11 *
12 * This code is distributed in the hope that it will be useful, but WITHOUT
13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 * version 2 for more details (a copy is included in the LICENSE file that
16 * accompanied this code).
17 *
18 * You should have received a copy of the GNU General Public License version
19 * 2 along with this work; if not, write to the Free Software Foundation,
20 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
21 *
22 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
23 * or visit www.oracle.com if you need additional information or have any
24 * questions.
25 */
26 package com.sun.javatest.tool.jthelp;
27
28 import java.awt.Component;
29
30 public interface HelpBroker {
31 void displayCurrentID(String helpID);
32 void enableHelpKey(final Component component, String helpID);
33 }
0 /*
1 * $Id$
2 *
3 * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 *
6 * This code is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 2 only, as
8 * published by the Free Software Foundation. Oracle designates this
9 * particular file as subject to the "Classpath" exception as provided
10 * by Oracle in the LICENSE file that accompanied this code.
11 *
12 * This code is distributed in the hope that it will be useful, but WITHOUT
13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 * version 2 for more details (a copy is included in the LICENSE file that
16 * accompanied this code).
17 *
18 * You should have received a copy of the GNU General Public License version
19 * 2 along with this work; if not, write to the Free Software Foundation,
20 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
21 *
22 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
23 * or visit www.oracle.com if you need additional information or have any
24 * questions.
25 */
26 package com.sun.javatest.tool.jthelp;
27
28 public class HelpID {
29
30 private String id;
31 private HelpSet hs;
32
33 public static HelpID create(String id, HelpSet hs) {
34 if (hs == null || id == null) {
35 return null;
36 }
37
38 return new HelpID(id, hs);
39 }
40
41 private HelpID(String id, HelpSet hs) {
42 this.id = id;
43 this.hs = hs;
44 }
45
46 public String getId(){
47 return id;
48 }
49
50 public HelpSet getHelpSet(){
51 return hs;
52 }
53 }
0 /*
1 * $Id$
2 *
3 * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 *
6 * This code is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 2 only, as
8 * published by the Free Software Foundation. Oracle designates this
9 * particular file as subject to the "Classpath" exception as provided
10 * by Oracle in the LICENSE file that accompanied this code.
11 *
12 * This code is distributed in the hope that it will be useful, but WITHOUT
13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 * version 2 for more details (a copy is included in the LICENSE file that
16 * accompanied this code).
17 *
18 * You should have received a copy of the GNU General Public License version
19 * 2 along with this work; if not, write to the Free Software Foundation,
20 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
21 *
22 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
23 * or visit www.oracle.com if you need additional information or have any
24 * questions.
25 */
26 package com.sun.javatest.tool.jthelp;
27
28 import javax.xml.stream.XMLInputFactory;
29 import javax.xml.stream.XMLStreamConstants;
30 import javax.xml.stream.XMLStreamException;
31 import javax.xml.stream.XMLStreamReader;
32 import java.io.IOException;
33 import java.net.URL;
34 import java.net.URLConnection;
35 import java.util.ArrayList;
36 import java.util.HashMap;
37
38 public class HelpSet {
39
40 private HashMap<String, URL> localMap;
41 private HashMap<String, URL> combinedMap;
42 private String helpTitle = "HelpSet Title";
43 private ArrayList<HelpSet> helpSets = new ArrayList<>();
44
45 public HelpSet() {
46
47 }
48
49 public String getTitle() {
50 return helpTitle;
51 }
52
53 public HelpSet(ClassLoader loader, URL url) {
54 this(loader, url, "");
55 }
56
57 public HelpSet(ClassLoader loader, URL url, String prefix) {
58
59 XMLStreamReader reader = getXMLReader(url);
60 try {
61 while (reader != null && reader.hasNext()) {
62 int Event = reader.next();
63 switch (Event) {
64 case XMLStreamConstants.START_ELEMENT: {
65 if ("title".equals(reader.getLocalName())) {
66 helpTitle = reader.getElementText();
67 }
68 if ("mapref".equals(reader.getLocalName())) {
69 localMap = new HashMap<>();
70 String mapLocation = reader.getAttributeValue(0);
71 URL u = findHelpSet(loader, prefix + mapLocation);
72 if (u == null) {
73 prefix = prefix + "moreInfo/";
74 u = findHelpSet(loader, prefix + mapLocation);
75 }
76 prefix = prefix + mapLocation.substring(0, mapLocation.lastIndexOf("/") + 1);
77 localMap = parseMap(loader, u, prefix);
78 }
79 }
80 }
81 }
82 } catch (XMLStreamException e) {
83 e.printStackTrace();
84 }
85
86 }
87
88 public void add(HelpSet hs) {
89 helpSets.add(hs);
90 }
91
92 public boolean remove(HelpSet hs) {
93 return helpSets.remove(hs);
94 }
95
96 public ArrayList<HelpSet> getHelpSets() {
97 return helpSets;
98 }
99
100 public HashMap<String, URL> getCombinedMap() {
101 if (combinedMap == null) {
102 combinedMap = new HashMap<>();
103 if (localMap != null) {
104 combinedMap.putAll(localMap);
105 }
106 for (HelpSet hs : helpSets) {
107 combinedMap.putAll(hs.getCombinedMap());
108 }
109 }
110 return combinedMap;
111 }
112
113 private HashMap<String, URL> parseMap(ClassLoader loader, URL url, String prefix) {
114
115 HashMap<String, URL> result = new HashMap<>();
116
117 HashMap<String, String> helpMap = readHelpMap(url);
118 for (String key : helpMap.keySet()) {
119 URL u = findHelpSet(loader, prefix + helpMap.get(key));
120 if (u == null) {
121 u = findHelpSet(loader, helpMap.get(key));
122 }
123 result.put(key, u);
124 }
125
126 return result;
127 }
128
129 public static HashMap<String, String> readHelpMap(URL url) {
130
131 HashMap<String, String> result = new HashMap<>();
132 XMLStreamReader reader = getXMLReader(url);
133
134 try {
135 while (reader != null && reader.hasNext()) {
136 int Event = reader.next();
137 switch (Event) {
138 case XMLStreamConstants.START_ELEMENT: {
139 if ("mapID".equals(reader.getLocalName())) {
140 String target = reader.getAttributeValue(0);
141 String htmlurl = reader.getAttributeValue(1);
142 if (htmlurl.contains("#")) {
143 htmlurl = htmlurl.substring(0, htmlurl.indexOf("#"));
144 }
145 result.put(target, htmlurl);
146 }
147 }
148 }
149 }
150 } catch (XMLStreamException e) {
151 e.printStackTrace();
152 }
153
154 return result;
155 }
156
157 public HashMap<String, URL> getLocalMap() {
158 return localMap;
159 }
160
161 private static XMLStreamReader getXMLReader(URL url) {
162 XMLInputFactory factory = XMLInputFactory.newInstance();
163 factory.setProperty(XMLInputFactory.SUPPORT_DTD, false);
164 URLConnection urlc = null;
165 try {
166 urlc = url.openConnection();
167 } catch (IOException e) {
168 e.printStackTrace();
169 }
170
171 XMLStreamReader reader = null;
172 try {
173 if (urlc != null) {
174 reader = factory.createXMLStreamReader(urlc.getInputStream());
175 }
176 } catch (XMLStreamException | IOException e) {
177 e.printStackTrace();
178 }
179
180 return reader;
181 }
182
183 public static URL findHelpSet(ClassLoader loader, String name) {
184
185 if (loader == null) {
186 return ClassLoader.getSystemClassLoader().getResource(name);
187 }
188
189 URL result = loader.getResource(name);
190
191 if (result == null) {
192 result = loader.getResource("com/sun/javatest/help/" + name);
193 }
194
195 if (result == null && !name.endsWith(".hs")) {
196 result = findHelpSet(loader, name + ".hs");
197 }
198
199 return result;
200
201 }
202 }
0 /*
1 * $Id$
2 *
3 * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 *
6 * This code is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 2 only, as
8 * published by the Free Software Foundation. Oracle designates this
9 * particular file as subject to the "Classpath" exception as provided
10 * by Oracle in the LICENSE file that accompanied this code.
11 *
12 * This code is distributed in the hope that it will be useful, but WITHOUT
13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 * version 2 for more details (a copy is included in the LICENSE file that
16 * accompanied this code).
17 *
18 * You should have received a copy of the GNU General Public License version
19 * 2 along with this work; if not, write to the Free Software Foundation,
20 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
21 *
22 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
23 * or visit www.oracle.com if you need additional information or have any
24 * questions.
25 */
26 package com.sun.javatest.tool.jthelp;
27
28 import javax.accessibility.Accessible;
29 import javax.swing.*;
30 import java.awt.*;
31 import java.io.IOException;
32 import java.net.URL;
33
34 public class JHelpContentViewer extends JPanel implements Accessible {
35
36 private JEditorPane pane;
37 private HelpSet helpSet;
38
39 public JHelpContentViewer(HelpSet hs) {
40 super();
41
42 helpSet = hs;
43 setLayout(new BorderLayout());
44 pane=new JEditorPane();
45 pane.setContentType("text/html");
46 pane.setEditable(false);
47
48 JScrollPane editorScrollPane = new JScrollPane(pane);
49 editorScrollPane.setVerticalScrollBarPolicy(
50 JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
51
52 add(editorScrollPane);
53 updateUI();
54 }
55
56 public void setCurrentID(HelpID helpId){
57
58 URL hurl = helpSet.getLocalMap().get(helpId.getId());
59 if (hurl == null){
60 hurl = helpSet.getCombinedMap().get(helpId.getId());
61 }
62
63 try {
64 if (hurl != null)
65 pane.setPage(hurl);
66 } catch (IOException ioe) {
67 ioe.printStackTrace();
68 }
69 }
70
71 }
0 /*
1 * $Id$
2 *
3 * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 *
6 * This code is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 2 only, as
8 * published by the Free Software Foundation. Oracle designates this
9 * particular file as subject to the "Classpath" exception as provided
10 * by Oracle in the LICENSE file that accompanied this code.
11 *
12 * This code is distributed in the hope that it will be useful, but WITHOUT
13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 * version 2 for more details (a copy is included in the LICENSE file that
16 * accompanied this code).
17 *
18 * You should have received a copy of the GNU General Public License version
19 * 2 along with this work; if not, write to the Free Software Foundation,
20 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
21 *
22 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
23 * or visit www.oracle.com if you need additional information or have any
24 * questions.
25 */
26 package com.sun.javatest.tool.jthelp;
27
28 import com.sun.javatest.ProductInfo;
29 import com.sun.javatest.tool.Preferences;
30
31 import javax.swing.*;
32 import java.awt.*;
33 import java.awt.event.ActionEvent;
34 import java.awt.event.ActionListener;
35 import java.awt.event.KeyEvent;
36 import java.io.*;
37 import java.net.URL;
38 import java.nio.charset.StandardCharsets;
39 import java.util.Enumeration;
40 import java.util.HashMap;
41 import java.util.Scanner;
42 import java.util.jar.JarEntry;
43 import java.util.jar.JarFile;
44
45 public class JTHelpBroker implements HelpBroker{
46
47 private static final String HELP_DIR_NAME = "jthelp";
48 private static final String HELP_VERSION_NAME = "version";
49 private static final String HELP_FILE_PREFIX = "/com/sun/javatest/help/default/";
50 private static final String HELP_FILE_NAME = "map.xml";
51 private HashMap<String, String> helpMap;
52
53 public JTHelpBroker(){
54 this(HelpBroker.class.getResource(HELP_FILE_PREFIX+HELP_FILE_NAME));
55 }
56
57 private JTHelpBroker(URL url){
58 helpMap = HelpSet.readHelpMap(url);
59 }
60
61 public void enableHelpKey(final Component component, String helpID){
62 if (component instanceof JComponent) {
63 KeyStroke keystroke = KeyStroke.getKeyStroke(KeyEvent.VK_F1, 0, false);
64 ((JComponent)component).registerKeyboardAction(new ActionListener() {
65 @Override
66 public void actionPerformed(ActionEvent e) {
67 displayCurrentID(ContextHelpManager.getHelpIDString(component));
68 }
69 }, keystroke, JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
70 }
71 ContextHelpManager.setHelpIDString(component, helpID);
72 }
73
74 private boolean isHelpUpToDate(){
75 File helpDir = new File(Preferences.getPrefsDir(), HELP_DIR_NAME);
76 if (!helpDir.exists()) {
77 return false;
78 }
79 File helpVersion = new File(helpDir, HELP_VERSION_NAME);
80 try {
81 Scanner scanner = new Scanner(helpVersion, StandardCharsets.UTF_8.name());
82 String version = scanner.nextLine();
83 if (version == null || !version.equals(ProductInfo.getVersion()+ProductInfo.getBuildNumber())){
84 return false;
85 }
86 } catch (IOException e) {
87 return false;
88 }
89
90
91 return true;
92 }
93
94 private void unpackHelpIfNeeded(){
95
96 if (isHelpUpToDate()){
97 return;
98 }
99
100 JTHelpProgressBar jtHelpProgressBar = new JTHelpProgressBar(new ProgressTask());
101 jtHelpProgressBar.createAndShowGUI();
102
103 }
104
105 public void displayCurrentID(String helpID){
106
107 unpackHelpIfNeeded();
108
109 try {
110 File helpDir = new File(Preferences.getPrefsDir(), HELP_DIR_NAME);
111 String helpPage = helpMap.get(helpID) != null ? helpMap.get(helpID) : "jthelp.html";
112 StringBuilder address = new StringBuilder();
113 address.append("file:").append(helpDir.getAbsolutePath()).append(HELP_FILE_PREFIX).append(helpPage);
114 URL url = new URL(address.toString());
115 Desktop.getDesktop().browse(url.toURI());
116 } catch (Exception e) {
117 System.err.println("Cannot open JavaTest help file:");
118 System.err.println(e.getMessage());
119 }
120 }
121
122 class ProgressTask extends SwingWorker<Void, Void> {
123 @Override
124 public Void doInBackground() {
125 try {
126 File jarFile = new File(HelpBroker.class.getProtectionDomain().getCodeSource().getLocation().toURI());
127 File destDir = new File(Preferences.getPrefsDir(), HELP_DIR_NAME);
128 File helpVersion = new File(destDir, HELP_VERSION_NAME);
129
130 JarFile jar = new JarFile(jarFile);
131 Enumeration enumEntries = jar.entries();
132
133 int total = 0;
134 while (enumEntries.hasMoreElements()) {
135 JarEntry file = (JarEntry) enumEntries.nextElement();
136 if (isHelpFile(file)) {
137 total++;
138 }
139 }
140
141 if (destDir.exists()){
142 destDir.delete();
143 }
144
145 destDir.mkdir();
146
147 int progress = 0;
148 setProgress((int) (progress * 100.0 / total));
149 enumEntries = jar.entries();
150
151 while (enumEntries.hasMoreElements()) {
152 JarEntry file = (JarEntry) enumEntries.nextElement();
153 File f = new java.io.File(destDir + java.io.File.separator + file.getName());
154 if (isHelpFile(file)) {
155 f.getParentFile().mkdirs();
156 InputStream is = jar.getInputStream(file);
157 FileOutputStream fos = new java.io.FileOutputStream(f);
158 while (is.available() > 0) {
159 fos.write(is.read());
160 }
161 fos.close();
162 is.close();
163 progress++;
164 setProgress((int) (progress * 100.0 / total));
165 }
166 }
167
168 try(PrintWriter out = new PrintWriter(new OutputStreamWriter(new FileOutputStream(helpVersion), StandardCharsets.UTF_8))){
169 out.println(ProductInfo.getVersion()+ProductInfo.getBuildNumber());
170 }
171
172 }
173 catch (Exception e){
174 System.err.println("Cannot unpack JavaTest help files");
175 System.err.println(e.getMessage());
176 }
177
178 return null;
179 }
180
181 private boolean isHelpFile(JarEntry file) {
182 return (file.getName().endsWith(".html")
183 || file.getName().endsWith(".gif")
184 || file.getName().endsWith(".css"));
185 }
186
187 }
188
189 }
0 /*
1 * $Id$
2 *
3 * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 *
6 * This code is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 2 only, as
8 * published by the Free Software Foundation. Oracle designates this
9 * particular file as subject to the "Classpath" exception as provided
10 * by Oracle in the LICENSE file that accompanied this code.
11 *
12 * This code is distributed in the hope that it will be useful, but WITHOUT
13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 * version 2 for more details (a copy is included in the LICENSE file that
16 * accompanied this code).
17 *
18 * You should have received a copy of the GNU General Public License version
19 * 2 along with this work; if not, write to the Free Software Foundation,
20 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
21 *
22 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
23 * or visit www.oracle.com if you need additional information or have any
24 * questions.
25 */
26 package com.sun.javatest.tool.jthelp;
27
28 import com.sun.javatest.tool.UIFactory;
29
30 import javax.swing.*;
31 import java.awt.*;
32 import java.beans.PropertyChangeEvent;
33 import java.beans.PropertyChangeListener;
34
35 public class JTHelpProgressBar extends Component implements PropertyChangeListener {
36
37 private JProgressBar progressBar;
38 private SwingWorker task;
39 private JDialog frame;
40 private JPanel сontentPane;
41 private UIFactory uif;
42
43
44 public JTHelpProgressBar(SwingWorker progressTask) {
45 uif = new UIFactory(this, null);
46
47 task = progressTask;
48 сontentPane = new JPanel(new BorderLayout());
49 JLabel waitText = uif.createLabel("help.wait");
50 progressBar = uif.createProgressBar("help.progress", JProgressBar.HORIZONTAL);
51
52 progressBar.setMinimum(0);
53 progressBar.setMaximum(100);
54 progressBar.setValue(0);
55 progressBar.setStringPainted(true);
56
57 JPanel panel = new JPanel();
58 panel.add(waitText);
59 panel.add(progressBar);
60
61 сontentPane.add(panel, BorderLayout.PAGE_START);
62 }
63
64 public void propertyChange(PropertyChangeEvent evt) {
65 if ("progress".equals(evt.getPropertyName())) {
66 final int progress = (Integer) evt.getNewValue();
67 SwingUtilities.invokeLater(new Runnable() {
68 public void run() {
69 progressBar.setValue(progress);
70 }
71 });
72 }
73 if (SwingWorker.StateValue.DONE == evt.getNewValue()) {
74 SwingUtilities.invokeLater(new Runnable() {
75 public void run() {
76 frame.dispose();
77 }
78 });
79 }
80 }
81
82
83 public void createAndShowGUI() {
84
85 frame = new JDialog();
86 frame.setModal(true);
87 frame.setUndecorated(true);
88 frame.getRootPane().setBorder(BorderFactory.createLineBorder(uif.getI18NColor("help.progress")) );
89
90 сontentPane.setOpaque(true);
91 frame.setContentPane(сontentPane);
92 frame.pack();
93
94 final Toolkit toolkit = Toolkit.getDefaultToolkit();
95 final Dimension screenSize = toolkit.getScreenSize();
96 final int x = (screenSize.width - frame.getWidth()) / 2;
97 final int y = (screenSize.height - frame.getHeight()) / 2;
98 frame.setLocation(x, y);
99
100 task.addPropertyChangeListener(JTHelpProgressBar.this);
101 task.execute();
102
103 frame.setVisible(true);
104
105 }
106
107 }
0 #
1 # $Id$
2 #
3 #
4 # Copyright (c) 2017 Oracle and/or its affiliates. All rights reserved.
5 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 #
7 # This code is free software; you can redistribute it and/or modify it
8 # under the terms of the GNU General Public License version 2 only, as
9 # published by the Free Software Foundation. Oracle designates this
10 # particular file as subject to the "Classpath" exception as provided
11 # by Oracle in the LICENSE file that accompanied this code.
12 #
13 # This code is distributed in the hope that it will be useful, but WITHOUT
14 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16 # version 2 for more details (a copy is included in the LICENSE file that
17 # accompanied this code).
18 #
19 # You should have received a copy of the GNU General Public License version
20 # 2 along with this work; if not, write to the Free Software Foundation,
21 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
22 #
23 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
24 # or visit www.oracle.com if you need additional information or have any
25 # questions.
26 #
27
28 help.wait.lbl=Unpacking help files:
29 help.progress.tip=Please wait
30 help.progress.name=Help Progress
31 help.progress.clr=#eeeeee
3434 import java.io.OutputStream;
3535 import java.io.OutputStreamWriter;
3636 import java.io.Writer;
37 import java.nio.charset.StandardCharsets;
3738 import java.util.Vector;
3839
3940 /**
177178 */
178179 public Writer backupAndOpenWriter(File file) throws IOException, SecurityException {
179180 backup(file);
180 return new BufferedWriter(new FileWriter(file));
181 return new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file), StandardCharsets.UTF_8));
181182 }
182183
183184 /**
231231
232232 FileFilter filter = new LayerFilter(suffix);
233233 File[] layer = parentDir.listFiles(filter);
234 if(number >= maxBackups) {
235 for(int i = 0; i < layer.length; i++) {
236 deleteDir(layer[i]);
237 }
238 }
239 else {
240 for(int i = 0; i < layer.length; i++) {
241 try {
242 String newName;
243 if(number != 0) {
244 newName = layer[i].getCanonicalPath().replaceAll(suffix, newSuffix);
234 if (layer != null) {
235 if (number >= maxBackups) {
236 for (int i = 0; i < layer.length; i++) {
237 deleteDir(layer[i]);
238 }
239 } else {
240 for (int i = 0; i < layer.length; i++) {
241 try {
242 String newName;
243 if (number != 0) {
244 newName = layer[i].getCanonicalPath().replaceAll(suffix, newSuffix);
245 } else {
246 newName = layer[i].getCanonicalPath() + newSuffix;
247 }
248 layer[i].renameTo(new File(newName));
249 } catch (IOException e) {
245250 }
246 else {
247 newName = layer[i].getCanonicalPath() + newSuffix;
248 }
249 layer[i].renameTo(new File(newName));
250 }
251 catch(IOException e) {}
251 }
252252 }
253253 }
254254 }
00 /*
11 * $Id$
22 *
3 * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
3 * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
44 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55 *
66 * This code is free software; you can redistribute it and/or modify it
3030 import java.io.IOException;
3131 import java.io.Writer;
3232 import java.net.URL;
33 import java.net.URLEncoder;
3334
3435 /**
3536 * A class to facilitate writing HTML via a stream.
337338 public void writeLink(File file, String body) throws IOException {
338339 startTag(A);
339340 StringBuffer sb = new StringBuffer();
340 String path = file.getPath().replace(File.separatorChar, '/');
341 String path = file.getPath();
341342 if (file.isAbsolute() && !path.startsWith("/"))
342343 sb.append('/');
343 sb.append(path);
344
345 for (int i = 0; i < path.length(); i++){
346 String pathSymbol = path.charAt(i) == File.separatorChar ? "/" :
347 URLEncoder.encode(String.valueOf(path.charAt(i)), "UTF-8");
348 sb.append(pathSymbol);
349 }
344350 writeAttr(HREF, sb.toString());
345351 write(body);
346352 endTag(A);
394394 ww.flush();
395395 }
396396
397 /**
398 * Sets the comparator which will be used in {@link #find(String[]) find} methods
399 * method
400 * @param comparator Comparator to set
401 */
402 public void setNodeComparator(Comparator<Node> comparator){
403 nodeComparator = comparator;
404 }
405
406 /**
407 * Returns current comparator used in {@link #find(String[]) find} methods
408 * method
409 * @return current node comparator
410 */
411 public Comparator<Node> getNodeComparator(){
412 return nodeComparator;
413 }
414
397415 private void write(WrapWriter out, Map m) throws IOException {
398416 int margin = out.getLeftMargin();
399417 for (Iterator iter = m.entrySet().iterator(); iter.hasNext(); ) {
487505 private static final int ALL = 1;
488506 private static final int ANY = 2;
489507
490 private static Comparator nodeComparator = new Comparator() {
491 public int compare(Object o1, Object o2) {
492 Node n1 = (Node) o1;
493 Node n2 = (Node) o2;
494
508 private Comparator<Node> nodeComparator = new Comparator<Node>() {
509 public int compare(Node n1, Node n2) {
495510 int v = compareStrings(n1.name, n2.name);
496511 return (v != 0 ? v : compareStrings(n1.description, n2.description));
497512 }
2626 package com.sun.javatest.util;
2727
2828 import com.sun.javatest.ResourceLoader;
29
30 import java.security.AccessController;
31 import java.security.PrivilegedAction;
2932 import java.text.MessageFormat;
3033 import java.util.Enumeration;
3134 import java.util.Locale;
111114 private Object getObj(String key) throws MissingResourceException {
112115 try {
113116 if (delegate == null) {
114 delegate = ResourceLoader.getBundle(name, Locale.getDefault(), classLoader);
117 delegate = AccessController.doPrivileged(
118 new PrivilegedAction<ResourceBundle>() {
119 public ResourceBundle run() {
120 return ResourceLoader.getBundle(name, Locale.getDefault(), classLoader);
121 }
122 });
115123 }
116124 return delegate.getObject(key);
117125 } catch (MissingResourceException e) {
118 return ResourceBundle.getBundle(name, Locale.getDefault(), classLoader).getObject(key);
126 ResourceBundle bundle = AccessController.doPrivileged(
127 new PrivilegedAction<ResourceBundle>() {
128 public ResourceBundle run() {
129 return ResourceBundle.getBundle(name, Locale.getDefault(), classLoader);
130 }
131 });
132 return bundle.getObject(key);
119133 }
120134 }
121135
157171 */
158172 public Enumeration getKeys() {
159173 if (delegate == null) {
160 delegate = ResourceLoader.getBundle(name, Locale.getDefault(), classLoader);
174 delegate = AccessController.doPrivileged(
175 new PrivilegedAction<ResourceBundle>() {
176 public ResourceBundle run() {
177 return ResourceLoader.getBundle(name, Locale.getDefault(), classLoader);
178 }
179 });
180
161181 }
162182 if (delegate.getKeys().hasMoreElements()) {
163183 return delegate.getKeys();
164184 }
165 return ResourceBundle.getBundle(name, Locale.getDefault(), classLoader).getKeys();
185
186 ResourceBundle bundle = AccessController.doPrivileged(
187 new PrivilegedAction<ResourceBundle>() {
188 public ResourceBundle run() {
189 return ResourceBundle.getBundle(name, Locale.getDefault(), classLoader);
190 }
191 });
192 return bundle.getKeys();
166193 }
167194
168195 /**
2525 */
2626 package com.sun.javatest.util;
2727
28 import java.io.BufferedReader;
29 import java.io.File;
30 import java.io.FileNotFoundException;
31 import java.io.FileReader;
32 import java.io.IOException;
33 import java.io.Reader;
28 import java.io.*;
29 import java.nio.charset.StandardCharsets;
3430 import java.util.Vector;
3531
3632 /**
8884 public LineParser(File file)
8985 throws FileNotFoundException, IOException
9086 {
91 this(file, new BufferedReader(new FileReader(file)));
87 this(file, new BufferedReader(new InputStreamReader(new FileInputStream(file), StandardCharsets.UTF_8)));
9288 }
9389
9490 /**
2525 */
2626 package com.sun.javatest.util;
2727
28 import java.io.File;
28 import java.io.*;
2929
30 import java.io.FileWriter;
31 import java.io.IOException;
32 import java.io.PrintWriter;
33 import java.io.OutputStreamWriter;
34 import java.io.Writer;
30 import java.nio.charset.StandardCharsets;
3531 import java.text.SimpleDateFormat;
3632 import java.util.Date;
3733
129125 closeWhenDone = false;
130126 }
131127 else {
132 FileWriter fw = null;
128 Writer fw = null;
133129 try {
134130 // open writer in append mode
135 fw = new FileWriter(file, true);
131 fw = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file, true), StandardCharsets.UTF_8));
136132 }
137133 catch (IOException e) {
138134 // oh well
172172 data = new String[0];
173173 }
174174
175 if (key == null)
176 arr = data;
177 else {
178 vec = copyOutOf(data);
179 old = insert(vec, key, value);
180 arr = new String[vec.size()];
181 vec.copyInto(arr);
182 }
175 // key == null is verified
176 vec = copyOutOf(data);
177 old = insert(vec, key, value);
178 arr = new String[vec.size()];
179 vec.copyInto(arr);
183180
184181 return arr;
185182 }
3434 import java.io.File;
3535 import java.lang.reflect.InvocationTargetException;
3636 import java.net.InetAddress;
37 import javax.help.HelpBroker;
38 import javax.help.HelpSet;
3937 import javax.swing.JDialog;
4038 import javax.swing.JFileChooser;
4139 import javax.swing.JFrame;
5856 import com.sun.interview.wizard.Exporter;
5957 import com.sun.interview.wizard.Wizard;
6058 import com.sun.interview.wizard.WizPane;
59 import com.sun.javatest.tool.jthelp.HelpBroker;
60 import com.sun.javatest.tool.jthelp.HelpSet;
61 import com.sun.javatest.tool.jthelp.JTHelpBroker;
6162
6263 public class I18NWizTest extends Interview
6364 {
9394 {
9495 EventQueue.invokeAndWait(new Runnable() {
9596 public void run() {
96 help_hs = new HelpSet();
97 help_hb = help_hs.createHelpBroker();
97 help_hb = new JTHelpBroker();
9898 }
9999 });
100100
3232 import java.awt.event.ActionEvent;
3333 import java.io.File;
3434 import java.io.FileNotFoundException;
35 import javax.help.HelpBroker;
3635 import javax.swing.Action;
3736 import javax.swing.JButton;
3837 import javax.swing.JDialog;
3333 import java.awt.event.ActionListener;
3434 import java.io.File;
3535 import java.io.FileNotFoundException;
36 import javax.help.HelpBroker;
3736 import javax.swing.AbstractButton;
3837 import javax.swing.Action;
3938 import javax.swing.JButton;
3939 import java.util.Vector;
4040 import java.util.logging.Logger;
4141
42 import javax.help.HelpBroker;
4342 import javax.swing.AbstractButton;
4443 import javax.swing.JButton;
4544 import javax.swing.JComponent;