clevic 0.12.0 → 0.13.0.b1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (119) hide show
  1. data/History.txt +10 -0
  2. data/Manifest.txt +209 -30
  3. data/README.txt +16 -20
  4. data/Rakefile +8 -8
  5. data/TODO +6 -7
  6. data/bin/clevic +12 -73
  7. data/lib/clevic/action_builder.rb +168 -0
  8. data/lib/clevic/ar_methods.rb +120 -0
  9. data/lib/clevic/attribute_list.rb +56 -0
  10. data/lib/clevic/cache_table.rb +60 -37
  11. data/lib/clevic/default_view.rb +3 -16
  12. data/lib/clevic/delegate.rb +46 -0
  13. data/lib/clevic/emitter.rb +38 -0
  14. data/lib/clevic/extensions.rb +61 -114
  15. data/lib/clevic/field.rb +159 -228
  16. data/lib/clevic/field_valuer.rb +165 -0
  17. data/lib/clevic/filter_command.rb +2 -6
  18. data/lib/clevic/generic_format.rb +52 -0
  19. data/lib/clevic/{ui → icons}/icon.png +0 -0
  20. data/lib/clevic/many_field.rb +7 -0
  21. data/lib/clevic/model_builder.rb +234 -146
  22. data/lib/clevic/model_column.rb +61 -13
  23. data/lib/clevic/order_attribute.rb +10 -0
  24. data/lib/clevic/qt.rb +35 -0
  25. data/lib/clevic/qt/action_builder.rb +47 -0
  26. data/lib/clevic/qt/boolean_delegate.rb +8 -0
  27. data/lib/clevic/{browser.rb → qt/browser.rb} +35 -14
  28. data/lib/clevic/qt/clipboard.rb +35 -0
  29. data/lib/clevic/qt/combo_delegate.rb +198 -0
  30. data/lib/clevic/qt/delegates.rb +1 -0
  31. data/lib/clevic/qt/distinct_delegate.rb +35 -0
  32. data/lib/clevic/qt/extensions.rb +52 -0
  33. data/lib/clevic/qt/field.rb +18 -0
  34. data/lib/clevic/{item_delegate.rb → qt/item_delegate.rb} +8 -4
  35. data/lib/clevic/qt/relational_delegate.rb +87 -0
  36. data/lib/clevic/{search_dialog.rb → qt/search_dialog.rb} +1 -11
  37. data/lib/clevic/qt/set_delegate.rb +44 -0
  38. data/lib/clevic/qt/table_model.rb +331 -0
  39. data/lib/clevic/qt/table_view.rb +344 -0
  40. data/lib/clevic/qt/text_area_delegate.rb +8 -0
  41. data/lib/clevic/{text_delegate.rb → qt/text_delegate.rb} +6 -4
  42. data/lib/clevic/{ui → qt/ui}/.gitignore +0 -0
  43. data/lib/clevic/{ui → qt/ui}/browser.ui +0 -0
  44. data/lib/clevic/{ui → qt/ui}/search_dialog.ui +0 -0
  45. data/lib/clevic/rails_models_loaders.rb +56 -0
  46. data/lib/clevic/record.rb +2 -17
  47. data/lib/clevic/sampler.rb +81 -0
  48. data/lib/clevic/sequel_ar_adapter.rb +215 -0
  49. data/lib/clevic/sequel_length_validation.rb +23 -0
  50. data/lib/clevic/sequel_meta.rb +65 -0
  51. data/lib/clevic/sequel_naked.rb +30 -0
  52. data/lib/clevic/swing.rb +38 -0
  53. data/lib/clevic/swing/action.rb +125 -0
  54. data/lib/clevic/swing/action_builder.rb +47 -0
  55. data/lib/clevic/swing/boolean_delegate.rb +26 -0
  56. data/lib/clevic/swing/browser.rb +282 -0
  57. data/lib/clevic/swing/cell_editor.rb +95 -0
  58. data/lib/clevic/swing/cell_renderer.rb +44 -0
  59. data/lib/clevic/swing/clipboard.rb +135 -0
  60. data/lib/clevic/swing/combo_delegate.rb +336 -0
  61. data/lib/clevic/swing/confirm_dialog.rb +57 -0
  62. data/lib/clevic/swing/delegate.rb +40 -0
  63. data/lib/clevic/swing/distinct_delegate.rb +30 -0
  64. data/lib/clevic/swing/extensions.rb +274 -0
  65. data/lib/clevic/swing/field.rb +35 -0
  66. data/lib/clevic/swing/relational_delegate.rb +48 -0
  67. data/lib/clevic/swing/row_header.rb +210 -0
  68. data/lib/clevic/swing/search_dialog.rb +230 -0
  69. data/lib/clevic/swing/selection_model.rb +90 -0
  70. data/lib/clevic/swing/set_delegate.rb +41 -0
  71. data/lib/clevic/swing/swing_table_index.rb +43 -0
  72. data/lib/clevic/swing/table_model.rb +200 -0
  73. data/lib/clevic/swing/table_view.rb +385 -0
  74. data/lib/clevic/swing/table_view_focus.rb +47 -0
  75. data/lib/clevic/swing/tag_delegate.rb +127 -0
  76. data/lib/clevic/swing/tag_editor.rb +101 -0
  77. data/lib/clevic/swing/text_area_delegate.rb +46 -0
  78. data/lib/clevic/swing/text_delegate.rb +31 -0
  79. data/lib/clevic/swing/ui/build.xml +74 -0
  80. data/lib/clevic/swing/ui/dist/README.TXT +33 -0
  81. data/lib/clevic/swing/ui/dist/lib/swing-layout-1.0.3.jar +0 -0
  82. data/lib/clevic/swing/ui/manifest.mf +3 -0
  83. data/lib/clevic/swing/ui/nbproject/build-impl.xml +731 -0
  84. data/lib/clevic/swing/ui/nbproject/genfiles.properties +8 -0
  85. data/lib/clevic/swing/ui/nbproject/private/config.properties +0 -0
  86. data/lib/clevic/swing/ui/nbproject/private/private.properties +6 -0
  87. data/lib/clevic/swing/ui/nbproject/private/private.xml +4 -0
  88. data/lib/clevic/swing/ui/nbproject/project.properties +70 -0
  89. data/lib/clevic/swing/ui/nbproject/project.xml +14 -0
  90. data/lib/clevic/swing/ui/src/SearchDialog.form +158 -0
  91. data/lib/clevic/swing/ui/src/SearchDialog.java +163 -0
  92. data/lib/clevic/swing/ui/src/TagEditor.form +106 -0
  93. data/lib/clevic/swing/ui/src/TagEditor.java +108 -0
  94. data/lib/clevic/swing/ui/src/resources/SearchDialog.properties +0 -0
  95. data/lib/clevic/table_index.rb +100 -0
  96. data/lib/clevic/table_model.rb +54 -425
  97. data/lib/clevic/table_searcher.rb +113 -116
  98. data/lib/clevic/table_view.rb +171 -399
  99. data/lib/clevic/table_view_paste.rb +199 -0
  100. data/lib/clevic/version.rb +3 -2
  101. data/lib/clevic/view.rb +94 -43
  102. data/models/accounts_models.rb +13 -13
  103. data/models/minimal_models.rb +5 -9
  104. data/models/times_models.rb +19 -14
  105. data/models/times_psql_models.rb +10 -0
  106. data/models/times_sqlite_models.rb +1 -8
  107. data/models/values_models.rb +2 -8
  108. data/tasks/clevic.rake +1 -1
  109. data/tasks/rdoc.rake +1 -5
  110. data/tasks/website.rake +1 -1
  111. data/test/test_cache_table.rb +15 -29
  112. data/test/test_helper.rb +14 -83
  113. data/test/test_order_attribute.rb +1 -1
  114. data/test/test_table_model.rb +0 -21
  115. data/test/test_table_searcher.rb +67 -61
  116. metadata +262 -78
  117. data/lib/clevic.rb +0 -4
  118. data/lib/clevic/db_options.rb +0 -112
  119. data/lib/clevic/delegates.rb +0 -386
@@ -0,0 +1,3 @@
1
+ Manifest-Version: 1.0
2
+ X-COMMENT: Main-Class will be added automatically by build
3
+
@@ -0,0 +1,731 @@
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="ui-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
+ <j2seproject1:property name="platform.home" value="platforms.${platform.active}.home"/>
58
+ <j2seproject1:property name="platform.bootcp" value="platforms.${platform.active}.bootclasspath"/>
59
+ <j2seproject1:property name="platform.compiler" value="platforms.${platform.active}.compile"/>
60
+ <j2seproject1:property name="platform.javac.tmp" value="platforms.${platform.active}.javac"/>
61
+ <condition property="platform.javac" value="${platform.home}/bin/javac">
62
+ <equals arg1="${platform.javac.tmp}" arg2="$${platforms.${platform.active}.javac}"/>
63
+ </condition>
64
+ <property name="platform.javac" value="${platform.javac.tmp}"/>
65
+ <j2seproject1:property name="platform.java.tmp" value="platforms.${platform.active}.java"/>
66
+ <condition property="platform.java" value="${platform.home}/bin/java">
67
+ <equals arg1="${platform.java.tmp}" arg2="$${platforms.${platform.active}.java}"/>
68
+ </condition>
69
+ <property name="platform.java" value="${platform.java.tmp}"/>
70
+ <j2seproject1:property name="platform.javadoc.tmp" value="platforms.${platform.active}.javadoc"/>
71
+ <condition property="platform.javadoc" value="${platform.home}/bin/javadoc">
72
+ <equals arg1="${platform.javadoc.tmp}" arg2="$${platforms.${platform.active}.javadoc}"/>
73
+ </condition>
74
+ <property name="platform.javadoc" value="${platform.javadoc.tmp}"/>
75
+ <condition property="platform.invalid" value="true">
76
+ <or>
77
+ <contains string="${platform.javac}" substring="$${platforms."/>
78
+ <contains string="${platform.java}" substring="$${platforms."/>
79
+ <contains string="${platform.javadoc}" substring="$${platforms."/>
80
+ </or>
81
+ </condition>
82
+ <fail unless="platform.home">Must set platform.home</fail>
83
+ <fail unless="platform.bootcp">Must set platform.bootcp</fail>
84
+ <fail unless="platform.java">Must set platform.java</fail>
85
+ <fail unless="platform.javac">Must set platform.javac</fail>
86
+ <fail if="platform.invalid">
87
+ The J2SE Platform is not correctly set up.
88
+ Your active platform is: ${platform.active}, but the corresponding property "platforms.${platform.active}.home" is not found in the project's properties files.
89
+ Either open the project in the IDE and setup the Platform with the same name or add it manually.
90
+ For example like this:
91
+ ant -Duser.properties.file=&lt;path_to_property_file&gt; jar (where you put the property "platforms.${platform.active}.home" in a .properties file)
92
+ or ant -Dplatforms.${platform.active}.home=&lt;path_to_JDK_home&gt; jar (where no properties file is used)
93
+ </fail>
94
+ <available file="${manifest.file}" property="manifest.available"/>
95
+ <condition property="manifest.available+main.class">
96
+ <and>
97
+ <isset property="manifest.available"/>
98
+ <isset property="main.class"/>
99
+ <not>
100
+ <equals arg1="${main.class}" arg2="" trim="true"/>
101
+ </not>
102
+ </and>
103
+ </condition>
104
+ <condition property="manifest.available+main.class+mkdist.available">
105
+ <and>
106
+ <istrue value="${manifest.available+main.class}"/>
107
+ <isset property="libs.CopyLibs.classpath"/>
108
+ </and>
109
+ </condition>
110
+ <condition property="have.tests">
111
+ <or/>
112
+ </condition>
113
+ <condition property="have.sources">
114
+ <or>
115
+ <available file="${src.dir}"/>
116
+ </or>
117
+ </condition>
118
+ <condition property="netbeans.home+have.tests">
119
+ <and>
120
+ <isset property="netbeans.home"/>
121
+ <isset property="have.tests"/>
122
+ </and>
123
+ </condition>
124
+ <condition property="no.javadoc.preview">
125
+ <and>
126
+ <isset property="javadoc.preview"/>
127
+ <isfalse value="${javadoc.preview}"/>
128
+ </and>
129
+ </condition>
130
+ <property name="run.jvmargs" value=""/>
131
+ <property name="javac.compilerargs" value=""/>
132
+ <property name="work.dir" value="${basedir}"/>
133
+ <condition property="no.deps">
134
+ <and>
135
+ <istrue value="${no.dependencies}"/>
136
+ </and>
137
+ </condition>
138
+ <property name="javac.debug" value="true"/>
139
+ <property name="javadoc.preview" value="true"/>
140
+ <property name="application.args" value=""/>
141
+ <property name="source.encoding" value="${file.encoding}"/>
142
+ <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
143
+ <and>
144
+ <isset property="javadoc.encoding"/>
145
+ <not>
146
+ <equals arg1="${javadoc.encoding}" arg2=""/>
147
+ </not>
148
+ </and>
149
+ </condition>
150
+ <property name="javadoc.encoding.used" value="${source.encoding}"/>
151
+ <property name="includes" value="**"/>
152
+ <property name="excludes" value=""/>
153
+ <property name="do.depend" value="false"/>
154
+ <condition property="do.depend.true">
155
+ <istrue value="${do.depend}"/>
156
+ </condition>
157
+ <condition else="" property="javac.compilerargs.jaxws" value="-Djava.endorsed.dirs='${jaxws.endorsed.dir}'">
158
+ <and>
159
+ <isset property="jaxws.endorsed.dir"/>
160
+ <available file="nbproject/jaxws-build.xml"/>
161
+ </and>
162
+ </condition>
163
+ </target>
164
+ <target name="-post-init">
165
+ <!-- Empty placeholder for easier customization. -->
166
+ <!-- You can override this target in the ../build.xml file. -->
167
+ </target>
168
+ <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
169
+ <fail unless="src.dir">Must set src.dir</fail>
170
+ <fail unless="build.dir">Must set build.dir</fail>
171
+ <fail unless="dist.dir">Must set dist.dir</fail>
172
+ <fail unless="build.classes.dir">Must set build.classes.dir</fail>
173
+ <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
174
+ <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
175
+ <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
176
+ <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
177
+ <fail unless="dist.jar">Must set dist.jar</fail>
178
+ </target>
179
+ <target name="-init-macrodef-property">
180
+ <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1">
181
+ <attribute name="name"/>
182
+ <attribute name="value"/>
183
+ <sequential>
184
+ <property name="@{name}" value="${@{value}}"/>
185
+ </sequential>
186
+ </macrodef>
187
+ </target>
188
+ <target name="-init-macrodef-javac">
189
+ <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
190
+ <attribute default="${src.dir}" name="srcdir"/>
191
+ <attribute default="${build.classes.dir}" name="destdir"/>
192
+ <attribute default="${javac.classpath}" name="classpath"/>
193
+ <attribute default="${includes}" name="includes"/>
194
+ <attribute default="${excludes}" name="excludes"/>
195
+ <attribute default="${javac.debug}" name="debug"/>
196
+ <attribute default="${empty.dir}" name="sourcepath"/>
197
+ <attribute default="${empty.dir}" name="gensrcdir"/>
198
+ <element name="customize" optional="true"/>
199
+ <sequential>
200
+ <property location="${build.dir}/empty" name="empty.dir"/>
201
+ <mkdir dir="${empty.dir}"/>
202
+ <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" executable="${platform.javac}" fork="yes" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}">
203
+ <src>
204
+ <dirset dir="@{gensrcdir}" erroronmissingdir="false">
205
+ <include name="*"/>
206
+ </dirset>
207
+ </src>
208
+ <classpath>
209
+ <path path="@{classpath}"/>
210
+ </classpath>
211
+ <compilerarg line="${javac.compilerargs} ${javac.compilerargs.jaxws}"/>
212
+ <customize/>
213
+ </javac>
214
+ </sequential>
215
+ </macrodef>
216
+ <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
217
+ <attribute default="${src.dir}" name="srcdir"/>
218
+ <attribute default="${build.classes.dir}" name="destdir"/>
219
+ <attribute default="${javac.classpath}" name="classpath"/>
220
+ <sequential>
221
+ <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">
222
+ <classpath>
223
+ <path path="@{classpath}"/>
224
+ </classpath>
225
+ </depend>
226
+ </sequential>
227
+ </macrodef>
228
+ <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3">
229
+ <attribute default="${build.classes.dir}" name="destdir"/>
230
+ <sequential>
231
+ <fail unless="javac.includes">Must set javac.includes</fail>
232
+ <pathconvert pathsep="," property="javac.includes.binary">
233
+ <path>
234
+ <filelist dir="@{destdir}" files="${javac.includes}"/>
235
+ </path>
236
+ <globmapper from="*.java" to="*.class"/>
237
+ </pathconvert>
238
+ <delete>
239
+ <files includes="${javac.includes.binary}"/>
240
+ </delete>
241
+ </sequential>
242
+ </macrodef>
243
+ </target>
244
+ <target name="-init-macrodef-junit">
245
+ <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
246
+ <attribute default="${includes}" name="includes"/>
247
+ <attribute default="${excludes}" name="excludes"/>
248
+ <attribute default="**" name="testincludes"/>
249
+ <sequential>
250
+ <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${platform.java}" showoutput="true">
251
+ <batchtest todir="${build.test.results.dir}"/>
252
+ <classpath>
253
+ <path path="${run.test.classpath}"/>
254
+ </classpath>
255
+ <syspropertyset>
256
+ <propertyref prefix="test-sys-prop."/>
257
+ <mapper from="test-sys-prop.*" to="*" type="glob"/>
258
+ </syspropertyset>
259
+ <formatter type="brief" usefile="false"/>
260
+ <formatter type="xml"/>
261
+ <jvmarg line="${run.jvmargs}"/>
262
+ </junit>
263
+ </sequential>
264
+ </macrodef>
265
+ </target>
266
+ <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
267
+ <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
268
+ <attribute default="${main.class}" name="name"/>
269
+ <attribute default="${debug.classpath}" name="classpath"/>
270
+ <attribute default="" name="stopclassname"/>
271
+ <sequential>
272
+ <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
273
+ <classpath>
274
+ <path path="@{classpath}"/>
275
+ </classpath>
276
+ <bootclasspath>
277
+ <path path="${platform.bootcp}"/>
278
+ </bootclasspath>
279
+ </nbjpdastart>
280
+ </sequential>
281
+ </macrodef>
282
+ <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
283
+ <attribute default="${build.classes.dir}" name="dir"/>
284
+ <sequential>
285
+ <nbjpdareload>
286
+ <fileset dir="@{dir}" includes="${fix.classes}">
287
+ <include name="${fix.includes}*.class"/>
288
+ </fileset>
289
+ </nbjpdareload>
290
+ </sequential>
291
+ </macrodef>
292
+ </target>
293
+ <target name="-init-debug-args">
294
+ <exec executable="${platform.java}" outputproperty="version-output">
295
+ <arg value="-version"/>
296
+ </exec>
297
+ <condition property="have-jdk-older-than-1.4">
298
+ <or>
299
+ <contains string="${version-output}" substring="java version &quot;1.0"/>
300
+ <contains string="${version-output}" substring="java version &quot;1.1"/>
301
+ <contains string="${version-output}" substring="java version &quot;1.2"/>
302
+ <contains string="${version-output}" substring="java version &quot;1.3"/>
303
+ </or>
304
+ </condition>
305
+ <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
306
+ <istrue value="${have-jdk-older-than-1.4}"/>
307
+ </condition>
308
+ <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
309
+ <os family="windows"/>
310
+ </condition>
311
+ <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
312
+ <isset property="debug.transport"/>
313
+ </condition>
314
+ </target>
315
+ <target depends="-init-debug-args" name="-init-macrodef-debug">
316
+ <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
317
+ <attribute default="${main.class}" name="classname"/>
318
+ <attribute default="${debug.classpath}" name="classpath"/>
319
+ <element name="customize" optional="true"/>
320
+ <sequential>
321
+ <java classname="@{classname}" dir="${work.dir}" fork="true" jvm="${platform.java}">
322
+ <jvmarg line="${debug-args-line}"/>
323
+ <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
324
+ <jvmarg value="-Dfile.encoding=${source.encoding}"/>
325
+ <redirector errorencoding="${source.encoding}" inputencoding="${source.encoding}" outputencoding="${source.encoding}"/>
326
+ <jvmarg line="${run.jvmargs}"/>
327
+ <classpath>
328
+ <path path="@{classpath}"/>
329
+ </classpath>
330
+ <syspropertyset>
331
+ <propertyref prefix="run-sys-prop."/>
332
+ <mapper from="run-sys-prop.*" to="*" type="glob"/>
333
+ </syspropertyset>
334
+ <customize/>
335
+ </java>
336
+ </sequential>
337
+ </macrodef>
338
+ </target>
339
+ <target name="-init-macrodef-java">
340
+ <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
341
+ <attribute default="${main.class}" name="classname"/>
342
+ <attribute default="${run.classpath}" name="classpath"/>
343
+ <element name="customize" optional="true"/>
344
+ <sequential>
345
+ <java classname="@{classname}" dir="${work.dir}" fork="true" jvm="${platform.java}">
346
+ <jvmarg value="-Dfile.encoding=${source.encoding}"/>
347
+ <redirector errorencoding="${source.encoding}" inputencoding="${source.encoding}" outputencoding="${source.encoding}"/>
348
+ <jvmarg line="${run.jvmargs}"/>
349
+ <classpath>
350
+ <path path="@{classpath}"/>
351
+ </classpath>
352
+ <syspropertyset>
353
+ <propertyref prefix="run-sys-prop."/>
354
+ <mapper from="run-sys-prop.*" to="*" type="glob"/>
355
+ </syspropertyset>
356
+ <customize/>
357
+ </java>
358
+ </sequential>
359
+ </macrodef>
360
+ </target>
361
+ <target name="-init-presetdef-jar">
362
+ <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
363
+ <jar compress="${jar.compress}" jarfile="${dist.jar}">
364
+ <j2seproject1:fileset dir="${build.classes.dir}"/>
365
+ </jar>
366
+ </presetdef>
367
+ </target>
368
+ <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"/>
369
+ <!--
370
+ ===================
371
+ COMPILATION SECTION
372
+ ===================
373
+ -->
374
+ <target depends="init" name="deps-jar" unless="no.deps"/>
375
+ <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
376
+ <target depends="init" name="-check-automatic-build">
377
+ <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
378
+ </target>
379
+ <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
380
+ <antcall target="clean"/>
381
+ </target>
382
+ <target depends="init,deps-jar" name="-pre-pre-compile">
383
+ <mkdir dir="${build.classes.dir}"/>
384
+ </target>
385
+ <target name="-pre-compile">
386
+ <!-- Empty placeholder for easier customization. -->
387
+ <!-- You can override this target in the ../build.xml file. -->
388
+ </target>
389
+ <target if="do.depend.true" name="-compile-depend">
390
+ <pathconvert property="build.generated.subdirs">
391
+ <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false">
392
+ <include name="*"/>
393
+ </dirset>
394
+ </pathconvert>
395
+ <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/>
396
+ </target>
397
+ <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-compile-depend" if="have.sources" name="-do-compile">
398
+ <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
399
+ <copy todir="${build.classes.dir}">
400
+ <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
401
+ </copy>
402
+ </target>
403
+ <target name="-post-compile">
404
+ <!-- Empty placeholder for easier customization. -->
405
+ <!-- You can override this target in the ../build.xml file. -->
406
+ </target>
407
+ <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
408
+ <target name="-pre-compile-single">
409
+ <!-- Empty placeholder for easier customization. -->
410
+ <!-- You can override this target in the ../build.xml file. -->
411
+ </target>
412
+ <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
413
+ <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
414
+ <j2seproject3:force-recompile/>
415
+ <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}"/>
416
+ </target>
417
+ <target name="-post-compile-single">
418
+ <!-- Empty placeholder for easier customization. -->
419
+ <!-- You can override this target in the ../build.xml file. -->
420
+ </target>
421
+ <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
422
+ <!--
423
+ ====================
424
+ JAR BUILDING SECTION
425
+ ====================
426
+ -->
427
+ <target depends="init" name="-pre-pre-jar">
428
+ <dirname file="${dist.jar}" property="dist.jar.dir"/>
429
+ <mkdir dir="${dist.jar.dir}"/>
430
+ </target>
431
+ <target name="-pre-jar">
432
+ <!-- Empty placeholder for easier customization. -->
433
+ <!-- You can override this target in the ../build.xml file. -->
434
+ </target>
435
+ <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available">
436
+ <j2seproject1:jar/>
437
+ </target>
438
+ <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class">
439
+ <j2seproject1:jar manifest="${manifest.file}"/>
440
+ </target>
441
+ <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">
442
+ <j2seproject1:jar manifest="${manifest.file}">
443
+ <j2seproject1:manifest>
444
+ <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
445
+ </j2seproject1:manifest>
446
+ </j2seproject1:jar>
447
+ <echo>To run this application from the command line without Ant, try:</echo>
448
+ <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
449
+ <property location="${dist.jar}" name="dist.jar.resolved"/>
450
+ <pathconvert property="run.classpath.with.dist.jar">
451
+ <path path="${run.classpath}"/>
452
+ <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
453
+ </pathconvert>
454
+ <echo>${platform.java} -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
455
+ </target>
456
+ <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries">
457
+ <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
458
+ <pathconvert property="run.classpath.without.build.classes.dir">
459
+ <path path="${run.classpath}"/>
460
+ <map from="${build.classes.dir.resolved}" to=""/>
461
+ </pathconvert>
462
+ <pathconvert pathsep=" " property="jar.classpath">
463
+ <path path="${run.classpath.without.build.classes.dir}"/>
464
+ <chainedmapper>
465
+ <flattenmapper/>
466
+ <globmapper from="*" to="lib/*"/>
467
+ </chainedmapper>
468
+ </pathconvert>
469
+ <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
470
+ <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
471
+ <fileset dir="${build.classes.dir}"/>
472
+ <manifest>
473
+ <attribute name="Main-Class" value="${main.class}"/>
474
+ <attribute name="Class-Path" value="${jar.classpath}"/>
475
+ </manifest>
476
+ </copylibs>
477
+ <echo>To run this application from the command line without Ant, try:</echo>
478
+ <property location="${dist.jar}" name="dist.jar.resolved"/>
479
+ <echo>${platform.java} -jar "${dist.jar.resolved}"</echo>
480
+ </target>
481
+ <target depends="init,compile,-pre-pre-jar,-pre-jar" if="libs.CopyLibs.classpath" name="-do-jar-with-libraries-without-manifest" unless="manifest.available+main.class">
482
+ <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
483
+ <pathconvert property="run.classpath.without.build.classes.dir">
484
+ <path path="${run.classpath}"/>
485
+ <map from="${build.classes.dir.resolved}" to=""/>
486
+ </pathconvert>
487
+ <pathconvert pathsep=" " property="jar.classpath">
488
+ <path path="${run.classpath.without.build.classes.dir}"/>
489
+ <chainedmapper>
490
+ <flattenmapper/>
491
+ <globmapper from="*" to="lib/*"/>
492
+ </chainedmapper>
493
+ </pathconvert>
494
+ <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
495
+ <copylibs compress="${jar.compress}" jarfile="${dist.jar}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
496
+ <fileset dir="${build.classes.dir}"/>
497
+ </copylibs>
498
+ </target>
499
+ <target name="-post-jar">
500
+ <!-- Empty placeholder for easier customization. -->
501
+ <!-- You can override this target in the ../build.xml file. -->
502
+ </target>
503
+ <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-manifest,-post-jar" description="Build JAR." name="jar"/>
504
+ <!--
505
+ =================
506
+ EXECUTION SECTION
507
+ =================
508
+ -->
509
+ <target depends="init,compile" description="Run a main class." name="run">
510
+ <j2seproject1:java>
511
+ <customize>
512
+ <arg line="${application.args}"/>
513
+ </customize>
514
+ </j2seproject1:java>
515
+ </target>
516
+ <target name="-do-not-recompile">
517
+ <property name="javac.includes.binary" value=""/>
518
+ </target>
519
+ <target depends="init,-do-not-recompile,compile-single" name="run-single">
520
+ <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
521
+ <j2seproject1:java classname="${run.class}"/>
522
+ </target>
523
+ <target depends="init,-do-not-recompile,compile-test-single" name="run-test-with-main">
524
+ <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
525
+ <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
526
+ </target>
527
+ <!--
528
+ =================
529
+ DEBUGGING SECTION
530
+ =================
531
+ -->
532
+ <target depends="init" if="netbeans.home" name="-debug-start-debugger">
533
+ <j2seproject1:nbjpdastart name="${debug.class}"/>
534
+ </target>
535
+ <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
536
+ <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
537
+ </target>
538
+ <target depends="init,compile" name="-debug-start-debuggee">
539
+ <j2seproject3:debug>
540
+ <customize>
541
+ <arg line="${application.args}"/>
542
+ </customize>
543
+ </j2seproject3:debug>
544
+ </target>
545
+ <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
546
+ <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto">
547
+ <j2seproject1:nbjpdastart stopclassname="${main.class}"/>
548
+ </target>
549
+ <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/>
550
+ <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
551
+ <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
552
+ <j2seproject3:debug classname="${debug.class}"/>
553
+ </target>
554
+ <target depends="init,-do-not-recompile,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
555
+ <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
556
+ <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
557
+ <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
558
+ </target>
559
+ <target depends="init,-do-not-recompile,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
560
+ <target depends="init" name="-pre-debug-fix">
561
+ <fail unless="fix.includes">Must set fix.includes</fail>
562
+ <property name="javac.includes" value="${fix.includes}.java"/>
563
+ </target>
564
+ <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
565
+ <j2seproject1:nbjpdareload/>
566
+ </target>
567
+ <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
568
+ <!--
569
+ ===============
570
+ JAVADOC SECTION
571
+ ===============
572
+ -->
573
+ <target depends="init" name="-javadoc-build">
574
+ <mkdir dir="${dist.javadoc.dir}"/>
575
+ <javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" executable="${platform.javadoc}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}">
576
+ <classpath>
577
+ <path path="${javac.classpath}"/>
578
+ </classpath>
579
+ <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
580
+ <filename name="**/*.java"/>
581
+ </fileset>
582
+ <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
583
+ <include name="**/*.java"/>
584
+ </fileset>
585
+ </javadoc>
586
+ </target>
587
+ <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
588
+ <nbbrowse file="${dist.javadoc.dir}/index.html"/>
589
+ </target>
590
+ <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
591
+ <!--
592
+ =========================
593
+ JUNIT COMPILATION SECTION
594
+ =========================
595
+ -->
596
+ <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
597
+ <mkdir dir="${build.test.classes.dir}"/>
598
+ </target>
599
+ <target name="-pre-compile-test">
600
+ <!-- Empty placeholder for easier customization. -->
601
+ <!-- You can override this target in the ../build.xml file. -->
602
+ </target>
603
+ <target if="do.depend.true" name="-compile-test-depend">
604
+ <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir=""/>
605
+ </target>
606
+ <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
607
+ <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir=""/>
608
+ <copy todir="${build.test.classes.dir}"/>
609
+ </target>
610
+ <target name="-post-compile-test">
611
+ <!-- Empty placeholder for easier customization. -->
612
+ <!-- You can override this target in the ../build.xml file. -->
613
+ </target>
614
+ <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
615
+ <target name="-pre-compile-test-single">
616
+ <!-- Empty placeholder for easier customization. -->
617
+ <!-- You can override this target in the ../build.xml file. -->
618
+ </target>
619
+ <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
620
+ <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
621
+ <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
622
+ <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" sourcepath="" srcdir=""/>
623
+ <copy todir="${build.test.classes.dir}"/>
624
+ </target>
625
+ <target name="-post-compile-test-single">
626
+ <!-- Empty placeholder for easier customization. -->
627
+ <!-- You can override this target in the ../build.xml file. -->
628
+ </target>
629
+ <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
630
+ <!--
631
+ =======================
632
+ JUNIT EXECUTION SECTION
633
+ =======================
634
+ -->
635
+ <target depends="init" if="have.tests" name="-pre-test-run">
636
+ <mkdir dir="${build.test.results.dir}"/>
637
+ </target>
638
+ <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
639
+ <j2seproject3:junit testincludes="**/*Test.java"/>
640
+ </target>
641
+ <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
642
+ <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
643
+ </target>
644
+ <target depends="init" if="have.tests" name="test-report"/>
645
+ <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
646
+ <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
647
+ <target depends="init" if="have.tests" name="-pre-test-run-single">
648
+ <mkdir dir="${build.test.results.dir}"/>
649
+ </target>
650
+ <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
651
+ <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
652
+ <j2seproject3:junit excludes="" includes="${test.includes}"/>
653
+ </target>
654
+ <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
655
+ <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
656
+ </target>
657
+ <target depends="init,-do-not-recompile,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
658
+ <!--
659
+ =======================
660
+ JUNIT DEBUGGING SECTION
661
+ =======================
662
+ -->
663
+ <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
664
+ <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
665
+ <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
666
+ <delete file="${test.report.file}"/>
667
+ <mkdir dir="${build.test.results.dir}"/>
668
+ <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}">
669
+ <customize>
670
+ <syspropertyset>
671
+ <propertyref prefix="test-sys-prop."/>
672
+ <mapper from="test-sys-prop.*" to="*" type="glob"/>
673
+ </syspropertyset>
674
+ <arg value="${test.class}"/>
675
+ <arg value="showoutput=true"/>
676
+ <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
677
+ <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
678
+ </customize>
679
+ </j2seproject3:debug>
680
+ </target>
681
+ <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
682
+ <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
683
+ </target>
684
+ <target depends="init,-do-not-recompile,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
685
+ <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
686
+ <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
687
+ </target>
688
+ <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
689
+ <!--
690
+ =========================
691
+ APPLET EXECUTION SECTION
692
+ =========================
693
+ -->
694
+ <target depends="init,compile-single" name="run-applet">
695
+ <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
696
+ <j2seproject1:java classname="sun.applet.AppletViewer">
697
+ <customize>
698
+ <arg value="${applet.url}"/>
699
+ </customize>
700
+ </j2seproject1:java>
701
+ </target>
702
+ <!--
703
+ =========================
704
+ APPLET DEBUGGING SECTION
705
+ =========================
706
+ -->
707
+ <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
708
+ <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
709
+ <j2seproject3:debug classname="sun.applet.AppletViewer">
710
+ <customize>
711
+ <arg value="${applet.url}"/>
712
+ </customize>
713
+ </j2seproject3:debug>
714
+ </target>
715
+ <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
716
+ <!--
717
+ ===============
718
+ CLEANUP SECTION
719
+ ===============
720
+ -->
721
+ <target depends="init" name="deps-clean" unless="no.deps"/>
722
+ <target depends="init" name="-do-clean">
723
+ <delete dir="${build.dir}"/>
724
+ <delete dir="${dist.dir}"/>
725
+ </target>
726
+ <target name="-post-clean">
727
+ <!-- Empty placeholder for easier customization. -->
728
+ <!-- You can override this target in the ../build.xml file. -->
729
+ </target>
730
+ <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
731
+ </project>