langtools/test/tools/javac/doctree/DocTreePathScannerTest.java
author akulyakh
Thu, 21 May 2015 11:41:04 -0700
changeset 30730 d3ce7619db2c
parent 27319 030080f03e4f
permissions -rw-r--r--
8076543: Add @modules as needed to the langtools tests Reviewed-by: jjg, shurailine
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
17549
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
     1
/*
30730
d3ce7619db2c 8076543: Add @modules as needed to the langtools tests
akulyakh
parents: 27319
diff changeset
     2
 * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
17549
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
     4
 *
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
     7
 * published by the Free Software Foundation.
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
     8
 *
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    13
 * accompanied this code).
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    14
 *
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    18
 *
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    21
 * questions.
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    22
 */
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    23
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    24
/*
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    25
 * @test
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    26
 * @bug 8009724
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    27
 * @summary adding DocTreePath and DocTreePathScanner
30730
d3ce7619db2c 8076543: Add @modules as needed to the langtools tests
akulyakh
parents: 27319
diff changeset
    28
 * @modules jdk.compiler/com.sun.tools.javac.api
d3ce7619db2c 8076543: Add @modules as needed to the langtools tests
akulyakh
parents: 27319
diff changeset
    29
 *          jdk.compiler/com.sun.tools.javac.file
17549
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    30
 */
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    31
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    32
import com.sun.source.doctree.DocCommentTree;
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    33
import com.sun.source.doctree.DocTree;
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    34
import com.sun.source.doctree.DocTree.Kind;
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    35
import com.sun.source.doctree.DocTreeVisitor;
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    36
import com.sun.source.tree.ClassTree;
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    37
import com.sun.source.tree.CompilationUnitTree;
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    38
import com.sun.source.tree.MethodTree;
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    39
import com.sun.source.tree.Tree;
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    40
import com.sun.source.tree.VariableTree;
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    41
import com.sun.source.util.DocTreePath;
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    42
import com.sun.source.util.DocTreePathScanner;
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    43
import com.sun.source.util.DocTreeScanner;
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    44
import com.sun.source.util.DocTrees;
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    45
import com.sun.source.util.JavacTask;
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    46
import com.sun.source.util.TreePath;
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    47
import com.sun.source.util.TreePathScanner;
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    48
import com.sun.tools.javac.api.JavacTool;
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    49
import java.io.File;
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    50
import java.util.ArrayList;
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    51
import java.util.List;
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    52
import javax.lang.model.element.Name;
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    53
import javax.tools.JavaFileObject;
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    54
import javax.tools.StandardJavaFileManager;
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    55
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    56
public class DocTreePathScannerTest {
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    57
    public static void main(String... args) throws Exception {
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    58
        DocTreePathScannerTest t = new DocTreePathScannerTest();
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    59
        t.run();
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    60
    }
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    61
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    62
    void run() throws Exception {
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    63
        List<File> files = new ArrayList<File>();
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    64
        File testSrc = new File(System.getProperty("test.src"));
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    65
        for (File f: testSrc.listFiles()) {
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    66
            if (f.isFile() && f.getName().endsWith(".java"))
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    67
                files.add(f);
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    68
        }
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    69
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    70
        JavacTool javac = JavacTool.create();
27319
030080f03e4f 8062348: langtools tests should close file manager (group 1)
jjg
parents: 17549
diff changeset
    71
        try (StandardJavaFileManager fm = javac.getStandardFileManager(null, null, null)) {
030080f03e4f 8062348: langtools tests should close file manager (group 1)
jjg
parents: 17549
diff changeset
    72
030080f03e4f 8062348: langtools tests should close file manager (group 1)
jjg
parents: 17549
diff changeset
    73
            Iterable<? extends JavaFileObject> fos = fm.getJavaFileObjectsFromFiles(files);
17549
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    74
27319
030080f03e4f 8062348: langtools tests should close file manager (group 1)
jjg
parents: 17549
diff changeset
    75
            JavacTask t = javac.getTask(null, fm, null, null, null, fos);
030080f03e4f 8062348: langtools tests should close file manager (group 1)
jjg
parents: 17549
diff changeset
    76
            DocTrees trees = DocTrees.instance(t);
17549
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    77
27319
030080f03e4f 8062348: langtools tests should close file manager (group 1)
jjg
parents: 17549
diff changeset
    78
            Iterable<? extends CompilationUnitTree> units = t.parse();
17549
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    79
27319
030080f03e4f 8062348: langtools tests should close file manager (group 1)
jjg
parents: 17549
diff changeset
    80
            DeclScanner ds = new DeclScanner(trees);
030080f03e4f 8062348: langtools tests should close file manager (group 1)
jjg
parents: 17549
diff changeset
    81
            for (CompilationUnitTree unit: units) {
030080f03e4f 8062348: langtools tests should close file manager (group 1)
jjg
parents: 17549
diff changeset
    82
                ds.scan(unit, null);
030080f03e4f 8062348: langtools tests should close file manager (group 1)
jjg
parents: 17549
diff changeset
    83
            }
17549
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    84
27319
030080f03e4f 8062348: langtools tests should close file manager (group 1)
jjg
parents: 17549
diff changeset
    85
            if (errors > 0)
030080f03e4f 8062348: langtools tests should close file manager (group 1)
jjg
parents: 17549
diff changeset
    86
                throw new Exception(errors + " errors occurred");
17549
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    87
        }
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    88
    }
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    89
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    90
    void error(String msg) {
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    91
        System.err.println("Error: " + msg);
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    92
        errors++;
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    93
    }
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    94
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    95
    int errors;
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    96
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    97
    class DeclScanner extends TreePathScanner<Void, Void> {
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    98
        DocTrees trees;
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
    99
        DocTreePathScanner<Void,Void> cs;
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
   100
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
   101
        DeclScanner(DocTrees trees) {
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
   102
            this.trees = trees;
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
   103
            cs = new CommentPathScanner();
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
   104
        }
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
   105
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
   106
        @Override
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
   107
        public Void visitClass(ClassTree tree, Void ignore) {
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
   108
            super.visitClass(tree, ignore);
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
   109
            visitDecl(tree, tree.getSimpleName());
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
   110
            return null;
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
   111
        }
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
   112
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
   113
        @Override
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
   114
        public Void visitMethod(MethodTree tree, Void ignore) {
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
   115
            super.visitMethod(tree, ignore);
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
   116
            visitDecl(tree, tree.getName());
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
   117
            return null;
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
   118
        }
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
   119
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
   120
        @Override
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
   121
        public Void visitVariable(VariableTree tree, Void ignore) {
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
   122
            super.visitVariable(tree, ignore);
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
   123
            visitDecl(tree, tree.getName());
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
   124
            return null;
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
   125
        }
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
   126
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
   127
        void visitDecl(Tree tree, Name name) {
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
   128
            TreePath path = getCurrentPath();
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
   129
            DocCommentTree dc = trees.getDocCommentTree(path);
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
   130
            if (dc != null)
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
   131
                cs.scan(new DocTreePath(path, dc), null);
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
   132
        }
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
   133
    }
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
   134
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
   135
    class CommentPathScanner extends DocTreePathScanner<Void, Void> {
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
   136
        CommentPathScanner() {}
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
   137
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
   138
        @Override
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
   139
        public Void scan(final DocTree tree, Void ignore) {
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
   140
            if (tree != null) {
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
   141
                DocTree previous = null;
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
   142
                for (DocTree current : getCurrentPath()) {
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
   143
                    if (previous != null) {
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
   144
                        final List<DocTree> children = new ArrayList<>();
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
   145
                        current.accept(new DocTreeScanner<Void, Void>() {
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
   146
                            @Override public Void scan(DocTree node, Void p) {
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
   147
                                children.add(node);
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
   148
                                return null;
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
   149
                            }
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
   150
                        }, null);
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
   151
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
   152
                        if (!children.contains(previous)) {
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
   153
                            error("Invalid DocTreePath for: " + tree);
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
   154
                        }
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
   155
                    }
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
   156
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
   157
                    previous = current;
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
   158
                }
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
   159
            }
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
   160
            return super.scan(tree, ignore);
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
   161
        }
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
   162
    }
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
   163
65ea6f3b72d9 8009724: Enhance the DocTree API with DocTreePath
jlahoda
parents:
diff changeset
   164
}