jruby-win32ole 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. data/.gitignore +7 -0
  2. data/Gemfile +4 -0
  3. data/README +0 -0
  4. data/Rakefile +8 -0
  5. data/VERSION +1 -0
  6. data/bin/make_data.rb +12 -0
  7. data/bin/sample +11 -0
  8. data/build.xml +74 -0
  9. data/jruby-win32ole.gemspec +21 -0
  10. data/lib/jruby-win32ole.rb +39 -0
  11. data/lib/jruby-win32ole/version.rb +5 -0
  12. data/lib/racob-x64.dll +0 -0
  13. data/lib/racob-x86.dll +0 -0
  14. data/lib/racob.jar +0 -0
  15. data/lib/win32ole/utils.rb +230 -0
  16. data/lib/win32ole/win32ole.jar +0 -0
  17. data/lib/win32ole/win32ole_error.rb +13 -0
  18. data/lib/win32ole/win32ole_event.rb +38 -0
  19. data/lib/win32ole/win32ole_method.rb +135 -0
  20. data/lib/win32ole/win32ole_param.rb +45 -0
  21. data/lib/win32ole/win32ole_ruby.rb +115 -0
  22. data/lib/win32ole/win32ole_type.rb +148 -0
  23. data/lib/win32ole/win32ole_typelib.rb +76 -0
  24. data/lib/win32ole/win32ole_variable.rb +41 -0
  25. data/lib/win32ole/win32ole_variant.rb +52 -0
  26. data/nbproject/build-impl.xml +800 -0
  27. data/nbproject/genfiles.properties +8 -0
  28. data/nbproject/private/config.properties +0 -0
  29. data/nbproject/private/private.properties +8 -0
  30. data/nbproject/private/private.xml +4 -0
  31. data/nbproject/project.properties +71 -0
  32. data/nbproject/project.xml +14 -0
  33. data/samples/browser_connect.rb +10 -0
  34. data/samples/const_load.rb +10 -0
  35. data/samples/dir_enum_bench.rb +24 -0
  36. data/samples/dispatch_bench.rb +44 -0
  37. data/samples/file_system_object.rb +7 -0
  38. data/samples/fs.rb +50 -0
  39. data/samples/ie_plus_events.rb +45 -0
  40. data/samples/ie_simple.rb +20 -0
  41. data/samples/ie_simple_clsid.rb +13 -0
  42. data/samples/sbem.rb +11 -0
  43. data/samples/small_enum_bench.rb +126 -0
  44. data/src/org/jruby/ext/win32ole/RubyInvocationProxy.java +34 -0
  45. data/src/org/jruby/ext/win32ole/RubyWIN32OLE.java +278 -0
  46. data/src/win32ole/Win32oleService.java +29 -0
  47. metadata +113 -0
@@ -0,0 +1,76 @@
1
+ require 'win32/registry'
2
+
3
+ class WIN32OLE_TYPELIB
4
+ attr_reader :typelib
5
+ attr_reader :name
6
+ alias :to_s :name
7
+
8
+ def initialize(*args)
9
+ # TODO: Make this work internally and externally API w/ regards to inargs
10
+ if args.length == 2
11
+ @typelib, @name = *args
12
+ puts "NO TYPELIB! for #{@name} #{@version}" unless @typelib
13
+ elsif args.length == 1
14
+ @name = args[0]
15
+ @typelib = search_registry(@name) # TODO: Missing search_registry2
16
+ # puts "NAME IS #{@name}///#{@typelib}"
17
+ end
18
+ end
19
+
20
+ def guid
21
+ @typelib.guid
22
+ end
23
+
24
+ def minor_version
25
+ @typelib.minor_version
26
+ end
27
+
28
+ def major_version
29
+ @typelib.major_version
30
+ end
31
+
32
+ def ole_classes # MRI: ole_types_from_typelib
33
+ ole_classes = []
34
+ find_all_typeinfo(@typelib) do |info, docs|
35
+ ole_classes << WIN32OLE_TYPE.new(self, info, docs)
36
+ end
37
+ ole_classes
38
+ end
39
+
40
+ def version
41
+ [minor_version, major_version].join('.')
42
+ end
43
+
44
+ def visible?
45
+ flags = @typelib.flags
46
+ flags != 0 && (flags & TypeLib::LIBFLAG_FRESTRICTED) == 0 &&
47
+ (flags & TypeLib::LIBFLAG_FHIDDEN) == 0
48
+ end
49
+
50
+ def inspect
51
+ name
52
+ end
53
+
54
+ class << self
55
+ def ole_classes(typelib)
56
+ new(typelib).ole_classes
57
+ end
58
+
59
+ def typelibs
60
+ typelibs = []
61
+ typelib_registry_each_guid_version do |guid, version, reg|
62
+ name = reg.read(nil)[1] || ''
63
+ registry_subkey(reg, 'win32', 'win64') do |arch_reg, arch|
64
+ type_lib = load_typelib(arch_reg, arch)
65
+ # TODO: I think MRI figures out a few more typelibs than we do
66
+ typelibs << WIN32OLE_TYPELIB.new(type_lib, name) if type_lib
67
+ end
68
+ end
69
+ typelibs
70
+ end
71
+
72
+ include WIN32OLE::Utils
73
+ end
74
+
75
+ include WIN32OLE::Utils
76
+ end
@@ -0,0 +1,41 @@
1
+ class WIN32OLE_VARIABLE
2
+ attr_reader :name
3
+
4
+ def initialize(type, var_desc, name)
5
+ @type, @var_desc, @name = type, var_desc, name
6
+ end
7
+
8
+ def ole_type
9
+ @type.ole_type # MRI gets from vardesc, but why shouldn't this work?
10
+ end
11
+
12
+ def ole_type_detail
13
+ # TODO: Fill in other details when they actually exist
14
+ [@type.ole_type]
15
+ end
16
+
17
+ def value
18
+ from_variant(@var_desc.constant)
19
+ end
20
+
21
+ def variable_kind
22
+ variable_kind_string(varkind)
23
+ end
24
+
25
+ def varkind
26
+ @var_desc.varkind
27
+ end
28
+
29
+ def inspect
30
+ "#<WIN32OLE_VARIABLE:#{to_s}=#{value.inspect}>"
31
+ end
32
+
33
+ alias :to_s :name
34
+
35
+ def visible?
36
+ flags = @var_desc.flags
37
+ flags & (VarDesc::VARFLAG_FHIDDEN | VarDesc::VARFLAG_FRESTRICTED | VarDesc::VARFLAG_FNONBROWSABLE) == 0
38
+ end
39
+
40
+ include WIN32OLE::Utils
41
+ end
@@ -0,0 +1,52 @@
1
+ class WIN32OLE
2
+ module VARIANT
3
+ VT_I2 = 2 # Short
4
+ VT_I4 = 3 # Int
5
+ VT_R4 = 4 # Float
6
+ VT_R8 = 5 # Double
7
+ VT_CY = 6 # Currency
8
+ VT_DATE = 7 # Date
9
+ VT_BSTR = 8 # String
10
+ VT_DISPATCH = 9 # Dispatch
11
+ VT_ERROR = 10 # Error
12
+ VT_BOOL = 11 # Boolean
13
+ VT_VARIANT = 12 # Variant containing Variant
14
+ VT_UNKNOWN = 13 # Unknown
15
+ VT_DECIMAL = 14 # Decimal
16
+ VT_I1 = 16 # Nothing in Jacob
17
+ VT_UI1 = 17 # Byte
18
+ VT_UI2 = 18 # Nothing in Jacob
19
+ VT_UI4 = 19 # Nothing in Jacob
20
+ VT_I8 = 20 # Not in MRI win32ole but in Jacob
21
+ VT_UI8 = 21 # !Jacob
22
+ VT_INT = 22 # Nothing in Jacob
23
+ VT_UINT = 23 # Nothing in Jacob
24
+ VT_VOID = 24 # !Jacob
25
+ VT_HRESULT = 25 # !Jacob
26
+ VT_PTR = 26 # Pointer
27
+ VT_SAFEARRAY = 27 # !Jacob
28
+ VT_CARRAY = 28 # !Jacob
29
+ VT_USERDEFINED = 29 # !Jacob
30
+ VT_LPSTR = 30 # !Jacob
31
+ VT_LPWSTR = 31 # !Jacob
32
+ VT_ARRAY = 8192 # Array
33
+ VT_BYREF = 16384 # Reference
34
+
35
+ VARIANTS = {
36
+ VT_I2 => "I2", VT_I4 => "I4", VT_R4 => "R4", VT_R8 => "R8",
37
+ VT_CY => "CY", VT_DATE => "DATE", VT_BSTR => "BSTR", VT_BOOL => "BOOL",
38
+ VT_VARIANT => "VARIANT", VT_DECIMAL => "DECIMAL", VT_I1 => "I1",
39
+ VT_UI1 => "UI1", VT_UI2 => "UI2", VT_UI4 => "UI4", VT_I8 => "I8",
40
+ VT_UI8 => "UI8", VT_INT => "INT", VT_UINT => "UINT", VT_VOID => "VOID",
41
+ VT_HRESULT => "HRESULT", VT_PTR => "PTR", VT_SAFEARRAY => "SAFEARRAY",
42
+ VT_CARRAY => "CARRAY", VT_USERDEFINED => "USERDEFINED",
43
+ VT_UNKNOWN => "UNKNOWN", VT_DISPATCH => "DISPATCH", VT_ERROR => "ERROR",
44
+ VT_LPSTR => "LPSTR", VT_LPWSTR => "LPWSTR"
45
+ }
46
+
47
+ def variant_to_string(vt)
48
+ VARIANTS[vt]
49
+ end
50
+ module_function :variant_to_string
51
+ end
52
+ end
@@ -0,0 +1,800 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!--
3
+ *** GENERATED FROM project.xml - DO NOT EDIT ***
4
+ *** EDIT ../build.xml INSTEAD ***
5
+
6
+ For the purpose of easier reading the script
7
+ is divided into following sections:
8
+
9
+ - initialization
10
+ - compilation
11
+ - jar
12
+ - execution
13
+ - debugging
14
+ - javadoc
15
+ - junit compilation
16
+ - junit execution
17
+ - junit debugging
18
+ - applet
19
+ - cleanup
20
+
21
+ -->
22
+ <project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="win32ole-impl">
23
+ <fail message="Please build using Ant 1.7.1 or higher.">
24
+ <condition>
25
+ <not>
26
+ <antversion atleast="1.7.1"/>
27
+ </not>
28
+ </condition>
29
+ </fail>
30
+ <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
31
+ <!--
32
+ ======================
33
+ INITIALIZATION SECTION
34
+ ======================
35
+ -->
36
+ <target name="-pre-init">
37
+ <!-- Empty placeholder for easier customization. -->
38
+ <!-- You can override this target in the ../build.xml file. -->
39
+ </target>
40
+ <target depends="-pre-init" name="-init-private">
41
+ <property file="nbproject/private/config.properties"/>
42
+ <property file="nbproject/private/configs/${config}.properties"/>
43
+ <property file="nbproject/private/private.properties"/>
44
+ </target>
45
+ <target depends="-pre-init,-init-private" name="-init-user">
46
+ <property file="${user.properties.file}"/>
47
+ <!-- The two properties below are usually overridden -->
48
+ <!-- by the active platform. Just a fallback. -->
49
+ <property name="default.javac.source" value="1.4"/>
50
+ <property name="default.javac.target" value="1.4"/>
51
+ </target>
52
+ <target depends="-pre-init,-init-private,-init-user" name="-init-project">
53
+ <property file="nbproject/configs/${config}.properties"/>
54
+ <property file="nbproject/project.properties"/>
55
+ </target>
56
+ <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
57
+ <available file="${manifest.file}" property="manifest.available"/>
58
+ <condition property="main.class.available">
59
+ <and>
60
+ <isset property="main.class"/>
61
+ <not>
62
+ <equals arg1="${main.class}" arg2="" trim="true"/>
63
+ </not>
64
+ </and>
65
+ </condition>
66
+ <condition property="manifest.available+main.class">
67
+ <and>
68
+ <isset property="manifest.available"/>
69
+ <isset property="main.class.available"/>
70
+ </and>
71
+ </condition>
72
+ <condition property="do.mkdist">
73
+ <and>
74
+ <isset property="libs.CopyLibs.classpath"/>
75
+ <not>
76
+ <istrue value="${mkdist.disabled}"/>
77
+ </not>
78
+ </and>
79
+ </condition>
80
+ <condition property="manifest.available+main.class+mkdist.available">
81
+ <and>
82
+ <istrue value="${manifest.available+main.class}"/>
83
+ <isset property="do.mkdist"/>
84
+ </and>
85
+ </condition>
86
+ <condition property="manifest.available+mkdist.available">
87
+ <and>
88
+ <istrue value="${manifest.available}"/>
89
+ <isset property="do.mkdist"/>
90
+ </and>
91
+ </condition>
92
+ <condition property="manifest.available-mkdist.available">
93
+ <or>
94
+ <istrue value="${manifest.available}"/>
95
+ <isset property="do.mkdist"/>
96
+ </or>
97
+ </condition>
98
+ <condition property="manifest.available+main.class-mkdist.available">
99
+ <or>
100
+ <istrue value="${manifest.available+main.class}"/>
101
+ <isset property="do.mkdist"/>
102
+ </or>
103
+ </condition>
104
+ <condition property="have.tests">
105
+ <or/>
106
+ </condition>
107
+ <condition property="have.sources">
108
+ <or>
109
+ <available file="${src.lib.dir}"/>
110
+ <available file="${src.dir}"/>
111
+ </or>
112
+ </condition>
113
+ <condition property="netbeans.home+have.tests">
114
+ <and>
115
+ <isset property="netbeans.home"/>
116
+ <isset property="have.tests"/>
117
+ </and>
118
+ </condition>
119
+ <condition property="no.javadoc.preview">
120
+ <and>
121
+ <isset property="javadoc.preview"/>
122
+ <isfalse value="${javadoc.preview}"/>
123
+ </and>
124
+ </condition>
125
+ <property name="run.jvmargs" value=""/>
126
+ <property name="javac.compilerargs" value=""/>
127
+ <property name="work.dir" value="${basedir}"/>
128
+ <condition property="no.deps">
129
+ <and>
130
+ <istrue value="${no.dependencies}"/>
131
+ </and>
132
+ </condition>
133
+ <property name="javac.debug" value="true"/>
134
+ <property name="javadoc.preview" value="true"/>
135
+ <property name="application.args" value=""/>
136
+ <property name="source.encoding" value="${file.encoding}"/>
137
+ <property name="runtime.encoding" value="${source.encoding}"/>
138
+ <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
139
+ <and>
140
+ <isset property="javadoc.encoding"/>
141
+ <not>
142
+ <equals arg1="${javadoc.encoding}" arg2=""/>
143
+ </not>
144
+ </and>
145
+ </condition>
146
+ <property name="javadoc.encoding.used" value="${source.encoding}"/>
147
+ <property name="includes" value="**"/>
148
+ <property name="excludes" value=""/>
149
+ <property name="do.depend" value="false"/>
150
+ <condition property="do.depend.true">
151
+ <istrue value="${do.depend}"/>
152
+ </condition>
153
+ <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
154
+ <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
155
+ <length length="0" string="${endorsed.classpath}" when="greater"/>
156
+ </condition>
157
+ <property name="javac.fork" value="false"/>
158
+ </target>
159
+ <target name="-post-init">
160
+ <!-- Empty placeholder for easier customization. -->
161
+ <!-- You can override this target in the ../build.xml file. -->
162
+ </target>
163
+ <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
164
+ <fail unless="src.lib.dir">Must set src.lib.dir</fail>
165
+ <fail unless="src.dir">Must set src.dir</fail>
166
+ <fail unless="build.dir">Must set build.dir</fail>
167
+ <fail unless="dist.dir">Must set dist.dir</fail>
168
+ <fail unless="build.classes.dir">Must set build.classes.dir</fail>
169
+ <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
170
+ <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
171
+ <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
172
+ <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
173
+ <fail unless="dist.jar">Must set dist.jar</fail>
174
+ </target>
175
+ <target name="-init-macrodef-property">
176
+ <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1">
177
+ <attribute name="name"/>
178
+ <attribute name="value"/>
179
+ <sequential>
180
+ <property name="@{name}" value="${@{value}}"/>
181
+ </sequential>
182
+ </macrodef>
183
+ </target>
184
+ <target name="-init-macrodef-javac">
185
+ <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
186
+ <attribute default="${src.lib.dir}:${src.dir}" name="srcdir"/>
187
+ <attribute default="${build.classes.dir}" name="destdir"/>
188
+ <attribute default="${javac.classpath}" name="classpath"/>
189
+ <attribute default="${includes}" name="includes"/>
190
+ <attribute default="${excludes}" name="excludes"/>
191
+ <attribute default="${javac.debug}" name="debug"/>
192
+ <attribute default="${empty.dir}" name="sourcepath"/>
193
+ <attribute default="${empty.dir}" name="gensrcdir"/>
194
+ <element name="customize" optional="true"/>
195
+ <sequential>
196
+ <property location="${build.dir}/empty" name="empty.dir"/>
197
+ <mkdir dir="${empty.dir}"/>
198
+ <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}">
199
+ <src>
200
+ <dirset dir="@{gensrcdir}" erroronmissingdir="false">
201
+ <include name="*"/>
202
+ </dirset>
203
+ </src>
204
+ <classpath>
205
+ <path path="@{classpath}"/>
206
+ </classpath>
207
+ <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
208
+ <compilerarg line="${javac.compilerargs}"/>
209
+ <customize/>
210
+ </javac>
211
+ </sequential>
212
+ </macrodef>
213
+ <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
214
+ <attribute default="${src.lib.dir}:${src.dir}" name="srcdir"/>
215
+ <attribute default="${build.classes.dir}" name="destdir"/>
216
+ <attribute default="${javac.classpath}" name="classpath"/>
217
+ <sequential>
218
+ <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">
219
+ <classpath>
220
+ <path path="@{classpath}"/>
221
+ </classpath>
222
+ </depend>
223
+ </sequential>
224
+ </macrodef>
225
+ <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3">
226
+ <attribute default="${build.classes.dir}" name="destdir"/>
227
+ <sequential>
228
+ <fail unless="javac.includes">Must set javac.includes</fail>
229
+ <pathconvert pathsep="," property="javac.includes.binary">
230
+ <path>
231
+ <filelist dir="@{destdir}" files="${javac.includes}"/>
232
+ </path>
233
+ <globmapper from="*.java" to="*.class"/>
234
+ </pathconvert>
235
+ <delete>
236
+ <files includes="${javac.includes.binary}"/>
237
+ </delete>
238
+ </sequential>
239
+ </macrodef>
240
+ </target>
241
+ <target name="-init-macrodef-junit">
242
+ <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
243
+ <attribute default="${includes}" name="includes"/>
244
+ <attribute default="${excludes}" name="excludes"/>
245
+ <attribute default="**" name="testincludes"/>
246
+ <sequential>
247
+ <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${build.dir}">
248
+ <batchtest todir="${build.test.results.dir}"/>
249
+ <classpath>
250
+ <path path="${run.test.classpath}"/>
251
+ </classpath>
252
+ <syspropertyset>
253
+ <propertyref prefix="test-sys-prop."/>
254
+ <mapper from="test-sys-prop.*" to="*" type="glob"/>
255
+ </syspropertyset>
256
+ <formatter type="brief" usefile="false"/>
257
+ <formatter type="xml"/>
258
+ <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
259
+ <jvmarg line="${run.jvmargs}"/>
260
+ </junit>
261
+ </sequential>
262
+ </macrodef>
263
+ </target>
264
+ <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
265
+ <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
266
+ <attribute default="${main.class}" name="name"/>
267
+ <attribute default="${debug.classpath}" name="classpath"/>
268
+ <attribute default="" name="stopclassname"/>
269
+ <sequential>
270
+ <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
271
+ <classpath>
272
+ <path path="@{classpath}"/>
273
+ </classpath>
274
+ </nbjpdastart>
275
+ </sequential>
276
+ </macrodef>
277
+ <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
278
+ <attribute default="${build.classes.dir}" name="dir"/>
279
+ <sequential>
280
+ <nbjpdareload>
281
+ <fileset dir="@{dir}" includes="${fix.classes}">
282
+ <include name="${fix.includes}*.class"/>
283
+ </fileset>
284
+ </nbjpdareload>
285
+ </sequential>
286
+ </macrodef>
287
+ </target>
288
+ <target name="-init-debug-args">
289
+ <property name="version-output" value="java version &quot;${ant.java.version}"/>
290
+ <condition property="have-jdk-older-than-1.4">
291
+ <or>
292
+ <contains string="${version-output}" substring="java version &quot;1.0"/>
293
+ <contains string="${version-output}" substring="java version &quot;1.1"/>
294
+ <contains string="${version-output}" substring="java version &quot;1.2"/>
295
+ <contains string="${version-output}" substring="java version &quot;1.3"/>
296
+ </or>
297
+ </condition>
298
+ <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
299
+ <istrue value="${have-jdk-older-than-1.4}"/>
300
+ </condition>
301
+ <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
302
+ <os family="windows"/>
303
+ </condition>
304
+ <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
305
+ <isset property="debug.transport"/>
306
+ </condition>
307
+ </target>
308
+ <target depends="-init-debug-args" name="-init-macrodef-debug">
309
+ <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
310
+ <attribute default="${main.class}" name="classname"/>
311
+ <attribute default="${debug.classpath}" name="classpath"/>
312
+ <element name="customize" optional="true"/>
313
+ <sequential>
314
+ <java classname="@{classname}" dir="${work.dir}" fork="true">
315
+ <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
316
+ <jvmarg line="${debug-args-line}"/>
317
+ <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
318
+ <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
319
+ <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
320
+ <jvmarg line="${run.jvmargs}"/>
321
+ <classpath>
322
+ <path path="@{classpath}"/>
323
+ </classpath>
324
+ <syspropertyset>
325
+ <propertyref prefix="run-sys-prop."/>
326
+ <mapper from="run-sys-prop.*" to="*" type="glob"/>
327
+ </syspropertyset>
328
+ <customize/>
329
+ </java>
330
+ </sequential>
331
+ </macrodef>
332
+ </target>
333
+ <target name="-init-macrodef-java">
334
+ <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
335
+ <attribute default="${main.class}" name="classname"/>
336
+ <attribute default="${run.classpath}" name="classpath"/>
337
+ <element name="customize" optional="true"/>
338
+ <sequential>
339
+ <java classname="@{classname}" dir="${work.dir}" fork="true">
340
+ <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
341
+ <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
342
+ <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
343
+ <jvmarg line="${run.jvmargs}"/>
344
+ <classpath>
345
+ <path path="@{classpath}"/>
346
+ </classpath>
347
+ <syspropertyset>
348
+ <propertyref prefix="run-sys-prop."/>
349
+ <mapper from="run-sys-prop.*" to="*" type="glob"/>
350
+ </syspropertyset>
351
+ <customize/>
352
+ </java>
353
+ </sequential>
354
+ </macrodef>
355
+ </target>
356
+ <target name="-init-presetdef-jar">
357
+ <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
358
+ <jar compress="${jar.compress}" jarfile="${dist.jar}">
359
+ <j2seproject1:fileset dir="${build.classes.dir}"/>
360
+ </jar>
361
+ </presetdef>
362
+ </target>
363
+ <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar" name="init"/>
364
+ <!--
365
+ ===================
366
+ COMPILATION SECTION
367
+ ===================
368
+ -->
369
+ <target name="-deps-jar-init" unless="built-jar.properties">
370
+ <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/>
371
+ <delete file="${built-jar.properties}" quiet="true"/>
372
+ </target>
373
+ <target if="already.built.jar.${basedir}" name="-warn-already-built-jar">
374
+ <echo level="warn" message="Cycle detected: win32ole was already built"/>
375
+ </target>
376
+ <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps">
377
+ <mkdir dir="${build.dir}"/>
378
+ <touch file="${built-jar.properties}" verbose="false"/>
379
+ <property file="${built-jar.properties}" prefix="already.built.jar."/>
380
+ <antcall target="-warn-already-built-jar"/>
381
+ <propertyfile file="${built-jar.properties}">
382
+ <entry key="${basedir}" value=""/>
383
+ </propertyfile>
384
+ </target>
385
+ <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
386
+ <target depends="init" name="-check-automatic-build">
387
+ <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
388
+ </target>
389
+ <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
390
+ <antcall target="clean"/>
391
+ </target>
392
+ <target depends="init,deps-jar" name="-pre-pre-compile">
393
+ <mkdir dir="${build.classes.dir}"/>
394
+ </target>
395
+ <target name="-pre-compile">
396
+ <!-- Empty placeholder for easier customization. -->
397
+ <!-- You can override this target in the ../build.xml file. -->
398
+ </target>
399
+ <target if="do.depend.true" name="-compile-depend">
400
+ <pathconvert property="build.generated.subdirs">
401
+ <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false">
402
+ <include name="*"/>
403
+ </dirset>
404
+ </pathconvert>
405
+ <j2seproject3:depend srcdir="${src.lib.dir}:${src.dir}:${build.generated.subdirs}"/>
406
+ </target>
407
+ <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-compile-depend" if="have.sources" name="-do-compile">
408
+ <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
409
+ <copy todir="${build.classes.dir}">
410
+ <fileset dir="${src.lib.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
411
+ <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
412
+ </copy>
413
+ </target>
414
+ <target name="-post-compile">
415
+ <!-- Empty placeholder for easier customization. -->
416
+ <!-- You can override this target in the ../build.xml file. -->
417
+ </target>
418
+ <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
419
+ <target name="-pre-compile-single">
420
+ <!-- Empty placeholder for easier customization. -->
421
+ <!-- You can override this target in the ../build.xml file. -->
422
+ </target>
423
+ <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
424
+ <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
425
+ <j2seproject3:force-recompile/>
426
+ <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.lib.dir}:${src.dir}"/>
427
+ </target>
428
+ <target name="-post-compile-single">
429
+ <!-- Empty placeholder for easier customization. -->
430
+ <!-- You can override this target in the ../build.xml file. -->
431
+ </target>
432
+ <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
433
+ <!--
434
+ ====================
435
+ JAR BUILDING SECTION
436
+ ====================
437
+ -->
438
+ <target depends="init" name="-pre-pre-jar">
439
+ <dirname file="${dist.jar}" property="dist.jar.dir"/>
440
+ <mkdir dir="${dist.jar.dir}"/>
441
+ </target>
442
+ <target name="-pre-jar">
443
+ <!-- Empty placeholder for easier customization. -->
444
+ <!-- You can override this target in the ../build.xml file. -->
445
+ </target>
446
+ <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available-mkdist.available">
447
+ <j2seproject1:jar/>
448
+ </target>
449
+ <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class-mkdist.available">
450
+ <j2seproject1:jar manifest="${manifest.file}"/>
451
+ </target>
452
+ <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class" name="-do-jar-with-mainclass" unless="manifest.available+main.class+mkdist.available">
453
+ <j2seproject1:jar manifest="${manifest.file}">
454
+ <j2seproject1:manifest>
455
+ <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
456
+ </j2seproject1:manifest>
457
+ </j2seproject1:jar>
458
+ <echo>To run this application from the command line without Ant, try:</echo>
459
+ <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
460
+ <property location="${dist.jar}" name="dist.jar.resolved"/>
461
+ <pathconvert property="run.classpath.with.dist.jar">
462
+ <path path="${run.classpath}"/>
463
+ <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
464
+ </pathconvert>
465
+ <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
466
+ </target>
467
+ <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries">
468
+ <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
469
+ <pathconvert property="run.classpath.without.build.classes.dir">
470
+ <path path="${run.classpath}"/>
471
+ <map from="${build.classes.dir.resolved}" to=""/>
472
+ </pathconvert>
473
+ <pathconvert pathsep=" " property="jar.classpath">
474
+ <path path="${run.classpath.without.build.classes.dir}"/>
475
+ <chainedmapper>
476
+ <flattenmapper/>
477
+ <globmapper from="*" to="lib/*"/>
478
+ </chainedmapper>
479
+ </pathconvert>
480
+ <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
481
+ <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
482
+ <fileset dir="${build.classes.dir}"/>
483
+ <manifest>
484
+ <attribute name="Main-Class" value="${main.class}"/>
485
+ <attribute name="Class-Path" value="${jar.classpath}"/>
486
+ </manifest>
487
+ </copylibs>
488
+ <echo>To run this application from the command line without Ant, try:</echo>
489
+ <property location="${dist.jar}" name="dist.jar.resolved"/>
490
+ <echo>java -jar "${dist.jar.resolved}"</echo>
491
+ </target>
492
+ <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+mkdist.available" name="-do-jar-with-libraries-without-mainclass" unless="main.class.available">
493
+ <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
494
+ <pathconvert property="run.classpath.without.build.classes.dir">
495
+ <path path="${run.classpath}"/>
496
+ <map from="${build.classes.dir.resolved}" to=""/>
497
+ </pathconvert>
498
+ <pathconvert pathsep=" " property="jar.classpath">
499
+ <path path="${run.classpath.without.build.classes.dir}"/>
500
+ <chainedmapper>
501
+ <flattenmapper/>
502
+ <globmapper from="*" to="lib/*"/>
503
+ </chainedmapper>
504
+ </pathconvert>
505
+ <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
506
+ <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
507
+ <fileset dir="${build.classes.dir}"/>
508
+ <manifest>
509
+ <attribute name="Class-Path" value="${jar.classpath}"/>
510
+ </manifest>
511
+ </copylibs>
512
+ </target>
513
+ <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.mkdist" name="-do-jar-with-libraries-without-manifest" unless="manifest.available">
514
+ <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
515
+ <pathconvert property="run.classpath.without.build.classes.dir">
516
+ <path path="${run.classpath}"/>
517
+ <map from="${build.classes.dir.resolved}" to=""/>
518
+ </pathconvert>
519
+ <pathconvert pathsep=" " property="jar.classpath">
520
+ <path path="${run.classpath.without.build.classes.dir}"/>
521
+ <chainedmapper>
522
+ <flattenmapper/>
523
+ <globmapper from="*" to="lib/*"/>
524
+ </chainedmapper>
525
+ </pathconvert>
526
+ <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
527
+ <copylibs compress="${jar.compress}" jarfile="${dist.jar}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
528
+ <fileset dir="${build.classes.dir}"/>
529
+ <manifest>
530
+ <attribute name="Class-Path" value="${jar.classpath}"/>
531
+ </manifest>
532
+ </copylibs>
533
+ </target>
534
+ <target name="-post-jar">
535
+ <!-- Empty placeholder for easier customization. -->
536
+ <!-- You can override this target in the ../build.xml file. -->
537
+ </target>
538
+ <target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-do-jar-with-libraries-without-mainclass,-do-jar-with-libraries-without-manifest,-post-jar" description="Build JAR." name="jar"/>
539
+ <!--
540
+ =================
541
+ EXECUTION SECTION
542
+ =================
543
+ -->
544
+ <target depends="init,compile" description="Run a main class." name="run">
545
+ <j2seproject1:java>
546
+ <customize>
547
+ <arg line="${application.args}"/>
548
+ </customize>
549
+ </j2seproject1:java>
550
+ </target>
551
+ <target name="-do-not-recompile">
552
+ <property name="javac.includes.binary" value=""/>
553
+ </target>
554
+ <target depends="init,compile-single" name="run-single">
555
+ <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
556
+ <j2seproject1:java classname="${run.class}"/>
557
+ </target>
558
+ <target depends="init,compile-test-single" name="run-test-with-main">
559
+ <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
560
+ <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
561
+ </target>
562
+ <!--
563
+ =================
564
+ DEBUGGING SECTION
565
+ =================
566
+ -->
567
+ <target depends="init" if="netbeans.home" name="-debug-start-debugger">
568
+ <j2seproject1:nbjpdastart name="${debug.class}"/>
569
+ </target>
570
+ <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
571
+ <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
572
+ </target>
573
+ <target depends="init,compile" name="-debug-start-debuggee">
574
+ <j2seproject3:debug>
575
+ <customize>
576
+ <arg line="${application.args}"/>
577
+ </customize>
578
+ </j2seproject3:debug>
579
+ </target>
580
+ <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
581
+ <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto">
582
+ <j2seproject1:nbjpdastart stopclassname="${main.class}"/>
583
+ </target>
584
+ <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/>
585
+ <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
586
+ <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
587
+ <j2seproject3:debug classname="${debug.class}"/>
588
+ </target>
589
+ <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
590
+ <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
591
+ <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
592
+ <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
593
+ </target>
594
+ <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
595
+ <target depends="init" name="-pre-debug-fix">
596
+ <fail unless="fix.includes">Must set fix.includes</fail>
597
+ <property name="javac.includes" value="${fix.includes}.java"/>
598
+ </target>
599
+ <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
600
+ <j2seproject1:nbjpdareload/>
601
+ </target>
602
+ <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
603
+ <!--
604
+ ===============
605
+ JAVADOC SECTION
606
+ ===============
607
+ -->
608
+ <target depends="init" name="-javadoc-build">
609
+ <mkdir dir="${dist.javadoc.dir}"/>
610
+ <javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}">
611
+ <classpath>
612
+ <path path="${javac.classpath}"/>
613
+ </classpath>
614
+ <fileset dir="${src.lib.dir}" excludes="${excludes}" includes="${includes}">
615
+ <filename name="**/*.java"/>
616
+ </fileset>
617
+ <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
618
+ <filename name="**/*.java"/>
619
+ </fileset>
620
+ <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
621
+ <include name="**/*.java"/>
622
+ </fileset>
623
+ </javadoc>
624
+ </target>
625
+ <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
626
+ <nbbrowse file="${dist.javadoc.dir}/index.html"/>
627
+ </target>
628
+ <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
629
+ <!--
630
+ =========================
631
+ JUNIT COMPILATION SECTION
632
+ =========================
633
+ -->
634
+ <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
635
+ <mkdir dir="${build.test.classes.dir}"/>
636
+ </target>
637
+ <target name="-pre-compile-test">
638
+ <!-- Empty placeholder for easier customization. -->
639
+ <!-- You can override this target in the ../build.xml file. -->
640
+ </target>
641
+ <target if="do.depend.true" name="-compile-test-depend">
642
+ <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir=""/>
643
+ </target>
644
+ <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
645
+ <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir=""/>
646
+ <copy todir="${build.test.classes.dir}"/>
647
+ </target>
648
+ <target name="-post-compile-test">
649
+ <!-- Empty placeholder for easier customization. -->
650
+ <!-- You can override this target in the ../build.xml file. -->
651
+ </target>
652
+ <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
653
+ <target name="-pre-compile-test-single">
654
+ <!-- Empty placeholder for easier customization. -->
655
+ <!-- You can override this target in the ../build.xml file. -->
656
+ </target>
657
+ <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
658
+ <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
659
+ <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
660
+ <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" sourcepath="" srcdir=""/>
661
+ <copy todir="${build.test.classes.dir}"/>
662
+ </target>
663
+ <target name="-post-compile-test-single">
664
+ <!-- Empty placeholder for easier customization. -->
665
+ <!-- You can override this target in the ../build.xml file. -->
666
+ </target>
667
+ <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
668
+ <!--
669
+ =======================
670
+ JUNIT EXECUTION SECTION
671
+ =======================
672
+ -->
673
+ <target depends="init" if="have.tests" name="-pre-test-run">
674
+ <mkdir dir="${build.test.results.dir}"/>
675
+ </target>
676
+ <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
677
+ <j2seproject3:junit testincludes="**/*Test.java"/>
678
+ </target>
679
+ <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
680
+ <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
681
+ </target>
682
+ <target depends="init" if="have.tests" name="test-report"/>
683
+ <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
684
+ <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
685
+ <target depends="init" if="have.tests" name="-pre-test-run-single">
686
+ <mkdir dir="${build.test.results.dir}"/>
687
+ </target>
688
+ <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
689
+ <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
690
+ <j2seproject3:junit excludes="" includes="${test.includes}"/>
691
+ </target>
692
+ <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
693
+ <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
694
+ </target>
695
+ <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
696
+ <!--
697
+ =======================
698
+ JUNIT DEBUGGING SECTION
699
+ =======================
700
+ -->
701
+ <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
702
+ <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
703
+ <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
704
+ <delete file="${test.report.file}"/>
705
+ <mkdir dir="${build.test.results.dir}"/>
706
+ <j2seproject3:debug classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner" classpath="${ant.home}/lib/ant.jar:${ant.home}/lib/ant-junit.jar:${debug.test.classpath}">
707
+ <customize>
708
+ <syspropertyset>
709
+ <propertyref prefix="test-sys-prop."/>
710
+ <mapper from="test-sys-prop.*" to="*" type="glob"/>
711
+ </syspropertyset>
712
+ <arg value="${test.class}"/>
713
+ <arg value="showoutput=true"/>
714
+ <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
715
+ <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
716
+ </customize>
717
+ </j2seproject3:debug>
718
+ </target>
719
+ <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
720
+ <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
721
+ </target>
722
+ <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
723
+ <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
724
+ <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
725
+ </target>
726
+ <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
727
+ <!--
728
+ =========================
729
+ APPLET EXECUTION SECTION
730
+ =========================
731
+ -->
732
+ <target depends="init,compile-single" name="run-applet">
733
+ <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
734
+ <j2seproject1:java classname="sun.applet.AppletViewer">
735
+ <customize>
736
+ <arg value="${applet.url}"/>
737
+ </customize>
738
+ </j2seproject1:java>
739
+ </target>
740
+ <!--
741
+ =========================
742
+ APPLET DEBUGGING SECTION
743
+ =========================
744
+ -->
745
+ <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
746
+ <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
747
+ <j2seproject3:debug classname="sun.applet.AppletViewer">
748
+ <customize>
749
+ <arg value="${applet.url}"/>
750
+ </customize>
751
+ </j2seproject3:debug>
752
+ </target>
753
+ <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
754
+ <!--
755
+ ===============
756
+ CLEANUP SECTION
757
+ ===============
758
+ -->
759
+ <target name="-deps-clean-init" unless="built-clean.properties">
760
+ <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/>
761
+ <delete file="${built-clean.properties}" quiet="true"/>
762
+ </target>
763
+ <target if="already.built.clean.${basedir}" name="-warn-already-built-clean">
764
+ <echo level="warn" message="Cycle detected: win32ole was already built"/>
765
+ </target>
766
+ <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps">
767
+ <mkdir dir="${build.dir}"/>
768
+ <touch file="${built-clean.properties}" verbose="false"/>
769
+ <property file="${built-clean.properties}" prefix="already.built.clean."/>
770
+ <antcall target="-warn-already-built-clean"/>
771
+ <propertyfile file="${built-clean.properties}">
772
+ <entry key="${basedir}" value=""/>
773
+ </propertyfile>
774
+ </target>
775
+ <target depends="init" name="-do-clean">
776
+ <delete dir="${build.dir}"/>
777
+ <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>
778
+ </target>
779
+ <target name="-post-clean">
780
+ <!-- Empty placeholder for easier customization. -->
781
+ <!-- You can override this target in the ../build.xml file. -->
782
+ </target>
783
+ <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
784
+ <target name="-check-call-dep">
785
+ <property file="${call.built.properties}" prefix="already.built."/>
786
+ <condition property="should.call.dep">
787
+ <not>
788
+ <isset property="already.built.${call.subproject}"/>
789
+ </not>
790
+ </condition>
791
+ </target>
792
+ <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
793
+ <ant antfile="${call.script}" inheritall="false" target="${call.target}">
794
+ <propertyset>
795
+ <propertyref prefix="transfer."/>
796
+ <mapper from="transfer.*" to="*" type="glob"/>
797
+ </propertyset>
798
+ </ant>
799
+ </target>
800
+ </project>