34480 scanned tasks race condition eliminated.
1.1 --- a/tasklist.docscan/build.xml Sat Nov 08 02:55:53 2003 +0000
1.2 +++ b/tasklist.docscan/build.xml Sat Nov 08 21:17:17 2003 +0000
1.3 @@ -26,7 +26,7 @@
1.4 <property name="license.file" value="${nb_all}/nbbuild/standard-nbm-license.txt"/>
1.5
1.6 <target name="compile">
1.7 - <javac srcdir="src" destdir="src" deprecation="${build.compiler.deprecation}" debug="${build.compiler.debug}">
1.8 + <javac srcdir="src" destdir="src" deprecation="${build.compiler.deprecation}" debug="${build.compiler.debug}" source="1.4">
1.9 <classpath>
1.10 <pathelement location="${nb_all}/openide/openide-13javac-workaround.jar"/>
1.11 <pathelement location="${nb_all}/openide/netbeans/lib/openide.jar"/>
2.1 --- a/tasklist.docscan/src/org/netbeans/modules/tasklist/docscan/SourceCodeCommentParser.java Sat Nov 08 02:55:53 2003 +0000
2.2 +++ b/tasklist.docscan/src/org/netbeans/modules/tasklist/docscan/SourceCodeCommentParser.java Sat Nov 08 21:17:17 2003 +0000
2.3 @@ -84,6 +84,9 @@
2.4 * Set the document to parse
2.5 * @param doc the document to parse
2.6 * @throws java.io.IOException if anything goes wrong...
2.7 + *
2.8 + * XXX not used however the idea is smart, do we really need
2.9 + * Document interface from the framework?
2.10 */
2.11 public void setDocument(File f) throws IOException {
2.12 parser.setDocument(f);
2.13 @@ -140,7 +143,7 @@
2.14 * @throws javax.swing.text.BadLocationException when....
2.15 */
2.16 public void setDocument(Document doc) throws BadLocationException {
2.17 - String text = doc.getText(0, doc.getLength());
2.18 + String text = DocumentUtil.extractString(doc);
2.19 this.doc = new BufferedReader(new StringReader(text));
2.20 lineno = 0;
2.21 rest = null;
3.1 --- a/tasklist.docscan/src/org/netbeans/modules/tasklist/docscan/SourceTaskProvider.java Sat Nov 08 02:55:53 2003 +0000
3.2 +++ b/tasklist.docscan/src/org/netbeans/modules/tasklist/docscan/SourceTaskProvider.java Sat Nov 08 21:17:17 2003 +0000
3.3 @@ -278,13 +278,7 @@
3.4 private List scanAll(Document doc, DataObject dobj) {
3.5 ArrayList newTasks = new ArrayList();
3.6
3.7 - String text = null;
3.8 - try {
3.9 - text = doc.getText(0, doc.getLength());
3.10 - } catch (BadLocationException e) {
3.11 - e.printStackTrace();
3.12 - return null;
3.13 - }
3.14 + String text = DocumentUtil.extractString(doc);
3.15
3.16 TaskTag matchTag = null;
3.17 try {