Переглянути джерело

random updates

tags/0.6.3m1rc1
Gregory Holmes 15 роки тому
джерело
коміт
9c5045e528

+ 34
- 48
nbproject/build-impl.xml Переглянути файл

@@ -19,7 +19,7 @@ is divided into following sections:
19 19
   - cleanup
20 20
 
21 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">
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="DMDirc-impl">
23 23
     <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
24 24
     <!-- 
25 25
                 ======================
@@ -108,10 +108,16 @@ is divided into following sections:
108 108
         <property name="javadoc.encoding.used" value="${source.encoding}"/>
109 109
         <property name="includes" value="**"/>
110 110
         <property name="excludes" value=""/>
111
-        <property name="do.depend" value="true"/>
111
+        <property name="do.depend" value="false"/>
112 112
         <condition property="do.depend.true">
113 113
             <istrue value="${do.depend}"/>
114 114
         </condition>
115
+        <condition else="" property="javac.compilerargs.jaxws" value="-Djava.endorsed.dirs='${jaxws.endorsed.dir}'">
116
+            <and>
117
+                <isset property="jaxws.endorsed.dir"/>
118
+                <available file="nbproject/jaxws-build.xml"/>
119
+            </and>
120
+        </condition>
115 121
     </target>
116 122
     <target name="-post-init">
117 123
         <!-- Empty placeholder for easier customization. -->
@@ -146,7 +152,6 @@ is divided into following sections:
146 152
             <attribute default="${includes}" name="includes"/>
147 153
             <attribute default="${excludes}" name="excludes"/>
148 154
             <attribute default="${javac.debug}" name="debug"/>
149
-            <attribute default="" name="javac.compilerargs.jaxws"/>
150 155
             <attribute default="" name="sourcepath"/>
151 156
             <element name="customize" optional="true"/>
152 157
             <sequential>
@@ -154,7 +159,7 @@ is divided into following sections:
154 159
                     <classpath>
155 160
                         <path path="@{classpath}"/>
156 161
                     </classpath>
157
-                    <compilerarg line="${javac.compilerargs} @{javac.compilerargs.jaxws}"/>
162
+                    <compilerarg line="${javac.compilerargs} ${javac.compilerargs.jaxws}"/>
158 163
                     <customize/>
159 164
                 </javac>
160 165
             </sequential>
@@ -194,9 +199,6 @@ is divided into following sections:
194 199
             <attribute default="**" name="testincludes"/>
195 200
             <sequential>
196 201
                 <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true">
197
-                    <classpath>
198
-                        <pathelement path="${clover.jar}"/>
199
-                    </classpath>
200 202
                     <batchtest todir="${build.test.results.dir}">
201 203
                         <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
202 204
                             <filename name="@{testincludes}"/>
@@ -216,13 +218,13 @@ is divided into following sections:
216 218
             </sequential>
217 219
         </macrodef>
218 220
     </target>
219
-    <target name="-init-macrodef-nbjpda">
221
+    <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
220 222
         <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
221 223
             <attribute default="${main.class}" name="name"/>
222 224
             <attribute default="${debug.classpath}" name="classpath"/>
223 225
             <attribute default="" name="stopclassname"/>
224 226
             <sequential>
225
-                <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="dt_socket">
227
+                <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
226 228
                     <classpath>
227 229
                         <path path="@{classpath}"/>
228 230
                     </classpath>
@@ -233,7 +235,9 @@ is divided into following sections:
233 235
             <attribute default="${build.classes.dir}" name="dir"/>
234 236
             <sequential>
235 237
                 <nbjpdareload>
236
-                    <fileset dir="@{dir}" includes="${fix.includes}*.class"/>
238
+                    <fileset dir="@{dir}" includes="${fix.classes}">
239
+                        <include name="${fix.includes}*.class"/>
240
+                    </fileset>
237 241
                 </nbjpdareload>
238 242
             </sequential>
239 243
         </macrodef>
@@ -251,6 +255,12 @@ is divided into following sections:
251 255
         <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
252 256
             <istrue value="${have-jdk-older-than-1.4}"/>
253 257
         </condition>
258
+        <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
259
+            <os family="windows"/>
260
+        </condition>
261
+        <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
262
+            <isset property="debug.transport"/>
263
+        </condition>
254 264
     </target>
255 265
     <target depends="-init-debug-args" name="-init-macrodef-debug">
256 266
         <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
@@ -260,7 +270,7 @@ is divided into following sections:
260 270
             <sequential>
261 271
                 <java classname="@{classname}" dir="${work.dir}" fork="true">
262 272
                     <jvmarg line="${debug-args-line}"/>
263
-                    <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
273
+                    <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
264 274
                     <jvmarg line="${run.jvmargs}"/>
265 275
                     <classpath>
266 276
                         <path path="@{classpath}"/>
@@ -296,7 +306,7 @@ is divided into following sections:
296 306
     <target name="-init-presetdef-jar">
297 307
         <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
298 308
             <jar compress="${jar.compress}" jarfile="${dist.jar}">
299
-                <j2seproject1:fileset dir="${build.classes.dir}" excludes="${dist.jar.excludes}"/>
309
+                <j2seproject1:fileset dir="${build.classes.dir}"/>
300 310
             </jar>
301 311
         </presetdef>
302 312
     </target>
@@ -307,6 +317,13 @@ is divided into following sections:
307 317
                 ===================
308 318
             -->
309 319
     <target depends="init" name="deps-jar" unless="no.deps"/>
320
+    <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
321
+    <target depends="init" name="-check-automatic-build">
322
+        <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
323
+    </target>
324
+    <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
325
+        <antcall target="clean"/>
326
+    </target>
310 327
     <target depends="init,deps-jar" name="-pre-pre-compile">
311 328
         <mkdir dir="${build.classes.dir}"/>
312 329
     </target>
@@ -327,7 +344,7 @@ is divided into following sections:
327 344
         <!-- Empty placeholder for easier customization. -->
328 345
         <!-- You can override this target in the ../build.xml file. -->
329 346
     </target>
330
-    <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
347
+    <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
331 348
     <target name="-pre-compile-single">
332 349
         <!-- Empty placeholder for easier customization. -->
333 350
         <!-- You can override this target in the ../build.xml file. -->
@@ -341,7 +358,7 @@ is divided into following sections:
341 358
         <!-- Empty placeholder for easier customization. -->
342 359
         <!-- You can override this target in the ../build.xml file. -->
343 360
     </target>
344
-    <target depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
361
+    <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
345 362
     <!--
346 363
                 ====================
347 364
                 JAR BUILDING SECTION
@@ -391,7 +408,7 @@ is divided into following sections:
391 408
         </pathconvert>
392 409
         <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
393 410
         <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
394
-            <fileset dir="${build.classes.dir}" excludes="${dist.jar.excludes}" />
411
+            <fileset dir="${build.classes.dir}"/>
395 412
             <manifest>
396 413
                 <attribute name="Main-Class" value="${main.class}"/>
397 414
                 <attribute name="Class-Path" value="${jar.classpath}"/>
@@ -465,7 +482,7 @@ is divided into following sections:
465 482
             -->
466 483
     <target depends="init" name="-javadoc-build">
467 484
         <mkdir dir="${dist.javadoc.dir}"/>
468
-        <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}">
485
+        <javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}">
469 486
             <classpath>
470 487
                 <path path="${javac.classpath}"/>
471 488
             </classpath>
@@ -474,41 +491,10 @@ is divided into following sections:
474 491
             </fileset>
475 492
         </javadoc>
476 493
     </target>
477
-
478
-    <target name="move-javadoc-check">
479
-        <condition property="move.javadoc">
480
-            <isset property="javadoc.moveto"/>
481
-        </condition>
482
-    </target>
483
-    <target name="move-javadoc" depends="move-javadoc-check" if="move.javadoc">
484
-        <delete dir="${javadoc.moveto}"/>
485
-        <move file="${dist.javadoc.dir}" tofile="${javadoc.moveto}"/>
486
-    </target>
487
-
488
-    <target depends="init,-doccheck-check" name="-doccheck-build" if="doccheck.run">
489
-        <mkdir dir="${doccheck.dir}"/>
490
-        <javadoc additionalparam="-doclet com.sun.tools.doclets.doccheck.DocCheck -docletpath ${doccheck.path} -skipPkg net.miginfocom.*" author="${javadoc.author}" destdir="${doccheck.dir}" failonerror="true" private="${javadoc.private}" source="${javac.source}" sourcepath="${src.dir}" useexternalfile="true" version="${javadoc.version}">
491
-            <classpath>
492
-                <path path="${javac.classpath}"/>
493
-            </classpath>
494
-        </javadoc>
495
-    </target>
496
-
497
-    <target name="-doccheck-check">
498
-        <condition property="doccheck.run">
499
-            <and>
500
-                <isset property="doccheck.path"/>
501
-                <isset property="doccheck.dir"/>
502
-                <available file="${doccheck.path}"/>
503
-            </and>
504
-        </condition>
505
-    </target>
506
-
507 494
     <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
508 495
         <nbbrowse file="${dist.javadoc.dir}/index.html"/>
509 496
     </target>
510
-    <target depends="init,-javadoc-build,-javadoc-browse,move-javadoc,-doccheck-build" description="Build Javadoc." name="javadoc"/>
511
-    <target depends="-doccheck-build" description="Build Javadoc error report (doccheck)." name="doccheck"/>
497
+    <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
512 498
     <!--
513 499
                 =========================
514 500
                 JUNIT COMPILATION SECTION

+ 2
- 2
nbproject/genfiles.properties Переглянути файл

@@ -10,5 +10,5 @@ nbproject/profiler-build-impl.xml.data.CRC32=bd5a0d51
10 10
 nbproject/profiler-build-impl.xml.script.CRC32=abda56ed
11 11
 nbproject/profiler-build-impl.xml.stylesheet.CRC32=42cb6bcf
12 12
 nbproject/build-impl.xml.data.CRC32=bd5a0d51
13
-nbproject/build-impl.xml.script.CRC32=c389cfac
14
-nbproject/build-impl.xml.stylesheet.CRC32=487672f9
13
+nbproject/build-impl.xml.script.CRC32=a83a4152
14
+nbproject/build-impl.xml.stylesheet.CRC32=e55b27f5

+ 6
- 3
nbproject/project.properties Переглянути файл

@@ -1,11 +1,13 @@
1
+application.title=DMDirc
2
+application.vendor=greboid
1 3
 file.reference.fest-assert-1.0a1.jar=lib/fest-assert-1.0a1.jar
2 4
 file.reference.fest-reflect-0.4.jar=lib/fest-reflect-0.4.jar
3 5
 file.reference.fest-swing-1.0b1.jar=lib/fest-swing-1.0b1.jar
4 6
 file.reference.fest-swing-junit-1.0b1.jar=lib/fest-swing-junit-1.0b1.jar
5 7
 file.reference.fest-util-0.4.jar=lib/fest-util-0.4.jar
6 8
 
9
+file.reference.junit-4.1.jar=lib/junit-4.1.jar
7 10
 libs.junit.classpath=/usr/share/java/junit.jar
8
-libs.junit_4.classpath=/usr/share/java/junit4.jar
9 11
 libs.junit.javadoc=
10 12
 
11 13
 doccheck.path=doccheck.jar
@@ -42,7 +44,8 @@ javac.target=1.6
42 44
 javac.test.classpath=\
43 45
     ${javac.classpath}:\
44 46
     ${build.classes.dir}:\
45
-    ${libs.junit_4.classpath}:\
47
+    ${libs.junit.classpath}:\
48
+    ${file.reference.junit-4.1.jar}:\
46 49
     ${file.reference.fest-swing-junit-1.0b1.jar}:\
47 50
     ${file.reference.fest-swing-1.0b1.jar}:\
48 51
     ${file.reference.fest-assert-1.0a1.jar}:\
@@ -74,6 +77,6 @@ run.test.classpath=\
74 77
     ${javac.test.classpath}:\
75 78
     ${build.test.classes.dir}:\
76 79
     ${libs.junit.classpath}:\
77
-    ${libs.junit_4.classpath}
80
+    ${file.reference.junit-4.1.jar}
78 81
 src.dir=src
79 82
 test.src.dir=test

+ 1
- 1
src/com/dmdirc/ui/swing/textpane/Line.java Переглянути файл

@@ -181,7 +181,7 @@ public class Line {
181 181
     /** {@inheritDoc} */
182 182
     @Override
183 183
     public boolean equals(Object object) {
184
-        if (object instanceof CachedLine || object instanceof Line) {
184
+        if (object instanceof Line) {
185 185
             return Arrays.equals(((Line) object).getLineParts(), getLineParts());
186 186
         }
187 187
         return false;

+ 3
- 0
src/com/dmdirc/ui/swing/textpane/TextPaneUI.java Переглянути файл

@@ -26,6 +26,9 @@ import javax.swing.JComponent;
26 26
 import javax.swing.UIManager;
27 27
 import javax.swing.plaf.ComponentUI;
28 28
 
29
+/**
30
+ * TextPane UI
31
+ */
29 32
 public class TextPaneUI extends ComponentUI {
30 33
 
31 34
     /** {@inheritDoc} */

+ 3
- 3
test/com/dmdirc/ui/messages/StyliserStylesTest.java Переглянути файл

@@ -23,7 +23,7 @@
23 23
 package com.dmdirc.ui.messages;
24 24
 
25 25
 import com.dmdirc.config.IdentityManager;
26
-import com.dmdirc.ui.swing.textpane.TextPane;
26
+import com.dmdirc.ui.swing.textpane.Line;
27 27
 import java.awt.Color;
28 28
 import java.awt.font.TextAttribute;
29 29
 import java.text.AttributedCharacterIterator;
@@ -57,8 +57,8 @@ public class StyliserStylesTest {
57 57
         final DefaultStyledDocument doc = new DefaultStyledDocument();
58 58
         final StringBuilder builder = new StringBuilder();
59 59
         Styliser.addStyledString(doc, new String[]{input});
60
-        final AttributedCharacterIterator aci = 
61
-                TextPane.styledDocumentToAttributedString(doc).getIterator();        
60
+        final AttributedCharacterIterator aci = new Line(
61
+                new String[]{input, }).getStyled().getIterator();
62 62
          
63 63
         Map<AttributedCharacterIterator.Attribute, Object> map = null;
64 64
         char chr = aci.current();

Завантаження…
Відмінити
Зберегти