New upstream version 5.0
Emmanuel Bourg
6 years ago
0 | 0 | repo: a621b82029eea89e1fe7feea9ebbac489a6b3866 |
1 | node: 184698ad8757598ad1a850c9a71b1e3ba54743f6 | |
1 | node: 142b98326aafe755c2460af671bcf0ee834b97cc | |
2 | 2 | branch: default |
3 | tag: 4.6 | |
3 | tag: jt5.0 |
0 | 0 | 0ed5ae3cb5a28d91f205755c7f5dfc3e4c976049 4.6b05 |
1 | 1 | 0ed5ae3cb5a28d91f205755c7f5dfc3e4c976049 4.6b05 |
2 | 2 | 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 ---⏎ |
0 | 0 | <?xml version='1.0' encoding='ISO-8859-1' ?> |
1 | 1 | <!-- |
2 | 2 | $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. | |
5 | 5 | DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
6 | ||
6 | ||
7 | 7 | This code is free software; you can redistribute it and/or modify it |
8 | 8 | under the terms of the GNU General Public License version 2 only, as |
9 | 9 | published by the Free Software Foundation. Oracle designates this |
10 | 10 | particular file as subject to the "Classpath" exception as provided |
11 | 11 | by Oracle in the LICENSE file that accompanied this code. |
12 | ||
12 | ||
13 | 13 | This code is distributed in the hope that it will be useful, but WITHOUT |
14 | 14 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
15 | 15 | FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
16 | 16 | version 2 for more details (a copy is included in the LICENSE file that |
17 | 17 | accompanied this code). |
18 | ||
18 | ||
19 | 19 | You should have received a copy of the GNU General Public License version |
20 | 20 | 2 along with this work; if not, write to the Free Software Foundation, |
21 | 21 | Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
22 | ||
22 | ||
23 | 23 | Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
24 | 24 | or visit www.oracle.com if you need additional information or have any |
25 | 25 | questions. |
28 | 28 | |
29 | 29 | <patternset id="i18ntest.packages"> |
30 | 30 | <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"/> | |
32 | 32 | <exclude name="com/sun/jct/utils/i18ncheck/I18NVisitor16.java"/> |
33 | </patternset> | |
33 | </patternset> | |
34 | 34 | |
35 | 35 | <target name="test-i18n" depends="test-i18n-static" description="Runs i18n checking on all JT Harness src"/> |
36 | 36 | <target name="test-i18n-static" depends="test-i18n-dynamic"> |
64 | 64 | </java> |
65 | 65 | </target> |
66 | 66 | <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" | |
68 | 68 | todir="${build.tmp}"/> |
69 | 69 | <java classname="${test.i18n.dynamic.class}" fork="true"> |
70 | 70 | <classpath> |
72 | 72 | </classpath> |
73 | 73 | <arg value="${build.tmp}/i18ncheck"/> |
74 | 74 | <arg value="${BUILD_DIR}/classes/"/> |
75 | <arg value="${BUILD_DIR}/binaries/lib/jh.jar"/> | |
76 | 75 | <arg value="${BUILD_DIR}/binaries/examples/tutorial/demots"/> |
77 | 76 | <arg value="${build.tmp}/demots_wd"/> |
78 | 77 | <arg value="${build.tmp}/demots.jti"/> |
80 | 79 | <arg value="${build.tmp}/services_wd"/> |
81 | 80 | </java> |
82 | 81 | </target> |
83 | ||
84 | ||
82 | ||
83 | ||
85 | 84 | <condition property="jdk6.available"> |
86 | 85 | <contains string="${java.version}" substring="1.6"/> |
87 | </condition> | |
86 | </condition> | |
88 | 87 | <target name="compile.test.i18n" depends="visitor15.compile, visitor16.compile, dist"> |
89 | 88 | <mkdir dir="${build.classes}"/> |
90 | ||
89 | ||
91 | 90 | <javac encoding="iso-8859-1" debug="true" target="1.5" source="1.5" |
92 | 91 | srcdir="${test.dir}" |
93 | 92 | destdir="${build.classes}" |
96 | 95 | </javac> |
97 | 96 | </target> |
98 | 97 | <target name="visitor15.compile" unless="jdk6.available"> |
99 | <mkdir dir="${build.classes}"/> | |
98 | <mkdir dir="${build.classes}"/> | |
100 | 99 | <javac encoding="iso-8859-1" debug="true" target="1.5" source="1.5" |
101 | 100 | srcdir="${test.dir}" |
102 | 101 | destdir="${build.classes}" |
103 | 102 | classpath="${jdk14.classpath}"> |
104 | 103 | <include name="com/sun/jct/utils/i18ncheck/I18NVisitor15.java"/> |
105 | </javac> | |
104 | </javac> | |
106 | 105 | </target> |
107 | 106 | <target name="visitor16.compile" if="jdk6.available"> |
108 | <mkdir dir="${build.classes}"/> | |
107 | <mkdir dir="${build.classes}"/> | |
109 | 108 | <javac encoding="iso-8859-1" debug="true" target="1.5" source="1.5" |
110 | 109 | srcdir="${test.dir}" |
111 | 110 | destdir="${build.classes}" |
24 | 24 | # questions. |
25 | 25 | # |
26 | 26 | |
27 | build.version = 4.6 | |
27 | build.version = 5.0 | |
28 | 28 | build.milestone = dev |
29 | 29 | build.number = b00 |
30 | 30 | |
48 | 48 | javadoc.splitindex = true |
49 | 49 | javadoc.use = true |
50 | 50 | 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. | |
53 | 53 | |
54 | 54 | run.class = com.sun.javatest.tool.Main |
55 | jdk14.classpath = ${jhalljar}:${servletjar} | |
55 | jdk14.classpath = ${servletjar} | |
56 | 56 | jdk11.classpath = ${jcommjar} |
57 | 57 | javadoc.classpath = ${jdk11.classpath}:${jdk14.classpath} |
58 | run.classpath = ${build.classes}:${jhjar} | |
58 | run.classpath = ${build.classes} | |
59 | 59 | |
60 | javahelp.missing = Please specify a 'jhall.jar' location in the 'local.properties' file. | |
61 | 60 | jcomm.missing = Please specify the location of the serial communcations API implementation jar (comm.jar) in the 'local.properties' file. |
62 | 61 | servlet.missing = Please specify a 'servlet.jar' location in the 'local.properties' file. |
63 | 62 | junit.missing = Please specify a 'junitlib' location in the 'local.properties' file. |
0 | 0 | <?xml version='1.0' encoding='ISO-8859-1' ?> |
1 | 1 | <!-- |
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. | |
5 | 3 | DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
6 | ||
4 | ||
7 | 5 | This code is free software; you can redistribute it and/or modify it |
8 | 6 | under the terms of the GNU General Public License version 2 only, as |
9 | 7 | published by the Free Software Foundation. Oracle designates this |
10 | 8 | particular file as subject to the "Classpath" exception as provided |
11 | 9 | by Oracle in the LICENSE file that accompanied this code. |
12 | ||
10 | ||
13 | 11 | This code is distributed in the hope that it will be useful, but WITHOUT |
14 | 12 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
15 | 13 | FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
16 | 14 | version 2 for more details (a copy is included in the LICENSE file that |
17 | 15 | accompanied this code). |
18 | ||
16 | ||
19 | 17 | You should have received a copy of the GNU General Public License version |
20 | 18 | 2 along with this work; if not, write to the Free Software Foundation, |
21 | 19 | Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
22 | ||
20 | ||
23 | 21 | Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
24 | 22 | or visit www.oracle.com if you need additional information or have any |
25 | 23 | questions. |
26 | 24 | --> |
27 | 25 | <project name="jtharness" default="build" basedir=".."> |
28 | ||
26 | ||
29 | 27 | <import file="build-i18ncheck.xml"/> |
30 | 28 | |
31 | 29 | <property file="build/local.properties"/> |
32 | 30 | <property file="build/build.properties"/> |
33 | 31 | |
34 | 32 | <import file="jtlite/build-jtlite.xml"/> |
35 | ||
33 | ||
36 | 34 | <property environment="env"/> |
37 | ||
35 | ||
38 | 36 | <patternset id="helpset"> |
39 | <include name="**/*.hs"/> | |
37 | <include name="**/*.hs"/> | |
40 | 38 | <include name="**/default/**"/> |
41 | 39 | <include name="**/images/**"/> |
42 | 40 | <exclude name="com/sun/javatest/tool/images/spl_*.gif"/> |
43 | 41 | </patternset> |
44 | ||
42 | ||
45 | 43 | <target name="build" depends="dist" description="Creates the build-distribution."/> |
46 | ||
44 | ||
47 | 45 | <target name="clean" description="Removes the entire build-distribution directory."> |
48 | 46 | <delete dir="${BUILD_DIR}"/> |
49 | 47 | </target> |
50 | ||
48 | ||
51 | 49 | <target name="stamp" description="Set up build time properties."> |
52 | 50 | <tstamp> |
53 | 51 | <format property="build.date" pattern="MMMMM dd, yyyy" locale="en"/> |
54 | 52 | <format property="build.date.time" pattern="MMMMM dd, yyyy hh:mm aa" locale="en"/> |
55 | 53 | </tstamp> |
56 | ||
57 | </target> | |
58 | ||
54 | ||
55 | </target> | |
56 | ||
59 | 57 | <presetdef name="buildinfo"> |
60 | 58 | <echo file="${build.classes}/META-INF/buildInfo.txt"># Build info |
61 | 59 | date=${build.date} |
67 | 65 | harness-variety=Full Bundle |
68 | 66 | </echo> |
69 | 67 | </presetdef> |
70 | ||
68 | ||
71 | 69 | <!-- ********** JT Harness *********************************************** --> |
72 | 70 | |
73 | 71 | <property name="src.javatest.help" location="${src.dir}/com/sun/javatest/help"/> |
78 | 76 | --> |
79 | 77 | <property name="build.javatest.help" location="${build.classes}/com/sun/javatest/help"/> |
80 | 78 | <property name="build.javatestAgent.help" location="${build.classes}/com/sun/javatest/agent/help"/> |
81 | ||
79 | ||
82 | 80 | <patternset id="interview.resources"> |
83 | 81 | <include name="com/sun/interview/**/*.properties"/> |
84 | 82 | <include name="com/sun/interview/wizard/*.gif"/> |
85 | 83 | <include name="com/sun/interview/wizard/selectiontree/resources/*.gif"/> |
86 | 84 | </patternset> |
87 | ||
85 | ||
88 | 86 | <patternset id="javatest.resources"> |
89 | 87 | <include name="com/sun/javatest/**/*.properties"/> |
90 | 88 | <include name="com/sun/javatest/**/*.xsd"/> |
92 | 90 | <include name="com/sun/javatest/**/*.css"/> |
93 | 91 | <exclude name="com/sun/javatest/tool/images/spl_*.gif"/> |
94 | 92 | </patternset> |
95 | ||
93 | ||
96 | 94 | <patternset id="javatest.junit.resources"> |
97 | 95 | <include name="com/sun/javatest/junit/**/*.properties"/> |
98 | 96 | </patternset> |
99 | ||
97 | ||
100 | 98 | <patternset id="javatest.packages"> |
101 | 99 | <include name="com/sun/interview/**"/> |
102 | 100 | <include name="com/sun/javatest/**"/> |
103 | 101 | <exclude name="com/sun/javatest/junit/**"/> |
104 | </patternset> | |
102 | <exclude name="com/sun/javatest/agent/SerialPort*.java" unless="jcomm.present"/> | |
103 | </patternset> | |
105 | 104 | |
106 | 105 | <patternset id="test.packages"> |
107 | 106 | <include name="com/sun/jct/utils/copyrightcheck/**" /> |
108 | 107 | </patternset> |
109 | ||
108 | ||
110 | 109 | <patternset id="javatest.jdk11.files"> |
111 | 110 | <include name="com/sun/javatest/Command.java"/> |
112 | 111 | <include name="com/sun/javatest/JavaTestSecurityManager.java"/> |
124 | 123 | <include name="com/sun/javatest/util/FileInfoCache.java"/> |
125 | 124 | <include name="com/sun/javatest/util/ReadAheadIterator.java"/> |
126 | 125 | </patternset> |
127 | ||
126 | ||
128 | 127 | <patternset id="javatest.junit.packages"> |
129 | 128 | <include name="com/sun/javatest/junit/**"/> |
130 | 129 | </patternset> |
131 | ||
130 | ||
132 | 131 | <target name="dist" depends="jar,jar.junit,dist.doc,build-examples,lite,test-copyrights" description="Creates the build-distribution."> |
133 | 132 | <property name="zip.prefix" value="jtharness-${build.version}"/> |
134 | 133 | <property name="zip.root" location="${BUILD_DIR}/tmp/zip/${zip.prefix}"/> |
137 | 136 | <copy todir="${zip.root}"> |
138 | 137 | <fileset dir="${BUILD_DIR}/binaries"/> |
139 | 138 | </copy> |
140 | ||
139 | ||
141 | 140 | <mkdir dir="${BUILD_DIR}/bundles"/> |
142 | 141 | <zip destfile="${BUILD_DIR}/bundles/${zip.prefix}.zip" filesOnly="true" |
143 | 142 | basedir="${zip.root}/.." excludes="${zip.prefix}/examples/*, ${zip.prefix}/examples/"/> |
154 | 153 | <copy todir="${target.legal.dir}"> |
155 | 154 | <fileset dir="${legal.dir}"/> |
156 | 155 | </copy> |
157 | ||
156 | ||
158 | 157 | <property name="target.doc.dir" value="${BUILD_DIR}/binaries/doc"/> |
159 | 158 | <mkdir dir="${target.doc.dir}"/> |
160 | 159 | <copy todir="${target.doc.dir}"> |
174 | 173 | <copy todir="${target.javadoc.dir}"> |
175 | 174 | <fileset dir="${javadoc.dir}"/> |
176 | 175 | </copy> |
177 | ||
176 | ||
178 | 177 | <!-- API docs --> |
179 | 178 | <property name="target.javadoc.dir" value="${target.doc.dir}/api"/> |
180 | 179 | <mkdir dir="${target.javadoc.dir}"/> |
217 | 216 | |
218 | 217 | |
219 | 218 | </target> |
220 | ||
219 | ||
221 | 220 | <!-- JAR Section --> |
222 | 221 | |
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."> | |
224 | 223 | <mkdir dir="${BUILD_DIR}/binaries/lib"/> |
225 | 224 | <jar destfile="${BUILD_DIR}/binaries/lib/javatest.jar" basedir="${build.classes}" index="false"> |
226 | 225 | <manifest> |
227 | 226 | <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}"/> | |
231 | 228 | </manifest> |
232 | 229 | <include name="META-INF/buildInfo.txt"/> |
233 | 230 | <include name="copyright.txt"/> |
235 | 232 | <include name="META-INF/services/com.sun.javatest.report.ReportFormat"/> |
236 | 233 | <patternset refid="javatest.packages"/> |
237 | 234 | </jar> |
238 | <copy file="${jhjar}" todir="${BUILD_DIR}/binaries/lib"/> | |
239 | </target> | |
240 | ||
235 | </target> | |
236 | ||
241 | 237 | <target name="jar.check" depends="compile"> |
242 | 238 | <dependset> |
243 | 239 | <srcfileset dir="${build.classes}"> |
249 | 245 | </dependset> |
250 | 246 | <available property="javatest.jar.ok" file="${BUILD_DIR}/binaries/lib/javatest.jar"/> |
251 | 247 | </target> |
252 | ||
248 | ||
253 | 249 | <!-- JAR - JUnit Support Section --> |
254 | 250 | |
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."> | |
256 | 252 | <mkdir dir="${BUILD_DIR}/binaries/lib"/> |
257 | 253 | <jar destfile="${BUILD_DIR}/binaries/lib/jt-junit.jar" basedir="${build.junit.classes}" index="false"> |
258 | 254 | <manifest> |
263 | 259 | <patternset refid="javatest.junit.packages"/> |
264 | 260 | </jar> |
265 | 261 | </target> |
266 | ||
262 | ||
267 | 263 | <target name="jar.junit.check" depends="compile.junit.classes"> |
268 | 264 | <dependset> |
269 | 265 | <srcfileset dir="${build.junit.classes}"> |
273 | 269 | </dependset> |
274 | 270 | <available property="jt-junit.jar.ok" file="${BUILD_DIR}/binaries/lib/jt-junit.jar"/> |
275 | 271 | </target> |
276 | ||
272 | ||
277 | 273 | <!-- Compilation Section --> |
278 | 274 | |
279 | 275 | <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 | ||
281 | 281 | <target name="compile.classes"> |
282 | <available file="${jhalljar}" type="file" property="javahelp.present"/> | |
283 | <fail unless="javahelp.present" message="${javahelp.missing}"/> | |
284 | ||
285 | ||
282 | ||
286 | 283 | <available file="${jcommjar}" type="file" property="jcomm.present"/> |
287 | <fail unless="jcomm.present" message="${jcomm.missing}"/> | |
288 | ||
284 | <antcall target="compile.serial.warning"/> | |
285 | ||
289 | 286 | <available file="${servletjar}" type="file" property="servlet.present"/> |
290 | 287 | <fail unless="servlet.present" message="${servlet.missing}"/> |
291 | ||
288 | ||
289 | <delete dir="${build.classes}" quiet="true"/> | |
292 | 290 | <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" | |
294 | 292 | srcdir="${src.dir}" |
293 | sourcepath="" | |
295 | 294 | 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}"> | |
303 | 296 | <patternset refid="javatest.packages"/> |
304 | 297 | </javac> |
305 | 298 | <copy todir="${build.classes}"> |
307 | 300 | <include name="copyright.txt"/> |
308 | 301 | </fileset> |
309 | 302 | </copy> |
310 | ||
311 | </target> | |
312 | ||
303 | ||
304 | </target> | |
305 | ||
313 | 306 | <target name="compile.test.copyright.classes"> |
314 | 307 | <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" | |
316 | 309 | srcdir="${test.dir}" |
317 | 310 | destdir="${build.classes}" |
318 | 311 | classpath="${jdk14.classpath}"> |
323 | 316 | <target name="compile.junit.classes" depends="compile.classes,compile.junit.resources"> |
324 | 317 | <available file="${junitlib}" type="file" property="junit.present"/> |
325 | 318 | <fail unless="junit.present" message="${junit.missing}"/> |
326 | ||
319 | ||
327 | 320 | <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" | |
329 | 322 | srcdir="${src.dir}" |
330 | 323 | destdir="${build.junit.classes}" |
331 | 324 | classpath="${jdk14.classpath}:${build.classes}:${bytecodelib}:${junitlib}"> |
332 | 325 | <patternset refid="javatest.junit.packages"/> |
333 | 326 | </javac> |
334 | ||
327 | ||
335 | 328 | <copy todir="${build.junit.classes}"> |
336 | 329 | <fileset dir="${legal.dir}"> |
337 | 330 | <include name="copyright.txt"/> |
338 | 331 | </fileset> |
339 | 332 | </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 | ||
381 | 336 | <target name="compile-javatest.help" depends="compile-javatest.help.main,compile-javatestAgent.help"/> |
382 | ||
337 | ||
383 | 338 | <target name="compile.resources" depends="stamp"> |
384 | 339 | <copy todir="${build.classes}"> |
385 | 340 | <fileset dir="${src.dir}"> |
389 | 344 | </copy> |
390 | 345 | <mkdir dir="${build.classes}/META-INF/"/> |
391 | 346 | <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" /> | |
396 | 347 | <copy file="${src.dir}/com/sun/javatest/tool/i18n.properties" |
397 | 348 | 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"/> | |
400 | 349 | <mkdir dir="${build.classes}/META-INF/services"/> |
401 | 350 | <copy file="${build.dir}/JavaTest.cmdMgrs.lst" tofile="${build.classes}/META-INF/services/com.sun.javatest.tool.CommandManager.lst"/> |
402 | 351 | <copy file="${build.dir}/JavaTest.toolMgrs.lst" tofile="${build.classes}/META-INF/services/com.sun.javatest.tool.ToolManager.lst"/> |
403 | 352 | <copy file="${build.dir}/com.sun.javatest.report.ReportFormat" tofile="${build.classes}/META-INF/services/com.sun.javatest.report.ReportFormat"/> |
404 | 353 | </target> |
405 | ||
354 | ||
406 | 355 | <target name="compile.junit.resources" depends="stamp"> |
407 | 356 | <copy todir="${build.junit.classes}"> |
408 | 357 | <fileset dir="${src.dir}"> |
412 | 361 | <mkdir dir="${build.classes}/META-INF/"/> |
413 | 362 | <buildinfo/> |
414 | 363 | </target> |
415 | ||
416 | ||
364 | ||
365 | ||
417 | 366 | <target name="run" depends="compile" description="Run application."> |
418 | 367 | <fail unless="run.class">${run.class.missing}</fail> |
419 | 368 | <java fork="true" classname="${run.class}"> |
422 | 371 | </classpath> |
423 | 372 | </java> |
424 | 373 | </target> |
425 | ||
374 | ||
426 | 375 | <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 | ||
427 | 380 | <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}" | |
429 | 382 | nonavbar="${javadoc.nonavbar}" |
430 | 383 | noindex="${javadoc.noindex}" splitindex="${javadoc.splitindex}" author="${javadoc.author}" |
431 | 384 | version="${javadoc.version}" |
432 | 385 | windowtitle="${javadoc.windowtitle}" private="${javadoc.private}" |
433 | additionalparam="${javadoc.additionalparam}" failonerror="true" | |
386 | additionalparam="${javadoc.add}" failonerror="true" | |
434 | 387 | useexternalfile="true"> |
435 | 388 | <classpath> |
436 | <path path="${jhjar}:${jcommjar}:${ant.home}/lib/ant.jar"/> | |
389 | <path path="${jcommjar}:${ant.home}/lib/ant.jar"/> | |
437 | 390 | </classpath> |
438 | 391 | <sourcepath> |
439 | 392 | <pathelement location="${src.dir}"/> |
452 | 405 | <package name="com.sun.javatest.report" /> |
453 | 406 | </javadoc> |
454 | 407 | </target> |
455 | ||
408 | ||
456 | 409 | <target name="test" depends="jar,test-nohead,test-i18n,test-copyrights,test-sanity" description="Runs test on JT Harness."> |
457 | 410 | <java fork="true" failonerror="true" classname="${run.class}"> |
458 | 411 | <classpath> |
459 | <path path="${jhalljar}"/> | |
460 | 412 | <path path="${BUILD_DIR}/binaries/lib/javatest.jar"/> |
461 | 413 | </classpath> |
462 | 414 | <arg value="-version"/> |
463 | 415 | </java> |
464 | 416 | </target> |
465 | ||
417 | ||
466 | 418 | <target name="test-sanity" depends="test-sanity-version,test-sanity-simpletck" /> |
467 | 419 | |
468 | 420 | <target name="test-sanity-version" depends="jar"> |
470 | 422 | outputproperty="test.sanity.version.output" |
471 | 423 | resultproperty="test.sanity.version.result"> |
472 | 424 | <classpath> |
473 | <path path="${jhalljar}"/> | |
474 | 425 | <path path="${BUILD_DIR}/binaries/lib/javatest.jar"/> |
475 | 426 | </classpath> |
476 | 427 | <arg value="-version"/> |
500 | 451 | outputproperty="test.sanity.simpletck.output" |
501 | 452 | resultproperty="test.sanity.simpletck.result"> |
502 | 453 | <classpath> |
503 | <path path="${jhalljar}" /> | |
504 | 454 | <path path="${libs}/demots.jar" /> |
505 | 455 | <path path="${libs}/demoapi.jar" /> |
506 | 456 | </classpath> |
527 | 477 | <target name="test-nohead" depends="dist" description="Runs all tests, which do not need display"> |
528 | 478 | <antcall target="test-statusmsg"/> |
529 | 479 | </target> |
530 | ||
480 | ||
531 | 481 | <target name="test-statusmsg" depends="jar" description="Tests the message string filtering of the Status class"> |
532 | 482 | <junit fork="no" haltonerror="off" printsummary="withOutAndErr" filtertrace="off" showoutput="on"> |
533 | 483 | <classpath> |
537 | 487 | </junit> |
538 | 488 | </target> |
539 | 489 | |
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" > | |
541 | 491 | <!-- copy across the help files --> |
542 | 492 | <delete dir="${build.javatest.help}"/> |
543 | 493 | <mkdir dir="${build.tmp}"/> |
544 | ||
494 | ||
545 | 495 | <copy todir="${build.javatest.help}" > |
546 | 496 | <fileset dir="${src.dir}/com/sun/javatest/help/"> |
547 | 497 | <patternset refid="helpset"/> |
552 | 502 | <patternset refid="helpset"/> |
553 | 503 | </fileset> |
554 | 504 | </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 | ||
586 | 507 | <target name="check-javatest.help"> |
587 | 508 | <dependset> |
588 | 509 | <srcfileset dir="${src.javatest.help}" /> |
589 | 510 | <targetfileset dir="${build.javatest.help}" /> |
590 | 511 | </dependset> |
591 | 512 | <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" > | |
594 | 515 | <!-- copy across the help files --> |
595 | 516 | <copy todir="${build.javatestAgent.help}"> |
596 | 517 | <fileset dir="${src.dir}/com/sun/javatest/agent/help/"> |
598 | 519 | <exclude name="**/*.tif"/> |
599 | 520 | </fileset> |
600 | 521 | </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 | ||
631 | 524 | <target name="check-javatestAgent.help"> |
632 | 525 | <dependset> |
633 | 526 | <srcfileset dir="${src.javatestAgent.help}" /> |
634 | 527 | <targetfileset dir="${build.javatestAgent.help}" /> |
635 | 528 | </dependset> |
636 | 529 | <available property="javatestAgent.help.ok" file="${build.javatestAgent.help}/default/map.xml"/> |
637 | </target> | |
530 | </target> | |
638 | 531 | <!-- ********** 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 | ||
653 | 533 | <target name="compile-jct.utils"> |
654 | <mkdir dir="${build.classes}"/> | |
534 | <mkdir dir="${build.classes}"/> | |
655 | 535 | <javac encoding="iso-8859-1" debug="true" source="1.4" |
656 | srcdir="${src.dir}" | |
536 | srcdir="${src.dir}" | |
657 | 537 | destdir="${build.classes}"> |
658 | 538 | <include name="com/sun/jct/utils/glossarygen/**"/> |
659 | 539 | <include name="com/sun/jct/utils/indexgen/**"/> |
660 | 540 | <include name="com/sun/jct/utils/mapmerge/**"/> |
661 | 541 | </javac> |
662 | 542 | </target> |
663 | ||
543 | ||
664 | 544 | <!-- ********** examples ********************************************** --> |
665 | 545 | <target name="build-examples" depends="build-tutorial"/> |
666 | ||
546 | ||
667 | 547 | <target name="build-tutorial" depends="jar"> |
668 | 548 | <property name="build.examples" location="${BUILD_DIR}/binaries/examples/tutorial"/> |
669 | 549 | <mkdir dir="${build.tmp}/${exam.dir}/demoapi"/> |
670 | 550 | <mkdir dir="${build.tmp}/${exam.dir}/simpleTags"/> |
671 | 551 | <mkdir dir="${build.examples}/demots/lib"/> |
672 | ||
552 | ||
673 | 553 | <javac encoding="iso-8859-1" debug="true" source="1.4" |
674 | srcdir="${exam.dir}/tutorial/demoapi" | |
554 | srcdir="${exam.dir}/tutorial/demoapi" | |
675 | 555 | destdir="${build.tmp}/${exam.dir}/demoapi"> |
676 | 556 | </javac> |
677 | <jar destfile="${build.examples}/demots/lib/demoapi.jar" | |
557 | <jar destfile="${build.examples}/demots/lib/demoapi.jar" | |
678 | 558 | basedir="${build.tmp}/${exam.dir}/demoapi" index="false"> |
679 | 559 | <manifest> |
680 | 560 | <attribute name="Built-By" value="${user.name}"/> |
681 | <attribute name="Main-Class" value="${run.class}"/> | |
561 | <attribute name="Main-Class" value="${run.class}"/> | |
682 | 562 | </manifest> |
683 | 563 | </jar> |
684 | 564 | <copy todir="${build.examples}/demots/lib"> |
685 | 565 | <fileset file="${BUILD_DIR}/binaries/lib/javatest.jar"/> |
686 | <fileset file="${jhjar}"/> | |
687 | </copy> | |
688 | ||
689 | ||
566 | </copy> | |
567 | ||
568 | ||
690 | 569 | <javac encoding="iso-8859-1" debug="true" source="1.4" |
691 | srcdir="${exam.dir}/tutorial/simpleTags" | |
570 | srcdir="${exam.dir}/tutorial/simpleTags" | |
692 | 571 | 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"> | |
694 | 573 | </javac> |
695 | 574 | <copy todir="${build.tmp}/${exam.dir}/simpleTags"> |
696 | 575 | <fileset dir="${exam.dir}/tutorial/simpleTags/src"> |
698 | 577 | <include name="**/*.properties"/> |
699 | 578 | </fileset> |
700 | 579 | </copy> |
701 | ||
702 | <jar destfile="${build.examples}/demots/lib/jtdemots.jar" | |
580 | ||
581 | <jar destfile="${build.examples}/demots/lib/jtdemots.jar" | |
703 | 582 | basedir="${build.tmp}/${exam.dir}/simpleTags" index="false"> |
704 | 583 | <manifest> |
705 | 584 | <attribute name="Built-By" value="${user.name}"/> |
706 | <attribute name="Main-Class" value="${run.class}"/> | |
585 | <attribute name="Main-Class" value="${run.class}"/> | |
707 | 586 | </manifest> |
708 | 587 | </jar> |
709 | 588 | <copy todir="${build.examples}/demots"> |
715 | 594 | <copy todir="${build.examples}/demoapi"> |
716 | 595 | <fileset dir="${exam.dir}/tutorial/demoapi"/> |
717 | 596 | </copy> |
718 | ||
719 | ||
597 | ||
598 | ||
720 | 599 | </target> |
721 | ||
722 | ||
600 | ||
601 | ||
723 | 602 | <target name="build-services-ts" depends="build-tutorial"> |
724 | 603 | <property name="services.ts" location="${BUILD_DIR}/binaries/examples/services_ts"/> |
725 | 604 | <mkdir dir="${build.tmp}/${exam.dir}/services_demo/classes"/> |
727 | 606 | |
728 | 607 | <copy todir="${services.ts}/lib"> |
729 | 608 | <fileset file="${BUILD_DIR}/binaries/lib/javatest.jar"/> |
730 | <fileset file="${jhjar}"/> | |
731 | 609 | <fileset file="${build.examples}/demots/lib/demoapi.jar"/> |
732 | 610 | </copy> |
733 | 611 | |
735 | 613 | <javac encoding="iso-8859-1" debug="true" |
736 | 614 | srcdir="${exam.dir}/services_demo/src" |
737 | 615 | 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"> | |
739 | 617 | </javac> |
740 | 618 | <copy todir="${build.tmp}/${exam.dir}/services_demo/classes"> |
741 | 619 | <fileset dir="${exam.dir}/services_demo/src"> |
760 | 638 | |
761 | 639 | |
762 | 640 | <!-- |
763 | ********** copyright checker ********************************************** | |
641 | ********** copyright checker ********************************************** | |
764 | 642 | --> |
765 | 643 | <property file="build/copyright.properties"/> |
766 | 644 | <target name="test-copyrights" depends="compile.test.copyright.classes"> |
24 | 24 | # questions. |
25 | 25 | # |
26 | 26 | |
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 | ||
33 | 27 | # location of jar with with implementation of java serial communications API |
34 | 28 | jcommjar = comm.jar |
35 | 29 |
+2
-1
99 | 99 | } |
100 | 100 | |
101 | 101 | public boolean isValueValid() { |
102 | return isValidIdentifier(value); | |
102 | return true; | |
103 | //return isValidIdentifier(value); | |
103 | 104 | } |
104 | 105 | |
105 | 106 | protected Question getNext() { |
0 | 0 | /* |
1 | 1 | * $Id$ |
2 | 2 | * |
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. | |
4 | 4 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5 | 5 | * |
6 | 6 | * This code is free software; you can redistribute it and/or modify it |
26 | 26 | package com.sun.interview; |
27 | 27 | |
28 | 28 | import java.io.File; |
29 | import java.util.ArrayList; | |
29 | 30 | import java.util.Map; |
30 | import java.util.Vector; | |
31 | 31 | |
32 | 32 | /** |
33 | 33 | * A {@link Question question} to which the response is one or more filenames. |
112 | 112 | return getValue(); |
113 | 113 | } |
114 | 114 | |
115 | @Override | |
115 | 116 | public String getStringValue() { |
116 | 117 | return join(value); |
117 | 118 | } |
119 | 120 | /** |
120 | 121 | * Set the response to this question to the value represented by |
121 | 122 | * a string-valued argument. |
123 | * @param paths The new value for the question, can be null to set no value. | |
122 | 124 | * @see #getValue |
123 | 125 | */ |
126 | @Override | |
124 | 127 | public void setValue(String paths) { |
125 | 128 | setValue(paths == null ? (File[])null : split(paths)); |
126 | 129 | } |
139 | 142 | } |
140 | 143 | } |
141 | 144 | |
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 | |
142 | 157 | 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 | ||
143 | 180 | return true; |
144 | 181 | } |
145 | 182 | |
183 | @Override | |
146 | 184 | public boolean isValueAlwaysValid() { |
147 | 185 | return false; |
148 | 186 | } |
172 | 210 | |
173 | 211 | /** |
174 | 212 | * 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 | |
177 | 217 | * to this question |
178 | 218 | * @see #getFilters |
179 | 219 | * @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 | } | |
183 | 261 | } |
184 | 262 | |
185 | 263 | /** |
261 | 339 | |
262 | 340 | char sep = (s.indexOf('\n') == -1 ? ' ' : '\n'); |
263 | 341 | |
264 | Vector v = new Vector(); | |
342 | ArrayList v = new ArrayList(); | |
265 | 343 | int start = -1; |
266 | 344 | for (int i = 0; i < s.length(); i++) { |
267 | 345 | if (s.charAt(i) == sep) { |
268 | 346 | if (start != -1) |
269 | v.addElement(new File(s.substring(start, i))); | |
347 | v.add(new File(s.substring(start, i))); | |
270 | 348 | start = -1; |
271 | 349 | } else |
272 | 350 | if (start == -1) |
273 | 351 | start = i; |
274 | 352 | } |
275 | 353 | if (start != -1) |
276 | v.addElement(new File(s.substring(start))); | |
354 | v.add(new File(s.substring(start))); | |
277 | 355 | if (v.size() == 0) |
278 | 356 | return empty; |
279 | 357 | File[] a = new File[v.size()]; |
280 | v.copyInto(a); | |
358 | v.toArray(a); | |
281 | 359 | return a; |
282 | 360 | } |
283 | 361 | |
370 | 448 | private boolean baseRelativeOnly; |
371 | 449 | |
372 | 450 | private FileFilter[] filters; |
451 | private FileFilter[] hintFilters; | |
373 | 452 | |
374 | 453 | private boolean duplicatesAllowed = true; |
375 | 454 | } |
0 | 0 | /* |
1 | 1 | * $Id$ |
2 | 2 | * |
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. | |
4 | 4 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5 | 5 | * |
6 | 6 | * This code is free software; you can redistribute it and/or modify it |
26 | 26 | package com.sun.interview; |
27 | 27 | |
28 | 28 | import com.sun.javatest.TestSuite; |
29 | import com.sun.javatest.tool.jthelp.HelpID; | |
30 | import com.sun.javatest.tool.jthelp.HelpSet; | |
31 | ||
29 | 32 | import java.net.URL; |
30 | 33 | import java.text.MessageFormat; |
34 | import java.util.HashMap; | |
31 | 35 | import java.util.ResourceBundle; |
32 | import javax.help.HelpSet; | |
33 | import javax.help.HelpSetException; | |
34 | import javax.help.Map.ID; | |
35 | 36 | |
36 | 37 | /** |
37 | 38 | * Class that contains a number of static method to work with both JavaTest |
56 | 57 | } |
57 | 58 | |
58 | 59 | /** |
59 | * Get the JavaHelp ID identifying the "more info" help for this | |
60 | * Get the JavaHelp HelpID identifying the "more info" help for this | |
60 | 61 | * 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 | |
62 | 63 | * question, or null if none. |
63 | 64 | */ |
64 | public static ID getHelpID(Question q) { | |
65 | public static HelpID getHelpID(Question q) { | |
65 | 66 | if (q == null) { |
66 | 67 | return null; |
67 | 68 | } |
68 | 69 | 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; | |
71 | 72 | } |
72 | 73 | |
73 | ID helpID = getID(q.getInterview(), q.getKey()); | |
74 | HelpID helpID = getID(q.getInterview(), q.getKey()); | |
74 | 75 | if (helpID != null) { |
75 | 76 | q.setHelpID(helpID); |
76 | 77 | } |
78 | 79 | } |
79 | 80 | |
80 | 81 | /** |
81 | * Creates ID for given interview and question key | |
82 | * Creates HelpID for given interview and question key | |
82 | 83 | * @param i interview |
83 | 84 | * @param key question key |
84 | * @return ID to be used for the question. | |
85 | * @return HelpID to be used for the question. | |
85 | 86 | */ |
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; | |
88 | 89 | if (i.getParent() != null) |
89 | id = getID(i.getParent(), key); | |
90 | helpId = getID(i.getParent(), key); | |
90 | 91 | |
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; | |
94 | 95 | } |
95 | 96 | |
96 | 97 | HelpSet hs = getHelpSet(i); |
97 | 98 | 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; | |
103 | 104 | } |
104 | 105 | } |
105 | 106 | return null; |
109 | 110 | * Get helpsets containing any related documents for this test suite. |
110 | 111 | * By default, the resource names for the help sets are obtained from |
111 | 112 | * getAdditionalDocNames(). |
113 | * @param ts The test suite to look for the docs within. | |
112 | 114 | * @return an array of help sets containing docs associated with this |
113 | 115 | * 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 | |
115 | 117 | * helpsets. |
116 | 118 | */ |
117 | 119 | public static HelpSet[] getAdditionalDocs(TestSuite ts) throws Help.Fault { |
128 | 130 | if (u == null) { |
129 | 131 | throw new Help.Fault(i18n, "ts.cantFindDoc", name); |
130 | 132 | } |
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); | |
137 | 134 | } |
138 | 135 | // only set if all opened OK |
139 | 136 | additionalDocs = docs; |
0 | 0 | /* |
1 | 1 | * $Id$ |
2 | 2 | * |
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. | |
4 | 4 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5 | 5 | * |
6 | 6 | * This code is free software; you can redistribute it and/or modify it |
62 | 62 | * |
63 | 63 | * @param interview - interview object to reset HelpSet |
64 | 64 | * @param object - an instance of javax.help.HelpSet |
65 | * @throws com.sun.interview.Interview.Fault if something went wrong | |
66 | 65 | */ |
67 | 66 | public Object updateHelpSetObject(Interview interview, Object object); |
68 | 67 |
0 | 0 | /* |
1 | 1 | * $Id$ |
2 | 2 | * |
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. | |
4 | 4 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5 | 5 | * |
6 | 6 | * This code is free software; you can redistribute it and/or modify it |
29 | 29 | import java.net.MalformedURLException; |
30 | 30 | import java.net.URL; |
31 | 31 | import java.net.URLClassLoader; |
32 | import java.security.AccessController; | |
33 | import java.security.PrivilegedAction; | |
32 | 34 | import java.text.MessageFormat; |
33 | 35 | import java.util.ArrayList; |
34 | 36 | import java.util.Arrays; |
278 | 280 | // name is not null |
279 | 281 | if (!name.equals(bundleName)) { |
280 | 282 | Class c = getClass(); |
281 | ClassLoader cl = c.getClassLoader(); | |
282 | String rn; | |
283 | final ClassLoader cl = c.getClassLoader(); | |
284 | final String rn; | |
283 | 285 | if (name.startsWith("/")) |
284 | 286 | rn = name.substring(1); |
285 | 287 | else { |
288 | 290 | rn = pn + "." + name; |
289 | 291 | } |
290 | 292 | //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 | }); | |
292 | 299 | bundleName = name; |
293 | 300 | } |
294 | 301 | } |
307 | 314 | * cannot be found. |
308 | 315 | * @see #getResourceBundle |
309 | 316 | */ |
310 | protected void setResourceBundle(String name, File file) | |
317 | protected void setResourceBundle(final String name, File file) | |
311 | 318 | throws MissingResourceException { |
312 | 319 | if (bundleName != null && bundleName.equals(name)) { |
313 | 320 | return; |
314 | 321 | } |
315 | 322 | try { |
316 | 323 | 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 | }); | |
319 | 331 | bundleName = name; |
320 | 332 | } catch (MalformedURLException e) { |
321 | 333 | } |
1977 | 1989 | * possible during construction. It is recommended that you select |
1978 | 1990 | * the most recent version possible when developing a new interview. |
1979 | 1991 | * 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> | |
1981 | 2042 | * |
1982 | 2043 | * @param value Which semantics the interview should use. |
1983 | 2044 | * @see #SEMANTIC_PRE_32 |
1984 | 2045 | * @see #SEMANTIC_VERSION_32 |
2046 | * @see #SEMANTIC_VERSION_43 | |
2047 | * @see #SEMANTIC_VERSION_50 | |
1985 | 2048 | * @see #SEMANTIC_MAX_VERSION |
1986 | 2049 | * @since 3.2 |
1987 | 2050 | * @see #getInterviewSemantics |
2303 | 2366 | trimPath(q); |
2304 | 2367 | predictPath(q); |
2305 | 2368 | //showPath(this, q, 0); |
2369 | verifyPredictPath(); | |
2306 | 2370 | |
2307 | 2371 | if (!pathContains(currPath[currPath.length - 1])) |
2308 | 2372 | setCurrentQuestionFromPath(currPath); |
2309 | 2373 | |
2310 | 2374 | 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 | } | |
2311 | 2386 | } |
2312 | 2387 | |
2313 | 2388 | /* useful debug routine |
2666 | 2741 | public static final int SEMANTIC_VERSION_43 = 2; |
2667 | 2742 | |
2668 | 2743 | /** |
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 | /** | |
2669 | 2756 | * The highest version number currently in use. Note that the compiler |
2670 | 2757 | * will probably inline this during compilation, so you will be locked at |
2671 | 2758 | * the version which you compile against. This is probably a useful |
2672 | 2759 | * behavior in this case. |
2673 | 2760 | * @see #setInterviewSemantics |
2674 | 2761 | */ |
2675 | public static final int SEMANTIC_MAX_VERSION = 2; | |
2762 | public static final int SEMANTIC_MAX_VERSION = 3; | |
2676 | 2763 | |
2677 | 2764 | static class Path { |
2678 | 2765 | void addQuestion(Question q) { |
25 | 25 | */ |
26 | 26 | package com.sun.interview; |
27 | 27 | |
28 | import com.sun.javatest.tool.jthelp.HelpID; | |
29 | import com.sun.javatest.tool.jthelp.HelpSet; | |
30 | ||
28 | 31 | import java.io.File; |
29 | 32 | import java.net.MalformedURLException; |
30 | 33 | import java.net.URL; |
31 | 34 | 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.*; | |
40 | 36 | |
41 | 37 | /** |
42 | 38 | * Implementation of the HelpSetFactory interface which is aware of javax.help |
52 | 48 | } |
53 | 49 | |
54 | 50 | 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)); | |
72 | 62 | } |
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); | |
73 | 68 | } |
74 | 69 | |
75 | 70 | public Object createHelpSetObject(String name, File file) throws Interview.Fault { |
83 | 78 | } |
84 | 79 | HelpSet helpset = new HelpSet(cl, url); |
85 | 80 | return helpset; |
86 | } catch (HelpSetException helpsetexception) { | |
87 | throw new BadHelpFault(i18n, "interview.badHelp", helpsetexception); | |
88 | 81 | } catch (MalformedURLException e) { |
89 | 82 | throw new HelpNotFoundFault(i18n, "interview.cantFindHelp", file.getPath()); |
90 | 83 | } |
93 | 86 | public Object createHelpID(Object hsObject, String target) { |
94 | 87 | if (hsObject != null) { |
95 | 88 | 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); | |
99 | 92 | } |
100 | 93 | } |
101 | 94 | |
121 | 114 | List<HelpSet> helpSetsToRemove = new ArrayList<HelpSet>(); |
122 | 115 | |
123 | 116 | // 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()) { | |
126 | 118 | helpSetsToRemove.add(entry); |
127 | 119 | newHelpSet.add(entry); |
128 | 120 | } // for |
176 | 168 | * This exception is to report problems found while opening a JavaHelp help set. |
177 | 169 | */ |
178 | 170 | public static class BadHelpFault extends Interview.Fault { |
179 | BadHelpFault(ResourceBundle i18n, String s, HelpSetException e) { | |
171 | BadHelpFault(ResourceBundle i18n, String s, Exception e) { | |
180 | 172 | super(i18n, s, e.getMessage()); |
181 | this.exc = e; | |
182 | 173 | } |
183 | ||
184 | /** | |
185 | * The underlying JavaHelp exception. | |
186 | */ | |
187 | public final HelpSetException exc; | |
188 | 174 | } |
189 | 175 | |
190 | 176 | } |
757 | 757 | */ |
758 | 758 | public String getGroupDisplayName(String group) { |
759 | 759 | ResourceBundle b = interview.getResourceBundle(); |
760 | presentationKeys = new HashMap(); | |
761 | 760 | String rn = tag + "." + group + ".group"; |
762 | 761 | |
763 | 762 | try { |
808 | 807 | if (value == null || value.getProperty(key) == null) |
809 | 808 | throw new IllegalArgumentException("No such key: " + key); |
810 | 809 | |
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 | } | |
811 | 825 | constraints.put(key, c); |
812 | 826 | } |
813 | 827 | |
819 | 833 | */ |
820 | 834 | public String getConstraintKeyFromRow(Object[] values) { |
821 | 835 | if (values != null && values.length > 0 ) |
822 | return values[0].toString(); | |
836 | return getKeyPropertyName(values[0].toString()); | |
823 | 837 | else |
824 | 838 | 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; | |
825 | 863 | } |
826 | 864 | |
827 | 865 | /** |
1403 | 1441 | * Constraints allowing a value to be either a boolean or Yes/No response. |
1404 | 1442 | */ |
1405 | 1443 | 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 | ||
1406 | 1450 | public BooleanConstraints() { |
1407 | 1451 | super(); |
1408 | 1452 | } |
248 | 248 | } |
249 | 249 | |
250 | 250 | /** |
251 | * Get the JavaHelp ID identifying the "more info" help for this | |
251 | * Get the HelpID identifying the "more info" help for this | |
252 | 252 | * question, or null if none. |
253 | 253 | * |
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 | |
255 | 255 | * by com.sun.interview.wizard.Help class, if wizard presents. |
256 | 256 | * Subclasses might override this method to return not null value, |
257 | 257 | * 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. | |
259 | 259 | * |
260 | * @return the JavaHelp ID identifying the "more info" help for this | |
260 | * @return the HelpID identifying the "more info" help for this | |
261 | 261 | * question, or null if none. |
262 | 262 | */ |
263 | 263 | public Object getHelpID() { |
267 | 267 | /** |
268 | 268 | * Set HelpID object associated with the Question. |
269 | 269 | * |
270 | * @param object Should be instance of javax.help.Map.ID | |
270 | * @param object Should be instance of HelpID | |
271 | 271 | * |
272 | 272 | */ |
273 | 273 | public void setHelpID(Object object) { |
25 | 25 | */ |
26 | 26 | package com.sun.interview; |
27 | 27 | |
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; | |
37 | 30 | import java.text.MessageFormat; |
38 | 31 | import java.util.Map; |
39 | 32 | import java.util.Iterator; |
210 | 203 | throw new BadArgs(i18n, "wp.noOutput"); |
211 | 204 | } |
212 | 205 | |
213 | Class ic = Class.forName(interviewClassName); | |
206 | Class ic = Class.forName(interviewClassName, true, ClassLoader.getSystemClassLoader()); | |
214 | 207 | Interview interview = (Interview)(ic.newInstance()); |
215 | 208 | Question[] questions; |
216 | 209 | |
232 | 225 | } |
233 | 226 | |
234 | 227 | try { |
235 | Writer out = new FileWriter(outFileName); | |
228 | Writer out = new OutputStreamWriter(new FileOutputStream(outFileName), StandardCharsets.UTF_8); | |
236 | 229 | WizPrint wp = new WizPrint(interview, questions); |
237 | 230 | wp.setShowTags(!path); |
238 | 231 | wp.setShowResponses(path); |
0 | 0 | /* |
1 | 1 | * $Id$ |
2 | 2 | * |
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. | |
4 | 4 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5 | 5 | * |
6 | 6 | * This code is free software; you can redistribute it and/or modify it |
60 | 60 | list.setBaseDirectory(q.getBaseDirectory()); |
61 | 61 | label.setLabelFor(list); |
62 | 62 | |
63 | FileFilter[] filters = q.getFilters(); | |
63 | FileFilter[] filters = q.getHintFilters(); | |
64 | 64 | if (filters == null || filters.length == 0) { |
65 | 65 | list.setFileSelectionMode(JFileChooser.FILES_ONLY); |
66 | 66 | } |
0 | 0 | /* |
1 | 1 | * $Id$ |
2 | 2 | * |
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. | |
4 | 4 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5 | 5 | * |
6 | 6 | * This code is free software; you can redistribute it and/or modify it |
32 | 32 | import javax.swing.JComponent; |
33 | 33 | import javax.swing.JFileChooser; |
34 | 34 | |
35 | import com.sun.interview.DirectoryFileFilter; | |
35 | 36 | import com.sun.interview.ExtensionFileFilter; |
36 | 37 | import com.sun.interview.FileFilter; |
37 | 38 | import com.sun.interview.FileQuestion; |
69 | 70 | strSuggs[i] = suggs[i].getPath(); |
70 | 71 | } |
71 | 72 | |
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, | |
73 | 80 | q, |
74 | 81 | 0, |
75 | 82 | strSuggs, |
159 | 166 | return null; |
160 | 167 | } |
161 | 168 | |
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 | ||
162 | 186 | private static final I18NResourceBundle i18n = I18NResourceBundle.getDefaultBundle(); |
163 | 187 | } |
28 | 28 | import java.awt.BorderLayout; |
29 | 29 | import java.awt.Dimension; |
30 | 30 | 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; | |
36 | 31 | import javax.accessibility.AccessibleContext; |
37 | 32 | import javax.swing.JComponent; |
38 | 33 | import javax.swing.event.AncestorEvent; |
42 | 37 | import com.sun.interview.Help; |
43 | 38 | import com.sun.interview.Interview; |
44 | 39 | 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; | |
45 | 43 | |
46 | 44 | class InfoPanel extends JComponent |
47 | 45 | { |
65 | 63 | } |
66 | 64 | |
67 | 65 | 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) | |
81 | 69 | 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()); | |
85 | 75 | } |
86 | 76 | } |
87 | 77 |
0 | 0 | /* |
1 | 1 | * $Id$ |
2 | 2 | * |
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. | |
4 | 4 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5 | 5 | * |
6 | 6 | * This code is free software; you can redistribute it and/or modify it |
28 | 28 | import java.awt.Component; |
29 | 29 | import java.awt.Dimension; |
30 | 30 | import java.awt.GridBagConstraints; |
31 | import java.awt.GridBagLayout; | |
32 | 31 | import java.awt.KeyboardFocusManager; |
33 | 32 | import java.awt.event.ActionEvent; |
34 | 33 | import java.awt.event.ActionListener; |
39 | 38 | |
40 | 39 | import javax.swing.BorderFactory; |
41 | 40 | import javax.swing.Box; |
41 | import javax.swing.BoxLayout; | |
42 | 42 | import javax.swing.JComponent; |
43 | 43 | import javax.swing.JLabel; |
44 | 44 | import javax.swing.JPanel; |
51 | 51 | |
52 | 52 | import com.sun.interview.PropertiesQuestion; |
53 | 53 | import com.sun.interview.Question; |
54 | import com.sun.javatest.tool.UIFactory; | |
55 | ||
54 | 56 | import java.util.Iterator; |
55 | 57 | import java.util.Set; |
56 | 58 | import javax.swing.CellEditor; |
65 | 67 | |
66 | 68 | tables = new HashMap(); |
67 | 69 | |
68 | panel = new JPanel(new GridBagLayout()); | |
70 | panel = new JPanel(); | |
71 | panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS)); | |
69 | 72 | panel.setName("properties"); |
70 | 73 | panel.setFocusable(false); |
71 | 74 | |
160 | 163 | if (model.getRowCount() == 0) |
161 | 164 | return; |
162 | 165 | |
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); | |
172 | 168 | box.setFocusable(false); |
173 | c.weighty = 1.0; | |
174 | panel.add(box, c); | |
175 | c.weighty = 0.0; | |
169 | panel.add(box); | |
176 | 170 | } |
177 | 171 | |
178 | 172 | // null group is for ungrouped properties |
181 | 175 | label.setName(question.getGroupDisplayName(group)); |
182 | 176 | //label.setDisplayedMnemonic(i18n.getString("int.sldr.mne").charAt(0)); |
183 | 177 | //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); | |
185 | 182 | } |
186 | 183 | /* |
187 | 184 | else { |
191 | 188 | } |
192 | 189 | */ |
193 | 190 | |
194 | if (renderer == null) | |
191 | if (renderer == null || | |
192 | renderer.getQuestion() != question) { | |
195 | 193 | renderer = new RenderingUtilities.PropCellRenderer(question); |
194 | } | |
196 | 195 | |
197 | 196 | JTable table = createTable(model); |
198 | 197 | table.setBorder(BorderFactory.createEtchedBorder()); |
199 | 198 | table.setRowSelectionAllowed(false); |
200 | 199 | table.setColumnSelectionAllowed(false); |
201 | 200 | table.getTableHeader().setReorderingAllowed(false); |
201 | table.setBackground(UIFactory.Colors.WINDOW_BACKGROUND.getValue()); | |
202 | 202 | |
203 | 203 | // setup key column |
204 | 204 | for (int i = 0; i < table.getColumnCount(); i++) { |
211 | 211 | tc.setResizable(true); |
212 | 212 | } |
213 | 213 | |
214 | c.gridy++; | |
215 | 214 | //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); | |
220 | 222 | |
221 | 223 | tables.put(group, table); |
222 | 224 | } |
261 | 263 | super(model); |
262 | 264 | setIntercellSpacing(new Dimension(4,4)); |
263 | 265 | setRowHeight((int)(getRowHeight() * 1.5)); |
266 | setFocusable(false); | |
264 | 267 | } |
265 | 268 | |
266 | 269 | public boolean isCellEditable(int row, int column) { |
268 | 271 | return false; |
269 | 272 | |
270 | 273 | if ( column == 1 && |
271 | question.isReadOnlyValue((String)(getValueAt(row, 0))) ) | |
274 | question.isReadOnlyValue(question.getKeyPropertyName((String)getValueAt(row, 0))) ) | |
272 | 275 | return false; |
273 | 276 | |
274 | 277 | return true; |
317 | 320 | |
318 | 321 | d = d2; |
319 | 322 | } |
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 | ||
320 | 330 | setDataVector(d, headers); |
321 | 331 | } |
322 | 332 | |
339 | 349 | |
340 | 350 | public void setValueAt(Object o, int row, int col) { |
341 | 351 | if (col == 1) { |
342 | String key = (String)(getValueAt(row, 0)); | |
352 | String key = q.getKeyPropertyName((String)(getValueAt(row, 0))); | |
343 | 353 | |
344 | 354 | q.updateProperty(key, (String)o); |
345 | 355 | fireEditedEvent(this, editedListener); |
357 | 367 | |
358 | 368 | protected Runnable valueSaver; |
359 | 369 | protected HashMap tables; |
360 | protected TableCellRenderer renderer; | |
370 | protected RenderingUtilities.PropCellRenderer renderer; | |
361 | 371 | protected PropertiesQuestion question; |
362 | 372 | protected JPanel panel; |
363 | 373 |
0 | 0 | /* |
1 | 1 | * $Id$ |
2 | 2 | * |
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. | |
4 | 4 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5 | 5 | * |
6 | 6 | * This code is free software; you can redistribute it and/or modify it |
29 | 29 | import java.awt.Component; |
30 | 30 | import java.awt.GridBagConstraints; |
31 | 31 | import java.awt.GridBagLayout; |
32 | import java.awt.Dimension; | |
32 | 33 | import java.awt.event.ActionEvent; |
33 | 34 | import java.awt.event.ActionListener; |
34 | 35 | import java.io.File; |
41 | 42 | import javax.swing.JPanel; |
42 | 43 | import javax.swing.JTable; |
43 | 44 | 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; | |
44 | 50 | import javax.swing.event.CellEditorListener; |
45 | 51 | import javax.swing.table.DefaultTableCellRenderer; |
46 | 52 | import javax.swing.table.TableCellEditor; |
53 | import javax.swing.border.LineBorder; | |
47 | 54 | |
48 | 55 | import com.sun.interview.ExtensionFileFilter; |
49 | 56 | import com.sun.interview.FileFilter; |
54 | 61 | import com.sun.interview.PropertiesQuestion.IntConstraints; |
55 | 62 | import com.sun.interview.PropertiesQuestion.StringConstraints; |
56 | 63 | import com.sun.interview.PropertiesQuestion.ValueConstraints; |
64 | import com.sun.javatest.tool.UIFactory; | |
57 | 65 | |
58 | 66 | /** |
59 | 67 | * Utilities for rendering questions. |
71 | 79 | this.q = q; |
72 | 80 | } |
73 | 81 | |
74 | ||
75 | 82 | public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) { |
76 | 83 | assignDelegate(table, row, column); |
77 | 84 | return delegate.getTableCellEditorComponent(table, value, isSelected, row, column); |
180 | 187 | |
181 | 188 | JTextField tf = (JTextField)getComponent(); |
182 | 189 | tf.setText(value.toString()); |
190 | tf.setFocusable(false); | |
183 | 191 | |
184 | 192 | if (vc instanceof IntConstraints) { |
185 | 193 | IntConstraints ic = (IntConstraints)vc; |
227 | 235 | this.rules = rules; |
228 | 236 | } |
229 | 237 | |
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 | ||
230 | 253 | @Override |
231 | 254 | public Component getTableCellEditorComponent(final JTable table, Object value, |
232 | 255 | boolean isSelected, final int row, final int column) { |
239 | 262 | String key = question.getConstraintKeyFromRow(values); |
240 | 263 | |
241 | 264 | 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 | } | |
242 | 283 | |
243 | 284 | final JComboBox cb = ((JComboBox)getComponent()); |
244 | 285 | cb.setEditable(true); |
250 | 291 | |
251 | 292 | String valid = question.isValueValid(key); |
252 | 293 | if (valid != null) { |
253 | cb.setBackground(Color.RED); | |
254 | 294 | cb.setToolTipText(valid); |
255 | 295 | } |
256 | 296 | else |
382 | 422 | } |
383 | 423 | else {} |
384 | 424 | } |
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 | } | |
397 | 425 | else if (rules instanceof FilenameConstraints) { |
398 | 426 | FilenameConstraints strRules = (FilenameConstraints)rules; |
399 | 427 | cb.setEditable(true); |
455 | 483 | |
456 | 484 | private PropertiesQuestion question; |
457 | 485 | private ValueConstraints rules; |
486 | private JCheckBox jCheckBox; | |
487 | private YesNoBox yesNoBox; | |
458 | 488 | } // editor cell |
459 | 489 | |
460 | 490 | |
468 | 498 | |
469 | 499 | public Component getTableCellRendererComponent(JTable table, Object value, |
470 | 500 | 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 | } | |
474 | 535 | // 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; | |
481 | 540 | } |
482 | 541 | |
483 | 542 | PropertiesQuestion q; |
543 | JCheckBox jCheckBox; | |
544 | YesNoBox yesNoBox; | |
545 | JComboBox jComboBox; | |
484 | 546 | } // 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 | } | |
485 | 582 | |
486 | 583 | private static final I18NResourceBundle i18n = I18NResourceBundle.getDefaultBundle(); |
487 | 584 | } |
36 | 36 | import java.awt.event.ActionListener; |
37 | 37 | import java.util.Hashtable; |
38 | 38 | import javax.accessibility.AccessibleContext; |
39 | import javax.help.HelpBroker; | |
40 | 39 | import javax.swing.BorderFactory; |
41 | 40 | import javax.swing.DefaultListCellRenderer; |
42 | 41 | import javax.swing.JButton; |
52 | 51 | import javax.swing.SwingUtilities; |
53 | 52 | import com.sun.interview.Interview; |
54 | 53 | import com.sun.interview.Question; |
54 | import com.sun.javatest.tool.jthelp.HelpBroker; | |
55 | 55 | |
56 | 56 | class SearchDialog extends JDialog |
57 | 57 | { |
165 | 165 | contentPane.add(btns, BorderLayout.SOUTH); |
166 | 166 | |
167 | 167 | if (helpBroker != null) |
168 | helpBroker.enableHelpKey(getRootPane(), helpPrefix + "search.csh", null); | |
168 | helpBroker.enableHelpKey(getRootPane(), helpPrefix + "search.csh"); | |
169 | 169 | |
170 | 170 | pack(); |
171 | 171 | setLocationRelativeTo(parent); |
317 | 317 | else if (cmd.equals(CLOSE)) |
318 | 318 | setVisible(false); |
319 | 319 | else if (cmd.equals(HELP)) { |
320 | helpBroker.setCurrentID(helpPrefix + "search.csh"); | |
321 | helpBroker.setDisplayed(true); | |
320 | helpBroker.displayCurrentID(helpPrefix + "search.csh"); | |
322 | 321 | } |
323 | 322 | } |
324 | 323 | }; |
31 | 31 | import java.awt.event.ActionEvent; |
32 | 32 | import java.awt.event.ActionListener; |
33 | 33 | import java.util.Map; |
34 | import javax.help.HelpBroker; | |
35 | 34 | import javax.accessibility.AccessibleContext; |
36 | 35 | import javax.swing.AbstractAction; |
37 | 36 | import javax.swing.BorderFactory; |
46 | 45 | import com.sun.interview.FinalQuestion; |
47 | 46 | import com.sun.interview.Interview; |
48 | 47 | import com.sun.interview.Question; |
48 | import com.sun.javatest.tool.jthelp.HelpBroker; | |
49 | 49 | |
50 | 50 | /** |
51 | 51 | * A widget comprising the basic panels for a wizard: an index for the |
36 | 36 | import java.awt.event.ActionListener; |
37 | 37 | import java.awt.event.WindowAdapter; |
38 | 38 | 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.*; | |
50 | 40 | import java.lang.reflect.InvocationTargetException; |
51 | 41 | import java.lang.reflect.Method; |
52 | 42 | import java.net.URL; |
43 | import java.nio.charset.StandardCharsets; | |
53 | 44 | import java.util.Properties; |
54 | import javax.help.HelpBroker; | |
55 | import javax.help.HelpSet; | |
56 | 45 | import javax.swing.BorderFactory; |
57 | 46 | import javax.swing.Box; |
58 | 47 | import javax.swing.Icon; |
83 | 72 | import com.sun.interview.Interview; |
84 | 73 | import com.sun.interview.Question; |
85 | 74 | 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; | |
86 | 78 | |
87 | 79 | /** |
88 | 80 | * A wizard to present an {@link Interview interview} consisting of |
120 | 112 | try { |
121 | 113 | UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName()); |
122 | 114 | |
123 | Class ic = (Class.forName(args[0])); | |
115 | Class ic = (Class.forName(args[0], true, ClassLoader.getSystemClassLoader())); | |
124 | 116 | Interview i = (Interview)(ic.newInstance()); |
125 | 117 | Wizard w = new Wizard(i); |
126 | 118 | w.showInFrame(true); |
450 | 442 | helpHelpSet = infoPanel.getHelpSet(); |
451 | 443 | |
452 | 444 | if (helpHelpBroker == null && helpHelpSet != null) |
453 | helpHelpBroker = helpHelpSet.createHelpBroker(); | |
445 | helpHelpBroker = new JTHelpBroker(); | |
454 | 446 | |
455 | 447 | if (helpHelpBroker != null && helpHelpSet != null) |
456 | helpHelpBroker.enableHelpKey(main, helpHelpPrefix + "window.csh", helpHelpSet); | |
448 | helpHelpBroker.enableHelpKey(main, helpHelpPrefix + "window.csh"); | |
457 | 449 | if (infoPanel == null) |
458 | 450 | main.add(body); |
459 | 451 | else |
642 | 634 | if (f.exists() && !okToOverwrite(f)) |
643 | 635 | return; |
644 | 636 | try { |
645 | Writer out = new FileWriter(f); | |
637 | Writer out = new OutputStreamWriter(new FileOutputStream(f), StandardCharsets.UTF_8); | |
646 | 638 | WizPrint w = new WizPrint(interview, interview.getPath()); |
647 | 639 | w.setShowResponses(true); |
648 | 640 | w.write(out); |
683 | 675 | * Handle the "help" action |
684 | 676 | */ |
685 | 677 | private void performHelp() { |
686 | helpHelpBroker.setCurrentID(helpHelpPrefix + "intro.csh"); | |
687 | helpHelpBroker.setDisplayed(true); | |
678 | helpHelpBroker.displayCurrentID(helpHelpPrefix + "intro.csh"); | |
688 | 679 | } |
689 | 680 | |
690 | 681 | /** |
1 | 1 | # $Id$ |
2 | 2 | # |
3 | 3 | # |
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. | |
5 | 5 | # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
6 | 6 | # |
7 | 7 | # This code is free software; you can redistribute it and/or modify it |
64 | 64 | file.lbl=File: |
65 | 65 | file.mne=F |
66 | 66 | 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 | |
67 | 72 | |
68 | 73 | find.case.ckb=Consider case |
69 | 74 | find.case.mne=D |
25 | 25 | */ |
26 | 26 | package com.sun.javatest; |
27 | 27 | |
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.*; | |
38 | 29 | import java.net.URL; |
39 | 30 | import java.net.URLClassLoader; |
31 | import java.nio.charset.StandardCharsets; | |
40 | 32 | import java.text.MessageFormat; |
41 | 33 | import java.util.Properties; |
42 | 34 | import java.util.ResourceBundle; |
536 | 528 | wp.setShowResponses(true); |
537 | 529 | wp.setShowResponseTypes(false); |
538 | 530 | wp.setShowTags(true); |
539 | BufferedWriter out = new BufferedWriter(new FileWriter(logFile)); | |
531 | BufferedWriter out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(logFile), StandardCharsets.UTF_8)); | |
540 | 532 | wp.write(out); |
541 | 533 | } |
542 | 534 |
25 | 25 | */ |
26 | 26 | package com.sun.javatest; |
27 | 27 | |
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; | |
45 | 30 | import java.util.HashSet; |
46 | 31 | import java.util.Set; |
47 | 32 | |
268 | 253 | } |
269 | 254 | |
270 | 255 | if (src.getName().endsWith(".html")) { |
271 | in = new BufferedReader(new FileReader(src)); | |
256 | in = new BufferedReader(new InputStreamReader(new FileInputStream(src), StandardCharsets.UTF_8)); | |
272 | 257 | if (dest.equals(src)) { |
273 | 258 | int size = (int)(src.length()); |
274 | 259 | char data[] = new char[size]; |
279 | 264 | String s = new String(data, 0, data.length); |
280 | 265 | in = new StringReader(s); |
281 | 266 | } |
282 | out = new BufferedWriter(new FileWriter(dest)); | |
267 | out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(dest), StandardCharsets.UTF_8)); | |
283 | 268 | currFile = src; |
284 | 269 | line = 1; |
285 | 270 | edit(in, out); |
0 | 0 | /* |
1 | 1 | * $Id$ |
2 | 2 | * |
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. | |
4 | 4 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5 | 5 | * |
6 | 6 | * This code is free software; you can redistribute it and/or modify it |
25 | 25 | */ |
26 | 26 | package com.sun.javatest; |
27 | 27 | |
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; | |
38 | 30 | import java.util.Arrays; |
39 | 31 | import java.util.HashMap; |
40 | 32 | import java.util.Iterator; |
65 | 57 | /** |
66 | 58 | * Test if a file appears to be for an exclude list, by checking the extension. |
67 | 59 | * @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. | |
69 | 61 | */ |
70 | 62 | public static boolean isExcludeFile(File f) { |
71 | 63 | return f.getPath().endsWith(EXCLUDEFILE_EXTN); |
106 | 98 | { |
107 | 99 | setStrictModeEnabled(strict); |
108 | 100 | 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)); | |
111 | 102 | try { |
112 | 103 | Parser p = new Parser(in); |
113 | 104 | Entry e; |
118 | 109 | } |
119 | 110 | finally { |
120 | 111 | in.close(); |
121 | fr.close(); | |
122 | 112 | } |
123 | 113 | } |
124 | 114 | } |
612 | 602 | maxPlatformWidth = Math.max(platformsToString(entry).length(), maxPlatformWidth); |
613 | 603 | } |
614 | 604 | |
615 | BufferedWriter out = new BufferedWriter(new FileWriter(f)); | |
605 | BufferedWriter out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(f), StandardCharsets.UTF_8)); | |
616 | 606 | out.write("# Exclude List"); |
617 | 607 | out.newLine(); |
618 | 608 | out.write("# SCCS %" + 'W' + "% %" + 'E' + "%"); // TAKE CARE WITH SCCS HEADERS |
25 | 25 | */ |
26 | 26 | package com.sun.javatest; |
27 | 27 | |
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; | |
34 | 30 | import java.util.Iterator; |
35 | 31 | |
36 | 32 | import com.sun.javatest.util.I18NResourceBundle; |
73 | 69 | throws FileNotFoundException, IOException |
74 | 70 | { |
75 | 71 | 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)); | |
77 | 73 | p.load(in); |
78 | 74 | in.close(); |
79 | 75 | |
106 | 102 | * <dd>Specify the test suite |
107 | 103 | * <dt><code>-keywords</code> <i>expr</i> |
108 | 104 | * <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> | |
110 | 106 | * <dd>Specify the status values used to select tests at runtime. |
111 | 107 | * <i>status-list</i> should be a comma-separated list of words from |
112 | 108 | * the following list: |
0 | 0 | /* |
1 | 1 | * $Id$ |
2 | 2 | * |
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. | |
4 | 4 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5 | 5 | * |
6 | 6 | * This code is free software; you can redistribute it and/or modify it |
37 | 37 | import com.sun.javatest.util.DynamicArray; |
38 | 38 | import com.sun.javatest.util.I18NResourceBundle; |
39 | 39 | import com.sun.javatest.util.ReadAheadIterator; |
40 | import java.util.HashMap; | |
41 | import java.util.Set; | |
40 | 42 | |
41 | 43 | /** |
42 | 44 | * The object responsible for coordinating the execution of a test run. |
590 | 592 | throw new Fault(i18n, "harness.alreadyRunning"); |
591 | 593 | |
592 | 594 | worker = new Thread() { |
595 | @Override | |
593 | 596 | public void run() { |
594 | 597 | boolean ok = false; |
595 | 598 | try { |
689 | 692 | env.putUrlAndFile("testSuiteRootDir", testSuite.getRootDir()); |
690 | 693 | } |
691 | 694 | |
695 | ||
696 | // notify the test suite we are starting | |
697 | testSuite.starting(this); | |
698 | notifier.startingTestRun(params); | |
699 | ||
692 | 700 | 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); | |
719 | 701 | raTestIter = getTestsIterator(testIter); |
720 | 702 | |
721 | 703 | // autostopThreshold is currently defined by a system property, |
723 | 705 | if (autostopThreshold > 0) |
724 | 706 | addObserver(new Autostop(autostopThreshold)); |
725 | 707 | |
726 | // notify the test suite we are starting | |
727 | testSuite.starting(this); | |
728 | ||
729 | notifier.startingTestRun(params); | |
730 | ||
731 | 708 | TestRunner r = testSuite.createTestRunner(); |
732 | ||
733 | 709 | r.setWorkDirectory(workDir); |
734 | 710 | r.setBackupPolicy(backupPolicy); |
735 | 711 | r.setEnvironment(env); |
785 | 761 | TestFilter[] filters = params.getFilters(); |
786 | 762 | // no tests are in the error, pass, fail categories -> none selected |
787 | 763 | notifyError(i18n, "harness.noTests", |
788 | formatFilterList(listFilterNames(filters))); | |
764 | new Object[] { | |
765 | formatFilterList(listFilterNames(filters)), | |
766 | testIter.getRejectCount(), | |
767 | formatFilterStats(params.getTests(), testIter) | |
768 | }); | |
789 | 769 | ok = false; |
790 | 770 | } |
791 | 771 | else { |
891 | 871 | return sb.toString(); |
892 | 872 | } |
893 | 873 | |
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 | ||
894 | 915 | |
895 | 916 | private void notifyError(I18NResourceBundle i18n, String key) { |
896 | 917 | notifyLocalizedError(i18n.getString(key)); |
0 | 0 | /* |
1 | 1 | * $Id$ |
2 | 2 | * |
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. | |
4 | 4 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5 | 5 | * |
6 | 6 | * This code is free software; you can redistribute it and/or modify it |
747 | 747 | Vector v = new Vector(); |
748 | 748 | |
749 | 749 | TestFilter excludeFilter = getExcludeListFilter(); |
750 | if (excludeFilter != null) | |
750 | if (excludeFilter != null) { | |
751 | 751 | v.addElement(excludeFilter); |
752 | } | |
752 | 753 | |
753 | 754 | TestFilter keywordFilter = getKeywordsFilter(); |
754 | if (keywordFilter != null) | |
755 | if (keywordFilter != null) { | |
755 | 756 | v.addElement(keywordFilter); |
757 | } | |
756 | 758 | |
757 | 759 | TestFilter statusFilter = getPriorStatusFilter(); |
758 | if (statusFilter != null) | |
760 | if (statusFilter != null) { | |
759 | 761 | 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) { | |
766 | 776 | return null; |
767 | else if (equal(v, cachedTestFilters)) | |
777 | } | |
778 | else if (equal(v, cachedTestFilters)) { | |
768 | 779 | return cachedTestFilters; |
780 | } | |
769 | 781 | else { |
770 | 782 | TestFilter[] filters = new TestFilter[v.size()]; |
771 | 783 | v.copyInto(filters); |
46 | 46 | import java.io.PrintWriter; |
47 | 47 | import java.io.StringReader; |
48 | 48 | import java.io.StringWriter; |
49 | import java.nio.charset.StandardCharsets; | |
49 | 50 | import java.util.HashMap; |
50 | 51 | import java.util.HashSet; |
51 | 52 | import java.util.Iterator; |
134 | 135 | processQuestionFromSet(templateData, allQuestionMap, actual.keySet(), actual); |
135 | 136 | |
136 | 137 | 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()); | |
139 | 140 | pm.makeConflictsReport(psConflicts); |
140 | 141 | pm.makeUpdatesReport(psUpdates); |
141 | 142 | updateAll(); |
740 | 741 | if (is == null) { |
741 | 742 | return ""; |
742 | 743 | } |
743 | r = new BufferedReader(new InputStreamReader(is)); | |
744 | r = new BufferedReader(new InputStreamReader(is, StandardCharsets.UTF_8)); | |
744 | 745 | |
745 | 746 | String line; |
746 | 747 | while( (line = r.readLine()) != null ) |
0 | 0 | /* |
1 | 1 | * $Id$ |
2 | 2 | * |
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. | |
4 | 4 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5 | 5 | * |
6 | 6 | * This code is free software; you can redistribute it and/or modify it |
83 | 83 | * @param text if the type is one of "all of" or "any of", text should |
84 | 84 | * be a white-space separated list of keywords; if type is "expr", |
85 | 85 | * text should be a boolean valued expression formed from |
86 | * keywords, '&' (and), '|' (or), '!' (not) and '(' ')' (parentheses). | |
86 | * keywords, '&' (and), '|' (or), '!' (not) and '(' ')' (parentheses). | |
87 | 87 | * @return A Keywords object for the specified type and text. |
88 | 88 | * @throws Keywords.Fault if there are errors in the arguments. |
89 | 89 | */ |
97 | 97 | * @param text if the type is one of "all of" or "any of", text should |
98 | 98 | * be a white-space separated list of keywords; if type is "expr", |
99 | 99 | * text should be a boolean valued expression formed from |
100 | * keywords, '&' (and), '|' (or), '!' (not) and '(' ')' (parentheses). | |
100 | * keywords, '&' (and), '|' (or), '!' (not) and '(' ')' (parentheses). | |
101 | 101 | * @param validKeywords a set of valid keywords for this test suite, |
102 | 102 | * or null. |
103 | 103 | * If not null, all the keywords in <i>text</i> must be in this set. |
109 | 109 | if (text == null) { |
110 | 110 | text = ""; |
111 | 111 | } |
112 | if (type == null || type.equals("ignore")) | |
112 | ||
113 | Keywords result = null; | |
114 | if (type == null || type.equals("ignore")) { | |
113 | 115 | 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 | } | |
118 | 126 | else if (type.equals(EXPR)) { |
119 | 127 | 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 { | |
123 | 133 | 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; | |
125 | 155 | |
126 | 156 | /** |
127 | 157 | * A constant to indicate that all of a list of keywords should be matched. |
257 | 287 | * @param s |
258 | 288 | * @return |
259 | 289 | */ |
290 | @Override | |
260 | 291 | public boolean accepts(Set s) { |
261 | 292 | return s.containsAll(keys); |
262 | 293 | } |
263 | 294 | |
295 | @Override | |
264 | 296 | public String toString() { |
265 | 297 | return "all of (" + allKwds + ")"; |
266 | 298 | } |
276 | 308 | * @param s - the set |
277 | 309 | * @return false, if none of the keywords is in the set |
278 | 310 | */ |
311 | @Override | |
279 | 312 | public boolean accepts(Set s) { |
280 | 313 | for (String kwd :keys) { |
281 | 314 | if (s.contains(kwd)) { |
285 | 318 | return false; |
286 | 319 | } |
287 | 320 | |
321 | @Override | |
288 | 322 | public String toString() { |
289 | 323 | return "any of (" + allKwds + ")"; |
290 | 324 | } |
0 | 0 | /* |
1 | 1 | * $Id$ |
2 | 2 | * |
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. | |
4 | 4 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5 | 5 | * |
6 | 6 | * This code is free software; you can redistribute it and/or modify it |
59 | 59 | |
60 | 60 | @Override |
61 | 61 | public String getReason() { |
62 | return i18n.getString("keywordsFilter.reason"); | |
62 | return i18n.getString("keywordsFilter.reason", keywords.getSummary()); | |
63 | 63 | } |
64 | 64 | |
65 | 65 | @Override |
0 | 0 | /* |
1 | 1 | * $Id$ |
2 | 2 | * |
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. | |
4 | 4 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5 | 5 | * |
6 | 6 | * This code is free software; you can redistribute it and/or modify it |
26 | 26 | package com.sun.javatest; |
27 | 27 | |
28 | 28 | 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; | |
37 | 32 | import java.util.HashMap; |
38 | 33 | import java.util.Map; |
39 | 34 | |
40 | 35 | import com.sun.javatest.util.I18NResourceBundle; |
41 | import java.io.Reader; | |
42 | import java.io.StringReader; | |
36 | ||
43 | 37 | import java.util.ArrayList; |
44 | 38 | import java.util.Iterator; |
45 | 39 | import java.util.TreeSet; |
153 | 147 | /** |
154 | 148 | * Test if a file appears to be for an exclude list, by checking the extension. |
155 | 149 | * @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. | |
157 | 151 | */ |
158 | 152 | public static boolean isKflFile(File f) { |
159 | 153 | return f.getPath().endsWith(KFLFILE_EXTN); |
194 | 188 | { |
195 | 189 | setStrictModeEnabled(strict); |
196 | 190 | if (f != null) { |
197 | BufferedReader in = new BufferedReader(new FileReader(f)); | |
191 | BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(f), StandardCharsets.UTF_8)); | |
198 | 192 | |
199 | 193 | Parser p = new Parser(in); |
200 | 194 | try { |
469 | 463 | * file is being written. |
470 | 464 | */ |
471 | 465 | 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)); | |
473 | 467 | out.write("### KFL/"); |
474 | 468 | out.write(KFL_FILE_VERSION); |
475 | 469 | out.newLine(); |
32 | 32 | import java.net.MalformedURLException; |
33 | 33 | import java.net.URL; |
34 | 34 | import java.net.URLClassLoader; |
35 | import java.security.AccessController; | |
36 | import java.security.PrivilegedAction; | |
35 | 37 | import java.util.Enumeration; |
36 | 38 | import java.util.Locale; |
37 | 39 | import java.util.ResourceBundle; |
52 | 54 | return ownClass.getClassLoader().getResources(name); |
53 | 55 | } |
54 | 56 | |
55 | public static InputStream getResourceAsStream(String name, Class ownClass) { | |
57 | public static InputStream getResourceAsStream(final String name, final Class ownClass) { | |
56 | 58 | URL url = getExtResource(name, ownClass); |
57 | 59 | try { |
58 | 60 | if (url != null) { |
59 | 61 | return url.openStream(); |
60 | 62 | } 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; | |
62 | 71 | } |
63 | 72 | } catch (IOException e) { |
64 | 73 | return null; |
181 | 190 | public static ResourceBundle getBundle(String name, Locale aDefault, ClassLoader classLoader) { |
182 | 191 | if (ext != null) { |
183 | 192 | initAltClassLoader(); |
184 | ResourceBundle altB = ResourceBundle.getBundle(name, aDefault, altClassLoader); | |
193 | ResourceBundle altB = getSBundle(name, aDefault, altClassLoader); | |
185 | 194 | if (altB.getKeys().hasMoreElements()) { |
186 | 195 | return altB; |
187 | 196 | } |
188 | 197 | } |
189 | return ResourceBundle.getBundle(name, aDefault, classLoader); | |
198 | return getSBundle(name, aDefault, classLoader); | |
190 | 199 | } |
191 | 200 | |
192 | 201 | public static ResourceBundle getBundle(String name) { |
193 | 202 | if (ext != null) { |
194 | 203 | initAltClassLoader(); |
195 | ResourceBundle altB = ResourceBundle.getBundle(name, Locale.getDefault(), altClassLoader); | |
204 | ResourceBundle altB = getSBundle(name, Locale.getDefault(), altClassLoader); | |
196 | 205 | if (altB.getKeys().hasMoreElements()) { |
197 | 206 | return altB; |
198 | 207 | } |
199 | 208 | } |
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; | |
201 | 220 | } |
202 | 221 | |
203 | 222 | private static ClassLoader altClassLoader; |
0 | 0 | /* |
1 | 1 | * $Id$ |
2 | 2 | * |
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. | |
4 | 4 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5 | 5 | * |
6 | 6 | * This code is free software; you can redistribute it and/or modify it |
27 | 27 | |
28 | 28 | import java.util.ArrayList; |
29 | 29 | import java.util.Enumeration; |
30 | import java.util.Hashtable; | |
30 | import java.util.HashMap; | |
31 | 31 | import java.util.Iterator; |
32 | 32 | import java.util.LinkedList; |
33 | 33 | import java.util.NoSuchElementException; |
34 | 34 | import java.util.Stack; |
35 | import java.util.Vector; | |
36 | ||
35 | ||
36 | import com.sun.javatest.tool.Preferences; | |
37 | 37 | import com.sun.javatest.util.Debug; |
38 | 38 | import com.sun.javatest.util.I18NResourceBundle; |
39 | import java.util.Set; | |
39 | 40 | |
40 | 41 | |
41 | 42 | /** |
64 | 65 | resultStats = new int[Status.NUM_STATES]; |
65 | 66 | nodeIndex = -1; |
66 | 67 | currFrame = null; |
68 | ||
69 | setRecordRejects(true); | |
67 | 70 | } |
68 | 71 | |
69 | 72 | TRT_Iterator(TestResultTable.TreeNode node) { |
242 | 245 | if (recordRejects == true) { |
243 | 246 | // only create new objects if they don't exist |
244 | 247 | // 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) { | |
249 | 253 | fo = new FilterObserver(); |
254 | } | |
255 | ||
256 | if (rejLock == null) { | |
257 | rejLock = new Object(); | |
258 | } | |
250 | 259 | } |
251 | 260 | } |
252 | 261 | |
273 | 282 | * @return Array as described or null if no tests have been rejected yet. |
274 | 283 | */ |
275 | 284 | @Override |
276 | public Hashtable getFilterStats() { | |
277 | if (filteredTRs == null) | |
285 | public HashMap<TestFilter, ArrayList<TestDescription>> getFilterStats() { | |
286 | if (filteredTRs == null) { | |
278 | 287 | return null; |
288 | } | |
279 | 289 | else { |
280 | // create shallow, reformatted version of stored data | |
290 | // create shallow copy | |
281 | 291 | // keys are TRs, values are TestFilters. |
282 | Hashtable out = new Hashtable(); | |
292 | HashMap<TestFilter, ArrayList<TestDescription>> out = new HashMap(filteredTRs.size()); | |
283 | 293 | |
284 | 294 | synchronized (rejLock) { |
285 | Enumeration keys = filteredTRs.keys(); | |
295 | Set keys = filteredTRs.keySet(); | |
286 | 296 | // each key is a TestFilter |
287 | while (keys.hasMoreElements()) { | |
297 | Iterator<TestFilter> it = keys.iterator(); | |
298 | while (it.hasNext()) { | |
288 | 299 | // 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); | |
297 | 303 | } // outer while |
298 | 304 | } // sync |
299 | 305 | |
787 | 793 | |
788 | 794 | absoluteCount++; |
789 | 795 | currentResult = tr; |
796 | TestDescription td = tr.getDescription(); | |
790 | 797 | |
791 | 798 | for (int i = 0; i < filters.length; i++) { |
792 | 799 | boolean accepted = true; |
793 | 800 | 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 | } | |
798 | 807 | } |
799 | 808 | catch (TestFilter.Fault f) { |
800 | 809 | accepted = true; |
809 | 818 | } |
810 | 819 | |
811 | 820 | 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 | ||
812 | 830 | // rejected |
813 | 831 | return i; |
814 | 832 | } |
844 | 862 | } |
845 | 863 | |
846 | 864 | /** |
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 | } | |
855 | 927 | |
856 | 928 | /** |
857 | 929 | * Tests (literally) that were provided by the client through one of the |
874 | 946 | private int[] resultStats; // pass/fail/error statistics |
875 | 947 | private int absoluteCount; // how many tests were processed |
876 | 948 | |
877 | ||
878 | 949 | // filter rejection info |
879 | 950 | private int rejectCount; |
880 | 951 | 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 | |
882 | 953 | private TestResult currentResult; // necessary communicate with filter observer, yuck |
883 | 954 | private Object rejLock; |
884 | 955 | 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"); | |
885 | 959 | |
886 | 960 | // ------ state information ------ |
887 | 961 | private Stack stack; |
941 | 1015 | @Override |
942 | 1016 | public void rejected(TestDescription d, TestFilter rejector) { |
943 | 1017 | synchronized (rejLock) { |
944 | Vector vec = (Vector)(filteredTRs.get(rejector)); | |
1018 | ArrayList vec = filteredTRs.get(rejector); | |
945 | 1019 | if (vec == null) { |
946 | vec = new Vector(); | |
1020 | vec = new ArrayList(); | |
947 | 1021 | filteredTRs.put(rejector, vec); |
948 | 1022 | } |
949 | 1023 | |
950 | // remove later... | |
1024 | // XXX remove later... | |
951 | 1025 | try { |
952 | 1026 | if (currentResult.getDescription() != d) |
953 | 1027 | throw new JavaTestError("TRT_Iterator observered TR.TD does not match filtered one."); |
956 | 1030 | throw new JavaTestError("TRT_Iterator cannot determine TR source info.", f); |
957 | 1031 | } // sanity check |
958 | 1032 | |
959 | vec.add(currentResult); | |
960 | ||
1033 | vec.add(d); | |
961 | 1034 | } // sync |
962 | 1035 | } |
963 | 1036 | } |
25 | 25 | */ |
26 | 26 | package com.sun.javatest; |
27 | 27 | |
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.*; | |
34 | 29 | //import java.util.Hashtable; |
30 | import java.nio.charset.StandardCharsets; | |
35 | 31 | import java.util.Iterator; |
36 | 32 | import java.util.Map; |
37 | 33 | import java.util.Vector; |
186 | 182 | |
187 | 183 | try { |
188 | 184 | 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)); | |
190 | 186 | p.load(in); |
191 | 187 | in.close(); |
192 | 188 |
0 | 0 | /* |
1 | 1 | * $Id$ |
2 | 2 | * |
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. | |
4 | 4 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5 | 5 | * |
6 | 6 | * This code is free software; you can redistribute it and/or modify it |
25 | 25 | */ |
26 | 26 | package com.sun.javatest; |
27 | 27 | |
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.*; | |
38 | 29 | import java.lang.ref.WeakReference; |
30 | import java.nio.charset.StandardCharsets; | |
39 | 31 | import java.text.DateFormat; |
40 | 32 | import java.text.ParseException; |
41 | 33 | import java.text.SimpleDateFormat; |
285 | 277 | /** |
286 | 278 | * Find out how many output buffers this section has inside it. |
287 | 279 | * |
288 | * @return The number of output buffers in use (>=0). | |
280 | * @return The number of output buffers in use (>=0). | |
289 | 281 | */ |
290 | 282 | public synchronized int getOutputCount() { |
291 | 283 | return buffers.length; |
660 | 652 | int charsRead = 0; |
661 | 653 | while (charsRead < chars) { |
662 | 654 | 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 | ||
663 | 662 | buff.append(data, 0, n); |
664 | 663 | charsRead += n; |
665 | 664 | } |
746 | 745 | notifyUpdatedOutput(Section.this, name, end, end, buf, offset, len); |
747 | 746 | |
748 | 747 | if (output.length() > maxOutputSize) { |
749 | int overflowEnd = maxOutputSize*2/3; | |
748 | int overflowEnd = maxOutputSize/3; | |
750 | 749 | if (overflowed) { |
751 | 750 | // output.delete(overflowStart, overflowEnd); |
752 | 751 | // JDK 1.1--start |
753 | 752 | 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)); | |
755 | 754 | // JDK 1.1--end |
756 | 755 | notifyUpdatedOutput(Section.this, name, overflowStart, overflowEnd, ""); |
757 | 756 | } |
1051 | 1050 | sections = null; |
1052 | 1051 | execStatus = null; |
1053 | 1052 | |
1054 | reload(new FileReader(resultsFile)); | |
1053 | reload(new InputStreamReader(new FileInputStream(resultsFile), StandardCharsets.UTF_8)); | |
1055 | 1054 | |
1056 | 1055 | // this next line is dubious since the execStatus should have |
1057 | 1056 | // been set during the reload |
1555 | 1554 | private void writeResults(File tempFile, BackupPolicy backupPolicy) |
1556 | 1555 | throws IOException |
1557 | 1556 | { |
1558 | FileWriter out; | |
1557 | Writer out; | |
1559 | 1558 | try { |
1560 | out = new FileWriter(tempFile); | |
1559 | out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(tempFile), StandardCharsets.UTF_8)); | |
1561 | 1560 | } |
1562 | 1561 | catch (IOException e) { |
1563 | 1562 | execStatus = Status.error("Problem writing result file for test: " + getTestName()); |
2038 | 2037 | throw new IllegalStateException("Cannot do a reload of this object."); |
2039 | 2038 | |
2040 | 2039 | try { |
2041 | reload(new FileReader(resultsFile)); | |
2040 | reload(new BufferedReader(new InputStreamReader(new FileInputStream(resultsFile), StandardCharsets.UTF_8))); | |
2042 | 2041 | |
2043 | 2042 | // Well, we have successfully reloaded it, so the object is now taking |
2044 | 2043 | // up a big footprint again ... put it back on the list to be shrunk again |
2076 | 2075 | } |
2077 | 2076 | else |
2078 | 2077 | 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()}); | |
2079 | 2082 | } |
2080 | 2083 | finally { |
2081 | 2084 | r.close(); |
2305 | 2308 | if (execStatus == null) |
2306 | 2309 | execStatus = Status.error("NO STATUS RECORDED IN FILE"); |
2307 | 2310 | |
2308 | // check whether checksum was valid or not | |
2309 | //if (checksumText == null) | |
2311 | // checksum support removed | |
2310 | 2312 | 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 | }*/ | |
2323 | 2313 | } |
2324 | 2314 | |
2325 | 2315 | /** |
2704 | 2694 | /** |
2705 | 2695 | * DateFormat, that is used to store date into TestResult |
2706 | 2696 | */ |
2707 | private static final DateFormat dateFormat = | |
2697 | public static final DateFormat dateFormat = | |
2708 | 2698 | new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy", Locale.US); |
2709 | 2699 | |
2710 | 2700 | static final String EXTN = ".jtr"; |
33 | 33 | import java.util.Map; |
34 | 34 | import java.util.TreeMap; |
35 | 35 | |
36 | import com.sun.javatest.logging.WorkDirLogHandler; | |
36 | 37 | import com.sun.javatest.util.Debug; |
37 | 38 | import com.sun.javatest.util.Fifo; |
38 | 39 | import com.sun.javatest.util.I18NResourceBundle; |
40 | ||
41 | import java.util.logging.Handler; | |
39 | 42 | import java.util.logging.Logger; |
40 | 43 | |
41 | 44 | /** |
445 | 448 | } |
446 | 449 | catch (InterruptedException e) { |
447 | 450 | // 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 | |
448 | 467 | } |
449 | 468 | |
450 | 469 | // important to avoid memory leak !!! |
515 | 534 | catch (TestResult.ReloadFault e) { |
516 | 535 | // delete this jtr and continue |
517 | 536 | // 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()}); | |
519 | 538 | f.delete(); |
520 | 539 | } |
521 | 540 | } |
538 | 557 | return tr; |
539 | 558 | } |
540 | 559 | 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()}); | |
543 | 562 | jtr.delete(); |
544 | 563 | // this notRun status will persist in cache until cache rebuilt |
545 | 564 | String name = tr.getTestName(); |
0 | 0 | /* |
1 | 1 | * $Id$ |
2 | 2 | * |
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. | |
4 | 4 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5 | 5 | * |
6 | 6 | * This code is free software; you can redistribute it and/or modify it |
28 | 28 | import java.io.File; |
29 | 29 | import java.io.IOException; |
30 | 30 | import java.text.Collator; |
31 | import java.util.ArrayList; | |
31 | 32 | import java.util.Arrays; |
32 | 33 | import java.util.Comparator; |
33 | 34 | import java.util.Enumeration; |
35 | import java.util.HashMap; | |
34 | 36 | import java.util.HashSet; |
35 | 37 | import java.util.Hashtable; |
36 | 38 | import java.util.Iterator; |
41 | 43 | import java.util.Vector; |
42 | 44 | import java.util.concurrent.locks.ReentrantLock; |
43 | 45 | |
46 | import com.sun.javatest.finder.TestFinderDecorator; | |
44 | 47 | import com.sun.javatest.tool.Preferences; |
45 | 48 | import com.sun.javatest.util.Debug; |
46 | 49 | import com.sun.javatest.util.DynamicArray; |
260 | 263 | |
261 | 264 | /** |
262 | 265 | * Create a table ready to be occupied. |
263 | * | |
264 | * @deprecated This method will become private. | |
265 | * XXX make this method private | |
266 | 266 | */ |
267 | 267 | public TestResultTable() { |
268 | //table = new Hashtable(); | |
269 | 268 | statusTables = new Hashtable[Status.NUM_STATES]; |
270 | 269 | for (int i = 0; i < statusTables.length; i++) |
271 | 270 | statusTables[i] = new Hashtable(); |
272 | 271 | |
273 | 272 | 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 | */ | |
283 | 273 | |
284 | 274 | instanceId++; |
285 | 275 | if (com.sun.javatest.httpd.HttpdServer.isActive()) { |
341 | 331 | |
342 | 332 | if (trCache == null) |
343 | 333 | initFinder(); |
334 | } | |
335 | ||
336 | public void updateTestExecutionOrderOnTheFly(){ | |
337 | root = new TRT_TreeNode(TestResultTable.this, null); | |
344 | 338 | } |
345 | 339 | |
346 | 340 | /** |
549 | 543 | } |
550 | 544 | } |
551 | 545 | |
546 | if (trCache != null){ | |
547 | trCache.requestFullUpdate(); | |
548 | } | |
549 | ||
552 | 550 | return true; |
553 | 551 | } |
554 | 552 | |
641 | 639 | if (target == null) |
642 | 640 | return null; |
643 | 641 | |
644 | Vector path = new Vector(); | |
642 | ArrayList path = new ArrayList(); | |
645 | 643 | TreeNode loc = target.getParent(); |
646 | 644 | while (loc != null) { |
647 | path.insertElementAt(loc, 0); | |
645 | path.add(0, loc); | |
648 | 646 | loc = loc.getParent(); |
649 | 647 | // getParent() will be null for the root node |
650 | 648 | } // while |
651 | 649 | |
652 | 650 | TreeNode[] result = new TreeNode[path.size()]; |
653 | path.copyInto(result); | |
651 | path.toArray(result); | |
654 | 652 | |
655 | 653 | if (debug == 2 || debug == 99) { |
656 | 654 | Debug.println("TRT - getObjectPath() results:"); |
677 | 675 | if (target == null) |
678 | 676 | return null; |
679 | 677 | |
680 | Vector path = new Vector(); | |
678 | ArrayList path = new ArrayList(); | |
681 | 679 | TreeNode loc = target; |
682 | 680 | while (loc != null) { |
683 | path.insertElementAt(loc, 0); | |
681 | path.add(0, loc); | |
684 | 682 | loc = loc.getParent(); // getParent() will be null for the root node |
685 | 683 | } // while |
686 | 684 | |
687 | 685 | TreeNode[] result = new TreeNode[path.size()]; |
688 | path.copyInto(result); | |
686 | path.toArray(result); | |
689 | 687 | |
690 | 688 | if (debug == 2 || debug == 99) { |
691 | 689 | Debug.println("TRT - getObjectPath() results:"); |
951 | 949 | if (debug == 1 || debug == 99) |
952 | 950 | Debug.println("TRT.lookupInitURL gave back " + Arrays.toString(objs)); |
953 | 951 | |
954 | if (objs == null) // no match | |
955 | continue; | |
952 | if (objs == null) { // no match | |
953 | } | |
956 | 954 | else if (objs instanceof TreeNode[]) { |
957 | 955 | // don't add duplicates |
958 | 956 | if (!initNodes.contains((TreeNode) objs[0])) |
1110 | 1108 | public static String getRootRelativePath(TreeNode node) { |
1111 | 1109 | if (node.isRoot()) return ""; |
1112 | 1110 | |
1113 | StringBuffer name = new StringBuffer(node.getName()); | |
1111 | StringBuilder name = new StringBuilder(node.getName()); | |
1114 | 1112 | node = node.getParent(); |
1115 | 1113 | |
1116 | 1114 | while (node != null && !node.isRoot()) { |
1371 | 1369 | } |
1372 | 1370 | |
1373 | 1371 | /** |
1372 | * Removes empty nodes (things with no tests below them). | |
1373 | * @param node The node to perform the prune operation upon. | |
1374 | 1374 | * @return True if some nodes were pruned, false otherwise. |
1375 | 1375 | */ |
1376 | 1376 | synchronized public boolean prune(TreeNode node) throws Fault { |
2546 | 2546 | * @return Array as described or null if no tests have been rejected yet. |
2547 | 2547 | * @since 3.0.3 |
2548 | 2548 | */ |
2549 | public abstract Hashtable getFilterStats(); | |
2549 | public abstract HashMap<TestFilter, ArrayList<TestDescription>> getFilterStats(); | |
2550 | 2550 | |
2551 | 2551 | // --- misc info --- |
2552 | 2552 | /** |
47 | 47 | import java.util.logging.LogRecord; |
48 | 48 | import com.sun.javatest.finder.BinaryTestFinder; |
49 | 49 | import com.sun.javatest.finder.HTMLTestFinder; |
50 | import com.sun.javatest.finder.TestFinderDecorator; | |
50 | 51 | import com.sun.javatest.interview.LegacyParameters; |
51 | 52 | import com.sun.javatest.lib.KeywordScript; |
52 | 53 | import com.sun.javatest.logging.WorkDirLogHandler; |
312 | 313 | throw new Fault(i18n, "ts.notASubtype", |
313 | 314 | new Object[] {className, "testsuite", TestSuite.class.getName()}); |
314 | 315 | } |
316 | catch (UnsupportedClassVersionError uce){ | |
317 | throw new Fault(i18n, "ts.compiledRecentVersion", | |
318 | new Object[] {System.getProperty("java.version"), root.getPath()}); | |
319 | } | |
315 | 320 | |
316 | 321 | String[] args = new String[tsClassAndArgs.length - 1]; |
317 | 322 | System.arraycopy(tsClassAndArgs, 1, args, 0, args.length); |
319 | 324 | } |
320 | 325 | |
321 | 326 | // initialize test finder |
322 | testSuite.setTestFinder(testSuite.createTestFinder()); | |
327 | testSuite.setTestFinder(new TestFinderDecorator(testSuite.createTestFinder())); | |
323 | 328 | |
324 | 329 | return testSuite; |
325 | 330 | } |
0 | 0 | /* |
1 | 1 | * $Id$ |
2 | 2 | * |
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. | |
4 | 4 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5 | 5 | * |
6 | 6 | * This code is free software; you can redistribute it and/or modify it |
928 | 928 | } |
929 | 929 | |
930 | 930 | /** |
931 | * See <code>putTestAnnotation(String,String,String). | |
931 | * See <code>putTestAnnotation(String,String,String)</code>. | |
932 | 932 | * |
933 | 933 | * @see #putTestAnnotation(String,String,String) |
934 | 934 | */ |
64 | 64 | String tag = null; |
65 | 65 | boolean localizeArgs = false; |
66 | 66 | boolean sharedCl = false; |
67 | int timeout = 0; | |
67 | 68 | |
68 | 69 | // analyze options |
69 | 70 | int i = 0; |
79 | 80 | } else if (args[i].equalsIgnoreCase("-sharedClassLoader") || |
80 | 81 | args[i].equalsIgnoreCase("-sharedCl")) { |
81 | 82 | 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 { | |
83 | 93 | return Status.error("Unrecognized option: " + args[i]); |
84 | 94 | } |
85 | 95 | } |
108 | 118 | t.setClassPath(classPath); |
109 | 119 | |
110 | 120 | t.setSharedClassLoader(sharedCl); |
121 | t.setAgentCommandTimeout(timeout); | |
111 | 122 | |
112 | 123 | out.println("Executing command via " + t.getConnection().getName()); |
113 | 124 |
0 | 0 | /* |
1 | 1 | * $Id$ |
2 | 2 | * |
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. | |
4 | 4 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5 | 5 | * |
6 | 6 | * This code is free software; you can redistribute it and/or modify it |
47 | 47 | if (host.length() == 0) { |
48 | 48 | throw new IllegalArgumentException("Cannot start active agent connection - empty value for hostname."); |
49 | 49 | } |
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."); | |
52 | 52 | } |
53 | 53 | |
54 | 54 | this.host = host; |
0 | 0 | /* |
1 | 1 | * $Id$ |
2 | 2 | * |
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. | |
4 | 4 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5 | 5 | * |
6 | 6 | * This code is free software; you can redistribute it and/or modify it |
36 | 36 | import java.lang.reflect.Constructor; |
37 | 37 | import java.lang.reflect.InvocationTargetException; |
38 | 38 | import java.lang.reflect.Method; |
39 | import java.util.Arrays; | |
39 | 40 | import java.util.Enumeration; |
40 | 41 | import java.util.MissingResourceException; |
41 | 42 | import java.util.Vector; |
48 | 49 | import com.sun.javatest.util.WriterStream; |
49 | 50 | |
50 | 51 | /** |
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. | |
52 | 53 | * Agents are typically started by using one of AgentMain, AgentFrame, |
53 | 54 | * or AgentApplet. The requests themselves are made from the harness |
54 | 55 | * via AgentManager, or a library class that uses AgentManager. |
573 | 574 | } |
574 | 575 | |
575 | 576 | // The following is used to ensure consistency between Agent and AgentManager |
576 | static final short protocolVersion = 104; | |
577 | static final short protocolVersion = 105; | |
577 | 578 | |
578 | 579 | /** |
579 | 580 | * The default port to which active agents will try and connect on a nominated host. |
594 | 595 | static final byte STATUS = (byte)'S'; |
595 | 596 | |
596 | 597 | 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."; | |
599 | 600 | |
600 | 601 | |
601 | 602 | /** |
763 | 764 | traceOut.println("sharedClassLoader: " + sharedClassLoader); |
764 | 765 | } |
765 | 766 | |
767 | timeoutValue = in.readInt(); | |
768 | ||
769 | if (tracing) | |
770 | traceOut.println("COMMAND TIMEOUT(seconds) IS `" + timeoutValue + "'"); | |
771 | ||
766 | 772 | byte guard = in.readByte(); |
767 | 773 | if (guard != 0) |
768 | 774 | throw new IOException("data format error"); |
779 | 785 | if (remoteClasses) { |
780 | 786 | cl = getAgentClassLoader(sharedClassLoader); |
781 | 787 | c = cl.loadClass(className); |
782 | } else | |
788 | } else { | |
783 | 789 | c = Class.forName(className); |
790 | } | |
784 | 791 | |
785 | 792 | if (request.equals("executeTest")) { |
786 | 793 | return executeTest(c, args, testLog, testRef); |
788 | 795 | return executeCommand(c, args, testLog, testRef, cl); |
789 | 796 | } else if (request.equals("executeMain")) { |
790 | 797 | return executeMain(c, args, testLog, testRef); |
791 | } else | |
798 | } else { | |
792 | 799 | return Status.error("Unrecognized request for agent: `" + request + "'"); |
800 | } | |
793 | 801 | } catch (ClassCastException e) { |
794 | 802 | if (tracing) |
795 | 803 | e.printStackTrace(traceOut); |
841 | 849 | |
842 | 850 | Command tc = (Command)(c.newInstance()); |
843 | 851 | 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 | ||
845 | 936 | } |
846 | 937 | |
847 | 938 | private Status executeMain(Class c, String[] args, |
904 | 995 | */ |
905 | 996 | synchronized void sendChars(byte type, char b[], int off, int len) throws IOException { |
906 | 997 | 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)); | |
908 | 1031 | switch (type) { |
909 | 1032 | case LOG_FLUSH: |
910 | 1033 | case REF_FLUSH: |
924 | 1047 | /** |
925 | 1048 | * Get the bytecodes for a class |
926 | 1049 | */ |
927 | synchronized byte[] getClassData(String className) throws ClassNotFoundException { | |
1050 | synchronized AgentRemoteClassData getClassData(String className) throws ClassNotFoundException { | |
928 | 1051 | if (tracing) |
929 | 1052 | traceOut.println("REMOTE LOAD " + className); |
930 | 1053 | |
933 | 1056 | out.writeUTF(className); |
934 | 1057 | out.flush(); |
935 | 1058 | |
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; | |
961 | 1064 | } catch (IOException e) { |
962 | 1065 | throw new ClassNotFoundException(className + ": " + e); |
963 | 1066 | } |
1024 | 1127 | if (classLoaderConstructor == null) { |
1025 | 1128 | try { |
1026 | 1129 | classLoaderConstructor = classLoaderClass.getDeclaredConstructor(argTypes); |
1130 | classLoaderConstructor.setAccessible(true); | |
1027 | 1131 | } catch (NoSuchMethodException e) { |
1028 | 1132 | e.printStackTrace(); |
1029 | 1133 | } |
1054 | 1158 | private DataOutputStream out; |
1055 | 1159 | private String tag; |
1056 | 1160 | private String request; |
1161 | private Integer timeoutValue; | |
1057 | 1162 | } |
1058 | 1163 | |
1059 | 1164 | private static Constructor classLoaderConstructor; |
1089 | 1194 | public synchronized void write(int ch) throws IOException { |
1090 | 1195 | buf[count++] = (char)ch; |
1091 | 1196 | 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 | } | |
1094 | 1203 | } |
1095 | 1204 | } |
1096 | 1205 | |
1141 | 1250 | case Agent.LOG: type = Agent.LOG_FLUSH; break; |
1142 | 1251 | case Agent.REF: type = Agent.REF_FLUSH; break; |
1143 | 1252 | } |
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 | } | |
1146 | 1259 | } |
1147 | 1260 | } |
1148 | 1261 |
36 | 36 | import java.awt.Label; |
37 | 37 | import java.awt.Panel; |
38 | 38 | import java.io.IOException; |
39 | import java.lang.reflect.InvocationTargetException; | |
40 | import java.lang.reflect.Method; | |
39 | 41 | import java.net.URL; |
40 | 42 | |
41 | 43 | import com.sun.javatest.Status; |
123 | 125 | PassiveModeOptions pmo = new PassiveModeOptions(); |
124 | 126 | pmo.setPort(passivePort); |
125 | 127 | |
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 | } | |
129 | 147 | |
130 | 148 | ModeOptions[] modeOptions = new ModeOptions[] {amo, pmo, smo}; |
131 | 149 |
0 | 0 | /* |
1 | 1 | * $Id$ |
2 | 2 | * |
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. | |
4 | 4 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5 | 5 | * |
6 | 6 | * This code is free software; you can redistribute it and/or modify it |
54 | 54 | } |
55 | 55 | } |
56 | 56 | 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); | |
59 | 59 | } |
60 | 60 | } |
61 | 61 |
0 | 0 | /* |
1 | 1 | * $Id$ |
2 | 2 | * |
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. | |
4 | 4 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5 | 5 | * |
6 | 6 | * This code is free software; you can redistribute it and/or modify it |
31 | 31 | import java.net.URL; |
32 | 32 | import java.net.URLConnection; |
33 | 33 | import java.net.URLStreamHandler; |
34 | import java.security.CodeSigner; | |
34 | 35 | import java.security.CodeSource; |
35 | 36 | import java.security.PermissionCollection; |
36 | 37 | import java.security.Permissions; |
38 | 39 | import java.util.HashMap; |
39 | 40 | import java.util.MissingResourceException; |
40 | 41 | |
41 | class AgentClassLoader2 extends ClassLoader { | |
42 | class AgentClassLoader2 extends InstantiationClassLoader { | |
42 | 43 | |
43 | 44 | private CodeSource cs = null; |
44 | 45 | private final HashMap<CodeSource, ProtectionDomain> pdcache = new HashMap<CodeSource, ProtectionDomain>(11); |
45 | 46 | private static volatile AgentClassLoader2 instance = null; |
46 | 47 | |
47 | public AgentClassLoader2(Agent.Task parent) { | |
48 | super(parent.getClass().getClassLoader()); | |
48 | private AgentClassLoader2(Agent.Task parent, ClassLoader cl) { | |
49 | super(cl); | |
49 | 50 | this.parent = parent; |
50 | 51 | |
51 | 52 | SecurityManager security = System.getSecurityManager(); |
63 | 64 | } |
64 | 65 | } |
65 | 66 | |
67 | private AgentClassLoader2(Agent.Task parent) { | |
68 | this(parent, parent.getClass().getClassLoader()); | |
69 | } | |
66 | 70 | |
67 | 71 | private ProtectionDomain getProtectionDomain(CodeSource cs) { |
68 | 72 | ProtectionDomain pd = null; |
93 | 97 | return instance; |
94 | 98 | } |
95 | 99 | |
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 | ||
96 | 118 | |
97 | 119 | @Override |
98 | 120 | public Class findClass(String className) throws ClassNotFoundException { |
99 | 121 | if (className != null) { |
100 | 122 | 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); | |
103 | 125 | if (getPackage(pkgName) == null) { |
104 | 126 | definePackage(pkgName, null, null, null, null, null, null, null); |
105 | 127 | } |
106 | 128 | } |
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 | ||
109 | 144 | } |
110 | 145 | throw new ClassNotFoundException(); |
111 | 146 | } |
165 | 200 | |
166 | 201 | private Agent.Task parent; |
167 | 202 | |
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 | ||
168 | 215 | private class AgentURLStreamHandler extends URLStreamHandler { |
169 | 216 | AgentURLStreamHandler(byte[] bytes) { |
170 | 217 | super(); |
37 | 37 | import java.awt.event.WindowEvent; |
38 | 38 | import java.io.IOException; |
39 | 39 | import java.io.PrintStream; |
40 | import java.lang.reflect.InvocationTargetException; | |
40 | 41 | import java.lang.reflect.Method; |
41 | 42 | |
42 | 43 | import com.sun.javatest.JavaTestSecurityManager; |
89 | 90 | |
90 | 91 | ActiveModeOptions amo = new ActiveModeOptions(); |
91 | 92 | 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 | } | |
93 | 101 | |
94 | 102 | for (int i = 0; i < args.length; i++) { |
95 | 103 | try { |
178 | 186 | System.err.println("Could not initialize serial ports"); |
179 | 187 | System.exit(1); |
180 | 188 | } |
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 | } | |
183 | 201 | } |
184 | 202 | |
185 | 203 |
0 | 0 | /* |
1 | 1 | * $Id$ |
2 | 2 | * |
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. | |
4 | 4 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5 | 5 | * |
6 | 6 | * This code is free software; you can redistribute it and/or modify it |
29 | 29 | import java.io.PrintStream; |
30 | 30 | import java.lang.reflect.Constructor; |
31 | 31 | import java.lang.reflect.InvocationTargetException; |
32 | import java.util.HashMap; | |
32 | 33 | |
33 | 34 | import com.sun.javatest.JavaTestSecurityManager; |
34 | 35 | import com.sun.javatest.Status; |
143 | 144 | // installing a less permissive one; moan if it can't be installed. |
144 | 145 | JavaTestSecurityManager.install(); |
145 | 146 | |
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 | ||
146 | 165 | int rc; |
147 | 166 | try { |
148 | 167 | run(args); |
280 | 299 | else if (args[i].equalsIgnoreCase("-map")) { |
281 | 300 | mapFile = args[++i]; |
282 | 301 | return 2; |
302 | } else if (args[i].equalsIgnoreCase("-mapArg")) { | |
303 | mappedArgs.put(args[++i], args[++i]); | |
304 | return 3; | |
283 | 305 | } |
284 | 306 | else if (args[i].equalsIgnoreCase("-trace")) { |
285 | 307 | tracing = true; |
468 | 490 | String[] msgs = {"Problem reading map file", e.toString()}; |
469 | 491 | throw new Fault(msgs); |
470 | 492 | } |
493 | } else if (mappedArgs.size() > 0) { | |
494 | agent.setMap(new Map(mappedArgs)); | |
471 | 495 | } |
472 | 496 | |
473 | 497 | Integer delay = Integer.getInteger("agent.retry.delay"); |
494 | 518 | out.println(" -passivePort port set the port for passive connections (implies -passive)"); |
495 | 519 | out.println(" -serialPort port set the port for serial port connections"); |
496 | 520 | 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"); | |
497 | 522 | out.println(" -concurrency num set the maximum number of simultaneous connections"); |
498 | 523 | out.println(" -trace trace the execution of the agent"); |
499 | 524 | out.println(" -observer class add an observer to the agent"); |
521 | 546 | private String serialPort = null; |
522 | 547 | private int concurrency = 1; |
523 | 548 | private String mapFile = null; |
549 | private java.util.Map<String, String> mappedArgs = new HashMap<String, String>(); | |
524 | 550 | private String observerClassName; |
525 | 551 | private boolean tracing; |
526 | 552 | |
535 | 561 | private static class ErrorObserver implements Agent.Observer { |
536 | 562 | ErrorObserver() { |
537 | 563 | try { |
538 | connectExceptionClass = Class.forName("java.net.ConnectException"); | |
564 | connectExceptionClass = Class.forName("java.net.ConnectException", true, ClassLoader.getSystemClassLoader()); | |
539 | 565 | } |
540 | 566 | catch (Throwable t) { |
541 | 567 | // ignore |
542 | 568 | } |
543 | 569 | |
544 | 570 | try { |
545 | unknownHostExceptionClass = Class.forName("java.net.UnknownHostException"); | |
571 | unknownHostExceptionClass = Class.forName("java.net.UnknownHostException", true, ClassLoader.getSystemClassLoader()); | |
546 | 572 | } |
547 | 573 | catch (Throwable t) { |
548 | 574 | // ignore |
0 | 0 | /* |
1 | 1 | * $Id$ |
2 | 2 | * |
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. | |
4 | 4 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5 | 5 | * |
6 | 6 | * This code is free software; you can redistribute it and/or modify it |
309 | 309 | } |
310 | 310 | |
311 | 311 | /** |
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 | /** | |
312 | 320 | * Request the agent for this client to execute a standard Test class. |
313 | 321 | * @param tag A string to identify the request in debug and trace output. |
314 | 322 | * @param className The name of the class to execute. The class must be an |
418 | 426 | out.writeBoolean(localizeArgs); |
419 | 427 | out.writeBoolean(classPath != null); // specify remoteClasses if classPath has been given |
420 | 428 | out.writeBoolean(sharedCl); |
429 | out.writeInt(timeout); | |
421 | 430 | out.writeByte(0); |
422 | 431 | out.flush(); |
423 | 432 | |
459 | 468 | case Agent.CLASS: |
460 | 469 | String className = in.readUTF(); |
461 | 470 | //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); | |
479 | 473 | out.flush(); |
480 | 474 | break; |
481 | 475 | |
551 | 545 | return status; |
552 | 546 | } |
553 | 547 | |
554 | private byte[] locateClass(String name) { | |
548 | private AgentRemoteClassData locateClass(String name) { | |
555 | 549 | //System.err.println("locateClass: " + name); |
556 | 550 | if (classPath != null) { |
557 | 551 | String cname = name.replace('.', '/') + ".class"; |
561 | 555 | data = readFromDir(cname, classPath[i]); |
562 | 556 | else |
563 | 557 | 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; | |
570 | 572 | } |
571 | 573 | |
572 | 574 | private byte[] locateData(String name) { |
662 | 664 | |
663 | 665 | private File[] classPath; |
664 | 666 | private boolean sharedCl; |
667 | private int timeout = 0; | |
665 | 668 | private Hashtable zips = new Hashtable(); |
666 | 669 | } |
667 | 670 |
181 | 181 | AgentManager mgr = AgentManager.access(); |
182 | 182 | ActiveAgentPool pool = mgr.getActiveAgentPool(); |
183 | 183 | |
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}); | |
191 | 185 | } |
192 | 186 | } |
193 | 187 |
785 | 785 | |
786 | 786 | for (int i = 0; i < modeOptions.length; i++) { |
787 | 787 | 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 | } | |
790 | 792 | } |
791 | 793 | |
792 | 794 | // 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 | } |
32 | 32 | import java.lang.reflect.Constructor; |
33 | 33 | import java.lang.reflect.InvocationTargetException; |
34 | 34 | import java.net.URL; |
35 | import java.nio.charset.StandardCharsets; | |
35 | 36 | import java.util.Enumeration; |
36 | 37 | import java.util.Vector; |
37 | 38 | import com.sun.javatest.util.StringArray; |
95 | 96 | * @throws IOException if any errors occurred reading the URL |
96 | 97 | */ |
97 | 98 | 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())); | |
99 | 100 | } |
100 | 101 | |
101 | 102 | |
181 | 182 | } |
182 | 183 | |
183 | 184 | /** |
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 | /** | |
184 | 201 | * Enumerate the entries of the map. |
185 | 202 | * @return an enumeration of the translation entries within the map |
186 | 203 | */ |
69 | 69 | String host = null; |
70 | 70 | int port = -1; |
71 | 71 | String tag = null; |
72 | int timeout = 0; | |
72 | 73 | boolean localizeArgs = false; |
73 | 74 | |
74 | 75 | // analyze options |
95 | 96 | } |
96 | 97 | else if ((args[i].equals("-t") || args[i].equals("-tag")) && i+1 < args.length) { |
97 | 98 | 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 | } | |
98 | 107 | } |
99 | 108 | else |
100 | 109 | return Status.error("Unrecognized option: " + args[i]); |
132 | 141 | t.setClassPath(classPath); |
133 | 142 | |
134 | 143 | t.setSharedClassLoader(sharedCl); |
144 | t.setAgentCommandTimeout(timeout); | |
135 | 145 | |
136 | 146 | err.println("Executing command via " + t.getConnection().getName()); |
137 | 147 |
3 | 3 | |
4 | 4 | Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved. |
5 | 5 | DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
6 | ||
6 | ||
7 | 7 | This code is free software; you can redistribute it and/or modify it |
8 | 8 | under the terms of the GNU General Public License version 2 only, as |
9 | 9 | published by the Free Software Foundation. Oracle designates this |
10 | 10 | particular file as subject to the "Classpath" exception as provided |
11 | 11 | by Oracle in the LICENSE file that accompanied this code. |
12 | ||
12 | ||
13 | 13 | This code is distributed in the hope that it will be useful, but WITHOUT |
14 | 14 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
15 | 15 | FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
16 | 16 | version 2 for more details (a copy is included in the LICENSE file that |
17 | 17 | accompanied this code). |
18 | ||
18 | ||
19 | 19 | You should have received a copy of the GNU General Public License version |
20 | 20 | 2 along with this work; if not, write to the Free Software Foundation, |
21 | 21 | Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
22 | ||
22 | ||
23 | 23 | Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
24 | 24 | or visit www.oracle.com if you need additional information or have any |
25 | 25 | questions. |
29 | 29 | PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp Index Version 1.0//EN" |
30 | 30 | "http://java.sun.com/products/javahelp/index_1_0.dtd"> |
31 | 31 | |
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"> | |
38 | 33 | |
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"/> | |
39 | 39 | |
40 | <!-- P --> | |
41 | <indexitem text="passive agent" target="passiveAgent.glossary"/> | |
40 | <!-- B --> | |
42 | 41 | |
42 | <!-- C --> | |
43 | 43 | |
44 | <!-- S --> | |
45 | <indexitem text="serial agent" target="serialAgent.glossary"/> | |
44 | <!-- D --> | |
46 | 45 | |
46 | <!-- E --> | |
47 | 47 | |
48 | <!-- T --> | |
49 | <indexitem text="test manager" target="testManager.glossary"/> | |
50 | <indexitem text="test suite" target="testSuite.glossary"/> | |
48 | <!-- F --> | |
51 | 49 | |
52 | <!-- W --> | |
53 | <indexitem text="work directory" target="workDirectory.glossary"/> | |
50 | <!-- G --> | |
54 | 51 | |
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"/> | |
55 | 89 | </index> |
3 | 3 | |
4 | 4 | Copyright (c) 2001, 2009, Oracle and/or its affiliates. All rights reserved. |
5 | 5 | DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
6 | ||
6 | ||
7 | 7 | This code is free software; you can redistribute it and/or modify it |
8 | 8 | under the terms of the GNU General Public License version 2 only, as |
9 | 9 | published by the Free Software Foundation. Oracle designates this |
10 | 10 | particular file as subject to the "Classpath" exception as provided |
11 | 11 | by Oracle in the LICENSE file that accompanied this code. |
12 | ||
12 | ||
13 | 13 | This code is distributed in the hope that it will be useful, but WITHOUT |
14 | 14 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
15 | 15 | FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
16 | 16 | version 2 for more details (a copy is included in the LICENSE file that |
17 | 17 | accompanied this code). |
18 | ||
18 | ||
19 | 19 | You should have received a copy of the GNU General Public License version |
20 | 20 | 2 along with this work; if not, write to the Free Software Foundation, |
21 | 21 | Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
22 | ||
22 | ||
23 | 23 | Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
24 | 24 | or visit www.oracle.com if you need additional information or have any |
25 | 25 | questions. |
29 | 29 | PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp Index Version 1.0//EN" |
30 | 30 | "http://java.sun.com/products/javahelp/index_1_0.dtd"> |
31 | 31 | |
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" /> | |
102 | 103 | </index> |
3 | 3 | |
4 | 4 | Copyright (c) 2002, 2009, Oracle and/or its affiliates. All rights reserved. |
5 | 5 | DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
6 | ||
6 | ||
7 | 7 | This code is free software; you can redistribute it and/or modify it |
8 | 8 | under the terms of the GNU General Public License version 2 only, as |
9 | 9 | published by the Free Software Foundation. Oracle designates this |
10 | 10 | particular file as subject to the "Classpath" exception as provided |
11 | 11 | by Oracle in the LICENSE file that accompanied this code. |
12 | ||
12 | ||
13 | 13 | This code is distributed in the hope that it will be useful, but WITHOUT |
14 | 14 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
15 | 15 | FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
16 | 16 | version 2 for more details (a copy is included in the LICENSE file that |
17 | 17 | accompanied this code). |
18 | ||
18 | ||
19 | 19 | You should have received a copy of the GNU General Public License version |
20 | 20 | 2 along with this work; if not, write to the Free Software Foundation, |
21 | 21 | Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
22 | ||
22 | ||
23 | 23 | Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
24 | 24 | or visit www.oracle.com if you need additional information or have any |
25 | 25 | questions. |
28 | 28 | <!DOCTYPE map |
29 | 29 | PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp Map Version 1.0//EN" |
30 | 30 | "http://java.sun.com/products/javahelp/map_1_0.dtd"> |
31 | ||
32 | 31 | <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" /> | |
75 | 109 | </map> |
39 | 39 | cmgr.help.monitorAgent.desc=Start the Agent Monitor tool |
40 | 40 | cmgr.help.startAgentPool.name=-startAgentPool |
41 | 41 | 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} | |
43 | 43 | cmgr.missingArg.err=Argument missing |
44 | 44 | |
45 | 45 | tmgr.openMonitor.act=Agent Monitor... |
37 | 37 | import java.awt.event.HierarchyListener; |
38 | 38 | import java.io.File; |
39 | 39 | import java.util.Map; |
40 | import javax.help.CSH; | |
41 | 40 | import javax.swing.BorderFactory; |
42 | 41 | import javax.swing.JLabel; |
43 | 42 | import javax.swing.JMenu; |
48 | 47 | import javax.swing.event.ChangeEvent; |
49 | 48 | import javax.swing.event.ChangeListener; |
50 | 49 | |
50 | import com.sun.javatest.tool.jthelp.ContextHelpManager; | |
51 | 51 | import com.sun.javatest.InterviewParameters; |
52 | 52 | import com.sun.javatest.TestSuite; |
53 | 53 | import com.sun.javatest.WorkDirectory; |
183 | 183 | tabs.addChangeListener(new ChangeListener() { |
184 | 184 | public void stateChanged(ChangeEvent e) { |
185 | 185 | Component c = tabs.getSelectedComponent(); |
186 | CSH.setHelpIDString(tabs, CSH.getHelpIDString(c)); | |
186 | ContextHelpManager.setHelpIDString(tabs, ContextHelpManager.getHelpIDString(c)); | |
187 | 187 | } |
188 | 188 | }); |
189 | CSH.setHelpIDString(tabs, CSH.getHelpIDString(panes[0])); | |
189 | ContextHelpManager.setHelpIDString(tabs, ContextHelpManager.getHelpIDString(panes[0])); | |
190 | 190 | |
191 | 191 | add(tabs, BorderLayout.CENTER); |
192 | 192 |
25 | 25 | */ |
26 | 26 | package com.sun.javatest.audit; |
27 | 27 | |
28 | import javax.help.CSH; | |
28 | import com.sun.javatest.tool.jthelp.ContextHelpManager; | |
29 | 29 | |
30 | 30 | import com.sun.javatest.tool.UIFactory; |
31 | 31 | |
32 | 32 | class BadChecksumPane extends ListPane { |
33 | 33 | BadChecksumPane(UIFactory uif) { |
34 | 34 | super("badChecksum", uif); |
35 | CSH.setHelpIDString(this, "audit.badChecksumTab.csh"); | |
35 | ContextHelpManager.setHelpIDString(this, "audit.badChecksumTab.csh"); | |
36 | 36 | } |
37 | 37 | |
38 | 38 | void show(Audit audit) { |
27 | 27 | |
28 | 28 | import com.sun.javatest.tool.UIFactory; |
29 | 29 | |
30 | import javax.help.CSH; | |
30 | import com.sun.javatest.tool.jthelp.ContextHelpManager; | |
31 | 31 | |
32 | 32 | |
33 | 33 | class BadTestCaseTestsPane extends ListPane { |
34 | 34 | BadTestCaseTestsPane(UIFactory uif) { |
35 | 35 | super("badTestCaseTests", uif); |
36 | CSH.setHelpIDString(this, "audit.badTestCasesTab.csh"); | |
36 | ContextHelpManager.setHelpIDString(this, "audit.badTestCasesTab.csh"); | |
37 | 37 | } |
38 | 38 | |
39 | 39 | void show(Audit audit) { |
25 | 25 | */ |
26 | 26 | package com.sun.javatest.audit; |
27 | 27 | |
28 | import javax.help.CSH; | |
28 | import com.sun.javatest.tool.jthelp.ContextHelpManager; | |
29 | 29 | |
30 | 30 | import com.sun.javatest.tool.UIFactory; |
31 | 31 | |
33 | 33 | class BadTestDescriptionPane extends ListPane { |
34 | 34 | BadTestDescriptionPane(UIFactory uif) { |
35 | 35 | super("badTestDesc", uif); |
36 | CSH.setHelpIDString(this, "audit.badTestDescriptionTab.csh"); | |
36 | ContextHelpManager.setHelpIDString(this, "audit.badTestDescriptionTab.csh"); | |
37 | 37 | } |
38 | 38 | |
39 | 39 | void show(Audit audit) { |
25 | 25 | */ |
26 | 26 | package com.sun.javatest.audit; |
27 | 27 | |
28 | import javax.help.CSH; | |
28 | import com.sun.javatest.tool.jthelp.ContextHelpManager; | |
29 | 29 | |
30 | 30 | import com.sun.javatest.tool.UIFactory; |
31 | 31 | |
33 | 33 | class BadTestsPane extends ListPane { |
34 | 34 | BadTestsPane(UIFactory uif) { |
35 | 35 | super("badTests", uif); |
36 | CSH.setHelpIDString(this, "audit.badResultFileTab.csh"); | |
36 | ContextHelpManager.setHelpIDString(this, "audit.badResultFileTab.csh"); | |
37 | 37 | } |
38 | 38 | |
39 | 39 | void show(Audit audit) { |
28 | 28 | import java.io.IOException; |
29 | 29 | import java.io.StringWriter; |
30 | 30 | import java.util.Date; |
31 | import javax.help.CSH; | |
32 | 31 | import javax.swing.BorderFactory; |
33 | 32 | import javax.swing.JEditorPane; |
34 | 33 | import javax.swing.JScrollPane; |
35 | 34 | |
35 | import com.sun.javatest.tool.jthelp.ContextHelpManager; | |
36 | 36 | import com.sun.javatest.Status; |
37 | 37 | import com.sun.javatest.TestDescription; |
38 | 38 | import com.sun.javatest.TestResult; |
55 | 55 | JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); |
56 | 56 | setBody(sp); |
57 | 57 | |
58 | CSH.setHelpIDString(this, "audit.summaryTab.csh"); | |
58 | ContextHelpManager.setHelpIDString(this, "audit.summaryTab.csh"); | |
59 | 59 | |
60 | 60 | OK = uif.getI18NString("smry.state.OK"); |
61 | 61 | ERROR = uif.getI18NString("smry.state.error"); |
94 | 94 | private CustomFilter filter = new CustomFilterAdapter(); |
95 | 95 | |
96 | 96 | void setCustomFilter(String filterClassName) throws ClassNotFoundException, InstantiationException, IllegalAccessException { |
97 | Class c = Class.forName(filterClassName); | |
97 | Class c = Class.forName(filterClassName, true, ClassLoader.getSystemClassLoader()); | |
98 | 98 | filter = (CustomFilter) c.newInstance(); |
99 | 99 | } |
100 | 100 |
25 | 25 | */ |
26 | 26 | package com.sun.javatest.cof; |
27 | 27 | |
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; | |
32 | 30 | import java.util.ArrayList; |
33 | 31 | import java.util.HashMap; |
34 | 32 | import java.util.List; |
51 | 49 | table = new HashMap<String, ArrayList<String>>(); |
52 | 50 | BufferedReader r = null; |
53 | 51 | try { |
54 | r = new BufferedReader(new FileReader(mtl)); | |
52 | r = new BufferedReader(new InputStreamReader(new FileInputStream(mtl), StandardCharsets.UTF_8)); | |
55 | 53 | String line; |
56 | 54 | while ((line = r.readLine()) != null) { |
57 | 55 | StringTokenizer st = new StringTokenizer(line); |
26 | 26 | package com.sun.javatest.cof; |
27 | 27 | |
28 | 28 | 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.*; | |
40 | 31 | import java.nio.channels.FileChannel; |
32 | import java.nio.charset.StandardCharsets; | |
41 | 33 | import java.util.Vector; |
42 | 34 | |
43 | 35 | import com.sun.javatest.TestSuite; |
364 | 356 | public void writeReport(Report r, File outputFile) throws Fault { |
365 | 357 | // creating report |
366 | 358 | try { |
367 | XMLWriter out = new XMLWriter(new FileWriter(outputFile)); | |
359 | XMLWriter out = new XMLWriter(new BufferedWriter(new OutputStreamWriter(new FileOutputStream(outputFile), StandardCharsets.UTF_8))); | |
368 | 360 | r.write(out); |
369 | 361 | out.close(); |
370 | 362 | } catch (IOException e) { |
57 | 57 | import javax.swing.table.TableColumn; |
58 | 58 | import javax.swing.table.TableModel; |
59 | 59 | |
60 | import javax.help.CSH; | |
61 | ||
60 | import com.sun.javatest.tool.jthelp.ContextHelpManager; | |
62 | 61 | import com.sun.javatest.TestFilter; |
63 | 62 | import com.sun.javatest.TestResult; |
64 | 63 | import com.sun.javatest.TestResultTable; |
95 | 94 | super("fo", uif, bpm, ttm, "br.fo"); |
96 | 95 | |
97 | 96 | init(); |
98 | CSH.setHelpIDString(this, "browse.filteredOutTab.csh"); | |
97 | ContextHelpManager.setHelpIDString(this, "browse.filteredOutTab.csh"); | |
99 | 98 | |
100 | 99 | cacheWatcher = new CacheObserver(); |
101 | 100 | } |
38 | 38 | import java.awt.image.BufferedImage; |
39 | 39 | import java.util.Arrays; |
40 | 40 | |
41 | import javax.help.CSH; | |
42 | ||
43 | 41 | import javax.swing.BorderFactory; |
44 | 42 | import javax.swing.Box; |
45 | 43 | import javax.swing.Icon; |
62 | 60 | import com.sun.javatest.tool.PieChart; |
63 | 61 | import com.sun.javatest.tool.UIFactory; |
64 | 62 | import com.sun.javatest.util.Debug; |
63 | import com.sun.javatest.tool.jthelp.ContextHelpManager; | |
65 | 64 | |
66 | 65 | /** |
67 | 66 | * Subpanel of BranchPanel. This panel displays a summary of tests below the given |
84 | 83 | pieColors[pieColors.length - 1] = I18NUtils.getStatusColor(I18NUtils.FILTERED_OUT); |
85 | 84 | } |
86 | 85 | |
87 | CSH.setHelpIDString(this, "browse.summaryTab.csh"); | |
86 | ContextHelpManager.setHelpIDString(this, "browse.summaryTab.csh"); | |
88 | 87 | |
89 | 88 | JPanel bodyPanel = uif.createPanel("br.summ.body", false); |
90 | 89 | bodyPanel.setLayout(new GridBagLayout()); |
65 | 65 | import javax.swing.table.TableColumn; |
66 | 66 | import javax.swing.table.TableModel; |
67 | 67 | |
68 | import javax.help.CSH; | |
69 | ||
70 | 68 | import com.sun.javatest.Harness; |
71 | 69 | import com.sun.javatest.JavaTestError; |
72 | 70 | import com.sun.javatest.Status; |
78 | 76 | import com.sun.javatest.util.Debug; |
79 | 77 | import com.sun.javatest.util.I18NResourceBundle; |
80 | 78 | import com.sun.javatest.util.StringArray; |
79 | import com.sun.javatest.tool.jthelp.ContextHelpManager; | |
81 | 80 | import java.awt.datatransfer.Clipboard; |
82 | 81 | |
83 | 82 | /** |
109 | 108 | // the enableHelp lines below are checked during the build |
110 | 109 | switch (state) { |
111 | 110 | case Status.PASSED: |
112 | CSH.setHelpIDString(this, "browse.passedTab.csh"); | |
111 | ContextHelpManager.setHelpIDString(this, "browse.passedTab.csh"); | |
113 | 112 | break; |
114 | 113 | case Status.FAILED: |
115 | CSH.setHelpIDString(this, "browse.failedTab.csh"); | |
114 | ContextHelpManager.setHelpIDString(this, "browse.failedTab.csh"); | |
116 | 115 | break; |
117 | 116 | case Status.ERROR: |
118 | CSH.setHelpIDString(this, "browse.errorTab.csh"); | |
117 | ContextHelpManager.setHelpIDString(this, "browse.errorTab.csh"); | |
119 | 118 | break; |
120 | 119 | case Status.NOT_RUN: |
121 | CSH.setHelpIDString(this, "browse.notRunTab.csh"); | |
120 | ContextHelpManager.setHelpIDString(this, "browse.notRunTab.csh"); | |
122 | 121 | break; |
123 | 122 | case BranchPanel.STATUS_FILTERED: |
124 | CSH.setHelpIDString(this, "browse.filteredOutTab.csh"); | |
123 | ContextHelpManager.setHelpIDString(this, "browse.filteredOutTab.csh"); | |
125 | 124 | break; |
126 | 125 | } // switch |
127 | 126 |
31 | 31 | import java.awt.event.ComponentListener; |
32 | 32 | import java.awt.event.ComponentEvent; |
33 | 33 | |
34 | import javax.help.CSH; | |
35 | 34 | import javax.swing.BorderFactory; |
36 | 35 | import javax.swing.JComponent; |
37 | 36 | import javax.swing.JPanel; |
50 | 49 | import com.sun.javatest.TestFilter; |
51 | 50 | import com.sun.javatest.TestResult; |
52 | 51 | import com.sun.javatest.TestResultTable; |
52 | import com.sun.javatest.tool.jthelp.ContextHelpManager; | |
53 | 53 | |
54 | 54 | import com.sun.javatest.tool.IconFactory; |
55 | 55 | import com.sun.javatest.tool.UIFactory; |
177 | 177 | */ |
178 | 178 | |
179 | 179 | currPanel = summPanel; |
180 | CSH.setHelpIDString(bPane, CSH.getHelpIDString(currPanel)); | |
180 | ContextHelpManager.setHelpIDString(bPane, ContextHelpManager.getHelpIDString(currPanel)); | |
181 | 181 | |
182 | 182 | setLayout(new BorderLayout()); |
183 | 183 | add(bPane, BorderLayout.CENTER); |
223 | 223 | |
224 | 224 | if (newPanel != currPanel) { |
225 | 225 | // 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)); | |
227 | 227 | currPanel = newPanel; |
228 | 228 | } |
229 | 229 |
30 | 30 | import java.io.File; |
31 | 31 | import java.io.IOException; |
32 | 32 | import java.util.Arrays; |
33 | import javax.help.CSH; | |
34 | 33 | import javax.swing.JComboBox; |
35 | 34 | import javax.swing.JFileChooser; |
36 | 35 | import javax.swing.JLabel; |
38 | 37 | import javax.swing.event.ListDataEvent; |
39 | 38 | import javax.swing.event.ListDataListener; |
40 | 39 | |
40 | import com.sun.javatest.tool.jthelp.ContextHelpManager; | |
41 | 41 | import com.sun.javatest.InterviewParameters; |
42 | 42 | import com.sun.javatest.TestEnvironment; |
43 | 43 | import com.sun.javatest.Parameters.EnvParameters; |
51 | 51 | { |
52 | 52 | CE_EnvironmentPane(UIFactory uif, InterviewParameters config) { |
53 | 53 | super(uif, config, "env"); |
54 | CSH.setHelpIDString(this, "confEdit.envTab.csh"); | |
54 | ContextHelpManager.setHelpIDString(this, "confEdit.envTab.csh"); | |
55 | 55 | |
56 | 56 | // save this value, so we can make files test-suite-relative later |
57 | 57 | testSuite = config.getTestSuite(); |
37 | 37 | import java.net.URL; |
38 | 38 | import java.text.DateFormat; |
39 | 39 | import java.util.Date; |
40 | import javax.help.CSH; | |
41 | 40 | import javax.swing.BorderFactory; |
42 | 41 | import javax.swing.ButtonGroup; |
43 | 42 | import javax.swing.JButton; |
51 | 50 | import javax.swing.event.ChangeEvent; |
52 | 51 | import javax.swing.event.ChangeListener; |
53 | 52 | |
53 | import com.sun.javatest.tool.jthelp.ContextHelpManager; | |
54 | 54 | import com.sun.javatest.InterviewParameters; |
55 | 55 | import com.sun.javatest.Parameters.ExcludeListParameters; |
56 | 56 | import com.sun.javatest.Parameters.MutableExcludeListParameters; |
176 | 176 | } |
177 | 177 | |
178 | 178 | private void initGUI() { |
179 | CSH.setHelpIDString(this, "confEdit.excludeTab.csh"); | |
179 | ContextHelpManager.setHelpIDString(this, "confEdit.excludeTab.csh"); | |
180 | 180 | |
181 | 181 | JPanel p = uif.createPanel("ce.excl", new BorderLayout(), false); |
182 | 182 |
29 | 29 | import java.awt.GridBagLayout; |
30 | 30 | import java.text.NumberFormat; |
31 | 31 | import java.text.ParsePosition; |
32 | import javax.help.CSH; | |
33 | 32 | import javax.swing.JLabel; |
34 | 33 | import javax.swing.JPanel; |
35 | 34 | import javax.swing.JTextField; |
36 | 35 | |
36 | import com.sun.javatest.tool.jthelp.ContextHelpManager; | |
37 | 37 | import com.sun.javatest.InterviewParameters; |
38 | 38 | import com.sun.javatest.Parameters.ConcurrencyParameters; |
39 | 39 | import com.sun.javatest.Parameters.MutableConcurrencyParameters; |
180 | 180 | } |
181 | 181 | |
182 | 182 | private void initGUI() { |
183 | CSH.setHelpIDString(this, "confEdit.execTab.csh"); | |
183 | ContextHelpManager.setHelpIDString(this, "confEdit.execTab.csh"); | |
184 | 184 | |
185 | 185 | JPanel p = uif.createPanel("ce.exec", new GridBagLayout(), false); |
186 | 186 |
30 | 30 | import java.awt.GridBagLayout; |
31 | 31 | import java.awt.event.ActionEvent; |
32 | 32 | import java.awt.event.ActionListener; |
33 | import javax.help.CSH; | |
34 | import javax.help.Map; | |
35 | import javax.help.JHelpContentViewer; | |
36 | 33 | import javax.swing.JButton; |
37 | 34 | import javax.swing.JLabel; |
38 | 35 | import javax.swing.JMenu; |
48 | 45 | import com.sun.interview.wizard.WizPane; |
49 | 46 | import com.sun.javatest.InterviewParameters; |
50 | 47 | 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; | |
51 | 51 | |
52 | 52 | class CE_FullView extends CE_View |
53 | 53 | { |
100 | 100 | |
101 | 101 | private void initGUI() { |
102 | 102 | setName(FULL); |
103 | CSH.setHelpIDString(this, "confEdit.fullView.csh"); | |
103 | ContextHelpManager.setHelpIDString(this, "confEdit.fullView.csh"); | |
104 | 104 | |
105 | 105 | String[] searchMenuItems = { FIND, FIND_NEXT }; |
106 | 106 | searchMenu = uif.createMenu("ce.search", searchMenuItems, localListener); |
171 | 171 | if (q instanceof ErrorQuestion) |
172 | 172 | return; |
173 | 173 | |
174 | Map.ID id = Help.getHelpID(q); | |
174 | HelpID helpId = Help.getHelpID(q); | |
175 | 175 | // uugh |
176 | if (id == null) | |
176 | if (helpId == null) | |
177 | 177 | System.err.println("WARNING: no help for " + q.getKey()); |
178 | 178 | else |
179 | showInfo(id); | |
179 | showInfo(helpId); | |
180 | 180 | } |
181 | 181 | |
182 | 182 | private class Listener |
29 | 29 | import java.awt.GridBagConstraints; |
30 | 30 | import java.awt.GridBagLayout; |
31 | 31 | import java.io.File; |
32 | import javax.help.CSH; | |
33 | 32 | import javax.swing.ButtonGroup; |
34 | 33 | import javax.swing.JLabel; |
35 | 34 | import javax.swing.JPanel; |
42 | 41 | import com.sun.javatest.tool.EditableFileList; |
43 | 42 | import com.sun.javatest.tool.FileChooser; |
44 | 43 | import com.sun.javatest.tool.UIFactory; |
44 | import com.sun.javatest.tool.jthelp.ContextHelpManager; | |
45 | 45 | |
46 | 46 | /** |
47 | 47 | * Standard values view, known failures list (KFL) panel. |
114 | 114 | } |
115 | 115 | |
116 | 116 | private void initGUI() { |
117 | CSH.setHelpIDString(this, "confEdit.kflTab.csh"); | |
117 | ContextHelpManager.setHelpIDString(this, "confEdit.kflTab.csh"); | |
118 | 118 | |
119 | 119 | JPanel p = uif.createPanel("ce.kfl", new BorderLayout(), false); |
120 | 120 | initToolBar(); |
38 | 38 | import java.awt.event.ItemListener; |
39 | 39 | import java.util.Arrays; |
40 | 40 | import java.util.HashSet; |
41 | import javax.help.CSH; | |
42 | 41 | import javax.swing.BorderFactory; |
43 | 42 | import javax.swing.Icon; |
44 | 43 | import javax.swing.JButton; |
63 | 62 | import com.sun.javatest.Parameters.KeywordsParameters; |
64 | 63 | import com.sun.javatest.Parameters.MutableKeywordsParameters; |
65 | 64 | import com.sun.javatest.tool.UIFactory; |
65 | import com.sun.javatest.tool.jthelp.ContextHelpManager; | |
66 | 66 | import java.awt.Container; |
67 | 67 | import java.awt.Dialog; |
68 | 68 | import java.awt.Frame; |
194 | 194 | } |
195 | 195 | |
196 | 196 | private void initGUI() { |
197 | CSH.setHelpIDString(this, "confEdit.keywordsTab.csh"); | |
197 | ContextHelpManager.setHelpIDString(this, "confEdit.keywordsTab.csh"); | |
198 | 198 | |
199 | 199 | JPanel p = uif.createPanel("ce.keywords", new BorderLayout(), false); |
200 | 200 |
27 | 27 | |
28 | 28 | import java.awt.GridBagConstraints; |
29 | 29 | import java.awt.GridBagLayout; |
30 | import javax.help.CSH; | |
31 | 30 | import javax.swing.BorderFactory; |
32 | 31 | import javax.swing.JCheckBox; |
33 | 32 | import javax.swing.JLabel; |
40 | 39 | import com.sun.javatest.Parameters.PriorStatusParameters; |
41 | 40 | import com.sun.javatest.Status; |
42 | 41 | import com.sun.javatest.tool.UIFactory; |
42 | import com.sun.javatest.tool.jthelp.ContextHelpManager; | |
43 | 43 | |
44 | 44 | class CE_PriorStatusPane extends CE_StdPane |
45 | 45 | { |
121 | 121 | } |
122 | 122 | |
123 | 123 | private void initGUI() { |
124 | CSH.setHelpIDString(this, "confEdit.statusTab.csh"); | |
124 | ContextHelpManager.setHelpIDString(this, "confEdit.statusTab.csh"); | |
125 | 125 | |
126 | 126 | JPanel p = uif.createPanel("ce.status", new GridBagLayout(), |
127 | 127 | false); |
35 | 35 | import java.awt.GridBagLayout; |
36 | 36 | import java.awt.Insets; |
37 | 37 | 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; | |
42 | 38 | import javax.swing.BorderFactory; |
43 | 39 | import javax.swing.JButton; |
44 | 40 | import javax.swing.JPanel; |
52 | 48 | import com.sun.javatest.InterviewParameters; |
53 | 49 | import com.sun.javatest.tool.ToolDialog; |
54 | 50 | 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; | |
55 | 55 | |
56 | 56 | class CE_StdView extends CE_View |
57 | 57 | { |
166 | 166 | |
167 | 167 | private void initGUI() { |
168 | 168 | setName(STD); |
169 | CSH.setHelpIDString(this, "confEdit.stdView.csh"); | |
169 | ContextHelpManager.setHelpIDString(this, "confEdit.stdView.csh"); | |
170 | 170 | |
171 | 171 | setLayout(new BorderLayout()); |
172 | 172 | initBody(); |
248 | 248 | } |
249 | 249 | |
250 | 250 | 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) { | |
253 | 253 | String s = "ConfigEditor.stdValues." + p.getName(); |
254 | 254 | HelpSet configHelpSet = Help.getHelpSet(config); |
255 | 255 | 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); | |
261 | 258 | } |
262 | 259 | } |
263 | if (id == null) | |
260 | if (helpId == null) | |
264 | 261 | System.err.println("CESV: no help for " + p); |
265 | 262 | else |
266 | showInfo(id); | |
263 | showInfo(helpId); | |
267 | 264 | } |
268 | 265 | |
269 | 266 | private JTabbedPane tabs; |
296 | 293 | |
297 | 294 | private void updateCSHAndInfo() { |
298 | 295 | CE_StdPane p = (CE_StdPane) (tabs.getSelectedComponent()); |
299 | CSH.setHelpIDString(tabs, CSH.getHelpIDString(p)); | |
296 | ContextHelpManager.setHelpIDString(tabs, ContextHelpManager.getHelpIDString(p)); | |
300 | 297 | if (isInfoVisible()) |
301 | 298 | showInfoForTab(p); |
302 | 299 | } |
29 | 29 | import java.awt.GridBagLayout; |
30 | 30 | import java.awt.event.ActionEvent; |
31 | 31 | 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; | |
37 | 34 | import java.util.HashSet; |
38 | 35 | import java.util.Set; |
39 | import javax.help.CSH; | |
40 | 36 | import javax.swing.ButtonGroup; |
41 | 37 | import javax.swing.JButton; |
42 | 38 | import javax.swing.JFileChooser; |
53 | 49 | import com.sun.javatest.tool.FileChooser; |
54 | 50 | import com.sun.javatest.tool.TestTreeSelectionPane; |
55 | 51 | import com.sun.javatest.tool.UIFactory; |
52 | import com.sun.javatest.tool.jthelp.ContextHelpManager; | |
56 | 53 | import java.util.ArrayList; |
57 | 54 | |
58 | 55 | /** |
129 | 126 | } |
130 | 127 | |
131 | 128 | private void initGUI() { |
132 | CSH.setHelpIDString(this, "confEdit.testsTab.csh"); | |
129 | ContextHelpManager.setHelpIDString(this, "confEdit.testsTab.csh"); | |
133 | 130 | |
134 | 131 | JPanel p = uif.createPanel("ce.tests", new GridBagLayout(), false); |
135 | 132 | |
199 | 196 | FileReader fr = null; |
200 | 197 | BufferedReader in = null; |
201 | 198 | try { |
202 | fr = new FileReader(file); | |
203 | in = new BufferedReader(fr); | |
199 | in = new BufferedReader(new InputStreamReader(new FileInputStream(file), StandardCharsets.UTF_8)); | |
204 | 200 | String line; |
205 | 201 | while ((line = in.readLine()) != null) { |
206 | 202 | line = line.trim(); |
26 | 26 | package com.sun.javatest.exec; |
27 | 27 | |
28 | 28 | import java.awt.event.ActionListener; |
29 | import javax.help.InvalidHelpSetContextException; | |
30 | import javax.help.JHelpContentViewer; | |
31 | import javax.help.Map; | |
32 | 29 | import javax.swing.JPanel; |
33 | 30 | |
34 | 31 | import com.sun.javatest.InterviewParameters; |
35 | import com.sun.javatest.JavaTestError; | |
36 | 32 | import com.sun.javatest.tool.ToolDialog; |
37 | 33 | import com.sun.javatest.tool.UIFactory; |
34 | import com.sun.javatest.tool.jthelp.HelpID; | |
35 | import com.sun.javatest.tool.jthelp.JHelpContentViewer; | |
38 | 36 | |
39 | 37 | abstract class CE_View extends JPanel |
40 | 38 | { |
68 | 66 | return (infoPanel != null); |
69 | 67 | } |
70 | 68 | |
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); | |
80 | 73 | } |
81 | 74 | |
82 | 75 | protected ToolDialog toolDialog; |
29 | 29 | import java.awt.event.ActionListener; |
30 | 30 | import java.awt.event.ComponentAdapter; |
31 | 31 | 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.*; | |
39 | 33 | import javax.swing.JButton; |
40 | 34 | import javax.swing.JComponent; |
41 | 35 | import javax.swing.JFileChooser; |
52 | 46 | import com.sun.javatest.tool.ToolDialog; |
53 | 47 | import com.sun.javatest.tool.UIFactory; |
54 | 48 | import java.awt.Dimension; |
49 | import java.nio.charset.StandardCharsets; | |
55 | 50 | import javax.swing.BorderFactory; |
56 | 51 | |
57 | 52 | class ChecklistBrowser extends ToolDialog |
226 | 221 | } |
227 | 222 | } |
228 | 223 | |
229 | FileWriter fw = null; | |
224 | Writer fw = null; | |
230 | 225 | Writer out = null; |
231 | 226 | try { |
232 | fw = new FileWriter(file); | |
227 | fw = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file), StandardCharsets.UTF_8)); | |
233 | 228 | out = new BufferedWriter(fw); |
234 | 229 | TextPane pane = (TextPane)body.getMediaPane(body.TEXT); |
235 | 230 | out.write(pane.getText()); |
0 | 0 | /* |
1 | 1 | * $Id$ |
2 | 2 | * |
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. | |
4 | 4 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5 | 5 | * |
6 | 6 | * This code is free software; you can redistribute it and/or modify it |
38 | 38 | * This method is called by the harness and it indicates to the viewer that it should |
39 | 39 | * check the given TestResult object for changes.<br> |
40 | 40 | * There can be three possible cases: |
41 | * <ul> | |
41 | 42 | * <li>TestResult is a different test, therefore the viewer should fully update the panel</li> |
42 | 43 | * <li>TestResult is the current test, the viewer should check the result for updates</li> |
43 | 44 | * <li>TestResult is null. There is no selected test.</li> |
45 | * </ul> | |
44 | 46 | * @param currTestResult Test result object which should be rendered in this |
45 | 47 | * panel immediately. May or may not be the one currently displayed. |
46 | 48 | */ |
29 | 29 | import java.awt.Frame; |
30 | 30 | import java.awt.GridBagConstraints; |
31 | 31 | 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; | |
38 | 32 | import javax.swing.BorderFactory; |
39 | 33 | import javax.swing.JDialog; |
40 | 34 | import javax.swing.JLabel; |
44 | 38 | |
45 | 39 | import com.sun.interview.Interview; |
46 | 40 | import com.sun.interview.Question; |
41 | import com.sun.javatest.tool.jthelp.JHelpContentViewer; | |
47 | 42 | |
48 | 43 | class DetailsBrowser extends JDialog { |
49 | 44 | DetailsBrowser(Component parent, Interview interview, JHelpContentViewer infoPanel) { |
60 | 55 | c.gridwidth = GridBagConstraints.REMAINDER; |
61 | 56 | c.weightx = 1; |
62 | 57 | |
63 | Listener listener = new Listener(); | |
58 | //Listener listener = new Listener(); | |
64 | 59 | |
65 | 60 | GridBagConstraints lc = new GridBagConstraints(); |
66 | 61 | lc.anchor = GridBagConstraints.EAST; |
91 | 86 | qp.add(keyField, fc); |
92 | 87 | |
93 | 88 | update(interview.getCurrentQuestion()); |
94 | interview.addObserver(listener); | |
89 | //interview.addObserver(listener); | |
95 | 90 | |
96 | 91 | p.add(qp, c); |
97 | 92 | |
120 | 115 | urlField.setEditable(false); |
121 | 116 | mp.add(urlField, fc); |
122 | 117 | |
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); | |
126 | 121 | |
127 | 122 | p.add(mp, c); |
128 | 123 | } |
145 | 140 | try { |
146 | 141 | if (helpSet != null) { |
147 | 142 | try { |
148 | Map.ID mid = Map.ID.create(q.getKey(), helpSet); | |
143 | Map.HelpID mid = Map.HelpID.create(q.getKey(), helpSet); | |
149 | 144 | URL u = helpSet.getLocalMap().getURLFromID(mid); |
150 | 145 | urlField.setText(u.toString()); |
151 | 146 | } |
165 | 160 | keyField.setText(q.getKey()); |
166 | 161 | } |
167 | 162 | |
168 | private void update(Map.ID id, URL u) { | |
163 | /*private void update(Map.HelpID id, URL u) { | |
169 | 164 | hsField.setText(id.getHelpSet().getTitle()); |
170 | 165 | idField.setText(id.getIDString()); |
171 | 166 | urlField.setText(u.toString()); |
172 | } | |
167 | }*/ | |
173 | 168 | |
174 | 169 | private static Frame getFrameParent(Component c) { |
175 | 170 | return (Frame)(SwingUtilities.getAncestorOfClass(Frame.class, c)); |
182 | 177 | private JTextField idField; |
183 | 178 | private JTextField urlField; |
184 | 179 | |
185 | private class Listener | |
180 | /*private class Listener | |
186 | 181 | implements HelpModelListener, Interview.Observer |
187 | 182 | { |
188 | 183 | // HelpModelListener |
198 | 193 | } |
199 | 194 | |
200 | 195 | public void finished() { } |
201 | } | |
196 | }*/ | |
202 | 197 | } |
29 | 29 | import com.sun.javatest.tool.Tool; |
30 | 30 | import com.sun.javatest.tool.ToolAction; |
31 | 31 | import com.sun.javatest.tool.UIFactory; |
32 | import com.sun.javatest.tool.jthelp.HelpBroker; | |
32 | 33 | import java.awt.event.ActionEvent; |
33 | 34 | import java.util.ArrayList; |
34 | 35 | import java.util.List; |
35 | 36 | import java.util.Map; |
36 | import javax.help.HelpBroker; | |
37 | 37 | import javax.swing.Action; |
38 | 38 | import javax.swing.JMenu; |
39 | 39 | |
100 | 100 | public void actionPerformed(ActionEvent e) { |
101 | 101 | HelpBroker b = tool.getHelpBroker(); |
102 | 102 | if (b != null) { |
103 | b.setCurrentID("browse.window.csh"); | |
104 | b.setDisplayed(true); | |
103 | b.displayCurrentID("browse.window.csh"); | |
105 | 104 | } else { |
106 | 105 | // could internationalize this, but the error isn't that helpful because a |
107 | 106 | // end-user probably can't fix the problem |
28 | 28 | import java.awt.EventQueue; |
29 | 29 | |
30 | 30 | import javax.accessibility.AccessibleContext; |
31 | import javax.help.CSH; | |
32 | 31 | |
33 | 32 | import javax.swing.BorderFactory; |
34 | 33 | import javax.swing.Icon; |
37 | 36 | |
38 | 37 | import com.sun.javatest.tool.UIFactory; |
39 | 38 | import com.sun.javatest.util.I18NResourceBundle; |
39 | import com.sun.javatest.tool.jthelp.ContextHelpManager; | |
40 | 40 | |
41 | 41 | class ElapsedTimeMonitor extends Monitor implements MonitorState.Observer { |
42 | 42 | ElapsedTimeMonitor(MonitorState ms, UIFactory uif) { |
137 | 137 | uif.setToolTip(this, "et.sm"); |
138 | 138 | AccessibleContext ac = getAccessibleContext(); |
139 | 139 | ac.setAccessibleName(uif.getI18NString("et.sm.name")); |
140 | CSH.setHelpIDString(this, "run.testProgress"); | |
140 | ContextHelpManager.setHelpIDString(this, "run.testProgress"); | |
141 | 141 | |
142 | 142 | update(); |
143 | 143 | } |
580 | 580 | } |
581 | 581 | } else { |
582 | 582 | 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); | |
587 | 585 | else { |
588 | 586 | setShortTitle(testSuiteName); |
589 | 587 | setI18NTitle("exec.title.tsName_wd.txt", new Object[]{testSuiteName, workDirPath}); |
0 | 0 | /* |
1 | 1 | * $Id$ |
2 | 2 | * |
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. | |
4 | 4 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5 | 5 | * |
6 | 6 | * This code is free software; you can redistribute it and/or modify it |
272 | 272 | if (QuickStartWizard.isQswDisabled()) { |
273 | 273 | return new Action[0]; |
274 | 274 | } else { |
275 | return new Action[] {openQuickStartAction}; | |
275 | return new Action[] {openTMQSWAction}; | |
276 | 276 | } |
277 | 277 | } |
278 | 278 | @Override |
363 | 363 | public Tool startTool() { |
364 | 364 | showQSW(); |
365 | 365 | return null; |
366 | /* | |
366 | /* | |
367 | 367 | Desktop d = getDesktop(); |
368 | 368 | Tool[] tools = d.getTools(); |
369 | 369 | if (tools != null) { |
377 | 377 | Tool t = new EmptyTool(this, "empty"); |
378 | 378 | d.addTool(t); |
379 | 379 | return t; |
380 | */ | |
380 | */ | |
381 | 381 | } |
382 | 382 | |
383 | 383 | /** |
626 | 626 | } |
627 | 627 | }; |
628 | 628 | |
629 | private Action openTMQSWAction = new ToolAction(i18n, "mgr.openTMQSW") { | |
630 | public void actionPerformed(ActionEvent e) { | |
631 | showQSW(); | |
632 | } | |
633 | }; | |
634 | ||
629 | 635 | //------------------------------------------------------------------------- |
630 | 636 | |
631 | 637 | private Action openTestSuiteAction = new ToolAction(i18n, "mgr.openTestSuite") { |
43 | 43 | import java.util.Map; |
44 | 44 | import java.util.Set; |
45 | 45 | 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; | |
50 | 46 | import javax.swing.BorderFactory; |
51 | 47 | import javax.swing.ButtonGroup; |
52 | 48 | import javax.swing.JCheckBoxMenuItem; |
69 | 65 | import com.sun.interview.Interview; |
70 | 66 | import com.sun.interview.Question; |
71 | 67 | import com.sun.javatest.InterviewParameters; |
72 | import com.sun.javatest.JavaTestError; | |
73 | 68 | import com.sun.javatest.TestSuite; |
74 | 69 | import com.sun.javatest.WorkDirectory; |
75 | 70 | import com.sun.javatest.exec.WorkDirChooseTool.ExecModelStub; |
79 | 74 | import com.sun.javatest.tool.Preferences; |
80 | 75 | import com.sun.javatest.tool.ToolDialog; |
81 | 76 | import com.sun.javatest.tool.UIFactory; |
77 | import com.sun.javatest.tool.jthelp.HelpID; | |
78 | import com.sun.javatest.tool.jthelp.JHelpContentViewer; | |
82 | 79 | import com.sun.javatest.util.Debug; |
83 | 80 | import java.util.ArrayList; |
84 | 81 | import java.util.List; |
205 | 202 | * Starts editing new config. Supposed to be called outside. |
206 | 203 | */ |
207 | 204 | 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 | } | |
209 | 213 | show(FULL_MODE); |
210 | 214 | } |
211 | 215 | |
1072 | 1076 | } |
1073 | 1077 | |
1074 | 1078 | 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) | |
1084 | 1082 | 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); | |
1089 | 1085 | } |
1090 | 1086 | |
1091 | 1087 |
36 | 36 | import java.awt.event.ComponentEvent; |
37 | 37 | import java.awt.event.ComponentListener; |
38 | 38 | import java.util.ResourceBundle; |
39 | ||
40 | import javax.help.CSH; | |
41 | 39 | |
42 | 40 | import javax.swing.JButton; |
43 | 41 | import javax.swing.JComboBox; |
59 | 57 | import com.sun.javatest.TestResult; |
60 | 58 | import com.sun.javatest.tool.Preferences; |
61 | 59 | import com.sun.javatest.tool.UIFactory; |
60 | import com.sun.javatest.tool.jthelp.ContextHelpManager; | |
62 | 61 | |
63 | 62 | /** |
64 | 63 | * The panel at the bottom of exec tool. |
225 | 224 | return c; |
226 | 225 | } |
227 | 226 | }); |
228 | CSH.setHelpIDString(selector, "run.testProgress"); | |
227 | ContextHelpManager.setHelpIDString(selector, "run.testProgress"); | |
229 | 228 | |
230 | 229 | GridBagConstraints gbc = new GridBagConstraints(); |
231 | 230 | gbc.weightx = 2.0d; |
40 | 40 | import java.awt.event.ActionListener; |
41 | 41 | import java.awt.print.PageFormat; |
42 | 42 | 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.*; | |
49 | 44 | import java.net.MalformedURLException; |
50 | 45 | import java.net.URL; |
46 | import java.nio.charset.StandardCharsets; | |
51 | 47 | import java.util.HashMap; |
52 | 48 | import java.util.Iterator; |
53 | 49 | import javax.imageio.ImageIO; |
646 | 642 | if (loadManually && "file".equals(url.getProtocol())) { |
647 | 643 | File file = new File(url.getFile()); |
648 | 644 | try { |
649 | Reader r = new BufferedReader(new FileReader(file)); | |
645 | Reader r = new BufferedReader(new InputStreamReader(new FileInputStream(file), StandardCharsets.UTF_8)); | |
650 | 646 | read(r, url); |
651 | 647 | r.close(); |
652 | 648 | } |
31 | 31 | import java.awt.event.ComponentListener; |
32 | 32 | import java.awt.event.ComponentEvent; |
33 | 33 | |
34 | import javax.help.CSH; | |
35 | 34 | import javax.swing.BorderFactory; |
36 | 35 | import javax.swing.DefaultListModel; |
37 | 36 | import javax.swing.JList; |
39 | 38 | import javax.swing.JScrollPane; |
40 | 39 | |
41 | 40 | import com.sun.javatest.tool.UIFactory; |
41 | import com.sun.javatest.tool.jthelp.ContextHelpManager; | |
42 | 42 | |
43 | 43 | import com.sun.javatest.util.Debug; |
44 | 44 | |
132 | 132 | } |
133 | 133 | }; |
134 | 134 | addComponentListener(cl); |
135 | CSH.setHelpIDString(this, "browse.multiselectionTab.csh"); | |
135 | ContextHelpManager.setHelpIDString(this, "browse.multiselectionTab.csh"); | |
136 | 136 | } |
137 | 137 | |
138 | 138 | protected void updatePanel(Object[] nodes) { |
0 | 0 | /* |
1 | 1 | * $Id$ |
2 | 2 | * |
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. | |
4 | 4 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5 | 5 | * |
6 | 6 | * This code is free software; you can redistribute it and/or modify it |
28 | 28 | import java.awt.GridBagConstraints; |
29 | 29 | import java.awt.GridBagLayout; |
30 | 30 | import java.util.Map; |
31 | import javax.help.HelpBroker; | |
32 | 31 | |
33 | 32 | import javax.swing.BorderFactory; |
34 | 33 | import javax.swing.Box; |
34 | import javax.swing.ButtonGroup; | |
35 | 35 | import javax.swing.JCheckBox; |
36 | 36 | import javax.swing.JLabel; |
37 | 37 | import javax.swing.JPanel; |
38 | import javax.swing.JRadioButton; | |
38 | 39 | import javax.swing.JTextArea; |
39 | 40 | import javax.swing.JTextField; |
40 | 41 | |
42 | 43 | import com.sun.javatest.tool.Preferences; |
43 | 44 | import com.sun.javatest.tool.PreferencesPane; |
44 | 45 | import com.sun.javatest.tool.UIFactory; |
46 | import com.sun.javatest.tool.jthelp.HelpBroker; | |
47 | ||
45 | 48 | import java.awt.Font; |
49 | ||
46 | 50 | |
47 | 51 | |
48 | 52 | class PrefsPane extends PreferencesPane |
54 | 58 | |
55 | 59 | @Override |
56 | 60 | public PreferencesPane[] getChildPanes() { |
57 | if (configEditorPane == null) | |
61 | if (configEditorPane == null) { | |
58 | 62 | configEditorPane = new ConfigEditorPane(); |
59 | if (reportingPane == null) | |
63 | } | |
64 | ||
65 | if (reportingPane == null) { | |
60 | 66 | reportingPane = new ReportingPane(); |
67 | } | |
68 | ||
69 | if (runPane == null) { | |
70 | runPane = new RunPane(); | |
71 | } | |
61 | 72 | |
62 | 73 | if (childPanes == null) |
63 | childPanes = new PreferencesPane[] { configEditorPane, reportingPane }; | |
74 | childPanes = new PreferencesPane[] { configEditorPane, reportingPane, runPane }; | |
64 | 75 | return childPanes; |
65 | 76 | } |
66 | 77 | |
75 | 86 | toolBarChk.setSelected(p == null || p.equals("true")); |
76 | 87 | p = (String) (m.get(ExecTool.FILTER_WARN_PREF)); |
77 | 88 | 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"))); | |
82 | 89 | p = (String) (m.get(TP_OutputSubpanel.LINE_WRAP_PREF)); |
83 | 90 | // selected by default |
84 | 91 | wrapResChk.setSelected((p == null ? true : p.equals("true"))); |
89 | 96 | super.save(m); |
90 | 97 | m.put(ExecTool.TOOLBAR_PREF, String.valueOf(toolBarChk.isSelected())); |
91 | 98 | 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())); | |
94 | 99 | m.put(TP_OutputSubpanel.LINE_WRAP_PREF, String.valueOf(wrapResChk.isSelected())); |
95 | 100 | } |
96 | 101 | |
104 | 109 | |
105 | 110 | add(createToolBarPanel(), c); |
106 | 111 | add(createFilterPanel(), c); |
107 | add(createExecutionPanel(), c); | |
108 | 112 | add(createTestRunMsgPanel(), c); |
109 | 113 | |
110 | 114 | c.weighty = 1; |
139 | 143 | return p; |
140 | 144 | } |
141 | 145 | |
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 | ||
160 | 146 | private JPanel createTestRunMsgPanel() { |
161 | 147 | JPanel p = uif.createPanel("exec.prefs.testrun", new GridBagLayout(), false); |
162 | 148 | GridBagConstraints c = new GridBagConstraints(); |
173 | 159 | private UIFactory uif; |
174 | 160 | private JCheckBox toolBarChk; |
175 | 161 | private JCheckBox filterWarnChk; |
176 | private JCheckBox tests2RunChk; | |
177 | private JCheckBox testSortingChk; // deceptive name, see i18n description | |
178 | 162 | private JCheckBox wrapResChk; |
179 | 163 | private ConfigEditorPane configEditorPane; |
180 | 164 | private ReportingPane reportingPane; |
165 | private RunPane runPane; | |
181 | 166 | private PreferencesPane[] childPanes; |
182 | 167 | |
183 | 168 | private class ConfigEditorPane extends PreferencesPane { |
286 | 271 | |
287 | 272 | JPanel p = new JPanel(new GridBagLayout()); |
288 | 273 | JLabel lbl = uif.createLabel("ep.rpt.url"); |
289 | //JTextArea infoTa = uif.createMessageArea("ep.rpt.url"); | |
290 | //lbl.setOpaque(false); | |
291 | 274 | p.add(lbl, c); |
292 | 275 | |
293 | 276 | bugUrlTf = uif.createInputField("ep.rpt.url", lbl); |
312 | 295 | |
313 | 296 | private JTextField bugUrlTf; |
314 | 297 | } |
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 | } | |
315 | 411 | } |
29 | 29 | import java.awt.GridBagConstraints; |
30 | 30 | import java.awt.GridBagLayout; |
31 | 31 | import java.io.File; |
32 | import javax.help.CSH; | |
33 | 32 | import javax.swing.BorderFactory; |
34 | 33 | import javax.swing.JButton; |
35 | 34 | import javax.swing.JComponent; |
42 | 41 | import com.sun.javatest.InterviewParameters; |
43 | 42 | import com.sun.javatest.TestSuite; |
44 | 43 | import com.sun.javatest.WorkDirectory; |
44 | import com.sun.javatest.finder.TestFinderDecorator; | |
45 | 45 | import com.sun.javatest.tool.ToolDialog; |
46 | 46 | import com.sun.javatest.tool.UIFactory; |
47 | 47 | import com.sun.javatest.util.StringArray; |
48 | import com.sun.javatest.tool.jthelp.ContextHelpManager; | |
48 | 49 | |
49 | 50 | class PropertiesBrowser extends ToolDialog |
50 | 51 | { |
97 | 98 | tabs.addChangeListener(new ChangeListener() { |
98 | 99 | public void stateChanged(ChangeEvent e) { |
99 | 100 | Component t = tabs.getSelectedComponent(); |
100 | CSH.setHelpIDString(tabs, CSH.getHelpIDString(t)); | |
101 | ContextHelpManager.setHelpIDString(tabs, ContextHelpManager.getHelpIDString(t)); | |
101 | 102 | } |
102 | 103 | }); |
103 | 104 | |
104 | 105 | Component t = tabs.getSelectedComponent(); |
105 | CSH.setHelpIDString(tabs, CSH.getHelpIDString(t)); | |
106 | ContextHelpManager.setHelpIDString(tabs, ContextHelpManager.getHelpIDString(t)); | |
106 | 107 | |
107 | 108 | return tabs; |
108 | 109 | } |
191 | 192 | private class TestSuitePane extends Pane { |
192 | 193 | TestSuitePane() { |
193 | 194 | super("props.ts"); |
194 | CSH.setHelpIDString(this, "execProps.testSuiteTab.csh"); | |
195 | ContextHelpManager.setHelpIDString(this, "execProps.testSuiteTab.csh"); | |
195 | 196 | path = addLabelledField("props.ts.path"); |
196 | 197 | name = addLabelledField("props.ts.name"); |
197 | 198 | id = addLabelledField("props.ts.id"); |
218 | 219 | private class WorkDirectoryPane extends Pane { |
219 | 220 | WorkDirectoryPane() { |
220 | 221 | super("props.wd"); |
221 | CSH.setHelpIDString(this, "execProps.workDirTab.csh"); | |
222 | ContextHelpManager.setHelpIDString(this, "execProps.workDirTab.csh"); | |
222 | 223 | path = addLabelledField("props.wd.path"); |
223 | 224 | // test results? |
224 | 225 | // id? |
234 | 235 | private class ConfigurationPane extends Pane { |
235 | 236 | ConfigurationPane() { |
236 | 237 | super("props.cfg"); |
237 | CSH.setHelpIDString(this, "execProps.configTab.csh"); | |
238 | ContextHelpManager.setHelpIDString(this, "execProps.configTab.csh"); | |
238 | 239 | path = addLabelledField("props.cfg.path"); |
239 | 240 | configName = addLabelledField("props.cfg.name"); |
240 | 241 | configDesc = addLabelledField("props.cfg.desc"); |
261 | 262 | //setField(configDesc, (env == null ? null : env.getDescription())); |
262 | 263 | setField(configName, config.getName()); |
263 | 264 | setField(configDesc, config.getDescription()); |
264 | setField(state, config == null ? null : | |
265 | config.isFinishable() ? completed : incomplete); | |
265 | setField(state, config.isFinishable() ? completed : incomplete); | |
266 | 266 | } |
267 | 267 | |
268 | 268 | if (config != null) |
289 | 289 | private class PluginsPane extends Pane { |
290 | 290 | PluginsPane() { |
291 | 291 | super("props.pi"); |
292 | CSH.setHelpIDString(this, "execProps.pluginsTab.csh"); | |
292 | ContextHelpManager.setHelpIDString(this, "execProps.pluginsTab.csh"); | |
293 | 293 | testSuiteClassName = addLabelledField("props.pi.testSuite"); |
294 | 294 | testFinderClassName = addLabelledField("props.pi.testFinder"); |
295 | 295 | testRunnerClassName = addLabelledField("props.pi.testRunner"); |
304 | 304 | } |
305 | 305 | else { |
306 | 306 | 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); | |
309 | 311 | setField(testRunnerClassName, |
310 | 312 | testSuite.createTestRunner().getClass().getName()); |
311 | 313 |
31 | 31 | import java.awt.event.ComponentEvent; |
32 | 32 | import java.awt.EventQueue; |
33 | 33 | 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; | |
41 | 36 | import javax.swing.BorderFactory; |
42 | 37 | import javax.swing.JButton; |
43 | 38 | import javax.swing.JComponent; |
210 | 205 | } |
211 | 206 | |
212 | 207 | try { |
213 | Writer out = new BufferedWriter(new FileWriter(file)); | |
208 | Writer out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file), StandardCharsets.UTF_8)); | |
214 | 209 | out.write(((JEditorPane)body.getMediaPane(body.TEXT)).getText()); |
215 | 210 | out.close(); |
216 | 211 | } |
29 | 29 | import java.awt.event.ActionEvent; |
30 | 30 | import java.awt.event.ActionListener; |
31 | 31 | |
32 | import javax.help.CSH; | |
33 | ||
34 | 32 | import javax.swing.BorderFactory; |
35 | 33 | import javax.swing.Icon; |
36 | 34 | import javax.swing.JComponent; |
40 | 38 | //import com.sun.javatest.Status; |
41 | 39 | //import com.sun.javatest.tool.I18NUtils; |
42 | 40 | import com.sun.javatest.tool.UIFactory; |
41 | import com.sun.javatest.tool.jthelp.ContextHelpManager; | |
43 | 42 | |
44 | 43 | /** |
45 | 44 | * Progress bars for test run. |
83 | 82 | smMeter.setBorder(BorderFactory.createCompoundBorder( |
84 | 83 | BorderFactory.createEmptyBorder(3,5,3,5), |
85 | 84 | BorderFactory.createLineBorder(Color.black))); |
86 | CSH.setHelpIDString(smMeter, "run.testProgress"); | |
85 | ContextHelpManager.setHelpIDString(smMeter, "run.testProgress"); | |
87 | 86 | |
88 | 87 | return smMeter; |
89 | 88 | } |
0 | 0 | /* |
1 | 1 | * $Id$ |
2 | 2 | * |
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. | |
4 | 4 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5 | 5 | * |
6 | 6 | * This code is free software; you can redistribute it and/or modify it |
309 | 309 | } |
310 | 310 | |
311 | 311 | 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"); | |
313 | 313 | |
314 | 314 | if (!useTests2Run) { |
315 | 315 | // alter tests in interview |
26 | 26 | package com.sun.javatest.exec; |
27 | 27 | |
28 | 28 | import java.util.Iterator; |
29 | import javax.help.CSH; | |
29 | import com.sun.javatest.tool.jthelp.ContextHelpManager; | |
30 | 30 | import com.sun.javatest.TestDescription; |
31 | 31 | import com.sun.javatest.TestResult; |
32 | 32 | import com.sun.javatest.tool.UIFactory; |
38 | 38 | class TP_DescSubpanel extends TP_PropertySubpanel { |
39 | 39 | TP_DescSubpanel(UIFactory uif) { |
40 | 40 | super(uif, "desc"); |
41 | CSH.setHelpIDString(this, "browse.testDescriptionTab.csh"); | |
41 | ContextHelpManager.setHelpIDString(this, "browse.testDescriptionTab.csh"); | |
42 | 42 | } |
43 | 43 | |
44 | 44 | protected void updateSubpanel(TestResult currTest) { |
25 | 25 | */ |
26 | 26 | package com.sun.javatest.exec; |
27 | 27 | |
28 | import javax.help.CSH; | |
29 | ||
30 | 28 | import java.awt.EventQueue; |
31 | 29 | import com.sun.javatest.TestResult; |
32 | 30 | import com.sun.javatest.tool.UIFactory; |
31 | import com.sun.javatest.tool.jthelp.ContextHelpManager; | |
33 | 32 | |
34 | 33 | /** |
35 | 34 | * A subpanel of TestPanel that displays the test environment for a test result. |
40 | 39 | { |
41 | 40 | TP_EnvSubpanel(UIFactory uif) { |
42 | 41 | super(uif, "env"); |
43 | CSH.setHelpIDString(this, "browse.testEnvironmentTab.csh"); | |
42 | ContextHelpManager.setHelpIDString(this, "browse.testEnvironmentTab.csh"); | |
44 | 43 | } |
45 | 44 | |
46 | 45 | protected void updateSubpanel(TestResult currTest) { |
29 | 29 | import java.awt.EventQueue; |
30 | 30 | import java.net.URL; |
31 | 31 | |
32 | import javax.help.CSH; | |
33 | 32 | import javax.swing.SwingUtilities; |
34 | 33 | |
35 | 34 | import com.sun.javatest.tool.UIFactory; |
36 | 35 | import com.sun.javatest.TestDescription; |
37 | 36 | import com.sun.javatest.TestResult; |
37 | import com.sun.javatest.tool.jthelp.ContextHelpManager; | |
38 | 38 | |
39 | 39 | /** |
40 | 40 | * Show the source and other files for the test. |
44 | 44 | TP_FilesSubpanel(UIFactory uif) { |
45 | 45 | super(uif, "files"); |
46 | 46 | setLayout(new BorderLayout()); |
47 | CSH.setHelpIDString(this, "browse.filesTab.csh"); | |
47 | ContextHelpManager.setHelpIDString(this, "browse.filesTab.csh"); | |
48 | 48 | |
49 | 49 | filesPane = new FilesPane(uif); |
50 | 50 |
32 | 32 | import java.awt.EventQueue; |
33 | 33 | import java.io.IOException; |
34 | 34 | import java.io.StringWriter; |
35 | import javax.help.CSH; | |
36 | 35 | import javax.swing.BorderFactory; |
37 | 36 | import javax.swing.DefaultListCellRenderer; |
38 | 37 | import javax.swing.DefaultListModel; |
62 | 61 | import com.sun.javatest.tool.UIFactory; |
63 | 62 | import com.sun.javatest.report.HTMLWriterEx; |
64 | 63 | import com.sun.javatest.util.StringArray; |
64 | import com.sun.javatest.tool.jthelp.ContextHelpManager; | |
65 | 65 | |
66 | 66 | /** |
67 | 67 | * Show the output sections for a particular test result. |
155 | 155 | sp.setResizeWeight(0); // all excess space to right hand side |
156 | 156 | add(sp); |
157 | 157 | |
158 | CSH.setHelpIDString(this, "browse.outputTab.csh"); | |
158 | ContextHelpManager.setHelpIDString(this, "browse.outputTab.csh"); | |
159 | 159 | initIcons(); |
160 | 160 | } |
161 | 161 |
27 | 27 | |
28 | 28 | import java.awt.EventQueue; |
29 | 29 | import java.util.Enumeration; |
30 | import javax.help.CSH; | |
30 | import com.sun.javatest.tool.jthelp.ContextHelpManager; | |
31 | 31 | import com.sun.javatest.TestResult; |
32 | 32 | import com.sun.javatest.tool.UIFactory; |
33 | 33 | |
41 | 41 | |
42 | 42 | TP_ResultsSubpanel(UIFactory uif) { |
43 | 43 | super(uif, "rslt"); |
44 | CSH.setHelpIDString(this, "browse.resultPropertiesTab.csh"); | |
44 | ContextHelpManager.setHelpIDString(this, "browse.resultPropertiesTab.csh"); | |
45 | 45 | } |
46 | 46 | |
47 | 47 | protected synchronized void updateSubpanel(TestResult currTest) { |
35 | 35 | import java.beans.PropertyChangeEvent; |
36 | 36 | import java.beans.PropertyChangeListener; |
37 | 37 | import java.util.Map; |
38 | import javax.help.CSH; | |
38 | import com.sun.javatest.tool.jthelp.ContextHelpManager; | |
39 | 39 | import javax.swing.JPanel; |
40 | 40 | import javax.swing.JTabbedPane; |
41 | 41 | import javax.swing.JTextField; |
108 | 108 | |
109 | 109 | if (newPanel != currPanel) { |
110 | 110 | // 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)); | |
112 | 112 | currPanel = newPanel; |
113 | 113 | } |
114 | 114 | |
298 | 298 | }); |
299 | 299 | |
300 | 300 | currPanel = outputPanel; |
301 | CSH.setHelpIDString(tabs, CSH.getHelpIDString(currPanel)); | |
301 | ContextHelpManager.setHelpIDString(tabs, ContextHelpManager.getHelpIDString(currPanel)); | |
302 | 302 | |
303 | 303 | statusField = uif.createOutputField("test.status"); |
304 | 304 | statusField.setEnabled(false); |
1394 | 1394 | TestResultTable.TreeNode node = item.getNode(); |
1395 | 1395 | |
1396 | 1396 | // switch event format if the node is the root |
1397 | if (node.isRoot()) { | |
1397 | if (node.isRoot() && getRoot() != null) { | |
1398 | 1398 | e = new TreeModelEvent(this, new Object[]{getRoot()}, (int[]) null, (Object[]) null); |
1399 | 1399 | } else { |
1400 | 1400 | // full path to the node, inclusive |
1416 | 1416 | } |
1417 | 1417 | } |
1418 | 1418 | |
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 | } | |
1424 | 1427 | } |
1425 | 1428 | private volatile boolean paused; |
1426 | 1429 | private volatile boolean stopping; |
1203 | 1203 | } catch (Exception ignore) { |
1204 | 1204 | } |
1205 | 1205 | } |
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 | }); | |
1206 | 1226 | } |
1207 | 1227 | |
1208 | 1228 | private void ensureTreeSelection() { |
1 | 1 | # $Id$ |
2 | 2 | # |
3 | 3 | # |
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. | |
5 | 5 | # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
6 | 6 | # |
7 | 7 | # This code is free software; you can redistribute it and/or modify it |
804 | 804 | ep.rpt.url.name=Bug prefix URL |
805 | 805 | ep.rpt.url.lbl=Bug prefix URL |
806 | 806 | 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. | |
807 | 819 | ep.title=Test Manager |
808 | 820 | ep.toolbar.bdr=Tool Bar |
809 | 821 | ep.toolbar.ckb=Displayed |
1255 | 1267 | mgr.errorOpeningWorkDirectory=An error occurred while opening the work directory: {0}\n{1} |
1256 | 1268 | mgr.openQuickStart.act=Open Quick Start Wizard ... |
1257 | 1269 | 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. | |
1258 | 1273 | mgr.openQuickStart.tip=Open a wizard to set up a new test manager window |
1259 | 1274 | mgr.openTestSuite.act=Test Suite ... |
1260 | 1275 | mgr.openTestSuite.mne=T |
1531 | 1546 | qsw.ts.cantCreateInterview.err=An error occurred while trying to access the test suite''s interview.\n{0} |
1532 | 1547 | qsw.ts.cantFindFile.err=Cannot find the specified file |
1533 | 1548 | 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} | |
1535 | 1550 | qsw.ts.configMismatch.err=The configuration file that you specified cannot be used with the test suite that you specified. |
1536 | 1551 | qsw.ts.templateMismatch.err=The template file that you specified cannot be used with the test suite that you specified. |
1537 | 1552 | qsw.ts.file.browse.btn=Browse... |
25 | 25 | */ |
26 | 26 | package com.sun.javatest.finder; |
27 | 27 | |
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; | |
33 | 30 | import java.util.Comparator; |
34 | 31 | import java.util.Hashtable; |
35 | 32 | import java.util.SortedSet; |
158 | 155 | } |
159 | 156 | }); |
160 | 157 | |
161 | FileReader fr = null; | |
162 | 158 | BufferedReader in = null; |
163 | 159 | try { |
164 | fr = new FileReader(file); | |
165 | in = new BufferedReader(fr); | |
160 | in = new BufferedReader(new InputStreamReader(new FileInputStream(file), StandardCharsets.UTF_8)); | |
166 | 161 | String line; |
167 | 162 | int lineNum = 0; |
168 | 163 | while ((line = in.readLine()) != null) { |
197 | 192 | // followed by the underlying writer for leak prevention |
198 | 193 | if (in != null){ |
199 | 194 | try { in.close(); } catch (IOException e) { } |
200 | } | |
201 | ||
202 | if (fr != null){ | |
203 | try { fr.close(); } catch (IOException e) { } | |
204 | 195 | } |
205 | 196 | } |
206 | 197 |
25 | 25 | */ |
26 | 26 | package com.sun.javatest.finder; |
27 | 27 | |
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; | |
34 | 30 | import java.util.Hashtable; |
35 | 31 | import java.util.Vector; |
36 | 32 | |
183 | 179 | namesInFile.clear(); |
184 | 180 | |
185 | 181 | try { |
186 | input = new BufferedReader(new FileReader(file)); | |
182 | input = new BufferedReader(new InputStreamReader(new FileInputStream(file), StandardCharsets.UTF_8)); | |
187 | 183 | currFile = file; |
188 | 184 | line = 1; |
189 | 185 | nextCh(); |
275 | 271 | else if (tag.equals("amp")) |
276 | 272 | replace = "&"; |
277 | 273 | else if (tag.equals("copy")) |
278 | replace = "©"; | |
274 | replace = "�"; | |
279 | 275 | if (replace == null) |
280 | 276 | replace = "&" + tag + ((char) c); |
281 | 277 | } |
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 | }⏎ |
75 | 75 | TestEnvironment env) throws Fault { |
76 | 76 | String delegateClassName = args[0]; |
77 | 77 | try { |
78 | Class delegateClass = Class.forName(delegateClassName); | |
78 | Class delegateClass = Class.forName(delegateClassName, true, ClassLoader.getSystemClassLoader()); | |
79 | 79 | delegate = (TestFinder)(delegateClass.newInstance()); |
80 | 80 | args = shift(args, 1); |
81 | 81 | delegate.init(args, testSuiteRoot, env); |
30 | 30 | import java.io.FileOutputStream; |
31 | 31 | import java.io.IOException; |
32 | 32 | import java.io.PrintStream; |
33 | import java.nio.charset.StandardCharsets; | |
33 | 34 | import java.util.Iterator; |
34 | 35 | |
35 | 36 | import com.sun.javatest.TestDescription; |
201 | 202 | if (outFile == null) |
202 | 203 | out = System.out; |
203 | 204 | else |
204 | out = new PrintStream(new BufferedOutputStream(new FileOutputStream(outFile))); | |
205 | out = new PrintStream(new BufferedOutputStream(new FileOutputStream(outFile)), true, StandardCharsets.UTF_8.name()); | |
205 | 206 | |
206 | 207 | // read the tests and write them to output |
207 | 208 | list(initialFile); |
25 | 25 | */ |
26 | 26 | package com.sun.javatest.finder; |
27 | 27 | |
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; | |
31 | 30 | import java.util.Map; |
32 | import java.io.FileNotFoundException; | |
33 | import java.io.IOException; | |
34 | 31 | import java.util.HashMap; |
35 | 32 | |
36 | 33 | import com.sun.javatest.TestFinder; |
272 | 269 | } |
273 | 270 | |
274 | 271 | try { |
275 | cs.init(new BufferedReader(new FileReader(file))); | |
272 | cs.init(new BufferedReader(new InputStreamReader(new FileInputStream(file), StandardCharsets.UTF_8))); | |
276 | 273 | if (fastScan) |
277 | 274 | cs.setFastScan(true); |
278 | 275 |
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 |
1 | 1 | <!-- |
2 | 2 | $Id$ |
3 | 3 | |
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. | |
5 | 5 | DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
6 | 6 | |
7 | 7 | This code is free software; you can redistribute it and/or modify it |
81 | 81 | available agents, an error will occur in the test run.</p> |
82 | 82 | <p> |
83 | 83 | 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 | |
85 | 85 | unexpected test failures occur, run the tests again, one at a time. Some test |
86 | 86 | suites may not work correctly if tests run concurrently. </p> |
87 | 87 | <p> |
88 | 88 | For the first test run, set the value in this field to <code>1</code>. After |
89 | 89 | the tests run properly, incrementally increase this value. Unless the test |
90 | 90 | 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 | |
92 | 92 | test suite documentation for additional information about using concurrency values |
93 | 93 | greater than <code>1</code>.</p> |
94 | 94 | <p> |
130 | 130 | |
131 | 131 | <hr> |
132 | 132 | |
133 | <p><a href="../copyright.html">Copyright</a> © 2006, 2011, Oracle and/or its affiliates. All rights reserved.</p> | |
133 | <p><a href="../copyright.html">Copyright</a> © 2006, 2015, Oracle and/or its affiliates. All rights reserved.</p> | |
134 | 134 | </BODY> |
135 | 135 | </HTML> |
136 | 136 |
1 | 1 | <!-- |
2 | 2 | $Id$ |
3 | 3 | |
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. | |
5 | 5 | DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
6 | 6 | |
7 | 7 | This code is free software; you can redistribute it and/or modify it |
78 | 78 | 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. |
79 | 79 | </p> |
80 | 80 | |
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 | ||
81 | 98 | <H2>Detailed Example of <code>writeReport</code> Command</H2> |
82 | 99 | <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> |
83 | 100 | <P><B>Command Options Format Example:</B></P> |
84 | 101 | <P class="indent2"> |
85 | 102 | <a href="aboutExamples.html"><EM>> 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> | |
87 | 104 | <P>See <a href="formatCommands.html">Formatting a Command</A> for descriptions and examples of other command formats that you can use.</P> |
88 | 105 | |
89 | 106 | <hr> |
90 | <p><a href="../copyright.html">Copyright</a> © 2002, 2012, Oracle and/or its affiliates. All rights reserved.</p> | |
107 | <p><a href="../copyright.html">Copyright</a> © 2002, 2015, Oracle and/or its affiliates. All rights reserved.</p> | |
91 | 108 | </BODY> |
92 | 109 | </HTML> |
93 | 110 |
1 | 1 | <!-- |
2 | 2 | $Id$ |
3 | 3 | |
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. | |
5 | 5 | DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
6 | 6 | |
7 | 7 | This code is free software; you can redistribute it and/or modify it |
94 | 94 | <p> |
95 | 95 | If you have unexpected test failures, run the tests again, one at a time. Some |
96 | 96 | 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> | |
98 | 98 | <p> |
99 | 99 | For your first test run, leave this field set to <code>1</code>. After the tests |
100 | 100 | run properly, you can increase this value. Unless your test |
101 | 101 | 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 | |
103 | 103 | documentation for additional information about using concurrency values greater |
104 | 104 | than <code>1</code>.</p> |
105 | 105 | <p> |
140 | 140 | |
141 | 141 | <hr> |
142 | 142 | |
143 | <p><a href="../copyright.html">Copyright</a> © 2002, 2011, Oracle and/or its affiliates. All rights reserved.</p> | |
143 | <p><a href="../copyright.html">Copyright</a> © 2002, 2015, Oracle and/or its affiliates. All rights reserved.</p> | |
144 | 144 | </BODY> |
145 | 145 | </HTML> |
146 | 146 |
10 | 10 | <body> |
11 | 11 | <p><b>Copyright Notice</b></p> |
12 | 12 | <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. | |
14 | 14 | DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
15 | 15 | </p> |
16 | 16 | <p> |
7 | 7 | |
8 | 8 | Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved. |
9 | 9 | DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
10 | ||
10 | ||
11 | 11 | This code is free software; you can redistribute it and/or modify it |
12 | 12 | under the terms of the GNU General Public License version 2 only, as |
13 | 13 | published by the Free Software Foundation. Oracle designates this |
14 | 14 | particular file as subject to the "Classpath" exception as provided |
15 | 15 | by Oracle in the LICENSE file that accompanied this code. |
16 | ||
16 | ||
17 | 17 | This code is distributed in the hope that it will be useful, but WITHOUT |
18 | 18 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
19 | 19 | FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
20 | 20 | version 2 for more details (a copy is included in the LICENSE file that |
21 | 21 | accompanied this code). |
22 | ||
22 | ||
23 | 23 | You should have received a copy of the GNU General Public License version |
24 | 24 | 2 along with this work; if not, write to the Free Software Foundation, |
25 | 25 | Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
26 | ||
26 | ||
27 | 27 | Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
28 | 28 | or visit www.oracle.com if you need additional information or have any |
29 | 29 | questions. |
31 | 31 | |
32 | 32 | |
33 | 33 | <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"/> | |
35 | 41 | |
36 | <indexitem text="All Tests View Filter" target="allTests.glossary" /> | |
42 | <!-- A --> | |
43 | <indexitem text="All Tests View Filter" target="glossary.AllTestsViewFilter"/> | |
37 | 44 | |
45 | <!-- B --> | |
46 | <indexitem text="Batch Mode" target="glossary.BatchMode"/> | |
38 | 47 | |
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"/> | |
41 | 57 | |
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"/> | |
52 | 60 | |
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"/> | |
53 | 68 | |
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"/> | |
56 | 73 | |
74 | <!-- G --> | |
75 | <indexitem text="Glossary" target="glossary.Glossary"/> | |
57 | 76 | |
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"/> | |
65 | 79 | |
80 | <!-- I --> | |
81 | <indexitem text="Interview" target="glossary.Interview"/> | |
82 | <indexitem text="Interview File" target="glossary.InterviewFile"/> | |
66 | 83 | |
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"/> | |
71 | 87 | |
88 | <!-- K --> | |
89 | <indexitem text="Keywords" target="glossary.Keywords"/> | |
90 | <indexitem text="Known Failures List Files" target="glossary.KnownFailuresListFiles"/> | |
72 | 91 | |
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"/> | |
75 | 95 | |
76 | <!-- H --> | |
77 | <indexitem text="HTTP server" target="httpServer.glossary"/> | |
96 | <!-- M --> | |
78 | 97 | |
98 | <!-- N --> | |
99 | <indexitem text="Not Run" target="glossary.NotRun"/> | |
79 | 100 | |
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"/> | |
83 | 103 | |
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"/> | |
90 | 110 | |
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 --> | |
95 | 112 | |
113 | <!-- R --> | |
114 | <indexitem text="Report Directory" target="glossary.ReportDirectory"/> | |
96 | 115 | |
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"/> | |
100 | 119 | |
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"/> | |
101 | 132 | |
102 | <!-- N --> | |
103 | <indexitem text="Not Run" target="initialFiles.glossary"/> | |
133 | <!-- U --> | |
104 | 134 | |
135 | <!-- V --> | |
136 | <indexitem text="View Filters" target="glossary.ViewFilters"/> | |
105 | 137 | |
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"/> | |
149 | 140 | </index> |
3 | 3 | |
4 | 4 | Copyright (c) 2001, 2009, Oracle and/or its affiliates. All rights reserved. |
5 | 5 | DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
6 | ||
6 | ||
7 | 7 | This code is free software; you can redistribute it and/or modify it |
8 | 8 | under the terms of the GNU General Public License version 2 only, as |
9 | 9 | published by the Free Software Foundation. Oracle designates this |
10 | 10 | particular file as subject to the "Classpath" exception as provided |
11 | 11 | by Oracle in the LICENSE file that accompanied this code. |
12 | ||
12 | ||
13 | 13 | This code is distributed in the hope that it will be useful, but WITHOUT |
14 | 14 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
15 | 15 | FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
16 | 16 | version 2 for more details (a copy is included in the LICENSE file that |
17 | 17 | accompanied this code). |
18 | ||
18 | ||
19 | 19 | You should have received a copy of the GNU General Public License version |
20 | 20 | 2 along with this work; if not, write to the Free Software Foundation, |
21 | 21 | Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
22 | ||
22 | ||
23 | 23 | Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
24 | 24 | or visit www.oracle.com if you need additional information or have any |
25 | 25 | questions. |
35 | 35 | <indexitem text=".jtr files" target="index.commandBrowseJTRTestresult" /> |
36 | 36 | <indexitem text=".jtx file" target="index.commandParameterCommandsParameterCommandsJtx" /> |
37 | 37 | <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" > | |
41 | 46 | <indexitem text="setting port number" target="index.commandHarnessSettingsSettingsAgentPoolPort" /> |
42 | 47 | <indexitem text="setting timeout" target="index.commandHarnessSettingsSettingsAgentPoolTimeout" /> |
43 | 48 | <indexitem text="starting" target="index.commandHarnessSettingsSettingsStartAgentPool" /> |
44 | 49 | </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" /> | |
47 | 51 | <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" /> | |
57 | 53 | </indexitem> |
58 | 54 | <indexitem text="batch command" target="index.commandBatchModeRunTests" /> |
59 | 55 | <indexitem text="Bookmarks" target="index.confEditSetMarkersKeywords" /> |
76 | 72 | <indexitem text="test result files" target="index.commandBrowseJTRTestresult" /> |
77 | 73 | </indexitem> |
78 | 74 | <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" /> | |
82 | 79 | <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" /> | |
84 | 84 | </indexitem> |
85 | 85 | <indexitem text="command" > |
86 | 86 | <indexitem text="batch" target="index.commandBatchModeRunTests" /> |
90 | 90 | <indexitem text="envFiles" target="index.commandTestenvFileEnvFile" /> |
91 | 91 | <indexitem text="excludeList" target="index.commandExcludeListExcludeList" /> |
92 | 92 | <indexitem text="keywords" target="index.commandKeywordKeywords" /> |
93 | <indexitem text="kfl" target="index.commandKnownFailureAnalysisWriteReportsKFL" /> | |
94 | <indexitem text="laf" target="index.commandSettingColorsSettingLAF" /> | |
93 | 95 | <indexitem text="observer" target="index.commandObserverRunTests" /> |
94 | 96 | <indexitem text="open" target="index.commandOpenOpen" /> |
95 | 97 | <indexitem text="priorStatus" target="index.commandPriorPrior" /> |
114 | 116 | <indexitem text="parameter" target="index.commandParameterCommandsParameterCommands" /> |
115 | 117 | <indexitem text="setup" target="index.commandSetupCommandsSetupCommands" /> |
116 | 118 | <indexitem text="task" target="index.commandTaskCommandsEditConfig" /> |
119 | <indexitem text="work directory" target="index.commandWorkdirWorkdirOpen" /> | |
117 | 120 | <indexitem text="workDir" target="index.commandWorkdirWorkdir" > |
118 | 121 | <indexitem text="create" target="index.commandWorkdirWorkdirCreate" /> |
119 | 122 | <indexitem text="overwrite" target="index.commandWorkdirWorkdirClearResults" /> |
120 | 123 | </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> | |
122 | 128 | </indexitem> |
123 | 129 | <indexitem text="concurrency command" target="index.commandConcurrencyConcurrency" /> |
124 | 130 | <indexitem text="config command" target="index.commandConfigConfig" /> |
125 | 131 | <indexitem text="configuration" > |
126 | 132 | <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" /> | |
128 | 134 | <indexitem text="test manager properties" target="index.execPropsDialogExecPropsDialogConfig" /> |
129 | 135 | </indexitem> |
130 | 136 | <indexitem text="configuration checklist" target="index.confEditChecklistChecklist" /> |
131 | 137 | <indexitem text="Configuration Editor" > |
132 | 138 | <indexitem text="Question Mode" target="index.confEditFullViewDialogFullViewDialog" > |
133 | <indexitem text="configuration history" target="index.confEditFullViewDialogFullViewDialogHistory" /> | |
134 | 139 | <indexitem text="File menu" target="index.confEditFullViewDialogFullViewDialogFilemenu" /> |
135 | 140 | <indexitem text="Help menu" target="index.confEditFullViewDialogFullViewDialogHelpmenu" /> |
136 | 141 | <indexitem text="index pane" target="index.confEditFullViewDialogFullViewDialogIndexPane" /> |
137 | 142 | <indexitem text="More Info pane" target="index.confEditFullViewDialogFullViewDialogMoreInfoPane" /> |
138 | 143 | <indexitem text="question pane" target="index.confEditFullViewDialogFullViewDialogQuestionPane" /> |
144 | <indexitem text="Recent Configuration" target="index.confEditFullViewDialogFullViewDialogHistory" /> | |
139 | 145 | <indexitem text="Search menu" target="index.confEditFullViewDialogFullViewDialogSearchmenu" /> |
140 | 146 | <indexitem text="View menu" target="index.confEditFullViewDialogFullViewDialogViewmenu" /> |
141 | 147 | </indexitem> |
152 | 158 | </indexitem> |
153 | 159 | </indexitem> |
154 | 160 | <indexitem text="configuration file" > |
155 | <indexitem text="changing values" target="index.confEditOtherValuesEditConfiguration" /> | |
161 | <indexitem text="changing values" target="index.confEditEditConfigurationEditConfiguration" /> | |
156 | 162 | <indexitem text="changing values in" target="index.commandEditConfigEditConfig" /> |
163 | <indexitem text="editing values" target="index.confEditEditQuickSetEditix" /> | |
157 | 164 | </indexitem> |
158 | 165 | <indexitem text="configuration values" > |
159 | 166 | <indexitem text="setting" target="index.commandOtherConfigValuesOtherConfigValues" /> |
160 | 167 | </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" /> | |
164 | 169 | <indexitem text="configuring a test run" target="index.confEditOverviewConfEditOverview" /> |
170 | <indexitem text="Create Report tabbed panes" target="index.mergeReportsReportMergePrefsDialog" /> | |
165 | 171 | <indexitem text="create work directory" target="index.commandWorkdirWorkdirCreate" /> |
166 | 172 | <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" /> | |
168 | 175 | <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" /> | |
179 | 188 | <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> | |
183 | 191 | <indexitem text="displaying" > |
184 | 192 | <indexitem text="configuration checklist" target="index.confEditChecklistChecklist" /> |
185 | 193 | <indexitem text="online information" target="index.uiOpenHelpOpenHelp" /> |
186 | 194 | <indexitem text="Question Log" target="index.confEditQuestionLogQuestionLog" /> |
187 | 195 | <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" /> | |
190 | 199 | <indexitem text="displaying reports" target="index.reportReportBrowserReportBrowser" /> |
200 | <indexitem text="editing Quick Set values" target="index.confEditEditQuickSetEditix" /> | |
191 | 201 | <indexitem text="EditJTI command format" target="index.commandEditConfigEditConfig" /> |
192 | 202 | <indexitem text="EditLinks command format" target="index.commandMoveReportsEditConfig" /> |
203 | <indexitem text="enabling propagation" target="index.templatesEnablePropFromTemplateConfeditEnablingPropagation" /> | |
193 | 204 | <indexitem text="env command" target="index.commandTestEnvEnv" /> |
194 | 205 | <indexitem text="envFiles command" target="index.commandTestenvFileEnvFile" /> |
195 | 206 | <indexitem text="environment files" target="index.confEditEnvironmentEnvironment" /> |
196 | 207 | <indexitem text="environment variable" > |
197 | 208 | <indexitem text="setting" target="index.commandHarnessSettingsSettingsEnvVariable" /> |
198 | 209 | </indexitem> |
199 | <indexitem text="example" > | |
200 | <indexitem text="runtests command" target="index.commandRunTestsRunTestsExample" /> | |
201 | </indexitem> | |
210 | <indexitem text="example, runtests command" target="index.commandRunTestsRunTestsExample" /> | |
202 | 211 | <indexitem text="examples" > |
203 | 212 | <indexitem text="creating a new work directory" target="index.commandWorkdirWorkdirExamples" /> |
204 | 213 | <indexitem text="replacing a work directory" target="index.commandWorkdirWorkdirExamples" /> |
208 | 217 | <indexitem text="latest" target="index.confEditExcludeListExcludeListLatest" /> |
209 | 218 | <indexitem text="other" target="index.confEditExcludeListExcludeListOther" /> |
210 | 219 | </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" /> | |
214 | 221 | <indexitem text="Exclude List contents" target="index.exclDialogExcludeListBrowser" /> |
215 | 222 | <indexitem text="Exclude List file" target="index.commandParameterCommandsParameterCommandsJtx" /> |
216 | 223 | <indexitem text="Exclude List files" target="index.confEditExcludeListExcludeList" /> |
219 | 226 | <indexitem text="specifying" target="index.commandExcludeListExcludeList" /> |
220 | 227 | </indexitem> |
221 | 228 | <indexitem text="excludeList command" target="index.commandExcludeListExcludeList" /> |
229 | <indexitem text="execution order" target="index.uiTestManagerTestExecOrder" /> | |
222 | 230 | <indexitem text="file" > |
223 | 231 | <indexitem text=".jte" target="index.confEditEnvironmentEnvironment" /> |
224 | 232 | <indexitem text=".jtp" target="index.commandParameterCommandsParameterCommandsJtp" /> |
230 | 238 | <indexitem text="viewing" target="index.browseFilesTabFilesTab" /> |
231 | 239 | </indexitem> |
232 | 240 | <indexitem text="filters" > |
233 | <indexitem text="browser" > | |
234 | 241 | <indexitem text="view" target="index.browseViewFiltersViewFilter" /> |
235 | 242 | </indexitem> |
236 | </indexitem> | |
237 | <indexitem text="folder icons" target="index.browseFolderIconsFolderIcons" /> | |
243 | <indexitem text="folder icons" target="index.uiFolderIconsFolderIcons" /> | |
238 | 244 | <indexitem text="folder information" > |
239 | 245 | <indexitem text="Test Manager" target="index.browseFolderInfoFolderInfo" /> |
240 | 246 | </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> | |
245 | 252 | <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" /> | |
253 | 261 | <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" /> | |
255 | 264 | <indexitem text="HTTP Server" target="index.commandHttpServerHttpServer" /> |
256 | 265 | <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" /> | |
264 | 273 | </indexitem> |
265 | 274 | </indexitem> |
266 | 275 | <indexitem text="increasing the timeout" target="index.commandTimeoutTimeout" /> |
276 | <indexitem text="information area" > | |
277 | <indexitem text="Test Manager" target="index.uiInfoPaneFolderInfo" /> | |
278 | </indexitem> | |
267 | 279 | <indexitem text="Information Commands" target="index.commandDisplayHelpDisplayHelp" /> |
268 | 280 | <indexitem text="initial files" target="index.confEditInitialFilesInitialFiles" /> |
269 | 281 | <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> | |
274 | 286 | <indexitem text="Keywords" > |
275 | 287 | <indexitem text="run filter" target="index.confEditKeywordsKeywords" /> |
276 | 288 | </indexitem> |
279 | 291 | <indexitem text="Configuration Editor" > |
280 | 292 | <indexitem text="Question Mode view" target="index.confEditKeywordsKeywords" /> |
281 | 293 | </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" /> | |
284 | 303 | <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" /> | |
285 | 308 | <indexitem text="markers" target="index.confEditSetMarkersKeywords" /> |
286 | <indexitem text="MDI window style" target="index.uiAppearancePrefsAppearancePrefsMdi" /> | |
287 | 309 | <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" /> | |
291 | 311 | <indexitem text="desktop" > |
292 | 312 | <indexitem text="File" target="index.uiDesktopMenusDesktopMenusFile" /> |
293 | 313 | <indexitem text="Help" target="index.uiDesktopMenusDesktopMenusHelp" /> |
314 | <indexitem text="Tool" target="index.uiDesktopMenusDesktopMenusTool" /> | |
294 | 315 | <indexitem text="Windows" target="index.uiDesktopMenusDesktopMenusWindow" /> |
295 | 316 | </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" /> | |
314 | 326 | <indexitem text="monitor test progress" target="index.commandVerboseRunTests" /> |
315 | 327 | <indexitem text="monitor, progress" target="index.runProgressMonitorProgressMonitor" /> |
316 | 328 | <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" /> | |
317 | 331 | <indexitem text="Multi-Selection Tab" target="index.browseMultiselectionTabMultiSelectionTab" /> |
318 | 332 | <indexitem text="multiple configurations" target="index.confEditMultipleMultiple" /> |
319 | <indexitem text="navigating help" target="index.jthelpJthelpNavigation" /> | |
320 | 333 | <indexitem text="number of" > |
321 | 334 | <indexitem text="failed tests" target="index.browseSummaryTabSummaryTabFailed" /> |
322 | 335 | <indexitem text="passed tests" target="index.browseSummaryTabSummaryTabPassed" /> |
329 | 342 | <indexitem text="total" target="index.browseSummaryTabSummaryTabTotal" /> |
330 | 343 | </indexitem> |
331 | 344 | <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" /> | |
338 | 350 | <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" /> | |
345 | 353 | <indexitem text="parameter commands" target="index.commandParameterCommandsParameterCommands" /> |
346 | 354 | <indexitem text="parameter file" target="index.commandParameterCommandsParameterCommandsJtp" /> |
347 | 355 | <indexitem text="plug-ins" > |
348 | 356 | <indexitem text="test manager properties" target="index.execPropsDialogExecPropsDialogPlugins" /> |
349 | 357 | </indexitem> |
358 | <indexitem text="Preferences dialog box" target="index.uiPrefsDialogPrefsDialog" /> | |
350 | 359 | <indexitem text="prior test status" target="index.commandPriorPrior" /> |
351 | 360 | <indexitem text="priorStatus command" target="index.commandPriorPrior" /> |
352 | <indexitem text="progress indicator" target="index.runProgressMeterProgressMeter" > | |
361 | <indexitem text="progress indicator" target="index.runProgressMeterProgressMeterBar" > | |
353 | 362 | <indexitem text="elapsed time" target="index.runProgressMeterProgressMeterTime" /> |
354 | <indexitem text="progress bar" target="index.runProgressMeterProgressMeterBar" /> | |
355 | 363 | </indexitem> |
356 | 364 | <indexitem text="Progress Monitor" target="index.runProgressMonitorProgressMonitor" > |
357 | 365 | <indexitem text="Memory" target="index.runProgressMonitorProgressMonitorMemory" /> |
359 | 367 | <indexitem text="Tests in Progress" target="index.runProgressMonitorProgressMonitorTest" /> |
360 | 368 | <indexitem text="Time" target="index.runProgressMonitorProgressMonitorTime" /> |
361 | 369 | </indexitem> |
362 | <indexitem text="Properties" > | |
363 | <indexitem text="Test Manager" target="index.browseViewMenuViewMenuProperties" /> | |
364 | </indexitem> | |
365 | 370 | <indexitem text="Question Log" target="index.confEditQuestionLogQuestionLog" /> |
366 | 371 | <indexitem text="Question Mode view" > |
367 | 372 | <indexitem text="setting" > |
370 | 375 | </indexitem> |
371 | 376 | </indexitem> |
372 | 377 | <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" /> | |
374 | 379 | </indexitem> |
375 | 380 | <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" /> | |
377 | 382 | <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" /> | |
379 | 384 | </indexitem> |
380 | 385 | <indexitem text="remotely monitor and control a test run" target="index.commandHttpServerHttpServer" /> |
386 | <indexitem text="remove Exclude List files" target="index.adminExcludeTabTEExcludeListTE" /> | |
381 | 387 | <indexitem text="replace existing work directory" target="index.commandWorkdirWorkdirClearResults" /> |
382 | 388 | <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" /> | |
383 | 395 | <indexitem text="reports" > |
396 | <indexitem text="KFL" > | |
397 | <indexitem text="New Passed" target="index.reportNewReportsFailtopass" /> | |
398 | </indexitem> | |
384 | 399 | <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" /> | |
388 | 401 | <indexitem text="writing" target="index.commandWriteReportsWriteReports" /> |
389 | 402 | </indexitem> |
403 | <indexitem text="resolving configuration-template conflicts" target="index.templatesResolveConflictsResolveConflict" /> | |
404 | <indexitem text="Restore Tools State on Start" target="index.uiAppearancePrefsAppearancePrefsRestore" /> | |
390 | 405 | <indexitem text="run filter" > |
391 | 406 | <indexitem text="Keywords" target="index.confEditKeywordsKeywords" /> |
392 | 407 | </indexitem> |
397 | 412 | <indexitem text="Test Manager window" target="index.runRunningRunning" /> |
398 | 413 | </indexitem> |
399 | 414 | <indexitem text="runtests command" target="index.commandRunTestsRunTests" /> |
400 | <indexitem text="SDI window style" target="index.uiAppearancePrefsAppearancePrefsSdi" /> | |
415 | <indexitem text="section 508" target="index.commandSettingColorsAY" /> | |
401 | 416 | <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" /> | |
404 | 419 | </indexitem> |
405 | 420 | <indexitem text="set command" target="index.commandSettingValuesSettingValues" > |
406 | 421 | <indexitem text="examples" target="index.commandSettingValuesSettingValuesExamples" /> |
415 | 430 | <indexitem text="time factor" target="index.confEditExecutionExecutionTimeFactor" /> |
416 | 431 | </indexitem> |
417 | 432 | <indexitem text="setting concurrency" target="index.commandConcurrencyConcurrency" /> |
418 | <indexitem text="setting JavaTest preferences" target="index.uiPrefsDialogPrefsDialog" /> | |
433 | <indexitem text="setting preferences" target="index.uiPrefsDialogPrefsDialog" /> | |
419 | 434 | <indexitem text="setting specific configuration values" target="index.commandOtherConfigValuesOtherConfigValues" /> |
420 | 435 | <indexitem text="setup commands" target="index.commandSetupCommandsSetupCommands" > |
421 | 436 | <indexitem text="additional" target="index.commandHarnessSettingsSettings" /> |
422 | 437 | </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" /> | |
424 | 440 | <indexitem text="specify" > |
425 | 441 | <indexitem text="a work directory" target="index.commandWorkdirWorkdir" /> |
426 | 442 | <indexitem text="configuration file" target="index.commandConfigConfig" /> |
427 | 443 | <indexitem text="directories of tests" target="index.commandTestDirTestDir" /> |
444 | <indexitem text="existing work directory" target="index.commandWorkdirWorkdirOpen" /> | |
428 | 445 | <indexitem text="tests to run" target="index.commandTestDirTestDir" /> |
429 | <indexitem text="work directory" > | |
430 | <indexitem text="existing" target="index.commandWorkdirWorkdirOpen" /> | |
431 | </indexitem> | |
432 | 446 | </indexitem> |
433 | 447 | <indexitem text="specify tests to run" target="index.confEditInitialFilesInitialFiles" /> |
434 | 448 | <indexitem text="specifying a test environment" target="index.confEditEnvironmentEnvironment" /> |
455 | 469 | <indexitem text="passed" target="index.browseSummaryTabSummaryTabPassed" /> |
456 | 470 | </indexitem> |
457 | 471 | </indexitem> |
458 | <indexitem text="Summary panel" > | |
459 | </indexitem> | |
460 | 472 | <indexitem text="system properties" > |
461 | 473 | <indexitem text="setting" target="index.commandHarnessSettingsSettingsSystemProperties" /> |
462 | 474 | </indexitem> |
463 | <indexitem text="Tabbed window style" target="index.uiAppearancePrefsAppearancePrefsFull" /> | |
464 | 475 | <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" /> | |
465 | 509 | <indexitem text="Test Description tab" target="index.browseTestDescriptionTabTestDescriptionTab" /> |
466 | 510 | <indexitem text="Test Environment browser" target="index.envDialogTestEnvBrowser" > |
467 | 511 | <indexitem text="defined in environment" target="index.envDialogTestEnvBrowserEnv" /> |
469 | 513 | <indexitem text="Entry Name" target="index.envDialogTestEnvBrowserKey" /> |
470 | 514 | <indexitem text="Value" target="index.envDialogTestEnvBrowserValue" /> |
471 | 515 | </indexitem> |
472 | <indexitem text="test icons" target="index.browseTestIconsTestIcons" /> | |
516 | <indexitem text="test icons" target="index.uiTestIconsTestIcons" /> | |
473 | 517 | <indexitem text="test information" > |
474 | 518 | <indexitem text="Test view" target="index.browseTestInfoTestInfo" /> |
475 | 519 | </indexitem> |
479 | 523 | <indexitem text="Failed test results" target="index.browseStatusTabsStatusTabsFailed" /> |
480 | 524 | <indexitem text="Filtered Out tests" target="index.browseStatusTabsStatusTabsNotRun" /> |
481 | 525 | <indexitem text="folder view" target="index.browseFolderInfoFolderInfo" /> |
526 | <indexitem text="information area" target="index.uiInfoPaneFolderInfo" /> | |
482 | 527 | <indexitem text="Not Run tests" target="index.browseStatusTabsStatusTabsNotRun" /> |
483 | 528 | <indexitem text="Passed test results" target="index.browseStatusTabsStatusTabsPassed" /> |
484 | 529 | <indexitem text="Summary information" target="index.browseSummaryTabSummaryTab" > |
491 | 536 | <indexitem text="total" target="index.browseSummaryTabSummaryTabTotal" /> |
492 | 537 | </indexitem> |
493 | 538 | <indexitem text="Test Run Messages" target="index.browseMessagesTabMessagesTab" > |
494 | <indexitem text="message area" target="index.browseMessagesTabMessagesTabMessagePane" /> | |
495 | 539 | <indexitem text="message list" target="index.browseMessagesTabMessagesTabListPane" /> |
496 | <indexitem text="Output Summary message" target="index.browseMessagesTabMessagesTabOutput" /> | |
497 | 540 | <indexitem text="Result message" target="index.browseMessagesTabMessagesTabOutput" /> |
498 | <indexitem text="summary message" target="index.browseMessagesTabMessagesTabSummary" /> | |
499 | <indexitem text="Test Result message" target="index.browseMessagesTabMessagesTabResult" /> | |
500 | 541 | </indexitem> |
501 | 542 | <indexitem text="Test view" target="index.browseTestInfoTestInfo" /> |
502 | 543 | </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" > | |
504 | 547 | <indexitem text="browsing test information" target="index.browseBrowsingBrowsingTest" /> |
505 | 548 | <indexitem text="progress indicator" target="index.runProgressMeterProgressMeter" > |
506 | 549 | <indexitem text="elapsed time" target="index.runProgressMeterProgressMeterTime" /> |
507 | 550 | <indexitem text="progress bar" target="index.runProgressMeterProgressMeterBar" /> |
508 | 551 | </indexitem> |
509 | 552 | <indexitem text="running tests" target="index.runRunningRunning" /> |
510 | <indexitem text="status message" target="index.uiWindowUiWindowStatusMessage" /> | |
511 | 553 | <indexitem text="Test Description tab" target="index.browseTestDescriptionTabTestDescriptionTab" /> |
512 | 554 | <indexitem text="Test Run Details tab" target="index.browseDetailsTabDetailsTab" > |
513 | 555 | <indexitem text="property names" target="index.browseDetailsTabDetailsTabName" /> |
514 | 556 | <indexitem text="values" target="index.browseDetailsTabDetailsTabValue" /> |
515 | 557 | </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" /> | |
522 | 559 | </indexitem> |
523 | 560 | <indexitem text="test reports" target="index.reportUsingReportsUsingReports" /> |
524 | 561 | <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" /> | |
527 | 563 | <indexitem text="test run" > |
528 | 564 | <indexitem text="monitoring" target="index.runMonitoringMonitoring" /> |
529 | 565 | <indexitem text="start" target="index.runStartingStarting" /> |
537 | 573 | <indexitem text="summary message" target="index.browseMessagesTabMessagesTabSummary" /> |
538 | 574 | <indexitem text="Test Result message" target="index.browseMessagesTabMessagesTabResult" /> |
539 | 575 | </indexitem> |
540 | <indexitem text="test run status icon" target="index.browseTestIconsTestIconsRunstatus" /> | |
576 | <indexitem text="test run status icon" target="index.uiTestIconsTestIconsRunstatus" /> | |
541 | 577 | <indexitem text="test status" > |
542 | 578 | <indexitem text="Error" target="index.browseStatusTabsStatusTabsError" /> |
543 | 579 | <indexitem text="Failed" target="index.browseStatusTabsStatusTabsFailed" /> |
550 | 586 | <indexitem text="test manager properties" target="index.execPropsDialogExecPropsDialogTestSuite" /> |
551 | 587 | </indexitem> |
552 | 588 | <indexitem text="Test Suite Errors" > |
553 | <indexitem text="Test Manager window" > | |
554 | <indexitem text="View menu" target="index.browseViewMenuViewMenuErrors" /> | |
555 | </indexitem> | |
556 | 589 | <indexitem text="viewing" target="index.browseTestSuiteErrorsTestSuiteErrors" /> |
557 | 590 | </indexitem> |
558 | <indexitem text="test tree" target="index.browseUsingtreeUsingtree" /> | |
591 | <indexitem text="test tree" target="index.uiUsingtreeUsingtree" /> | |
559 | 592 | <indexitem text="Test view" target="index.browseTestInfoTestInfo" /> |
560 | 593 | <indexitem text="tests" > |
561 | 594 | <indexitem text="running" target="index.runRunningRunning" /> |
563 | 596 | <indexitem text="tests command" target="index.commandTestDirTestDir" /> |
564 | 597 | <indexitem text="testSuite command" target="index.commandTestsuiteTestsuite" /> |
565 | 598 | <indexitem text="timeoutFactor command" target="index.commandTimeoutTimeout" /> |
599 | <indexitem text="tool" > | |
600 | <indexitem text="Test Manager" target="index.uiWindowUiWindow" /> | |
601 | </indexitem> | |
566 | 602 | <indexitem text="tool bar" target="index.uiToolBarToolBar" /> |
603 | <indexitem text="Tool menu" target="index.uiDesktopMenusDesktopMenusTool" /> | |
567 | 604 | <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> | |
568 | 609 | <indexitem text="troubleshooting" target="index.conceptsTroubleshootingTroubleshooting" > |
569 | 610 | <indexitem text="exit codes" target="index.commandTroubleshootingTroubleshootingExitcodes" /> |
570 | 611 | <indexitem text="output overflow" target="index.conceptsTroubleshootingOutputOverflow" /> |
577 | 618 | <indexitem text="tests that fail" target="index.conceptsTroubleshootingTroubleshootingFailed" /> |
578 | 619 | <indexitem text="tests with errors" target="index.conceptsTroubleshootingTroubleshootingErrors" /> |
579 | 620 | </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> | |
581 | 625 | <indexitem text="viewing test results" target="index.conceptsTroubleshootingTroubleshootingViewing" /> |
582 | 626 | </indexitem> |
583 | 627 | <indexitem text="troubleshooting a test run" target="index.runTroubleshootingRunTroubleshooting" /> |
586 | 630 | <indexitem text="EditJTI" target="index.commandEditConfigEditConfig" /> |
587 | 631 | </indexitem> |
588 | 632 | <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" /> | |
597 | 641 | <indexitem text="viewing source file list" target="index.browseFilesTabFilesTab" /> |
598 | 642 | <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" /> | |
611 | 644 | <indexitem text="Windows menu" target="index.uiDesktopMenusDesktopMenusWindow" /> |
612 | 645 | <indexitem text="work directory" > |
613 | 646 | <indexitem text="create new" target="index.commandWorkdirWorkdirCreate" /> |
614 | 647 | <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" /> | |
618 | 650 | <indexitem text="test manager properties" target="index.execPropsDialogExecPropsDialogWorkDir" /> |
619 | 651 | </indexitem> |
652 | <indexitem text="work directory status line" target="index.uiWorkDirStatusWorkDirStatus" /> | |
620 | 653 | <indexitem text="writereport command" target="index.commandWriteReportsWriteReports" /> |
621 | 654 | <indexitem text="writing reports" target="index.commandWriteReportsWriteReports" /> |
622 | 655 | </index> |
3 | 3 | |
4 | 4 | Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved. |
5 | 5 | DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
6 | ||
6 | ||
7 | 7 | This code is free software; you can redistribute it and/or modify it |
8 | 8 | under the terms of the GNU General Public License version 2 only, as |
9 | 9 | published by the Free Software Foundation. Oracle designates this |
10 | 10 | particular file as subject to the "Classpath" exception as provided |
11 | 11 | by Oracle in the LICENSE file that accompanied this code. |
12 | ||
12 | ||
13 | 13 | This code is distributed in the hope that it will be useful, but WITHOUT |
14 | 14 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
15 | 15 | FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
16 | 16 | version 2 for more details (a copy is included in the LICENSE file that |
17 | 17 | accompanied this code). |
18 | ||
18 | ||
19 | 19 | You should have received a copy of the GNU General Public License version |
20 | 20 | 2 along with this work; if not, write to the Free Software Foundation, |
21 | 21 | Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
22 | ||
22 | ||
23 | 23 | Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
24 | 24 | or visit www.oracle.com if you need additional information or have any |
25 | 25 | questions. |
28 | 28 | <!DOCTYPE map |
29 | 29 | PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp Map Version 1.0//EN" |
30 | 30 | "http://java.sun.com/products/javahelp/map_1_0.dtd"> |
31 | ||
32 | 31 | <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" /> | |
295 | 522 | </map> |
1 | 1 | <!-- |
2 | 2 | $Id$ |
3 | 3 | |
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. | |
5 | 5 | DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
6 | 6 | |
7 | 7 | This code is free software; you can redistribute it and/or modify it |
111 | 111 | index.html~1~ |
112 | 112 | reportdir.dat |
113 | 113 | text/ |
114 | text~1~/<pre></td></tr></table> | |
114 | text~1~/</pre></td></tr></table> | |
115 | 115 | |
116 | 116 | <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 |
117 | 117 | in the report dialog box does not affect any previously saved backup reports. |
198 | 198 | <p><b>Optional files/sections to generate</b>:</p> |
199 | 199 | <p>These options are set to Yes by default.</p> |
200 | 200 | <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> | |
202 | 202 | <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> |
203 | 203 | <li><p>Report on tests in KFL which are now missing.</p></li></ul> |
204 | 204 | |
239 | 239 | |
240 | 240 | <a name="knownFailureListReports"><!--index:KFL reports--><!--reports: KFL: creating--></a></p> |
241 | 241 | <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> | |
243 | 243 | |
244 | 244 | <a name="kfanalysis"> <!--index:known failure analysis--></a> |
245 | 245 | <h3><a name="Known Failure Analysis">Known Failure Analysis</a></h3> |
278 | 278 | <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> |
279 | 279 | |
280 | 280 | <a name="newfailures"><!-- index:KFL reports --><!-- reports: KFL: New Failures --></a> |
281 | <h4>New Failures</h4> | |
281 | <h4>New Failure</h4> | |
282 | 282 | <p>Any test or test case which has a Failed status in the current results but does not appear in the KFL.</p> |
283 | 283 | |
284 | 284 | <a name="failtofail"><!-- index:KFL reports--><!--reports: KFL: Old Failures --></a> |
285 | <h4>Old Failures</h4> | |
285 | <h4>Old Failure</h4> | |
286 | 286 | <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> |
287 | 287 | |
288 | 288 | <a name="unrelerr"><!-- index:KFL reports--><!--reports: KFL: Unrelated Errors --></a> |
289 | <h4>Unrelated Errors</h4> | |
289 | <h4>Unrelated Error</h4> | |
290 | 290 | <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> |
291 | 291 | |
292 | 292 | <a name="reportFiles"><!-- index:report files --><!-- index:report directory --></a> |
332 | 332 | <tr valign="top"> |
333 | 333 | <th scope="col" class="left">HTML Report</th><th scope="col" class="left">File Names</th></tr> |
334 | 334 | <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> | |
339 | 339 | <td><code>kfl_fail2notrun.html</code>, <code>kfl_tc_fail2notrun.html</code></td></tr> |
340 | 340 | |
341 | 341 | <tr><td>Missing (test not found)</td> |
342 | 342 | <td><code>kfl_fail2missing.html</code>, <code>kfl_tc_fail2missing.html</code></td></tr> |
343 | 343 | |
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> | |
347 | 347 | |
348 | 348 | </table> |
349 | 349 | |
364 | 364 | <td>Unexpected Error</td> |
365 | 365 | <td><code>kfl_fail2error.txt</code>, <code>kfl_tc_fail2error.txt</code></td> |
366 | 366 | </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> | |
369 | 373 | <td><code>kfl_fail2notrun.txt</code>, <code>kfl_tc_fail2notrun.txt</code></td> |
370 | 374 | </tr> |
371 | 375 | <tr> |
373 | 377 | <td><code>kfl_fail2missing.txt</code>, <code>kfl_tc_fail2missing.txt</code></td> |
374 | 378 | </tr> |
375 | 379 | <tr> |
376 | <td>New Failures</td> | |
380 | <td>New Failure</td> | |
377 | 381 | <td><code>kfl_newfailures.txt</code>, <code>kfl_tc_newfailures.txt</code></td> |
378 | 382 | </tr> |
379 | 383 | <tr> |
380 | <td>Old Failures</td> | |
384 | <td>Old Failure</td> | |
381 | 385 | <td><code>kfl_fail2fail.txt</code>, <code>kfl_tc_fail2fail.txt</code></td> |
382 | 386 | </tr> |
383 | 387 | </table> |
384 | 388 | <p>The files whose names begin with <code>tc_</code> are present only if the test suite supports test case identification. </p> |
385 | 389 | <hr> |
386 | 390 | |
387 | <p><a href="../copyright.html">Copyright</a> © 2002, 2014, Oracle and/or its affiliates. All rights reserved.</p> | |
391 | <p><a href="../copyright.html">Copyright</a> © 2002, 2015, Oracle and/or its affiliates. All rights reserved.</p> | |
388 | 392 | </BODY> |
389 | 393 | </HTML> |
390 | 394 |
32 | 32 | import java.io.OutputStreamWriter; |
33 | 33 | import java.io.PrintWriter; |
34 | 34 | import java.net.Socket; |
35 | import java.nio.charset.StandardCharsets; | |
35 | 36 | import java.util.Hashtable; |
36 | 37 | |
37 | 38 | import com.sun.javatest.util.I18NResourceBundle; |
69 | 70 | buf.setLength(0); |
70 | 71 | } |
71 | 72 | |
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)); | |
74 | 75 | |
75 | 76 | |
76 | 77 | request = in.readLine(); |
1 | 1 | # $Id$ |
2 | 2 | # |
3 | 3 | # |
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. | |
5 | 5 | # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
6 | 6 | # |
7 | 7 | # This code is free software; you can redistribute it and/or modify it |
162 | 162 | harness.errorNotifyStart=An error occurred when notifying the test suite that the test run is starting. |
163 | 163 | harness.incompleteParameters=The configuration parameters you specified are incomplete or invalid.\n{0} |
164 | 164 | 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} | |
166 | 166 | harness.starting=Starting test run |
167 | 167 | harness.testsuiteError={0} |
168 | 168 | harness.tooManyErrors=Test run aborted because too many tests failed in succession. |
245 | 245 | |
246 | 246 | keywordsFilter.description=Select tests according to their keywords |
247 | 247 | 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} | |
249 | 249 | |
250 | 250 | kfl.badEntry=Failed to read KFL entry: {0} |
251 | 251 | kfl.cantListCase=Overlapping KFL test/test case: {0} |
286 | 286 | rslt.badLine=Result file format not recognized; unexpected line `{0}''. |
287 | 287 | rslt.badHeader=Result file format not recognized: bad header on first line: {0} |
288 | 288 | 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} | |
289 | 290 | rslt.empty=Result file empty: {0} |
290 | 291 | rslt.fileNotFound=Result file not found: {0} |
291 | 292 | rslt.noOutputTitle=An output title could not be found. |
345 | 346 | statusFilter.description=Select tests according to their prior result status |
346 | 347 | statusFilter.name=Prior Status |
347 | 348 | 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. | |
349 | 350 | |
350 | 351 | tec.cantFindFile=Cannot find specified file {0}. |
351 | 352 | #tec.interviewClassAccess=Problem accessing interview class specified in file {0}.\n{1} |
365 | 366 | |
366 | 367 | #trc.abort=Cache update action aborted due to shutdown signal. |
367 | 368 | #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} | |
369 | 370 | #trc.cantopen=An unrecoverable error occurred while trying to create/open file {0}, the error was: {1}. |
370 | 371 | #trc.flushError=Error flushing results to the cache. File may be corrupted. |
371 | 372 | trc.lockTimeout=Timeout waiting for test result cache lock |
443 | 444 | #ts.logger.noworkdir=Can't create general purpose logger: work directory is null |
444 | 445 | ts.noScript=Cannot determine script: No suitable environment entries |
445 | 446 | 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} | |
446 | 450 | ts.notTestSuiteFile=Path does not identify a valid test suite.\n{0} |
447 | 451 | |
448 | 452 | wd.alreadyExists=Work directory already exists. |
0 | 0 | /* |
1 | 1 | * $Id$ |
2 | 2 | * |
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. | |
4 | 4 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5 | 5 | * |
6 | 6 | * This code is free software; you can redistribute it and/or modify it |
52 | 52 | * The test suite for which this interview applies should be set |
53 | 53 | * with setTestSuite. |
54 | 54 | * @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 | |
56 | 56 | */ |
57 | 57 | protected BasicInterviewParameters(String tag) |
58 | 58 | throws Fault |
76 | 76 | * Create a BasicInterviewParameters object. |
77 | 77 | * @param tag the tag used to qualify questions in this interview |
78 | 78 | * @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 | |
80 | 80 | */ |
81 | 81 | protected BasicInterviewParameters(String tag, TestSuite ts) |
82 | 82 | throws Fault |
361 | 361 | /** |
362 | 362 | * Discover the maximum allowable concurrency value that should be accepted. |
363 | 363 | * @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. | |
367 | 365 | * @see com.sun.javatest.Parameters.ConcurrencyParameters#MAX_CONCURRENCY |
368 | 366 | */ |
369 | 367 | protected int getMaxConcurrency() { |
370 | // return Parameters.ConcurrencyParameters.MAX_CONCURRENCY; | |
371 | return 50; | |
368 | return Parameters.ConcurrencyParameters.MAX_CONCURRENCY; | |
372 | 369 | } |
373 | 370 | |
374 | 371 | //-------------------------------------------------------------------------- |
0 | 0 | /* |
1 | 1 | * $Id$ |
2 | 2 | * |
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. | |
4 | 4 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5 | 5 | * |
6 | 6 | * This code is free software; you can redistribute it and/or modify it |
37 | 37 | { |
38 | 38 | /** |
39 | 39 | * 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 | |
41 | 41 | * interview. |
42 | 42 | */ |
43 | 43 | public LegacyParameters() |
52 | 52 | /** |
53 | 53 | * Create a configuration interview for legacy tests suites. |
54 | 54 | * @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 | |
56 | 56 | * interview. |
57 | 57 | */ |
58 | 58 | public LegacyParameters(TestSuite testSuite) |
0 | 0 | /* |
1 | 1 | * $Id$ |
2 | 2 | * |
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. | |
4 | 4 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5 | 5 | * |
6 | 6 | * This code is free software; you can redistribute it and/or modify it |
25 | 25 | */ |
26 | 26 | package com.sun.javatest.interview; |
27 | 27 | |
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; | |
33 | 30 | import java.util.ArrayList; |
34 | 31 | import java.util.Arrays; |
35 | 32 | import java.util.TreeSet; |
194 | 191 | private static final String TREE = "tree"; |
195 | 192 | |
196 | 193 | /** |
197 | * Represents Tests Selection Choice Question. Exctracted to separate class | |
194 | * Represents Tests Selection Choice Question. Extracted to separate class | |
198 | 195 | * for extensibility purposes |
199 | 196 | */ |
200 | 197 | public class TreeOrFileChoiceQuestion extends ChoiceQuestion{ |
205 | 202 | } |
206 | 203 | |
207 | 204 | /** |
208 | * Should be overriden if more selection choices are needed | |
205 | * Should be overridden if more selection choices are needed | |
209 | 206 | * @return array of test selection choices |
210 | 207 | */ |
211 | 208 | protected String[] getTestSelectionChoices(){ |
252 | 249 | // |
253 | 250 | // file |
254 | 251 | |
255 | private FileQuestion qTestFile = new FileQuestion(this, "testFile") { | |
252 | protected FileQuestion qTestFile = new FileQuestion(this, "testFile") { | |
256 | 253 | @Override |
257 | 254 | public boolean isValueValid() { |
258 | 255 | return (value != null && value.getPath().length() > 0); |
280 | 277 | } |
281 | 278 | }; |
282 | 279 | |
283 | private String[] getTests(File file) { | |
280 | protected String[] getTests(File file) { | |
284 | 281 | ArrayList<String> paths = new ArrayList(); |
285 | 282 | try { |
286 | BufferedReader in = new BufferedReader(new FileReader(file)); | |
283 | BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(file), StandardCharsets.UTF_8)); | |
287 | 284 | String line; |
288 | 285 | while ((line = in.readLine()) != null) { |
289 | 286 | line = line.trim(); |
330 | 327 | private TreeQuestion.Model model = new TreeQuestion.Model() { |
331 | 328 | @Override |
332 | 329 | 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(); | |
334 | 341 | } |
335 | 342 | |
336 | 343 | @Override |
518 | 525 | }; |
519 | 526 | |
520 | 527 | private String[] cachedTestsValue; |
521 | private Question cachedTestsError; | |
528 | protected Question cachedTestsError; | |
522 | 529 | private Object[] cachedTestsErrorArgs; |
523 | 530 | |
524 | 531 | //---------------------------------------------------------------------------- |
30 | 30 | import com.sun.javatest.lib.MultiStatus; |
31 | 31 | import java.lang.reflect.InvocationTargetException; |
32 | 32 | import java.lang.reflect.Method; |
33 | import java.security.AccessController; | |
34 | import java.security.PrivilegedAction; | |
33 | 35 | import java.util.Iterator; |
34 | 36 | import java.util.Map; |
35 | 37 | import java.util.Set; |
131 | 133 | protected void getListAllJunitTestCases(){ |
132 | 134 | tests = new TreeMap<String,Method>(); |
133 | 135 | 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 | }); | |
135 | 142 | for (Method m: methods){ |
136 | 143 | if(m == null || excludeTestCases.contains(m.getName())){ |
137 | 144 | continue; |
75 | 75 | } |
76 | 76 | } |
77 | 77 | |
78 | public ClassLoader getClassLoader() { | |
79 | return cl; | |
80 | } | |
81 | ||
82 | 78 | private ClassLoader cl; |
83 | 79 | } |
0 | 0 | /* |
1 | 1 | * $Id$ |
2 | 2 | * |
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. | |
4 | 4 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5 | 5 | * |
6 | 6 | * This code is free software; you can redistribute it and/or modify it |
153 | 153 | * set of options, each beginning with `-', to be |
154 | 154 | * used by this object. |
155 | 155 | * The options are |
156 | * <dl> | |
156 | 157 | * <dt> |
157 | 158 | * <dt>-v |
158 | 159 | * <dd> verbose mode |
40 | 40 | import java.io.InputStreamReader; |
41 | 41 | import java.io.IOException; |
42 | 42 | import java.net.URL; |
43 | import java.nio.charset.StandardCharsets; | |
43 | 44 | import javax.swing.JComponent; |
44 | 45 | import javax.swing.JFrame; |
45 | 46 | import javax.swing.JScrollPane; |
51 | 52 | import javax.swing.text.Highlighter; |
52 | 53 | import javax.swing.text.View; |
53 | 54 | import javax.swing.text.html.HTMLDocument; |
54 | ||
55 | import com.sun.java.help.impl.ViewAwareComponent; | |
56 | 55 | |
57 | 56 | /** |
58 | 57 | * A lightweight component that will show a text file, suitable for |
81 | 80 | */ |
82 | 81 | public class ShowFile |
83 | 82 | extends JComponent |
84 | implements ViewAwareComponent | |
85 | 83 | { |
86 | 84 | public ShowFile() { |
87 | 85 | addMouseListener(new MouseAdapter() { |
81 | 81 | </p> |
82 | 82 | <p> |
83 | 83 | <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"> | |
85 | 85 | <param name="text" value="Specifying Test Environment Files"> |
86 | 86 | <param name="target" value="confEdit.envTab.csh"> |
87 | 87 | </object> |
39 | 39 | documentation for the correct method for your test suite. |
40 | 40 | <p> |
41 | 41 | <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"> | |
43 | 43 | <param name="text" value="Using Exclude Lists"> |
44 | 44 | <param name="target" value="confEdit.excludeTab.csh"> |
45 | 45 | </object> |
49 | 49 | </p> |
50 | 50 | <p> |
51 | 51 | <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"> | |
53 | 53 | <param name="text" value="Setting Test Execution Parameters"> |
54 | 54 | <param name="target" value="confEdit.execTab.csh"> |
55 | 55 | </object> |
43 | 43 | documentation describes how to use these keywords. |
44 | 44 | <p> |
45 | 45 | <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"> | |
47 | 47 | <param name="text" value="Using Keywords as Filters"> |
48 | 48 | <param name="target" value="confEdit.keywordsTab.csh"> |
49 | 49 | </object> |
41 | 41 | |
42 | 42 | <p> |
43 | 43 | <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"> | |
45 | 45 | <param name="text" value="KFL Options in HTML Reports"> |
46 | 46 | <param name="target" value="confEdit.kflTab.csh"> |
47 | 47 | </object> |
45 | 45 | </p> |
46 | 46 | <p> |
47 | 47 | <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"> | |
49 | 49 | <param name="text" value="Using Prior Status as a Filter"> |
50 | 50 | <param name="target" value="confEdit.statusTab.csh"> |
51 | 51 | </object> |
47 | 47 | </p> |
48 | 48 | <p> |
49 | 49 | <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"> | |
51 | 51 | <param name="text" value="Specifying Tests to Run"> |
52 | 52 | <param name="target" value="confEdit.testsTab.csh"> |
53 | 53 | </object> |
43 | 43 | distributed as part of a test suite (unlike an exclude list).</p> |
44 | 44 | <p> |
45 | 45 | <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"> | |
47 | 47 | <param name="text" value="Creating Reports"> |
48 | 48 | <param name="target" value="report.newReport.csh"> |
49 | 49 | </object> |
45 | 45 | </p> |
46 | 46 | <p> |
47 | 47 | <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"> | |
49 | 49 | <param name="text" value="Using Prior Status as a Filter"> |
50 | 50 | <param name="target" value="confEdit.statusTab.csh"> |
51 | 51 | </object> |
38 | 38 | </p> |
39 | 39 | <p> |
40 | 40 | <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"> | |
42 | 42 | <param name="text" value="Specifying Tests to Run"> |
43 | 43 | <param name="target" value="confEdit.testsTab.csh"> |
44 | 44 | </object> |
47 | 47 | </p> |
48 | 48 | <p> |
49 | 49 | <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"> | |
51 | 51 | <param name="text" value="Specifying Tests to Run"> |
52 | 52 | <param name="target" value="confEdit.testsTab.csh"> |
53 | 53 | </object> |
50 | 50 | |
51 | 51 | <p> |
52 | 52 | <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"> | |
54 | 54 | <param name="text" value="Specifying Tests to Run"> |
55 | 55 | <param name="target" value="confEdit.testsTab.csh"> |
56 | 56 | </object> |
34 | 34 | import java.awt.event.ActionEvent; |
35 | 35 | import java.awt.event.ItemEvent; |
36 | 36 | 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.*; | |
42 | 38 | import java.net.MalformedURLException; |
43 | 39 | import java.net.URL; |
40 | import java.nio.charset.StandardCharsets; | |
44 | 41 | import java.util.Vector; |
45 | 42 | |
46 | 43 | import javax.swing.Action; |
308 | 305 | && !url.getFile().endsWith(".htm") |
309 | 306 | && !url.getFile().endsWith(".html")) { |
310 | 307 | textArea.setContentType("text/plain"); |
311 | FileReader r = null; | |
312 | 308 | 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)); | |
315 | 310 | textArea.read(br, url); |
316 | 311 | br.close(); |
317 | 312 | } |
318 | 313 | catch (IOException e) { |
319 | 314 | 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 | } | |
328 | 315 | } |
329 | 316 | |
330 | 317 | } |
35 | 35 | import java.awt.event.ComponentAdapter; |
36 | 36 | import java.awt.event.ComponentEvent; |
37 | 37 | 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; | |
41 | 40 | import java.util.ArrayList; |
42 | 41 | import java.util.List; |
43 | 42 | |
57 | 56 | import java.awt.event.FocusEvent; |
58 | 57 | import java.awt.event.FocusListener; |
59 | 58 | import java.awt.event.KeyListener; |
60 | import java.io.IOException; | |
61 | 59 | import javax.swing.filechooser.FileView; |
62 | 60 | |
63 | 61 | class FilesPane extends JPanel { |
380 | 378 | String formatVersion = "formatVersion=\"v1\""; |
381 | 379 | |
382 | 380 | if (!f.getName().endsWith(".xml")) return false; |
383 | FileReader fr = null; | |
381 | BufferedReader r = null; | |
384 | 382 | try { |
385 | fr = new FileReader(f); | |
386 | BufferedReader r = new BufferedReader(fr); | |
383 | r = new BufferedReader(new InputStreamReader(new FileInputStream(f), StandardCharsets.UTF_8)); | |
387 | 384 | boolean hasSchema, hasVersion = false; |
388 | 385 | |
389 | 386 | // line 1 |
400 | 397 | return false; |
401 | 398 | } finally { |
402 | 399 | try { |
403 | if (fr != null) fr.close(); | |
400 | if (r != null) r.close(); | |
404 | 401 | } catch (IOException ex) { |
405 | 402 | // nothing... |
406 | 403 | } |
0 | 0 | /* |
1 | 1 | * $Id$ |
2 | 2 | * |
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. | |
4 | 4 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5 | 5 | * |
6 | 6 | * This code is free software; you can redistribute it and/or modify it |
56 | 56 | tool.updateGUI(); |
57 | 57 | } |
58 | 58 | }); |
59 | setHelp("report.options.csh"); | |
59 | setHelp("mergeReports.window.csh"); | |
60 | 60 | } |
61 | 61 | |
62 | 62 | String getResultPath() { |
37 | 37 | import java.awt.event.HierarchyListener; |
38 | 38 | import java.awt.event.ItemEvent; |
39 | 39 | 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.*; | |
46 | 41 | import java.net.MalformedURLException; |
47 | 42 | import java.net.URL; |
43 | import java.nio.charset.StandardCharsets; | |
48 | 44 | import java.util.Map; |
49 | 45 | |
50 | 46 | import javax.swing.BorderFactory; |
576 | 572 | && !url.getFile().endsWith(".html")) { |
577 | 573 | textArea.setContentType("text/plain"); |
578 | 574 | try { |
579 | Reader r = new BufferedReader(new FileReader(file)); | |
575 | Reader r = new BufferedReader(new InputStreamReader(new FileInputStream(file), StandardCharsets.UTF_8)); | |
580 | 576 | textArea.read(r, url); |
581 | 577 | r.close(); |
582 | 578 | } catch (IOException e) { |
115 | 115 | throws SAXException { |
116 | 116 | if (qualifiedName.equals(Scheme.TR)) { |
117 | 117 | 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)); | |
120 | 119 | String status = attributes.getValue(Scheme.TR_STATUS); |
121 | 120 | map.put(url, new TestResultDescr(status, id, time)); |
122 | 121 | } |
0 | 0 | /* |
1 | 1 | * $Id$ |
2 | 2 | * |
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. | |
4 | 4 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5 | 5 | * |
6 | 6 | * This code is free software; you can redistribute it and/or modify it |
29 | 29 | import com.sun.javatest.util.I18NResourceBundle; |
30 | 30 | import java.io.BufferedWriter; |
31 | 31 | import java.io.File; |
32 | import java.io.FileWriter; | |
32 | import java.io.FileOutputStream; | |
33 | 33 | import java.io.IOException; |
34 | import java.io.OutputStreamWriter; | |
34 | 35 | import java.io.Writer; |
36 | import java.nio.charset.Charset; | |
35 | 37 | import java.util.ArrayList; |
36 | 38 | import java.util.Collections; |
37 | 39 | import java.util.List; |
41 | 43 | * HTML format of the report. |
42 | 44 | */ |
43 | 45 | public class HTMLReport implements ReportFormat { |
44 | ||
45 | 46 | @Override |
46 | 47 | public ReportLink write(ReportSettings s, File dir) throws IOException { |
47 | 48 | reportDir = dir; |
49 | initCharset(); | |
48 | 50 | setKflData(s.getKflSorter()); |
49 | 51 | setResults(s.getSortedResults()); |
50 | 52 | |
128 | 130 | ReportWriter.initializeDirectory(reportDir); |
129 | 131 | if (writer != null) { |
130 | 132 | ReportWriter out = new ReportWriter(writer, |
131 | i18n.getString("report.title"), i18n); | |
133 | i18n.getString("report.title"), i18n, reportCharset); | |
132 | 134 | |
133 | 135 | // test suite name |
134 | 136 | String testSuiteName = s.getInterview().getTestSuite().getName(); |
136 | 138 | out.startTag(HTMLWriterEx.H2); |
137 | 139 | out.writeI18N("report.testSuite", testSuiteName); |
138 | 140 | 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); | |
139 | 147 | } |
140 | 148 | |
141 | 149 | // info from sections for main report |
226 | 234 | } |
227 | 235 | |
228 | 236 | 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); | |
230 | 242 | } |
231 | 243 | |
232 | 244 | public void setResults(TreeSet[] results) { |
243 | 255 | |
244 | 256 | // ---------------------------------------------------------------------- |
245 | 257 | |
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 | ||
246 | 281 | 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"; | |
247 | 296 | |
248 | 297 | File reportDir; |
249 | 298 |
0 | 0 | /* |
1 | 1 | * $Id$ |
2 | 2 | * |
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. | |
4 | 4 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5 | 5 | * |
6 | 6 | * This code is free software; you can redistribute it and/or modify it |
95 | 95 | |
96 | 96 | /** |
97 | 97 | * 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 <head> element! | |
100 | 99 | */ |
101 | 100 | public void writeContentMeta() throws IOException { |
102 | 101 | closePrevTag(); |
103 | 102 | writeRaw(String.format(META_CONTENT, Charset.defaultCharset())); |
104 | 103 | } |
105 | 104 | |
105 | /** | |
106 | * Write Content-Type meta tag using given charset: | |
107 | * This must go inside the <head> 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 | ||
106 | 124 | private static final String META_CONTENT = "\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=%s\">\n"; |
107 | 125 | } |
27 | 27 | |
28 | 28 | import com.sun.javatest.KnownFailuresList; |
29 | 29 | 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; | |
34 | 33 | import java.util.HashSet; |
35 | 34 | import java.util.TreeSet; |
36 | 35 | |
69 | 68 | private void writeTestSet(String f, String id, TreeSet<KflSorter.TestDiff> tests) { |
70 | 69 | // add file validation |
71 | 70 | 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)); | |
73 | 72 | out.write("# "); |
74 | 73 | out.write(f); |
75 | 74 | out.write("\n"); |
25 | 25 | */ |
26 | 26 | package com.sun.javatest.report; |
27 | 27 | |
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; | |
33 | 30 | import java.util.HashSet; |
34 | 31 | import java.util.SortedSet; |
35 | 32 | |
409 | 406 | } |
410 | 407 | |
411 | 408 | 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)); | |
413 | 410 | } |
414 | 411 | |
415 | 412 | /* |
593 | 593 | continue; |
594 | 594 | } |
595 | 595 | 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 | } | |
597 | 606 | } |
598 | 607 | s = reader.readLine(); |
599 | 608 | } |
31 | 31 | import com.sun.javatest.TestResultTable; |
32 | 32 | import com.sun.javatest.util.I18NResourceBundle; |
33 | 33 | 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; | |
39 | 37 | import java.util.Collections; |
40 | 38 | import java.util.Iterator; |
41 | 39 | import java.util.List; |
126 | 124 | } |
127 | 125 | |
128 | 126 | 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)); | |
130 | 128 | } |
131 | 129 | |
132 | 130 | // these fields must have synchronized indexes |
32 | 32 | import com.sun.javatest.tool.Preferences; |
33 | 33 | import com.sun.javatest.util.BackupUtil; |
34 | 34 | 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; | |
43 | 38 | import java.text.SimpleDateFormat; |
44 | 39 | import java.util.ArrayList; |
45 | 40 | import java.util.Arrays; |
169 | 164 | * from the preferences will be used. |
170 | 165 | * @throws IllegalArgumentException if the type parameter does not |
171 | 166 | * 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. | |
173 | 168 | * null for default generated reports |
174 | 169 | * @throws java.io.IOException If an error occurs writing any of the files. |
175 | 170 | */ |
176 | public void writeReport(String type) throws IOException { | |
171 | public void writeReport(String... types) throws IOException { | |
177 | 172 | // make a settings object - default settings |
178 | 173 | //Settings settings = new Settings(params); |
179 | 174 | ReportSettings settings = getSettingsPrefs(); |
180 | 175 | settings.setInterview(params); |
181 | 176 | |
182 | 177 | String[] typesToGen; |
183 | if (type == null) { | |
178 | if (types == null) { | |
184 | 179 | // if type is not specified generate html and plain text |
185 | 180 | typesToGen = new String[] {"html", "txt"}; |
186 | 181 | } else { |
187 | typesToGen = new String[] {type}; | |
182 | typesToGen = Arrays.copyOf(types, types.length); | |
188 | 183 | } |
189 | 184 | |
190 | 185 | // this setting can originate in a legacy constructor |
212 | 207 | doCLReport(rf, settings, typesToGen, links); |
213 | 208 | } |
214 | 209 | 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)); | |
216 | 214 | } |
217 | 215 | |
218 | 216 | updateStaffFiles(reportDir, settings, links); |
357 | 355 | StringBuilder content = new StringBuilder(); |
358 | 356 | BufferedReader r = null; |
359 | 357 | try { |
360 | r = new BufferedReader(new InputStreamReader(new FileInputStream(index))); | |
358 | r = new BufferedReader(new InputStreamReader(new FileInputStream(index), StandardCharsets.UTF_8)); | |
361 | 359 | String line; |
362 | 360 | while( (line = r.readLine()) != null ) { |
363 | 361 | content.append(line); |
416 | 414 | StringBuilder sb = new StringBuilder(); |
417 | 415 | BufferedReader r = null; |
418 | 416 | try { |
419 | r = new BufferedReader(new InputStreamReader(new FileInputStream(index))); | |
417 | r = new BufferedReader(new InputStreamReader(new FileInputStream(index), StandardCharsets.UTF_8)); | |
420 | 418 | String line; |
421 | 419 | while( (line = r.readLine()) != null ) { |
422 | 420 | sb.append(line); |
460 | 458 | |
461 | 459 | Writer writer = null; |
462 | 460 | try { |
463 | writer = new BufferedWriter(new FileWriter(index)); | |
461 | writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(index), StandardCharsets.UTF_8)); | |
464 | 462 | writer.write(sb.toString()); |
465 | 463 | writer.flush(); |
466 | 464 | writer.close(); |
504 | 502 | private void fillIndexFile(File index, ReportSettings s, List<ReportLink> links) { |
505 | 503 | Writer writer = null; |
506 | 504 | try { |
507 | writer = new BufferedWriter(new FileWriter(index)); | |
505 | writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(index), StandardCharsets.UTF_8)); | |
508 | 506 | HTMLWriterEx out = new HTMLWriterEx(writer); |
509 | 507 | out.setI18NResourceBundle(i18n); |
510 | 508 |
0 | 0 | /* |
1 | 1 | * $Id$ |
2 | 2 | * |
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. | |
4 | 4 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5 | 5 | * |
6 | 6 | * This code is free software; you can redistribute it and/or modify it |
27 | 27 | |
28 | 28 | import java.io.File; |
29 | 29 | import java.io.IOException; |
30 | import java.util.Iterator; | |
31 | import java.util.ListIterator; | |
30 | import java.util.*; | |
32 | 31 | |
33 | 32 | import com.sun.javatest.AllTestsFilter; |
34 | 33 | import com.sun.javatest.CompositeFilter; |
39 | 38 | import com.sun.javatest.tool.Command; |
40 | 39 | import com.sun.javatest.tool.CommandContext; |
41 | 40 | import com.sun.javatest.tool.CommandManager; |
41 | import com.sun.javatest.tool.Preferences; | |
42 | 42 | import com.sun.javatest.util.HelpTree; |
43 | 43 | import com.sun.javatest.util.I18NResourceBundle; |
44 | 44 | import com.sun.javatest.util.StringArray; |
135 | 135 | else if (arg.equals("-type")) { |
136 | 136 | if (!argIter.hasNext()) |
137 | 137 | 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"); | |
139 | 147 | } |
140 | 148 | else if (arg.equals("-filter")) { |
141 | 149 | if (!argIter.hasNext()) |
226 | 234 | // TEMP add p.getFilters -- in time, Report API should |
227 | 235 | // provide more flexible reporting options |
228 | 236 | 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); | |
230 | 239 | |
231 | 240 | File cPath; |
232 | 241 | try { |
246 | 255 | |
247 | 256 | private File path; |
248 | 257 | private boolean createFlag; |
249 | private String type; | |
258 | private List<String> types; | |
250 | 259 | private String filter; |
251 | 260 | } |
252 | 261 |
0 | 0 | /* |
1 | 1 | * $Id$ |
2 | 2 | * |
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. | |
4 | 4 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5 | 5 | * |
6 | 6 | * This code is free software; you can redistribute it and/or modify it |
25 | 25 | */ |
26 | 26 | package com.sun.javatest.report; |
27 | 27 | |
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; | |
32 | 31 | import java.text.DateFormat; |
33 | 32 | import java.util.Date; |
34 | 33 | |
50 | 49 | * Creates a new ReportWriter. |
51 | 50 | * @param out the output stream |
52 | 51 | */ |
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 { | |
54 | 59 | super(out, "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">", i18n); |
55 | 60 | this.i18n = i18n; |
56 | 61 | |
57 | 62 | startTag(HTMLWriterEx.HTML); |
58 | 63 | startTag(HTMLWriterEx.HEAD); |
59 | writeContentMeta(); | |
64 | writeContentMeta(cs); | |
60 | 65 | startTag(HTMLWriterEx.TITLE); |
61 | 66 | writeI18N("reportWriter.product.name", new Object[] { |
62 | 67 | ProductInfo.getName(), title } ); |
107 | 112 | File cssFile = new File(dir, CSS_FILENAME); |
108 | 113 | |
109 | 114 | 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)); | |
111 | 116 | |
112 | 117 | fw.write("h1 {font-size: 18pt;\n"); |
113 | 118 | fw.write(" font-family: SansSerif;\n"); |
1 | 1 | # $Id$ |
2 | 2 | # |
3 | 3 | # |
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. | |
5 | 5 | # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
6 | 6 | # |
7 | 7 | # This code is free software; you can redistribute it and/or modify it |
111 | 111 | kfl.new.summary=New Failure |
112 | 112 | |
113 | 113 | 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 | |
117 | 117 | |
118 | 118 | kfl.f2nr.summary=Missing (not run) |
119 | 119 | 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 | |
121 | 121 | kfl.f2nr.notes=The tests listed were failing but are now not being run. |
122 | 122 | |
123 | 123 | ## ---test cases |
132 | 132 | kfl.tc_f2m.title=Known Failures - Failed Test Cases Now Missing |
133 | 133 | |
134 | 134 | 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 | |
136 | 136 | 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 | |
138 | 138 | |
139 | 139 | kfl.tc_new.notes=The test cases listed were not failing before but currently are. |
140 | 140 | kfl.tc_new.heading=New Failures |
165 | 165 | report.testResult.err=Report - bad initial tests in configuration settings, cannot continue. |
166 | 166 | report.writing.err=Report - error during writing test result |
167 | 167 | report.testSuite=TestSuite: {0} |
168 | report.filter=Filter: {0} | |
168 | 169 | |
169 | 170 | reportWriter.generatedOn=Report generated on {0,date} {0,time} |
170 | 171 | reportWriter.keyValue.separator={0}: {1}; |
191 | 192 | rm.help.report.desc=(Deprecated) Specify directory for automatic report if no actions are given |
192 | 193 | rm.help.report.name=-report <dir> |
193 | 194 | 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> | |
195 | 196 | rm.report.missingArg=argument missing |
196 | 197 | rm.writeReport.badArg=bad argument for writeReport command ({0}) |
197 | 198 | rm.writeReport.cantCreate=cannot create directory for report ({0}) |
26 | 26 | package com.sun.javatest.services; |
27 | 27 | |
28 | 28 | 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; | |
32 | 32 | import java.util.HashSet; |
33 | 33 | import java.util.Map; |
34 | 34 | import java.util.Properties; |
96 | 96 | props = new Properties(); |
97 | 97 | |
98 | 98 | try { |
99 | props.load(new FileReader(propFile)); | |
99 | props.load(new BufferedReader(new InputStreamReader(new FileInputStream(propFile), StandardCharsets.UTF_8))); | |
100 | 100 | } catch (IOException ex) { |
101 | 101 | } |
102 | 102 | } |
25 | 25 | */ |
26 | 26 | package com.sun.javatest.servlets; |
27 | 27 | |
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; | |
31 | 30 | import java.util.Iterator; |
32 | 31 | import javax.servlet.ServletException; |
33 | 32 | import javax.servlet.http.HttpServlet; |
71 | 70 | String bugLink = getInitParameter("bugLink"); |
72 | 71 | |
73 | 72 | res.setContentType("text/html"); |
74 | PrintWriter out = new PrintWriter(res.getOutputStream()); | |
73 | PrintWriter out = new PrintWriter(new OutputStreamWriter(res.getOutputStream(), StandardCharsets.UTF_8), true); | |
75 | 74 | out.println("<html>"); |
76 | 75 | out.println("<head>"); |
77 | 76 | out.println("<title>" + file + "</title>"); |
27 | 27 | |
28 | 28 | import java.io.File; |
29 | 29 | import java.io.IOException; |
30 | import java.io.OutputStreamWriter; | |
30 | 31 | import java.io.PrintWriter; |
32 | import java.nio.charset.StandardCharsets; | |
31 | 33 | import java.util.Enumeration; |
32 | 34 | import java.util.Iterator; |
33 | 35 | import java.util.Map; |
65 | 67 | } |
66 | 68 | |
67 | 69 | res.setContentType("text/html"); |
68 | PrintWriter out = new PrintWriter(res.getOutputStream()); | |
70 | PrintWriter out = new PrintWriter(new OutputStreamWriter(res.getOutputStream(), StandardCharsets.UTF_8), true); | |
69 | 71 | out.println("<html>"); |
70 | 72 | out.println("<head>"); |
71 | 73 | out.println("<title>" + file + "</title>"); |
34 | 34 | import java.awt.event.ActionListener; |
35 | 35 | import java.awt.event.WindowAdapter; |
36 | 36 | import java.awt.event.WindowEvent; |
37 | import java.awt.event.KeyEvent; | |
37 | 38 | import java.io.FileNotFoundException; |
38 | 39 | import java.util.Collection; |
39 | 40 | import java.util.Iterator; |
40 | 41 | import java.util.List; |
41 | 42 | import java.util.Map; |
42 | 43 | import java.util.Vector; |
43 | import javax.help.HelpBroker; | |
44 | 44 | import javax.accessibility.AccessibleContext; |
45 | 45 | import javax.swing.Action; |
46 | 46 | import javax.swing.JFrame; |
51 | 51 | import javax.swing.SwingUtilities; |
52 | 52 | import javax.swing.event.MenuEvent; |
53 | 53 | 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; | |
54 | 59 | import com.sun.javatest.util.ExitCount; |
55 | 60 | import com.sun.javatest.util.I18NResourceBundle; |
56 | 61 | import com.sun.javatest.util.PrefixMap; |
308 | 313 | |
309 | 314 | frame.setJMenuBar(mb); |
310 | 315 | |
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); | |
316 | 326 | |
317 | 327 | Desktop.addPreferredSizeDebugListener(frame); |
318 | 328 |
55 | 55 | import java.util.Properties; |
56 | 56 | import java.util.Set; |
57 | 57 | 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; | |
64 | 58 | import javax.swing.BorderFactory; |
65 | 59 | import javax.swing.Icon; |
66 | 60 | import javax.swing.JButton; |
79 | 73 | import com.sun.javatest.InterviewParameters; |
80 | 74 | import com.sun.javatest.JavaTestError; |
81 | 75 | 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; | |
82 | 80 | import com.sun.javatest.util.BackupPolicy; |
83 | 81 | import com.sun.javatest.report.HTMLWriterEx; |
84 | 82 | import com.sun.javatest.util.I18NResourceBundle; |
855 | 853 | n++; |
856 | 854 | } |
857 | 855 | |
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 | ||
866 | 856 | try { |
867 | 857 | File dir = f.getParentFile(); |
868 | 858 | if (dir != null && !dir.exists()) |
926 | 916 | } |
927 | 917 | |
928 | 918 | 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 | } | |
946 | 919 | |
947 | 920 | // ALERT!! NEEDS FIXING! |
948 | 921 | // should use saved view info |
1177 | 1150 | public void dispose() { |
1178 | 1151 | if (currView != null) |
1179 | 1152 | currView.dispose(); |
1180 | ||
1181 | if (helpBroker != null && helpBroker.isDisplayed()) { | |
1182 | helpBroker.setDisplayed(false); | |
1183 | } | |
1184 | 1153 | } |
1185 | 1154 | |
1186 | 1155 | /** |
1463 | 1432 | } |
1464 | 1433 | |
1465 | 1434 | 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 | } | |
1508 | 1458 | } |
1509 | 1459 | |
1510 | 1460 | private void initToolManagers() { |
1587 | 1537 | Component comp = javax.swing.SwingUtilities.findFocusOwner(src); |
1588 | 1538 | System.err.println("ALT-F2: source=" + src); |
1589 | 1539 | 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); | |
1591 | 1543 | } |
1592 | 1544 | }; |
1593 | 1545 | |
1674 | 1626 | private PreferencesPane prefsPane; |
1675 | 1627 | private PreferencesPane colorPane; |
1676 | 1628 | private ToolManager[] toolManagers; |
1677 | private DefaultHelpBroker helpBroker; | |
1629 | private HelpBroker helpBroker; | |
1678 | 1630 | private LogFile logFile; |
1679 | 1631 | private boolean firstTime; |
1680 | 1632 | private boolean saveOnExit; |
0 | 0 | /* |
1 | 1 | * $Id$ |
2 | 2 | * |
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. | |
4 | 4 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5 | 5 | * |
6 | 6 | * This code is free software; you can redistribute it and/or modify it |
132 | 132 | throw new Fault(i18n, "dt.opts.laf.badArg", new Object[] {lafName}); |
133 | 133 | } |
134 | 134 | |
135 | addArg(lafName); | |
136 | ||
135 | 137 | ctx.setPreferredLookAndFeel(laf); |
136 | 138 | } |
137 | 139 |
27 | 27 | package com.sun.javatest.tool; |
28 | 28 | |
29 | 29 | 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.*; | |
36 | 31 | import java.lang.ref.WeakReference; |
32 | import java.nio.charset.StandardCharsets; | |
37 | 33 | import java.util.Date; |
38 | 34 | import java.util.HashMap; |
39 | 35 | import java.util.Iterator; |
222 | 218 | |
223 | 219 | if (historyFile.exists()) { |
224 | 220 | try { |
225 | BufferedReader br = new BufferedReader(new FileReader(historyFile)); | |
221 | BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(historyFile), StandardCharsets.UTF_8)); | |
226 | 222 | String line; |
227 | 223 | while ((line = br.readLine()) != null) { |
228 | 224 | String p = line.trim(); |
243 | 239 | |
244 | 240 | private void writeEntries() { |
245 | 241 | try { |
246 | BufferedWriter bw = new BufferedWriter(new FileWriter(historyFile)); | |
242 | BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(historyFile), StandardCharsets.UTF_8)); | |
247 | 243 | bw.write("# Configuration File History"); |
248 | 244 | bw.newLine(); |
249 | 245 | bw.write("# written at " + (new Date())); |
39 | 39 | import java.awt.event.WindowEvent; |
40 | 40 | import java.beans.PropertyChangeEvent; |
41 | 41 | 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; | |
47 | 44 | import java.util.Iterator; |
48 | 45 | import java.util.Set; |
49 | 46 | import java.util.Vector; |
50 | 47 | import java.beans.PropertyChangeListener; |
51 | 48 | import javax.accessibility.AccessibleContext; |
52 | import javax.help.JHelpContentViewer; | |
53 | 49 | import javax.swing.AbstractAction; |
54 | 50 | import javax.swing.Action; |
55 | 51 | import javax.swing.ActionMap; |
78 | 74 | import javax.swing.event.MenuListener; |
79 | 75 | import javax.swing.text.Document; |
80 | 76 | import javax.swing.text.JTextComponent; |
77 | import com.sun.javatest.tool.jthelp.JHelpContentViewer; | |
81 | 78 | |
82 | 79 | class FocusMonitor |
83 | 80 | { |
154 | 151 | }; |
155 | 152 | } |
156 | 153 | else |
157 | out = new BufferedWriter(new FileWriter(reportFile, true)); | |
154 | out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(reportFile, true), StandardCharsets.UTF_8)); | |
158 | 155 | |
159 | 156 | out.write("---------------------------------------"); |
160 | 157 | out.write(NEWLINE); |
25 | 25 | */ |
26 | 26 | package com.sun.javatest.tool; |
27 | 27 | |
28 | import com.sun.javatest.tool.jthelp.HelpBroker; | |
29 | import com.sun.javatest.tool.jthelp.JHelpContentViewer; | |
30 | ||
28 | 31 | import java.awt.event.MouseAdapter; |
29 | 32 | import java.awt.event.MouseEvent; |
30 | 33 | import java.io.BufferedReader; |
31 | 34 | import java.io.InputStreamReader; |
32 | 35 | import java.lang.reflect.Method; |
33 | import javax.help.HelpBroker; | |
34 | import javax.help.JHelpContentViewer; | |
35 | 36 | import javax.swing.SwingUtilities; |
36 | 37 | |
37 | 38 | /** |
56 | 57 | if (!openUrl(getTarget())) { |
57 | 58 | JHelpContentViewer cv = (JHelpContentViewer) SwingUtilities.getAncestorOfClass(JHelpContentViewer.class, e.getComponent()); |
58 | 59 | HelpBroker hb = (HelpBroker) (cv.getClientProperty(HELPBROKER_FOR_HELPLINK)); |
59 | hb.setCurrentID(getTarget()); | |
60 | hb.setDisplayed(true); | |
60 | hb.displayCurrentID(getTarget()); | |
61 | 61 | } |
62 | 62 | } |
63 | 63 | }); |
24 | 24 | * questions. |
25 | 25 | */ |
26 | 26 | package com.sun.javatest.tool; |
27 | ||
28 | import com.sun.javatest.tool.jthelp.HelpBroker; | |
29 | import com.sun.javatest.tool.jthelp.JHelpContentViewer; | |
27 | 30 | |
28 | 31 | import java.awt.Color; |
29 | 32 | import java.awt.Cursor; |
36 | 39 | |
37 | 40 | import javax.accessibility.Accessible; |
38 | 41 | import javax.accessibility.AccessibleContext; |
39 | import javax.help.HelpBroker; | |
40 | import javax.help.JHelpContentViewer; | |
41 | 42 | import javax.swing.JComponent; |
42 | 43 | import javax.swing.SwingUtilities; |
43 | 44 | |
74 | 75 | public void mousePressed(MouseEvent e) { |
75 | 76 | JHelpContentViewer cv = (JHelpContentViewer) SwingUtilities.getAncestorOfClass(JHelpContentViewer.class, e.getComponent()); |
76 | 77 | HelpBroker hb = (HelpBroker) (cv.getClientProperty(HELPBROKER_FOR_HELPLINK)); |
77 | hb.setCurrentID(target); | |
78 | hb.setDisplayed(true); | |
78 | hb.displayCurrentID(target); | |
79 | 79 | } |
80 | 80 | }); |
81 | 81 | setCursor(new Cursor(Cursor.HAND_CURSOR)); |
39 | 39 | import java.util.ListIterator; |
40 | 40 | import java.util.TreeMap; |
41 | 41 | |
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 | ||
49 | 42 | import com.sun.javatest.Harness; |
50 | 43 | 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; | |
52 | 47 | import com.sun.javatest.util.HelpTree; |
53 | 48 | import com.sun.javatest.util.I18NResourceBundle; |
54 | 49 | import com.sun.javatest.util.WrapWriter; |
288 | 283 | } |
289 | 284 | |
290 | 285 | 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"); | |
304 | 294 | } |
305 | 295 | } |
306 | 296 | } |
351 | 341 | |
352 | 342 | private static I18NResourceBundle i18n = I18NResourceBundle.getBundleForClass(HelpManager.class); |
353 | 343 | |
354 | private static class CustomHelpBroker | |
344 | /*private static class CustomHelpBroker | |
355 | 345 | extends DefaultHelpBroker |
356 | 346 | { |
357 | 347 | CustomHelpBroker(HelpSet hs) { |
410 | 400 | private Window getHelpWindow() { |
411 | 401 | return getWindowPresentation().getHelpWindow(); |
412 | 402 | } |
413 | } | |
403 | }*/ | |
414 | 404 | } |
39 | 39 | import java.util.TreeSet; |
40 | 40 | import java.util.WeakHashMap; |
41 | 41 | |
42 | import javax.help.DefaultHelpBroker; | |
43 | import javax.help.HelpBroker; | |
44 | import javax.help.HelpSet; | |
45 | ||
46 | 42 | import javax.swing.JButton; |
47 | 43 | import javax.swing.JComponent; |
48 | 44 | import javax.swing.JDialog; |
61 | 57 | import com.sun.javatest.Harness; |
62 | 58 | import com.sun.javatest.ProductInfo; |
63 | 59 | 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; | |
64 | 63 | |
65 | 64 | |
66 | 65 | class HelpMenu extends JMenu |
253 | 252 | private void showHelpSet(HelpSet hs) { |
254 | 253 | HelpBroker hb = getHelpBroker(hs); |
255 | 254 | 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(); | |
259 | 258 | } |
260 | 259 | else { |
261 | 260 | // could internationalize this, but the error isn't that helpful because a |
267 | 266 | private HelpBroker getHelpBroker(HelpSet hs) { |
268 | 267 | HelpBroker hb = (HelpBroker) (helpBrokerTable.get(hs)); |
269 | 268 | if (hb == null) { |
270 | int dpi = uif.getDotsPerInch(); | |
271 | 269 | //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(); | |
274 | 271 | helpBrokerTable.put(hs, hb); |
275 | 272 | } |
276 | 273 | return hb; |
401 | 398 | else if (cmd.equals(HELP)) { |
402 | 399 | HelpBroker helpBroker = desktop.getHelpBroker(); |
403 | 400 | 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"); | |
408 | 402 | } |
409 | 403 | else { |
410 | 404 | // could internationalize this, but the error isn't that helpful because a |
25 | 25 | */ |
26 | 26 | package com.sun.javatest.tool; |
27 | 27 | |
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; | |
33 | 30 | import java.util.ListIterator; |
34 | 31 | |
35 | 32 | import com.sun.javatest.util.HelpTree; |
94 | 91 | PrintWriter newLog; |
95 | 92 | |
96 | 93 | 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))); | |
99 | 95 | } |
100 | 96 | catch (IOException e) { |
101 | 97 | throw new Fault(i18n, "logm.log.cantOpenFile", e); |
0 | 0 | /* |
1 | 1 | * $Id$ |
2 | 2 | * |
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. | |
4 | 4 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5 | 5 | * |
6 | 6 | * This code is free software; you can redistribute it and/or modify it |
93 | 93 | */ |
94 | 94 | public static void main(String[] args) { |
95 | 95 | tracing = Boolean.getBoolean("javatest.trace.startup"); |
96 | ||
96 | 97 | if (tracing) |
97 | 98 | traceStartTime = System.currentTimeMillis(); |
98 | 99 | |
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 | ||
99 | 117 | String javaVersion = System.getProperty("java.version"); |
100 | 118 | 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"}; | |
102 | 120 | for (int i = 0; i < oldVersions.length; i++) { |
103 | 121 | if (javaVersion.startsWith(oldVersions[i])) { |
104 | 122 | // 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."); | |
106 | 124 | System.exit(1); |
107 | 125 | } |
108 | 126 | } |
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); | |
117 | 127 | } |
118 | 128 | |
119 | 129 | main0(args); |
0 | 0 | /* |
1 | 1 | * $Id$ |
2 | 2 | * |
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. | |
4 | 4 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5 | 5 | * |
6 | 6 | * This code is free software; you can redistribute it and/or modify it |
25 | 25 | */ |
26 | 26 | package com.sun.javatest.tool; |
27 | 27 | |
28 | import com.sun.javatest.util.DynamicArray; | |
29 | import com.sun.javatest.util.I18NResourceBundle; | |
30 | import com.sun.javatest.util.SortedProperties; | |
28 | 31 | import java.io.BufferedInputStream; |
29 | 32 | import java.io.BufferedOutputStream; |
30 | 33 | import java.io.File; |
31 | 34 | import java.io.FileInputStream; |
35 | import java.io.FileNotFoundException; | |
32 | 36 | import java.io.FileOutputStream; |
33 | import java.io.FileNotFoundException; | |
37 | import java.io.IOException; | |
34 | 38 | import java.io.InputStream; |
35 | import java.io.IOException; | |
36 | 39 | import java.io.OutputStream; |
37 | import java.util.Collection; | |
38 | 40 | import java.util.Enumeration; |
39 | 41 | import java.util.Hashtable; |
40 | import java.util.Map; | |
41 | 42 | 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; | |
49 | 43 | |
50 | 44 | /** |
51 | 45 | * A class which provides a collection of user preferences, |
80 | 74 | return theOne; |
81 | 75 | } |
82 | 76 | |
83 | static File getPrefsDir() { | |
77 | public static File getPrefsDir() { | |
84 | 78 | File userDir = new File(System.getProperty("user.home")); |
85 | 79 | String prefDir = System.getProperty("javatest.preferences.dir", ".javatest"); |
86 | 80 | return new File(userDir, prefDir); |
40 | 40 | import java.util.Properties; |
41 | 41 | import java.util.Set; |
42 | 42 | |
43 | import javax.help.CSH; | |
44 | import javax.help.HelpBroker; | |
45 | 43 | import javax.swing.BorderFactory; |
46 | 44 | import javax.swing.JButton; |
47 | 45 | import javax.swing.JComponent; |
57 | 55 | import javax.swing.tree.TreeModel; |
58 | 56 | import javax.swing.tree.TreeSelectionModel; |
59 | 57 | 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 | ||
61 | 61 | import java.awt.event.KeyEvent; |
62 | 62 | import javax.swing.AbstractAction; |
63 | 63 | import javax.swing.ActionMap; |
96 | 96 | * @see PreferencesPane#showDialog |
97 | 97 | */ |
98 | 98 | protected void setHelp(String helpID) { |
99 | CSH.setHelpIDString(this, helpID); | |
99 | ContextHelpManager.setHelpIDString(this, helpID); | |
100 | 100 | } |
101 | 101 | |
102 | 102 | /** |
196 | 196 | //prefsTreeLeafIcon = uif.createIcon("prefs.leaf"); |
197 | 197 | setName("prefs"); |
198 | 198 | 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"); | |
202 | 209 | Desktop.addHelpDebugListener(this); |
203 | 210 | uif.setAccessibleDescription(this, "prefs"); |
204 | 211 |
32 | 32 | |
33 | 33 | import com.sun.javatest.TestSuite; |
34 | 34 | import com.sun.javatest.WorkDirectory; |
35 | import com.sun.javatest.tool.jthelp.JTHelpBroker; | |
35 | 36 | import com.sun.javatest.util.FileInfoCache; |
36 | 37 | import com.sun.javatest.util.I18NResourceBundle; |
37 | import javax.help.DefaultHelpBroker; | |
38 | ||
39 | 38 | /** |
40 | 39 | * |
41 | 40 | */ |
321 | 320 | private Component parent; |
322 | 321 | private boolean approveOpenSelection_dirExists = false; |
323 | 322 | |
324 | private UIFactory uif = new UIFactory(SelectedWorkDirApprover.class, new DefaultHelpBroker()); | |
323 | private UIFactory uif = new UIFactory(SelectedWorkDirApprover.class, new JTHelpBroker()); | |
325 | 324 | private static I18NResourceBundle i18n = I18NResourceBundle.getBundleForClass(SelectedWorkDirApprover.class); |
326 | 325 | |
327 | 326 | private boolean allowNoTemplate = false; |
43 | 43 | import java.util.Map; |
44 | 44 | import java.util.Set; |
45 | 45 | |
46 | import javax.help.CSH; | |
47 | ||
48 | 46 | import javax.swing.Action; |
49 | 47 | import javax.swing.JDialog; |
50 | 48 | import javax.swing.JFrame; |
61 | 59 | import javax.swing.event.MenuListener; |
62 | 60 | |
63 | 61 | import com.sun.javatest.util.PrefixMap; |
62 | import com.sun.javatest.tool.jthelp.ContextHelpManager; | |
64 | 63 | |
65 | 64 | /** |
66 | 65 | * A container that presents the current desktop tools in a tabbed pane. |
228 | 227 | // hands on the new selected tool (if any) |
229 | 228 | if (selectedTool == null) { |
230 | 229 | mainFrame.setTitle(uif.getI18NString("dt.title.txt")); |
231 | CSH.setHelpIDString(contents, null); | |
230 | ContextHelpManager.setHelpIDString(contents, null); | |
232 | 231 | } |
233 | 232 | else { |
234 | 233 | //OLD addToolMenuItemsToBasicMenuBar(selectedTool); |
235 | 234 | addToolMenuItemsToFrameMenuBar(mainFrame, selectedTool); |
236 | 235 | selectedTool.addObserver(listener); |
237 | 236 | mainFrame.setTitle(uif.getI18NString("dt.title.tool.txt", selectedTool.getTitle())); |
238 | CSH.setHelpIDString(contents, CSH.getHelpIDString(selectedTool)); | |
237 | ContextHelpManager.setHelpIDString(contents, ContextHelpManager.getHelpIDString(selectedTool)); | |
239 | 238 | contents.setSelectedComponent(selectedTool); |
240 | 239 | } |
241 | 240 |
158 | 158 | uif.showError("tsc.cantFindTestSuite", e.getMessage()); |
159 | 159 | } |
160 | 160 | catch (TestSuite.Fault e) { |
161 | uif.showError("tsc.notATestSuite", e.getMessage()); | |
161 | uif.showError("tsc.unableToOpen", e.getMessage()); | |
162 | 162 | } |
163 | 163 | } |
164 | 164 |
33 | 33 | import java.util.List; |
34 | 34 | import java.util.Map; |
35 | 35 | |
36 | import javax.help.HelpBroker; | |
37 | ||
38 | 36 | import javax.swing.JDialog; |
39 | 37 | import javax.swing.JMenuBar; |
40 | 38 | import javax.swing.JPanel; |
41 | 39 | |
42 | 40 | import com.sun.javatest.TestSuite; |
43 | 41 | import com.sun.javatest.WorkDirectory; |
42 | import com.sun.javatest.tool.jthelp.ContextHelpManager; | |
43 | import com.sun.javatest.tool.jthelp.HelpBroker; | |
44 | 44 | import com.sun.javatest.util.DynamicArray; |
45 | 45 | |
46 | 46 | /** |
273 | 273 | protected Tool(ToolManager m, String uiKey, String helpID) { |
274 | 274 | this(m, uiKey); |
275 | 275 | |
276 | HelpBroker b = getHelpBroker(); | |
277 | if (b != null) | |
278 | b.enableHelp(this, helpID, null); | |
276 | ContextHelpManager.setHelpIDString(this, helpID); | |
279 | 277 | } |
280 | 278 | |
281 | 279 | /** |
359 | 357 | if (comp instanceof JDialog) { |
360 | 358 | JDialog d = (JDialog) comp; |
361 | 359 | 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); | |
363 | 365 | } |
364 | else | |
365 | b.enableHelp(comp, helpID, null); | |
366 | 366 | } |
367 | 367 | } |
368 | 368 | |
376 | 376 | protected void setHelpOnButton(Component comp, String helpID) { |
377 | 377 | HelpBroker b = getHelpBroker(); |
378 | 378 | if (b != null) |
379 | b.enableHelpOnButton(comp, helpID, null); | |
379 | b.enableHelpKey(comp, helpID); | |
380 | 380 | } |
381 | 381 | |
382 | 382 | /** |
39 | 39 | import java.awt.Window; |
40 | 40 | import java.awt.event.ActionEvent; |
41 | 41 | import java.awt.event.ActionListener; |
42 | import java.awt.event.KeyEvent; | |
42 | 43 | import java.net.URL; |
43 | 44 | import java.util.MissingResourceException; |
44 | ||
45 | import javax.help.HelpBroker; | |
46 | 45 | |
47 | 46 | import javax.accessibility.Accessible; |
48 | 47 | import javax.accessibility.AccessibleContext; |
94 | 93 | import javax.swing.table.TableModel; |
95 | 94 | |
96 | 95 | import com.sun.javatest.ProductInfo; |
96 | import com.sun.javatest.tool.jthelp.ContextHelpManager; | |
97 | import com.sun.javatest.tool.jthelp.HelpBroker; | |
97 | 98 | import com.sun.javatest.util.I18NResourceBundle; |
98 | 99 | import java.awt.Dialog; |
99 | 100 | import java.util.Enumeration; |
550 | 551 | * @param helpID the help ID identifying the context sensitive help for |
551 | 552 | * the component |
552 | 553 | */ |
553 | public void setHelp(Component comp, String helpID) { | |
554 | public void setHelp(final Component comp, final String helpID) { | |
554 | 555 | if (helpID == null) |
555 | 556 | throw new NullPointerException(); |
556 | 557 | |
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); | |
562 | 589 | } |
563 | else | |
564 | helpBroker.enableHelp(comp, helpID, null); | |
565 | } | |
590 | ||
591 | } | |
592 | ||
566 | 593 | } |
567 | 594 | |
568 | 595 | /** |
926 | 953 | * @return the button that was created |
927 | 954 | * @see #createButton |
928 | 955 | */ |
929 | public JButton createHelpButton(String uiKey, String helpID) { | |
956 | public JButton createHelpButton(String uiKey, final String helpID) { | |
930 | 957 | 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 | ||
935 | 967 | return hb; |
936 | 968 | } |
937 | 969 | |
1700 | 1732 | * @return the button that was created |
1701 | 1733 | * @see #createButton |
1702 | 1734 | */ |
1703 | public JMenuItem createHelpMenuItem(String uiKey, String helpID) { | |
1735 | public JMenuItem createHelpMenuItem(String uiKey, final String helpID) { | |
1704 | 1736 | JMenuItem mi = new JMenuItem(getI18NString(uiKey + ".mit")); |
1705 | 1737 | 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 | ||
1710 | 1747 | return mi; |
1711 | 1748 | } |
1712 | 1749 |
1 | 1 | # $Id$ |
2 | 2 | # |
3 | 3 | # |
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. | |
5 | 5 | # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
6 | 6 | # |
7 | 7 | # This code is free software; you can redistribute it and/or modify it |
226 | 226 | dt.logo.icon=images/jtlogo.png |
227 | 227 | dt.menuBar.desc=Menus for available for use in all JT Harness windows |
228 | 228 | dt.menuBar.name=Menu Bar |
229 | dt.opts.name=Desktop | |
229 | dt.opts.name=Desktop | |
230 | 230 | dt.opts.desc=Options for starting the JT Harness graphical user interface |
231 | 231 | dt.opts.cleanDesktop.desc=(Old) See -newDesktop |
232 | 232 | dt.opts.cleanDesktop.name=-cleanDesktop |
237 | 237 | dt.opts.laf.desc=Use specific LookAndFeel for JavaTest graphical user interface. Currently supported: system, sys, metal, nimbus, default (nimbus) |
238 | 238 | dt.opts.laf.name=-laf |
239 | 239 | 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} | |
241 | 241 | #dt.prefs.mdi.mne=M |
242 | 242 | #dt.prefs.mdi.rb=MDI |
243 | 243 | #dt.prefs.mdi.tip=JT Harness tools are contained within a common frame |
292 | 292 | 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. |
293 | 293 | 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. |
294 | 294 | dv.restore.noMgr=Cannot find specified manager ({1}) |
295 | dv.restore.noMgrClass=No manager specified | |
295 | dv.restore.noMgrClass=No manager specified | |
296 | 296 | |
297 | 297 | env.name=Environment |
298 | 298 | env.desc=Options for adding values into JT Harness environments |
309 | 309 | fh.empty=(no previous files) |
310 | 310 | |
311 | 311 | #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: | |
313 | 313 | #help.cmd.optHead=\nThe available options are: |
314 | 314 | |
315 | 315 | help.cmd.files.desc=Types of files accepted as command line arguments |
352 | 352 | help.cmd.syntax.string.desc=One or more commands can be put directly on the command line by enclosing them in quotation marks. |
353 | 353 | help.cmd.syntax.string.name=command string |
354 | 354 | 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. | |
356 | 356 | help.onlineHelp.pleaseWait=Opening online help; please wait... |
357 | 357 | 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}. |
358 | 358 | help.harnessType.full.txt=(Full) |
371 | 371 | hm.aboutJava=Java(TM) {0}\n{1}\n{2}\n{3} |
372 | 372 | hm.aboutJavaTest.mit=About the JT Harness |
373 | 373 | 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. | |
376 | 376 | hm.aboutJavaTest.copy.desc=Long version of software copyright notice - multiple paragraphs. |
377 | 377 | hm.aboutJavaTest.copy.name=Long copyright notice. |
378 | 378 | hm.aboutJavaTest.text.desc=Build date, author, version, jar file name, copyright info. |
404 | 404 | http.name=HTTP server |
405 | 405 | http.desc=Options for the JT Harness HTTP server |
406 | 406 | http.startHttp.name=-startHttp |
407 | http.startHttp.desc=Start the internal HTTP server | |
407 | http.startHttp.desc=Start the internal HTTP server | |
408 | 408 | |
409 | 409 | list.add.btn=Add |
410 | 410 | list.add.tip=Add a new entry to the list |
488 | 488 | tsc.cantFindTestSuite.err=Cannot find the specified test suite: {0} |
489 | 489 | tsc.ft=Test Suite |
490 | 490 | 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} | |
491 | 492 | tsc.open.btn=Open |
492 | 493 | tsc.open.tip=Open the selected test suite |
493 | 494 | 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⏎ |
34 | 34 | import java.io.OutputStream; |
35 | 35 | import java.io.OutputStreamWriter; |
36 | 36 | import java.io.Writer; |
37 | import java.nio.charset.StandardCharsets; | |
37 | 38 | import java.util.Vector; |
38 | 39 | |
39 | 40 | /** |
177 | 178 | */ |
178 | 179 | public Writer backupAndOpenWriter(File file) throws IOException, SecurityException { |
179 | 180 | backup(file); |
180 | return new BufferedWriter(new FileWriter(file)); | |
181 | return new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file), StandardCharsets.UTF_8)); | |
181 | 182 | } |
182 | 183 | |
183 | 184 | /** |
231 | 231 | |
232 | 232 | FileFilter filter = new LayerFilter(suffix); |
233 | 233 | 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) { | |
245 | 250 | } |
246 | else { | |
247 | newName = layer[i].getCanonicalPath() + newSuffix; | |
248 | } | |
249 | layer[i].renameTo(new File(newName)); | |
250 | } | |
251 | catch(IOException e) {} | |
251 | } | |
252 | 252 | } |
253 | 253 | } |
254 | 254 | } |
0 | 0 | /* |
1 | 1 | * $Id$ |
2 | 2 | * |
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. | |
4 | 4 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5 | 5 | * |
6 | 6 | * This code is free software; you can redistribute it and/or modify it |
30 | 30 | import java.io.IOException; |
31 | 31 | import java.io.Writer; |
32 | 32 | import java.net.URL; |
33 | import java.net.URLEncoder; | |
33 | 34 | |
34 | 35 | /** |
35 | 36 | * A class to facilitate writing HTML via a stream. |
337 | 338 | public void writeLink(File file, String body) throws IOException { |
338 | 339 | startTag(A); |
339 | 340 | StringBuffer sb = new StringBuffer(); |
340 | String path = file.getPath().replace(File.separatorChar, '/'); | |
341 | String path = file.getPath(); | |
341 | 342 | if (file.isAbsolute() && !path.startsWith("/")) |
342 | 343 | 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 | } | |
344 | 350 | writeAttr(HREF, sb.toString()); |
345 | 351 | write(body); |
346 | 352 | endTag(A); |
394 | 394 | ww.flush(); |
395 | 395 | } |
396 | 396 | |
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 | ||
397 | 415 | private void write(WrapWriter out, Map m) throws IOException { |
398 | 416 | int margin = out.getLeftMargin(); |
399 | 417 | for (Iterator iter = m.entrySet().iterator(); iter.hasNext(); ) { |
487 | 505 | private static final int ALL = 1; |
488 | 506 | private static final int ANY = 2; |
489 | 507 | |
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) { | |
495 | 510 | int v = compareStrings(n1.name, n2.name); |
496 | 511 | return (v != 0 ? v : compareStrings(n1.description, n2.description)); |
497 | 512 | } |
26 | 26 | package com.sun.javatest.util; |
27 | 27 | |
28 | 28 | import com.sun.javatest.ResourceLoader; |
29 | ||
30 | import java.security.AccessController; | |
31 | import java.security.PrivilegedAction; | |
29 | 32 | import java.text.MessageFormat; |
30 | 33 | import java.util.Enumeration; |
31 | 34 | import java.util.Locale; |
111 | 114 | private Object getObj(String key) throws MissingResourceException { |
112 | 115 | try { |
113 | 116 | 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 | }); | |
115 | 123 | } |
116 | 124 | return delegate.getObject(key); |
117 | 125 | } 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); | |
119 | 133 | } |
120 | 134 | } |
121 | 135 | |
157 | 171 | */ |
158 | 172 | public Enumeration getKeys() { |
159 | 173 | 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 | ||
161 | 181 | } |
162 | 182 | if (delegate.getKeys().hasMoreElements()) { |
163 | 183 | return delegate.getKeys(); |
164 | 184 | } |
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(); | |
166 | 193 | } |
167 | 194 | |
168 | 195 | /** |
25 | 25 | */ |
26 | 26 | package com.sun.javatest.util; |
27 | 27 | |
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; | |
34 | 30 | import java.util.Vector; |
35 | 31 | |
36 | 32 | /** |
88 | 84 | public LineParser(File file) |
89 | 85 | throws FileNotFoundException, IOException |
90 | 86 | { |
91 | this(file, new BufferedReader(new FileReader(file))); | |
87 | this(file, new BufferedReader(new InputStreamReader(new FileInputStream(file), StandardCharsets.UTF_8))); | |
92 | 88 | } |
93 | 89 | |
94 | 90 | /** |
25 | 25 | */ |
26 | 26 | package com.sun.javatest.util; |
27 | 27 | |
28 | import java.io.File; | |
28 | import java.io.*; | |
29 | 29 | |
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; | |
35 | 31 | import java.text.SimpleDateFormat; |
36 | 32 | import java.util.Date; |
37 | 33 | |
129 | 125 | closeWhenDone = false; |
130 | 126 | } |
131 | 127 | else { |
132 | FileWriter fw = null; | |
128 | Writer fw = null; | |
133 | 129 | try { |
134 | 130 | // open writer in append mode |
135 | fw = new FileWriter(file, true); | |
131 | fw = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file, true), StandardCharsets.UTF_8)); | |
136 | 132 | } |
137 | 133 | catch (IOException e) { |
138 | 134 | // oh well |
172 | 172 | data = new String[0]; |
173 | 173 | } |
174 | 174 | |
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); | |
183 | 180 | |
184 | 181 | return arr; |
185 | 182 | } |
34 | 34 | import java.io.File; |
35 | 35 | import java.lang.reflect.InvocationTargetException; |
36 | 36 | import java.net.InetAddress; |
37 | import javax.help.HelpBroker; | |
38 | import javax.help.HelpSet; | |
39 | 37 | import javax.swing.JDialog; |
40 | 38 | import javax.swing.JFileChooser; |
41 | 39 | import javax.swing.JFrame; |
58 | 56 | import com.sun.interview.wizard.Exporter; |
59 | 57 | import com.sun.interview.wizard.Wizard; |
60 | 58 | 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; | |
61 | 62 | |
62 | 63 | public class I18NWizTest extends Interview |
63 | 64 | { |
93 | 94 | { |
94 | 95 | EventQueue.invokeAndWait(new Runnable() { |
95 | 96 | public void run() { |
96 | help_hs = new HelpSet(); | |
97 | help_hb = help_hs.createHelpBroker(); | |
97 | help_hb = new JTHelpBroker(); | |
98 | 98 | } |
99 | 99 | }); |
100 | 100 |
32 | 32 | import java.awt.event.ActionEvent; |
33 | 33 | import java.io.File; |
34 | 34 | import java.io.FileNotFoundException; |
35 | import javax.help.HelpBroker; | |
36 | 35 | import javax.swing.Action; |
37 | 36 | import javax.swing.JButton; |
38 | 37 | import javax.swing.JDialog; |