Kaynağa Gözat

This commit fixes issue 499

Hyperion/Dancer sucks.
OnJoin now asks for as many listmodes at a time as possible
Parser now keeps track of list modes requested and what order they were requested, so that listmode processor knows what each incomming listmode should be.
Misc fixes to support hyperion/dacer gayness with list modes.
parser.setAutoListMode() allows disabling automatic list mode requesting.
channel.hasAskedForListModes() returns true/false if channel.requestListModes() has ever been called.


git-svn-id: http://svn.dmdirc.com/trunk@2689 00569f92-eb28-0410-84fd-f71c24880f
tags/0.5.5
Shane Mc Cormack 16 yıl önce
ebeveyn
işleme
1333a284e5

+ 253
- 172
nbproject/build-impl.xml Dosyayı Görüntüle

18
   - applet
18
   - applet
19
   - cleanup
19
   - cleanup
20
 
20
 
21
--->
22
-<project name="DMDirc-impl" default="default" basedir=".." xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:j2seproject2="http://www.netbeans.org/ns/j2se-project/2" xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:jaxws="http://www.netbeans.org/ns/jax-ws/1">
23
-    <target name="default" depends="test,jar,javadoc" description="Build and test whole project."/>
21
+        -->
22
+<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject2="http://www.netbeans.org/ns/j2se-project/2" 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="DMDirc-impl">
23
+    <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
24
     <!-- 
24
     <!-- 
25
-    ======================
26
-    INITIALIZATION SECTION 
27
-    ======================
28
-    -->
25
+                ======================
26
+                INITIALIZATION SECTION 
27
+                ======================
28
+            -->
29
     <target name="-pre-init">
29
     <target name="-pre-init">
30
         <!-- Empty placeholder for easier customization. -->
30
         <!-- Empty placeholder for easier customization. -->
31
         <!-- You can override this target in the ../build.xml file. -->
31
         <!-- You can override this target in the ../build.xml file. -->
32
     </target>
32
     </target>
33
-    <target name="-init-private" depends="-pre-init">
33
+    <target depends="-pre-init" name="-init-private">
34
+        <property file="nbproject/private/config.properties"/>
35
+        <property file="nbproject/private/configs/${config}.properties"/>
34
         <property file="nbproject/private/private.properties"/>
36
         <property file="nbproject/private/private.properties"/>
35
     </target>
37
     </target>
36
-    <target name="-init-user" depends="-pre-init,-init-private">
38
+    <target depends="-pre-init,-init-private" name="-init-user">
37
         <property file="${user.properties.file}"/>
39
         <property file="${user.properties.file}"/>
38
         <!-- The two properties below are usually overridden -->
40
         <!-- The two properties below are usually overridden -->
39
         <!-- by the active platform. Just a fallback. -->
41
         <!-- by the active platform. Just a fallback. -->
40
         <property name="default.javac.source" value="1.4"/>
42
         <property name="default.javac.source" value="1.4"/>
41
         <property name="default.javac.target" value="1.4"/>
43
         <property name="default.javac.target" value="1.4"/>
42
     </target>
44
     </target>
43
-    <target name="-init-project" depends="-pre-init,-init-private,-init-user">
45
+    <target depends="-pre-init,-init-private,-init-user" name="-init-project">
46
+        <property file="nbproject/configs/${config}.properties"/>
44
         <property file="nbproject/project.properties"/>
47
         <property file="nbproject/project.properties"/>
45
     </target>
48
     </target>
46
-    <target name="-do-init" depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property">
49
+    <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
47
         <available file="${manifest.file}" property="manifest.available"/>
50
         <available file="${manifest.file}" property="manifest.available"/>
48
         <condition property="manifest.available+main.class">
51
         <condition property="manifest.available+main.class">
49
             <and>
52
             <and>
77
             </and>
80
             </and>
78
         </condition>
81
         </condition>
79
         <condition property="no.javadoc.preview">
82
         <condition property="no.javadoc.preview">
80
-            <isfalse value="${javadoc.preview}"/>
83
+            <and>
84
+                <isset property="javadoc.preview"/>
85
+                <isfalse value="${javadoc.preview}"/>
86
+            </and>
81
         </condition>
87
         </condition>
82
         <property name="run.jvmargs" value=""/>
88
         <property name="run.jvmargs" value=""/>
83
         <property name="javac.compilerargs" value=""/>
89
         <property name="javac.compilerargs" value=""/>
89
         </condition>
95
         </condition>
90
         <property name="javac.debug" value="true"/>
96
         <property name="javac.debug" value="true"/>
91
         <property name="javadoc.preview" value="true"/>
97
         <property name="javadoc.preview" value="true"/>
98
+        <property name="application.args" value=""/>
99
+        <property name="source.encoding" value="${file.encoding}"/>
100
+        <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
101
+            <and>
102
+                <isset property="javadoc.encoding"/>
103
+                <not>
104
+                    <equals arg1="${javadoc.encoding}" arg2=""/>
105
+                </not>
106
+            </and>
107
+        </condition>
108
+        <property name="javadoc.encoding.used" value="${source.encoding}"/>
109
+        <property name="includes" value="**"/>
110
+        <property name="excludes" value=""/>
111
+        <property name="do.depend" value="true"/>
112
+        <condition property="do.depend.true">
113
+            <istrue value="${do.depend}"/>
114
+        </condition>
92
     </target>
115
     </target>
93
     <target name="-post-init">
116
     <target name="-post-init">
94
         <!-- Empty placeholder for easier customization. -->
117
         <!-- Empty placeholder for easier customization. -->
95
         <!-- You can override this target in the ../build.xml file. -->
118
         <!-- You can override this target in the ../build.xml file. -->
96
     </target>
119
     </target>
97
-    <target name="-init-check" depends="-pre-init,-init-private,-init-user,-init-project,-do-init">
120
+    <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
98
         <fail unless="src.dir">Must set src.dir</fail>
121
         <fail unless="src.dir">Must set src.dir</fail>
99
         <fail unless="test.src.dir">Must set test.src.dir</fail>
122
         <fail unless="test.src.dir">Must set test.src.dir</fail>
100
         <fail unless="build.dir">Must set build.dir</fail>
123
         <fail unless="build.dir">Must set build.dir</fail>
117
     </target>
140
     </target>
118
     <target name="-init-macrodef-javac">
141
     <target name="-init-macrodef-javac">
119
         <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
142
         <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
120
-            <attribute name="srcdir" default="${src.dir}"/>
121
-            <attribute name="destdir" default="${build.classes.dir}"/>
122
-            <attribute name="classpath" default="${javac.classpath}"/>
123
-            <attribute name="debug" default="${javac.debug}"/>
143
+            <attribute default="${src.dir}" name="srcdir"/>
144
+            <attribute default="${build.classes.dir}" name="destdir"/>
145
+            <attribute default="${javac.classpath}" name="classpath"/>
146
+            <attribute default="${includes}" name="includes"/>
147
+            <attribute default="${excludes}" name="excludes"/>
148
+            <attribute default="${javac.debug}" name="debug"/>
149
+            <attribute default="" name="javac.compilerargs.jaxws"/>
150
+            <attribute default="" name="sourcepath"/>
124
             <element name="customize" optional="true"/>
151
             <element name="customize" optional="true"/>
125
             <sequential>
152
             <sequential>
126
-                <javac srcdir="@{srcdir}" destdir="@{destdir}" debug="@{debug}" deprecation="${javac.deprecation}" source="${javac.source}" target="${javac.target}" includeantruntime="false">
153
+                <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}">
127
                     <classpath>
154
                     <classpath>
128
                         <path path="@{classpath}"/>
155
                         <path path="@{classpath}"/>
129
                     </classpath>
156
                     </classpath>
130
-                    <compilerarg line="${javac.compilerargs}"/>
157
+                    <compilerarg line="${javac.compilerargs} @{javac.compilerargs.jaxws}"/>
131
                     <customize/>
158
                     <customize/>
132
                 </javac>
159
                 </javac>
133
             </sequential>
160
             </sequential>
134
         </macrodef>
161
         </macrodef>
162
+        <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
163
+            <attribute default="${src.dir}" name="srcdir"/>
164
+            <attribute default="${build.classes.dir}" name="destdir"/>
165
+            <attribute default="${javac.classpath}" name="classpath"/>
166
+            <sequential>
167
+                <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">
168
+                    <classpath>
169
+                        <path path="@{classpath}"/>
170
+                    </classpath>
171
+                </depend>
172
+            </sequential>
173
+        </macrodef>
174
+        <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3">
175
+            <attribute default="${build.classes.dir}" name="destdir"/>
176
+            <sequential>
177
+                <fail unless="javac.includes">Must set javac.includes</fail>
178
+                <pathconvert pathsep="," property="javac.includes.binary">
179
+                    <path>
180
+                        <filelist dir="@{destdir}" files="${javac.includes}"/>
181
+                    </path>
182
+                    <globmapper from="*.java" to="*.class"/>
183
+                </pathconvert>
184
+                <delete>
185
+                    <files includes="${javac.includes.binary}"/>
186
+                </delete>
187
+            </sequential>
188
+        </macrodef>
135
     </target>
189
     </target>
136
     <target name="-init-macrodef-junit">
190
     <target name="-init-macrodef-junit">
137
         <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
191
         <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
138
-            <attribute name="includes" default="**/*Test.java"/>
192
+            <attribute default="${includes}" name="includes"/>
193
+            <attribute default="${excludes}" name="excludes"/>
194
+            <attribute default="**" name="testincludes"/>
139
             <sequential>
195
             <sequential>
140
-                <junit showoutput="true" fork="true" dir="${basedir}" failureproperty="tests.failed" errorproperty="tests.failed">
196
+                <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true">
141
                     <batchtest todir="${build.test.results.dir}">
197
                     <batchtest todir="${build.test.results.dir}">
142
-                        <fileset dir="${test.src.dir}" includes="@{includes}"/>
198
+                        <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
199
+                            <filename name="@{testincludes}"/>
200
+                        </fileset>
143
                     </batchtest>
201
                     </batchtest>
144
                     <classpath>
202
                     <classpath>
145
                         <path path="${run.test.classpath}"/>
203
                         <path path="${run.test.classpath}"/>
146
                     </classpath>
204
                     </classpath>
147
                     <syspropertyset>
205
                     <syspropertyset>
148
                         <propertyref prefix="test-sys-prop."/>
206
                         <propertyref prefix="test-sys-prop."/>
149
-                        <mapper type="glob" from="test-sys-prop.*" to="*"/>
207
+                        <mapper from="test-sys-prop.*" to="*" type="glob"/>
150
                     </syspropertyset>
208
                     </syspropertyset>
151
                     <formatter type="brief" usefile="false"/>
209
                     <formatter type="brief" usefile="false"/>
152
                     <formatter type="xml"/>
210
                     <formatter type="xml"/>
157
     </target>
215
     </target>
158
     <target name="-init-macrodef-nbjpda">
216
     <target name="-init-macrodef-nbjpda">
159
         <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
217
         <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
160
-            <attribute name="name" default="${main.class}"/>
161
-            <attribute name="classpath" default="${debug.classpath}"/>
162
-            <attribute name="stopclassname" default=""/>
218
+            <attribute default="${main.class}" name="name"/>
219
+            <attribute default="${debug.classpath}" name="classpath"/>
220
+            <attribute default="" name="stopclassname"/>
163
             <sequential>
221
             <sequential>
164
-                <nbjpdastart transport="dt_socket" addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}">
222
+                <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="dt_socket">
165
                     <classpath>
223
                     <classpath>
166
                         <path path="@{classpath}"/>
224
                         <path path="@{classpath}"/>
167
                     </classpath>
225
                     </classpath>
169
             </sequential>
227
             </sequential>
170
         </macrodef>
228
         </macrodef>
171
         <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
229
         <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
172
-            <attribute name="dir" default="${build.classes.dir}"/>
230
+            <attribute default="${build.classes.dir}" name="dir"/>
173
             <sequential>
231
             <sequential>
174
                 <nbjpdareload>
232
                 <nbjpdareload>
175
-                    <fileset includes="${fix.includes}*.class" dir="@{dir}"/>
233
+                    <fileset dir="@{dir}" includes="${fix.includes}*.class"/>
176
                 </nbjpdareload>
234
                 </nbjpdareload>
177
             </sequential>
235
             </sequential>
178
         </macrodef>
236
         </macrodef>
179
     </target>
237
     </target>
180
-    <target name="-init-macrodef-debug">
238
+    <target name="-init-debug-args">
239
+        <property name="version-output" value="java version &quot;${ant.java.version}"/>
240
+        <condition property="have-jdk-older-than-1.4">
241
+            <or>
242
+                <contains string="${version-output}" substring="java version &quot;1.0"/>
243
+                <contains string="${version-output}" substring="java version &quot;1.1"/>
244
+                <contains string="${version-output}" substring="java version &quot;1.2"/>
245
+                <contains string="${version-output}" substring="java version &quot;1.3"/>
246
+            </or>
247
+        </condition>
248
+        <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
249
+            <istrue value="${have-jdk-older-than-1.4}"/>
250
+        </condition>
251
+    </target>
252
+    <target depends="-init-debug-args" name="-init-macrodef-debug">
181
         <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
253
         <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
182
-            <attribute name="classname" default="${main.class}"/>
183
-            <attribute name="classpath" default="${debug.classpath}"/>
254
+            <attribute default="${main.class}" name="classname"/>
255
+            <attribute default="${debug.classpath}" name="classpath"/>
184
             <element name="customize" optional="true"/>
256
             <element name="customize" optional="true"/>
185
             <sequential>
257
             <sequential>
186
-                <java fork="true" classname="@{classname}" dir="${work.dir}">
187
-                    <jvmarg value="-Xdebug"/>
188
-                    <jvmarg value="-Xnoagent"/>
189
-                    <jvmarg value="-Djava.compiler=none"/>
258
+                <java classname="@{classname}" dir="${work.dir}" fork="true">
259
+                    <jvmarg line="${debug-args-line}"/>
190
                     <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
260
                     <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
191
                     <jvmarg line="${run.jvmargs}"/>
261
                     <jvmarg line="${run.jvmargs}"/>
192
                     <classpath>
262
                     <classpath>
194
                     </classpath>
264
                     </classpath>
195
                     <syspropertyset>
265
                     <syspropertyset>
196
                         <propertyref prefix="run-sys-prop."/>
266
                         <propertyref prefix="run-sys-prop."/>
197
-                        <mapper type="glob" from="run-sys-prop.*" to="*"/>
267
+                        <mapper from="run-sys-prop.*" to="*" type="glob"/>
198
                     </syspropertyset>
268
                     </syspropertyset>
199
                     <customize/>
269
                     <customize/>
200
                 </java>
270
                 </java>
203
     </target>
273
     </target>
204
     <target name="-init-macrodef-java">
274
     <target name="-init-macrodef-java">
205
         <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
275
         <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
206
-            <attribute name="classname" default="${main.class}"/>
276
+            <attribute default="${main.class}" name="classname"/>
207
             <element name="customize" optional="true"/>
277
             <element name="customize" optional="true"/>
208
             <sequential>
278
             <sequential>
209
-                <java fork="true" classname="@{classname}" dir="${work.dir}">
279
+                <java classname="@{classname}" dir="${work.dir}" fork="true">
210
                     <jvmarg line="${run.jvmargs}"/>
280
                     <jvmarg line="${run.jvmargs}"/>
211
                     <classpath>
281
                     <classpath>
212
                         <path path="${run.classpath}"/>
282
                         <path path="${run.classpath}"/>
213
                     </classpath>
283
                     </classpath>
214
                     <syspropertyset>
284
                     <syspropertyset>
215
                         <propertyref prefix="run-sys-prop."/>
285
                         <propertyref prefix="run-sys-prop."/>
216
-                        <mapper type="glob" from="run-sys-prop.*" to="*"/>
286
+                        <mapper from="run-sys-prop.*" to="*" type="glob"/>
217
                     </syspropertyset>
287
                     </syspropertyset>
218
                     <customize/>
288
                     <customize/>
219
                 </java>
289
                 </java>
222
     </target>
292
     </target>
223
     <target name="-init-presetdef-jar">
293
     <target name="-init-presetdef-jar">
224
         <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
294
         <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
225
-            <jar jarfile="${dist.jar}" compress="${jar.compress}">
295
+            <jar compress="${jar.compress}" jarfile="${dist.jar}">
226
                 <j2seproject1:fileset dir="${build.classes.dir}"/>
296
                 <j2seproject1:fileset dir="${build.classes.dir}"/>
227
             </jar>
297
             </jar>
228
         </presetdef>
298
         </presetdef>
229
     </target>
299
     </target>
230
-    <target name="init" 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"/>
300
+    <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"/>
231
     <!--
301
     <!--
232
-    ===================
233
-    COMPILATION SECTION
234
-    ===================
235
-    -->
236
-    <target name="deps-jar" depends="init" unless="no.deps"/>
237
-    <target name="-pre-pre-compile" depends="init,deps-jar">
302
+                ===================
303
+                COMPILATION SECTION
304
+                ===================
305
+            -->
306
+    <target depends="init" name="deps-jar" unless="no.deps"/>
307
+    <target depends="init,deps-jar" name="-pre-pre-compile">
238
         <mkdir dir="${build.classes.dir}"/>
308
         <mkdir dir="${build.classes.dir}"/>
239
     </target>
309
     </target>
240
     <target name="-pre-compile">
310
     <target name="-pre-compile">
241
         <!-- Empty placeholder for easier customization. -->
311
         <!-- Empty placeholder for easier customization. -->
242
         <!-- You can override this target in the ../build.xml file. -->
312
         <!-- You can override this target in the ../build.xml file. -->
243
     </target>
313
     </target>
244
-    <target name="-do-compile" depends="init,deps-jar,-pre-pre-compile,-pre-compile" if="have.sources">
314
+    <target if="do.depend.true" name="-compile-depend">
315
+        <j2seproject3:depend/>
316
+    </target>
317
+    <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-compile-depend" if="have.sources" name="-do-compile">
245
         <j2seproject3:javac/>
318
         <j2seproject3:javac/>
246
         <copy todir="${build.classes.dir}">
319
         <copy todir="${build.classes.dir}">
247
-            <fileset dir="${src.dir}" excludes="${build.classes.excludes}"/>
320
+            <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
248
         </copy>
321
         </copy>
249
     </target>
322
     </target>
250
     <target name="-post-compile">
323
     <target name="-post-compile">
251
         <!-- Empty placeholder for easier customization. -->
324
         <!-- Empty placeholder for easier customization. -->
252
         <!-- You can override this target in the ../build.xml file. -->
325
         <!-- You can override this target in the ../build.xml file. -->
253
     </target>
326
     </target>
254
-    <target name="compile" depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project."/>
327
+    <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
255
     <target name="-pre-compile-single">
328
     <target name="-pre-compile-single">
256
         <!-- Empty placeholder for easier customization. -->
329
         <!-- Empty placeholder for easier customization. -->
257
         <!-- You can override this target in the ../build.xml file. -->
330
         <!-- You can override this target in the ../build.xml file. -->
258
     </target>
331
     </target>
259
-    <target name="-do-compile-single" depends="init,deps-jar,-pre-pre-compile">
332
+    <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
260
         <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
333
         <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
261
-        <j2seproject3:javac>
262
-            <customize>
263
-                <patternset includes="${javac.includes}"/>
264
-            </customize>
265
-        </j2seproject3:javac>
334
+        <j2seproject3:force-recompile/>
335
+        <j2seproject3:javac excludes="" includes="${javac.includes}" sourcepath="${src.dir}"/>
266
     </target>
336
     </target>
267
     <target name="-post-compile-single">
337
     <target name="-post-compile-single">
268
         <!-- Empty placeholder for easier customization. -->
338
         <!-- Empty placeholder for easier customization. -->
269
         <!-- You can override this target in the ../build.xml file. -->
339
         <!-- You can override this target in the ../build.xml file. -->
270
     </target>
340
     </target>
271
-    <target name="compile-single" depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single"/>
341
+    <target depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
272
     <!--
342
     <!--
273
-    ====================
274
-    JAR BUILDING SECTION
275
-    ====================
276
-    -->
277
-    <target name="-pre-pre-jar" depends="init">
278
-        <dirname property="dist.jar.dir" file="${dist.jar}"/>
343
+                ====================
344
+                JAR BUILDING SECTION
345
+                ====================
346
+            -->
347
+    <target depends="init" name="-pre-pre-jar">
348
+        <dirname file="${dist.jar}" property="dist.jar.dir"/>
279
         <mkdir dir="${dist.jar.dir}"/>
349
         <mkdir dir="${dist.jar.dir}"/>
280
     </target>
350
     </target>
281
     <target name="-pre-jar">
351
     <target name="-pre-jar">
282
         <!-- Empty placeholder for easier customization. -->
352
         <!-- Empty placeholder for easier customization. -->
283
         <!-- You can override this target in the ../build.xml file. -->
353
         <!-- You can override this target in the ../build.xml file. -->
284
     </target>
354
     </target>
285
-    <target name="-do-jar-without-manifest" depends="init,compile,-pre-pre-jar,-pre-jar" unless="manifest.available">
355
+    <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available">
286
         <j2seproject1:jar/>
356
         <j2seproject1:jar/>
287
     </target>
357
     </target>
288
-    <target name="-do-jar-with-manifest" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" unless="manifest.available+main.class">
358
+    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class">
289
         <j2seproject1:jar manifest="${manifest.file}"/>
359
         <j2seproject1:jar manifest="${manifest.file}"/>
290
     </target>
360
     </target>
291
-    <target name="-do-jar-with-mainclass" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class" unless="manifest.available+main.class+mkdist.available">
361
+    <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">
292
         <j2seproject1:jar manifest="${manifest.file}">
362
         <j2seproject1:jar manifest="${manifest.file}">
293
             <j2seproject1:manifest>
363
             <j2seproject1:manifest>
294
                 <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
364
                 <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
295
             </j2seproject1:manifest>
365
             </j2seproject1:manifest>
296
         </j2seproject1:jar>
366
         </j2seproject1:jar>
297
         <echo>To run this application from the command line without Ant, try:</echo>
367
         <echo>To run this application from the command line without Ant, try:</echo>
298
-        <property name="build.classes.dir.resolved" location="${build.classes.dir}"/>
299
-        <property name="dist.jar.resolved" location="${dist.jar}"/>
368
+        <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
369
+        <property location="${dist.jar}" name="dist.jar.resolved"/>
300
         <pathconvert property="run.classpath.with.dist.jar">
370
         <pathconvert property="run.classpath.with.dist.jar">
301
             <path path="${run.classpath}"/>
371
             <path path="${run.classpath}"/>
302
             <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
372
             <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
303
         </pathconvert>
373
         </pathconvert>
304
         <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
374
         <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
305
     </target>
375
     </target>
306
-    <target name="-do-jar-with-libraries" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available">
307
-        <property name="build.classes.dir.resolved" location="${build.classes.dir}"/>
376
+    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries">
377
+        <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
308
         <pathconvert property="run.classpath.without.build.classes.dir">
378
         <pathconvert property="run.classpath.without.build.classes.dir">
309
             <path path="${run.classpath}"/>
379
             <path path="${run.classpath}"/>
310
             <map from="${build.classes.dir.resolved}" to=""/>
380
             <map from="${build.classes.dir.resolved}" to=""/>
311
         </pathconvert>
381
         </pathconvert>
312
-        <pathconvert property="jar.classpath" pathsep=" ">
382
+        <pathconvert pathsep=" " property="jar.classpath">
313
             <path path="${run.classpath.without.build.classes.dir}"/>
383
             <path path="${run.classpath.without.build.classes.dir}"/>
314
             <chainedmapper>
384
             <chainedmapper>
315
                 <flattenmapper/>
385
                 <flattenmapper/>
316
                 <globmapper from="*" to="lib/*"/>
386
                 <globmapper from="*" to="lib/*"/>
317
             </chainedmapper>
387
             </chainedmapper>
318
         </pathconvert>
388
         </pathconvert>
319
-        <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" name="copylibs" classpath="${libs.CopyLibs.classpath}"/>
320
-        <copylibs manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}" jarfile="${dist.jar}" compress="${jar.compress}">
389
+        <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
390
+        <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
321
             <fileset dir="${build.classes.dir}"/>
391
             <fileset dir="${build.classes.dir}"/>
322
             <manifest>
392
             <manifest>
323
                 <attribute name="Main-Class" value="${main.class}"/>
393
                 <attribute name="Main-Class" value="${main.class}"/>
325
             </manifest>
395
             </manifest>
326
         </copylibs>
396
         </copylibs>
327
         <echo>To run this application from the command line without Ant, try:</echo>
397
         <echo>To run this application from the command line without Ant, try:</echo>
328
-        <property name="dist.jar.resolved" location="${dist.jar}"/>
398
+        <property location="${dist.jar}" name="dist.jar.resolved"/>
329
         <echo>java -jar "${dist.jar.resolved}"</echo>
399
         <echo>java -jar "${dist.jar.resolved}"</echo>
330
     </target>
400
     </target>
331
     <target name="-post-jar">
401
     <target name="-post-jar">
332
         <!-- Empty placeholder for easier customization. -->
402
         <!-- Empty placeholder for easier customization. -->
333
         <!-- You can override this target in the ../build.xml file. -->
403
         <!-- You can override this target in the ../build.xml file. -->
334
     </target>
404
     </target>
335
-    <target name="jar" depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-post-jar" description="Build JAR."/>
405
+    <target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-post-jar" description="Build JAR." name="jar"/>
336
     <!--
406
     <!--
337
-    =================
338
-    EXECUTION SECTION
339
-    =================
340
-    -->
341
-    <target name="run" depends="init,compile" description="Run a main class.">
407
+                =================
408
+                EXECUTION SECTION
409
+                =================
410
+            -->
411
+    <target depends="init,compile" description="Run a main class." name="run">
342
         <j2seproject1:java>
412
         <j2seproject1:java>
343
             <customize>
413
             <customize>
344
                 <arg line="${application.args}"/>
414
                 <arg line="${application.args}"/>
345
             </customize>
415
             </customize>
346
         </j2seproject1:java>
416
         </j2seproject1:java>
347
     </target>
417
     </target>
348
-    <target name="run-single" depends="init,compile-single">
418
+    <target name="-do-not-recompile">
419
+        <property name="javac.includes.binary" value=""/>
420
+    </target>
421
+    <target depends="init,-do-not-recompile,compile-single" name="run-single">
349
         <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
422
         <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
350
         <j2seproject1:java classname="${run.class}"/>
423
         <j2seproject1:java classname="${run.class}"/>
351
     </target>
424
     </target>
352
     <!--
425
     <!--
353
-    =================
354
-    DEBUGGING SECTION
355
-    =================
356
-    -->
357
-    <target name="-debug-start-debugger" if="netbeans.home" depends="init">
426
+                =================
427
+                DEBUGGING SECTION
428
+                =================
429
+            -->
430
+    <target depends="init" if="netbeans.home" name="-debug-start-debugger">
358
         <j2seproject1:nbjpdastart name="${debug.class}"/>
431
         <j2seproject1:nbjpdastart name="${debug.class}"/>
359
     </target>
432
     </target>
360
-    <target name="-debug-start-debuggee" depends="init,compile">
433
+    <target depends="init,compile" name="-debug-start-debuggee">
361
         <j2seproject3:debug>
434
         <j2seproject3:debug>
362
             <customize>
435
             <customize>
363
                 <arg line="${application.args}"/>
436
                 <arg line="${application.args}"/>
364
             </customize>
437
             </customize>
365
         </j2seproject3:debug>
438
         </j2seproject3:debug>
366
     </target>
439
     </target>
367
-    <target name="debug" if="netbeans.home" depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE."/>
368
-    <target name="-debug-start-debugger-stepinto" if="netbeans.home" depends="init">
440
+    <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
441
+    <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto">
369
         <j2seproject1:nbjpdastart stopclassname="${main.class}"/>
442
         <j2seproject1:nbjpdastart stopclassname="${main.class}"/>
370
     </target>
443
     </target>
371
-    <target name="debug-stepinto" if="netbeans.home" depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee"/>
372
-    <target name="-debug-start-debuggee-single" if="netbeans.home" depends="init,compile-single">
444
+    <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/>
445
+    <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
373
         <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
446
         <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
374
         <j2seproject3:debug classname="${debug.class}"/>
447
         <j2seproject3:debug classname="${debug.class}"/>
375
     </target>
448
     </target>
376
-    <target name="debug-single" if="netbeans.home" depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single"/>
377
-    <target name="-pre-debug-fix" depends="init">
449
+    <target depends="init,-do-not-recompile,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
450
+    <target depends="init" name="-pre-debug-fix">
378
         <fail unless="fix.includes">Must set fix.includes</fail>
451
         <fail unless="fix.includes">Must set fix.includes</fail>
379
         <property name="javac.includes" value="${fix.includes}.java"/>
452
         <property name="javac.includes" value="${fix.includes}.java"/>
380
     </target>
453
     </target>
381
-    <target name="-do-debug-fix" if="netbeans.home" depends="init,-pre-debug-fix,compile-single">
454
+    <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
382
         <j2seproject1:nbjpdareload/>
455
         <j2seproject1:nbjpdareload/>
383
     </target>
456
     </target>
384
-    <target name="debug-fix" if="netbeans.home" depends="init,-pre-debug-fix,-do-debug-fix"/>
457
+    <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
385
     <!--
458
     <!--
386
-    ===============
387
-    JAVADOC SECTION
388
-    ===============
389
-    -->
390
-    <target name="-javadoc-build" depends="init">
459
+                ===============
460
+                JAVADOC SECTION
461
+                ===============
462
+            -->
463
+    <target depends="init" name="-javadoc-build">
391
         <mkdir dir="${dist.javadoc.dir}"/>
464
         <mkdir dir="${dist.javadoc.dir}"/>
392
-        <javadoc destdir="${dist.javadoc.dir}" source="${javac.source}" notree="${javadoc.notree}" use="${javadoc.use}" nonavbar="${javadoc.nonavbar}" noindex="${javadoc.noindex}" splitindex="${javadoc.splitindex}" author="${javadoc.author}" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}" private="${javadoc.private}" additionalparam="${javadoc.additionalparam}" failonerror="true" useexternalfile="true">
465
+        <javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" charset="${javadoc.encoding.used}" destdir="${dist.javadoc.dir}" docencoding="${javadoc.encoding.used}" 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}">
393
             <classpath>
466
             <classpath>
394
                 <path path="${javac.classpath}"/>
467
                 <path path="${javac.classpath}"/>
395
             </classpath>
468
             </classpath>
396
-            <sourcepath>
397
-                <pathelement location="${src.dir}"/>
398
-            </sourcepath>
399
-            <packageset dir="${src.dir}" includes="*/**"/>
400
-            <fileset dir="${src.dir}" includes="*.java"/>
469
+            <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
470
+                <filename name="**/*.java"/>
471
+            </fileset>
401
         </javadoc>
472
         </javadoc>
402
     </target>
473
     </target>
403
-    <target name="-javadoc-browse" if="netbeans.home" unless="no.javadoc.preview" depends="init,-javadoc-build">
474
+    <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
404
         <nbbrowse file="${dist.javadoc.dir}/index.html"/>
475
         <nbbrowse file="${dist.javadoc.dir}/index.html"/>
405
     </target>
476
     </target>
406
-    <target name="javadoc" depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc."/>
477
+    <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
407
     <!--
478
     <!--
408
-    =========================
409
-    JUNIT COMPILATION SECTION
410
-    =========================
411
-    -->
412
-    <target name="-pre-pre-compile-test" if="have.tests" depends="init,compile">
479
+                =========================
480
+                JUNIT COMPILATION SECTION
481
+                =========================
482
+            -->
483
+    <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
413
         <mkdir dir="${build.test.classes.dir}"/>
484
         <mkdir dir="${build.test.classes.dir}"/>
414
     </target>
485
     </target>
415
     <target name="-pre-compile-test">
486
     <target name="-pre-compile-test">
416
         <!-- Empty placeholder for easier customization. -->
487
         <!-- Empty placeholder for easier customization. -->
417
         <!-- You can override this target in the ../build.xml file. -->
488
         <!-- You can override this target in the ../build.xml file. -->
418
     </target>
489
     </target>
419
-    <target name="-do-compile-test" if="have.tests" depends="init,compile,-pre-pre-compile-test,-pre-compile-test">
420
-        <j2seproject3:javac srcdir="${test.src.dir}" destdir="${build.test.classes.dir}" debug="true" classpath="${javac.test.classpath}"/>
490
+    <target if="do.depend.true" name="-compile-test-depend">
491
+        <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
492
+    </target>
493
+    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
494
+        <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
421
         <copy todir="${build.test.classes.dir}">
495
         <copy todir="${build.test.classes.dir}">
422
-            <fileset dir="${test.src.dir}" excludes="**/*.java"/>
496
+            <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
423
         </copy>
497
         </copy>
424
     </target>
498
     </target>
425
     <target name="-post-compile-test">
499
     <target name="-post-compile-test">
426
         <!-- Empty placeholder for easier customization. -->
500
         <!-- Empty placeholder for easier customization. -->
427
         <!-- You can override this target in the ../build.xml file. -->
501
         <!-- You can override this target in the ../build.xml file. -->
428
     </target>
502
     </target>
429
-    <target name="compile-test" depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test"/>
503
+    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
430
     <target name="-pre-compile-test-single">
504
     <target name="-pre-compile-test-single">
431
         <!-- Empty placeholder for easier customization. -->
505
         <!-- Empty placeholder for easier customization. -->
432
         <!-- You can override this target in the ../build.xml file. -->
506
         <!-- You can override this target in the ../build.xml file. -->
433
     </target>
507
     </target>
434
-    <target name="-do-compile-test-single" if="have.tests" depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single">
508
+    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
435
         <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
509
         <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
436
-        <j2seproject3:javac srcdir="${test.src.dir}" destdir="${build.test.classes.dir}" debug="true" classpath="${javac.test.classpath}">
437
-            <customize>
438
-                <patternset includes="${javac.includes}"/>
439
-            </customize>
440
-        </j2seproject3:javac>
510
+        <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
511
+        <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/>
441
         <copy todir="${build.test.classes.dir}">
512
         <copy todir="${build.test.classes.dir}">
442
-            <fileset dir="${test.src.dir}" excludes="**/*.java"/>
513
+            <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
443
         </copy>
514
         </copy>
444
     </target>
515
     </target>
445
     <target name="-post-compile-test-single">
516
     <target name="-post-compile-test-single">
446
         <!-- Empty placeholder for easier customization. -->
517
         <!-- Empty placeholder for easier customization. -->
447
         <!-- You can override this target in the ../build.xml file. -->
518
         <!-- You can override this target in the ../build.xml file. -->
448
     </target>
519
     </target>
449
-    <target name="compile-test-single" depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single"/>
520
+    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
450
     <!--
521
     <!--
451
-    =======================
452
-    JUNIT EXECUTION SECTION
453
-    =======================
454
-    -->
455
-    <target name="-pre-test-run" if="have.tests" depends="init">
522
+                =======================
523
+                JUNIT EXECUTION SECTION
524
+                =======================
525
+            -->
526
+    <target depends="init" if="have.tests" name="-pre-test-run">
456
         <mkdir dir="${build.test.results.dir}"/>
527
         <mkdir dir="${build.test.results.dir}"/>
457
     </target>
528
     </target>
458
-    <target name="-do-test-run" if="have.tests" depends="init,compile-test,-pre-test-run">
459
-        <j2seproject3:junit/>
529
+    <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
530
+        <j2seproject3:junit testincludes="**/*Test.java"/>
460
     </target>
531
     </target>
461
-    <target name="-post-test-run" if="have.tests" depends="init,compile-test,-pre-test-run,-do-test-run">
532
+    <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
462
         <fail if="tests.failed">Some tests failed; see details above.</fail>
533
         <fail if="tests.failed">Some tests failed; see details above.</fail>
463
     </target>
534
     </target>
464
-    <target name="test-report" if="have.tests" depends="init"/>
465
-    <target name="-test-browse" if="netbeans.home+have.tests" depends="init"/>
466
-    <target name="test" depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests."/>
467
-    <target name="-pre-test-run-single" if="have.tests" depends="init">
535
+    <target depends="init" if="have.tests" name="test-report"/>
536
+    <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
537
+    <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
538
+    <target depends="init" if="have.tests" name="-pre-test-run-single">
468
         <mkdir dir="${build.test.results.dir}"/>
539
         <mkdir dir="${build.test.results.dir}"/>
469
     </target>
540
     </target>
470
-    <target name="-do-test-run-single" if="have.tests" depends="init,compile-test-single,-pre-test-run-single">
541
+    <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
471
         <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
542
         <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
472
-        <j2seproject3:junit includes="${test.includes}"/>
543
+        <j2seproject3:junit excludes="" includes="${test.includes}"/>
473
     </target>
544
     </target>
474
-    <target name="-post-test-run-single" if="have.tests" depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single">
545
+    <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
475
         <fail if="tests.failed">Some tests failed; see details above.</fail>
546
         <fail if="tests.failed">Some tests failed; see details above.</fail>
476
     </target>
547
     </target>
477
-    <target name="test-single" depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test."/>
548
+    <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"/>
478
     <!--
549
     <!--
479
-    =======================
480
-    JUNIT DEBUGGING SECTION
481
-    =======================
482
-    -->
483
-    <target name="-debug-start-debuggee-test" if="have.tests" depends="init,compile-test">
550
+                =======================
551
+                JUNIT DEBUGGING SECTION
552
+                =======================
553
+            -->
554
+    <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
484
         <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
555
         <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
485
-        <j2seproject3:debug classname="junit.textui.TestRunner" classpath="${debug.test.classpath}">
556
+        <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
557
+        <delete file="${test.report.file}"/>
558
+        <mkdir dir="${build.test.results.dir}"/>
559
+        <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}">
486
             <customize>
560
             <customize>
487
-                <arg line="${test.class}"/>
561
+                <syspropertyset>
562
+                    <propertyref prefix="test-sys-prop."/>
563
+                    <mapper from="test-sys-prop.*" to="*" type="glob"/>
564
+                </syspropertyset>
565
+                <arg value="${test.class}"/>
566
+                <arg value="showoutput=true"/>
567
+                <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
568
+                <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
488
             </customize>
569
             </customize>
489
         </j2seproject3:debug>
570
         </j2seproject3:debug>
490
     </target>
571
     </target>
491
-    <target name="-debug-start-debugger-test" if="netbeans.home+have.tests" depends="init,compile-test">
492
-        <j2seproject1:nbjpdastart name="${test.class}" classpath="${debug.test.classpath}"/>
572
+    <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
573
+        <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
493
     </target>
574
     </target>
494
-    <target name="debug-test" depends="init,compile-test,-debug-start-debugger-test,-debug-start-debuggee-test"/>
495
-    <target name="-do-debug-fix-test" if="netbeans.home" depends="init,-pre-debug-fix,compile-test-single">
575
+    <target depends="init,-do-not-recompile,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
576
+    <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
496
         <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
577
         <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
497
     </target>
578
     </target>
498
-    <target name="debug-fix-test" if="netbeans.home" depends="init,-pre-debug-fix,-do-debug-fix-test"/>
579
+    <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
499
     <!--
580
     <!--
500
-    =========================
501
-    APPLET EXECUTION SECTION
502
-    =========================
503
-    -->
504
-    <target name="run-applet" depends="init,compile-single">
581
+                =========================
582
+                APPLET EXECUTION SECTION
583
+                =========================
584
+            -->
585
+    <target depends="init,compile-single" name="run-applet">
505
         <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
586
         <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
506
         <j2seproject1:java classname="sun.applet.AppletViewer">
587
         <j2seproject1:java classname="sun.applet.AppletViewer">
507
             <customize>
588
             <customize>
510
         </j2seproject1:java>
591
         </j2seproject1:java>
511
     </target>
592
     </target>
512
     <!--
593
     <!--
513
-    =========================
514
-    APPLET DEBUGGING  SECTION
515
-    =========================
516
-    -->
517
-    <target name="-debug-start-debuggee-applet" if="netbeans.home" depends="init,compile-single">
594
+                =========================
595
+                APPLET DEBUGGING  SECTION
596
+                =========================
597
+            -->
598
+    <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
518
         <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
599
         <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
519
         <j2seproject3:debug classname="sun.applet.AppletViewer">
600
         <j2seproject3:debug classname="sun.applet.AppletViewer">
520
             <customize>
601
             <customize>
522
             </customize>
603
             </customize>
523
         </j2seproject3:debug>
604
         </j2seproject3:debug>
524
     </target>
605
     </target>
525
-    <target name="debug-applet" if="netbeans.home" depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet"/>
606
+    <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
526
     <!--
607
     <!--
527
-    ===============
528
-    CLEANUP SECTION
529
-    ===============
530
-    -->
531
-    <target name="deps-clean" depends="init" unless="no.deps"/>
532
-    <target name="-do-clean" depends="init">
608
+                ===============
609
+                CLEANUP SECTION
610
+                ===============
611
+            -->
612
+    <target depends="init" name="deps-clean" unless="no.deps"/>
613
+    <target depends="init" name="-do-clean">
533
         <delete dir="${build.dir}"/>
614
         <delete dir="${build.dir}"/>
534
         <delete dir="${dist.dir}"/>
615
         <delete dir="${dist.dir}"/>
535
     </target>
616
     </target>
537
         <!-- Empty placeholder for easier customization. -->
618
         <!-- Empty placeholder for easier customization. -->
538
         <!-- You can override this target in the ../build.xml file. -->
619
         <!-- You can override this target in the ../build.xml file. -->
539
     </target>
620
     </target>
540
-    <target name="clean" depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products."/>
621
+    <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
541
 </project>
622
 </project>

+ 3
- 3
nbproject/genfiles.properties Dosyayı Görüntüle

3
 build.xml.stylesheet.CRC32=240b97a2
3
 build.xml.stylesheet.CRC32=240b97a2
4
 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
4
 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
5
 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
5
 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
6
-nbproject/build-impl.xml.data.CRC32=42229879
7
-nbproject/build-impl.xml.script.CRC32=07e37bde
8
-nbproject/build-impl.xml.stylesheet.CRC32=20b9345e
6
+nbproject/build-impl.xml.data.CRC32=bd5a0d51
7
+nbproject/build-impl.xml.script.CRC32=71da8a92
8
+nbproject/build-impl.xml.stylesheet.CRC32=eb00e44a

+ 69
- 2
src/com/dmdirc/parser/ChannelInfo.java Dosyayı Görüntüle

29
 import java.util.HashMap;
29
 import java.util.HashMap;
30
 import java.util.LinkedList;
30
 import java.util.LinkedList;
31
 import java.util.Map;
31
 import java.util.Map;
32
+import java.util.Queue;
32
 
33
 
33
 /**
34
 /**
34
  * Contains Channel information.
35
  * Contains Channel information.
77
 	private LinkedList<String> lModeQueue = new LinkedList<String>();
78
 	private LinkedList<String> lModeQueue = new LinkedList<String>();
78
 	/** A Map to allow applications to attach misc data to this object */
79
 	/** A Map to allow applications to attach misc data to this object */
79
 	private Map myMap;
80
 	private Map myMap;
81
+	
82
+	/** Queue of requested list modes */
83
+	private Queue<Character> listModeQueue = new LinkedList<Character>();
84
+	/** Listmode Queue Time */
85
+	private long listModeQueueTime = System.currentTimeMillis();
86
+	/** Have we asked the server for the list modes for this channel yet? */
87
+	private boolean askedForListModes = false;
80
 
88
 
81
 	/**
89
 	/**
82
 	 * Create a new channel object.
90
 	 * Create a new channel object.
90
 		sName = name;
98
 		sName = name;
91
 	}
99
 	}
92
 	
100
 	
101
+	/**
102
+	 * Get the listModeQueue
103
+	 *
104
+	 * @return The listModeQueue
105
+	 */
106
+	public Queue<Character> getListModeQueue() {
107
+		Queue<Character> result = listModeQueue;
108
+		final long now = System.currentTimeMillis();
109
+		// Incase of breakage, if getListModeQueue() was last called greater than
110
+		// 60 seconds ago, we reset the list.
111
+		if (now-(30*1000) > listModeQueueTime) {
112
+			result = new LinkedList<Character>();
113
+			myParser.callDebugInfo(myParser.DEBUG_LMQ, "Resetting LMQ");
114
+		}
115
+		listModeQueueTime = now;
116
+		return result;
117
+	}
118
+	
119
+	/**
120
+	 * Ask the server for all the list modes for this channel.
121
+	 */
122
+	public void requestListModes() {
123
+		askedForListModes = true;
124
+		int modecount = 1;
125
+		try { 
126
+			modecount = Integer.parseInt(myParser.h005Info.get("MODES"));
127
+		} catch (NumberFormatException e) { /* use default modecount */}
128
+		
129
+		String listmodes = "";
130
+		int i = 0;
131
+		for (Character cTemp : myParser.hChanModesOther.keySet()) {
132
+			int nTemp = myParser.hChanModesOther.get(cTemp);
133
+			if (nTemp == myParser.MODE_LIST) {
134
+				i++;
135
+				listmodes = listmodes + cTemp;
136
+				if (i >= modecount) {
137
+					myParser.sendString("MODE "+getName()+" "+listmodes);
138
+					i = 0;
139
+					listmodes = "";
140
+				}
141
+			}
142
+		}
143
+		if (i > 0) { myParser.sendString("MODE "+getName()+" "+listmodes); }
144
+	}
145
+	
146
+	/**
147
+	 * Have we ever asked the server for this channels listmodes?
148
+	 *
149
+	 * @return True if requestListModes() has ever been used, else false
150
+	 */
151
+	public boolean hasAskedForListModes() {
152
+		return askedForListModes;
153
+	}
154
+	
93
 	/**
155
 	/**
94
 	 * Set the Map object attatched to this object.
156
 	 * Set the Map object attatched to this object.
95
 	 *
157
 	 *
379
 		else if (myParser.hChanModesOther.get(cMode) != myParser.MODE_LIST) { return; }
441
 		else if (myParser.hChanModesOther.get(cMode) != myParser.MODE_LIST) { return; }
380
 		
442
 		
381
 		// Hyperion sucks.
443
 		// Hyperion sucks.
382
-		if (cMode == 'b') {
444
+		if (cMode == 'b' || cMode == 'q') {
383
 			final String thisIRCD = myParser.getIRCD(true).toLowerCase();
445
 			final String thisIRCD = myParser.getIRCD(true).toLowerCase();
384
-			if ((thisIRCD.equals("hyperion") || thisIRCD.equals("dancer")) {
446
+			if ((thisIRCD.equals("hyperion") || thisIRCD.equals("dancer"))) {
447
+				if (cMode == 'b' && givenItem.getItem().charAt(0) == '%') {
448
+					cMode = 'q';
449
+				} else if (cMode == 'q' && givenItem.getItem().charAt(0) != '%') {
450
+					cMode = 'b';
451
+				}
385
 				if (givenItem.getItem().charAt(0) == '%') {
452
 				if (givenItem.getItem().charAt(0) == '%') {
386
 					newItem = new ChannelListModeItem(givenItem.getItem().substring(1), givenItem.getOwner(), givenItem.getTime());
453
 					newItem = new ChannelListModeItem(givenItem.getItem().substring(1), givenItem.getOwner(), givenItem.getTime());
387
 				}
454
 				}

+ 53
- 8
src/com/dmdirc/parser/IRCParser.java Dosyayı Görüntüle

53
 import java.util.Collection;
53
 import java.util.Collection;
54
 import java.util.Hashtable;
54
 import java.util.Hashtable;
55
 import java.util.Timer;
55
 import java.util.Timer;
56
+import java.util.Queue;
56
 
57
 
57
 import javax.net.ssl.SSLContext;
58
 import javax.net.ssl.SSLContext;
58
 import javax.net.ssl.SSLSocketFactory;
59
 import javax.net.ssl.SSLSocketFactory;
76
 	public static final int DEBUG_SOCKET = 2;
77
 	public static final int DEBUG_SOCKET = 2;
77
 	/** Processing Manager Debug Information. */
78
 	/** Processing Manager Debug Information. */
78
 	public static final int DEBUG_PROCESSOR = 4;
79
 	public static final int DEBUG_PROCESSOR = 4;
79
-//	public static final int DEBUG_SOMETHING = 8; //Next thingy
80
+	/** List Mode Queue Debug Information. */
81
+	public static final int DEBUG_LMQ = 8;
82
+//	public static final int DEBUG_SOMETHING = 16; //Next thingy
80
 
83
 
81
 	/** Socket is not created yet. */
84
 	/** Socket is not created yet. */
82
 	public static final byte STATE_NULL = 0;
85
 	public static final byte STATE_NULL = 0;
244
 	/** Should fake (channel)clients be created for callbacks where they do not exist? */
247
 	/** Should fake (channel)clients be created for callbacks where they do not exist? */
245
 	boolean createFake = false;
248
 	boolean createFake = false;
246
 	
249
 	
250
+	/** Should channels automatically request list modes? */
251
+	boolean autoListMode = true;
252
+	
247
 	/** Should part/quit/kick callbacks be fired before removing the user internally? */
253
 	/** Should part/quit/kick callbacks be fired before removing the user internally? */
248
 	boolean removeAfterCallback = true;
254
 	boolean removeAfterCallback = true;
249
 		
255
 		
309
 	 */
315
 	 */
310
 	public void setCreateFake(final boolean newValue) { createFake = newValue; }
316
 	public void setCreateFake(final boolean newValue) { createFake = newValue; }
311
 	
317
 	
318
+	/**
319
+	 * Get the current Value of autoListMode.
320
+	 *
321
+	 * @return Value of autoListMode (true if channels automatically ask for list modes on join, else false)
322
+	 */
323
+	public boolean getAutoListMode() { return autoListMode; }
324
+	
325
+	/**
326
+	 * Set the current Value of autoListMode.
327
+	 *
328
+	 * @param newValue New value to set autoListMode
329
+	 */
330
+	public void setAutoListMode(final boolean newValue) { autoListMode = newValue; }
331
+
312
 	/**
332
 	/**
313
 	 * Get the current Value of removeAfterCallback.
333
 	 * Get the current Value of removeAfterCallback.
314
 	 *
334
 	 *
838
 	 * @return ChannelInfo Object for the channel, or null
858
 	 * @return ChannelInfo Object for the channel, or null
839
 	 */
859
 	 */
840
 	public ChannelInfo getChannelInfo(String sWhat) {
860
 	public ChannelInfo getChannelInfo(String sWhat) {
841
-		sWhat = toLowerCase(sWhat);
842
-		if (hChannelList.containsKey(sWhat)) { return hChannelList.get(sWhat); } else { return null; }
861
+		synchronized (hChannelList) {
862
+			sWhat = toLowerCase(sWhat);
863
+			if (hChannelList.containsKey(sWhat)) { return hChannelList.get(sWhat); } else { return null; }
864
+		}
843
 	}
865
 	}
844
 	
866
 	
845
 	/**
867
 	/**
869
 		final String[] newLine = tokeniseLine(line);
891
 		final String[] newLine = tokeniseLine(line);
870
 		if (newLine[0].equalsIgnoreCase("away") && newLine.length > 1) {
892
 		if (newLine[0].equalsIgnoreCase("away") && newLine.length > 1) {
871
 			cMyself.setAwayReason(newLine[newLine.length-1]);
893
 			cMyself.setAwayReason(newLine[newLine.length-1]);
894
+		} else if (newLine[0].equalsIgnoreCase("mode") && newLine.length == 3) {
895
+			ChannelInfo channel = getChannelInfo(newLine[1]);
896
+			if (channel != null) {
897
+				Queue<Character> listModeQueue = channel.getListModeQueue();
898
+				for (int i = 0; i < newLine[2].length() ; ++i) {
899
+					Character mode = newLine[2].charAt(i);
900
+					callDebugInfo(DEBUG_LMQ, "Intercepted mode request for "+channel+" for mode "+mode);
901
+					if (hChanModesOther.containsKey(mode) && hChanModesOther.get(mode) == MODE_LIST) {
902
+						listModeQueue.offer(mode);
903
+						callDebugInfo(DEBUG_LMQ, "Added to LMQ");
904
+					}
905
+				}
906
+			}
872
 		}
907
 		}
873
 	}
908
 	}
874
 	
909
 	
1932
 	 * @param channel Channel to add
1967
 	 * @param channel Channel to add
1933
 	 */
1968
 	 */
1934
 	public void addChannel(final ChannelInfo channel) {
1969
 	public void addChannel(final ChannelInfo channel) {
1935
-		hChannelList.put(toLowerCase(channel.getName()), channel);
1970
+		synchronized (hChannelList) {
1971
+			hChannelList.put(toLowerCase(channel.getName()), channel);
1972
+		}
1936
 	}
1973
 	}
1937
 
1974
 
1938
 	/**
1975
 	/**
1941
 	 * @param channel Channel to remove
1978
 	 * @param channel Channel to remove
1942
 	 */
1979
 	 */
1943
 	public void removeChannel(final ChannelInfo channel) {
1980
 	public void removeChannel(final ChannelInfo channel) {
1944
-		hChannelList.remove(toLowerCase(channel.getName()));
1981
+		synchronized (hChannelList) {
1982
+			hChannelList.remove(toLowerCase(channel.getName()));
1983
+		}
1945
 	}
1984
 	}
1946
 
1985
 
1947
 	/**
1986
 	/**
1950
 	 * @return Count of known channel
1989
 	 * @return Count of known channel
1951
 	 */
1990
 	 */
1952
 	public int knownChannels() {
1991
 	public int knownChannels() {
1953
-		return hChannelList.size();
1992
+		synchronized (hChannelList) {
1993
+			return hChannelList.size();
1994
+		}
1954
 	}
1995
 	}
1955
 
1996
 
1956
 	/**
1997
 	/**
1959
 	 * @return Known channels as a collection
2000
 	 * @return Known channels as a collection
1960
 	 */
2001
 	 */
1961
 	public Collection<ChannelInfo> getChannels() {
2002
 	public Collection<ChannelInfo> getChannels() {
1962
-		return hChannelList.values();
2003
+		synchronized (hChannelList) {
2004
+			return hChannelList.values();
2005
+		}
1963
 	}
2006
 	}
1964
 
2007
 
1965
 	/**
2008
 	/**
1966
 	 * Clear the channel list
2009
 	 * Clear the channel list
1967
 	 */
2010
 	 */
1968
 	public void clearChannels() {
2011
 	public void clearChannels() {
1969
-		hChannelList.clear();
2012
+		synchronized (hChannelList) {
2013
+			hChannelList.clear();
2014
+		}
1970
 	}
2015
 	}
1971
 
2016
 
1972
 	/**
2017
 	/**

+ 5
- 6
src/com/dmdirc/parser/ProcessJoin.java Dosyayı Görüntüle

71
 				myParser.addChannel(iChannel);
71
 				myParser.addChannel(iChannel);
72
 				sendString("MODE "+iChannel.getName());
72
 				sendString("MODE "+iChannel.getName());
73
 				
73
 				
74
-				// Find out the lists currently in use
75
-				for (Character cTemp : myParser.hChanModesOther.keySet()) {
76
-					nTemp = myParser.hChanModesOther.get(cTemp);
77
-					if (nTemp == myParser.MODE_LIST) { sendString("MODE "+iChannel.getName()+" "+cTemp); }
74
+				if (myParser.getAutoListMode()) {
75
+					iChannel.requestListModes();
78
 				}
76
 				}
79
 				callChannelSelfJoin(iChannel);
77
 				callChannelSelfJoin(iChannel);
80
 			} else {
78
 			} else {
93
 				}
91
 				}
94
 			}
92
 			}
95
 		}
93
 		}
96
-	}	
94
+	}
97
 	
95
 	
96
+
98
 	/**
97
 	/**
99
 	 * Callback to all objects implementing the ChannelJoin Callback.
98
 	 * Callback to all objects implementing the ChannelJoin Callback.
100
 	 *
99
 	 *
101
 	 * @see IChannelJoin
100
 	 * @see IChannelJoin
102
 	 * @param cChannel Channel Object
101
 	 * @param cChannel Channel Object
103
 	 * @param cChannelClient ChannelClient object for new person
102
 	 * @param cChannelClient ChannelClient object for new person
104
-         * @return true if a method was called, false otherwise
103
+	 * @return true if a method was called, false otherwise
105
 	 */
104
 	 */
106
 	protected boolean callChannelJoin(ChannelInfo cChannel, ChannelClientInfo cChannelClient) {
105
 	protected boolean callChannelJoin(ChannelInfo cChannel, ChannelClientInfo cChannelClient) {
107
 		CallbackOnChannelJoin cb = (CallbackOnChannelJoin)getCallbackManager().getCallbackType("OnChannelJoin");
106
 		CallbackOnChannelJoin cb = (CallbackOnChannelJoin)getCallbackManager().getCallbackType("OnChannelJoin");

+ 43
- 3
src/com/dmdirc/parser/ProcessListModes.java Dosyayı Görüntüle

24
 
24
 
25
 package com.dmdirc.parser;
25
 package com.dmdirc.parser;
26
 
26
 
27
+import java.util.LinkedList;
28
+import java.util.Queue;
29
+
27
 // import com.dmdirc.parser.callbacks.;
30
 // import com.dmdirc.parser.callbacks.;
28
 // import com.dmdirc.parser.callbacks.interfaces.;
31
 // import com.dmdirc.parser.callbacks.interfaces.;
29
 
32
 
34
 	/**
37
 	/**
35
 	 * Process a ListModes.
38
 	 * Process a ListModes.
36
 	 *
39
 	 *
37
-	 * @param sParam Type of line to process ("348", "349", "346", "347", "367", "368")
40
+	 * @param sParam Type of line to process ("348", "349", "346", "347", "367", "368", "482")
38
 	 * @param token IRCTokenised line to process
41
 	 * @param token IRCTokenised line to process
39
 	 */
42
 	 */
43
+	@SuppressWarnings("unchecked")
40
 	public void process(String sParam, String[] token) {
44
 	public void process(String sParam, String[] token) {
41
 		ChannelInfo channel = getChannelInfo(token[3]);
45
 		ChannelInfo channel = getChannelInfo(token[3]);
42
 		String thisIRCD = myParser.getIRCD(true).toLowerCase();
46
 		String thisIRCD = myParser.getIRCD(true).toLowerCase();
48
 		char mode = 'b';
52
 		char mode = 'b';
49
 		boolean isItem = true; // true if item listing, false if "end of .." item
53
 		boolean isItem = true; // true if item listing, false if "end of .." item
50
 		if (channel == null) { return; }
54
 		if (channel == null) { return; }
55
+		
51
 		if (sParam.equals("367") || sParam.equals("368")) {
56
 		if (sParam.equals("367") || sParam.equals("368")) {
52
 			// Ban List/Item.
57
 			// Ban List/Item.
53
 			// (Also used for +d and +q on hyperion... -_-)
58
 			// (Also used for +d and +q on hyperion... -_-)
75
 			isCleverMode = true;
80
 			isCleverMode = true;
76
 		}
81
 		}
77
 		
82
 		
83
+		final Queue<Character> listModeQueue = channel.getListModeQueue();
84
+		if (!isCleverMode && listModeQueue != null) {
85
+			if (sParam.equals("482")) {
86
+				myParser.callDebugInfo(myParser.DEBUG_LMQ, "Dropped LMQ mode "+listModeQueue.poll());
87
+			} else {
88
+				if (listModeQueue.peek() != null) {
89
+					Character oldMode = mode;
90
+					mode = listModeQueue.peek();
91
+					myParser.callDebugInfo(myParser.DEBUG_LMQ, "LMQ says this is "+mode);
92
+					if (oldMode != mode) {
93
+						myParser.callDebugInfo(myParser.DEBUG_LMQ, "LMQ disagrees with guess LMQ: "+mode+" Guess: "+oldMode);
94
+					}
95
+					if ((thisIRCD.equals("hyperion") || thisIRCD.equals("dancer")) && (mode == 'b' || mode == 'q')) {
96
+						LinkedList<Character> lmq = (LinkedList<Character>)listModeQueue;
97
+						if (mode == 'b') {
98
+							lmq.remove((Character)'q');
99
+							myParser.callDebugInfo(myParser.DEBUG_LMQ, "Dropping q from list");
100
+						} else if (mode == 'q') {
101
+							lmq.remove((Character)'b');
102
+							myParser.callDebugInfo(myParser.DEBUG_LMQ, "Dropping b from list");
103
+						}
104
+					}
105
+					if (!isItem) {
106
+						listModeQueue.poll();
107
+					}
108
+				}
109
+			}
110
+		}
111
+		
112
+		if (sParam.equals("482")) { return; }
113
+		
78
 		if (isItem) {
114
 		if (isItem) {
79
-			if ((!isCleverMode) && (thisIRCD.equals("hyperion") || thisIRCD.equals("dancer"))) {
115
+			if ((!isCleverMode) && listModeQueue == null && (thisIRCD.equals("hyperion") || thisIRCD.equals("dancer"))) {
80
 				if (token.length > 4) {
116
 				if (token.length > 4) {
81
 					if (mode == 'b') {
117
 					if (mode == 'b') {
82
 						// Assume mode is a 'd' mode
118
 						// Assume mode is a 'd' mode
123
 	 * @return String[] with the names of the tokens we handle.
159
 	 * @return String[] with the names of the tokens we handle.
124
 	 */
160
 	 */
125
 	public String[] handles() {
161
 	public String[] handles() {
126
-		String[] iHandle = new String[9];
162
+		String[] iHandle = new String[10];
127
 		int i = 0;
163
 		int i = 0;
128
 		// Ban List - All IRCds
164
 		// Ban List - All IRCds
129
 		iHandle[i++] = "367"; // Item
165
 		iHandle[i++] = "367"; // Item
145
 		iHandle[i++] = "348"; // Item
181
 		iHandle[i++] = "348"; // Item
146
 		iHandle[i++] = "349"; // End
182
 		iHandle[i++] = "349"; // End
147
 		
183
 		
184
+		// "Only operator can do that"
185
+		// This pops an item off the list mode queue
186
+		iHandle[i++] = "482"; // End
187
+		
148
 		// This is here to allow finding the processor for adding LISTMODE support
188
 		// This is here to allow finding the processor for adding LISTMODE support
149
 		iHandle[i++] = "__LISTMODE__";
189
 		iHandle[i++] = "__LISTMODE__";
150
 		return iHandle;
190
 		return iHandle;

Loading…
İptal
Kaydet