Java 类com.sun.source.tree.ErroneousTree 实例源码

项目:openjdk-jdk10    文件:JavacParserTest.java   
@Test
void testOperatorMissingError() throws IOException {

    String code = "package test; public class ErrorTest { "
            + "void method() { int x = y  z } }";
    CompilationUnitTree cut = getCompilationUnitTree(code);
    final List<String> values = new ArrayList<>();
    final List<String> expectedValues =
            new ArrayList<>(Arrays.asList("[z]"));

    new TreeScanner<Void, Void>() {
        @Override
        public Void visitErroneous(ErroneousTree node, Void p) {
            values.add(getErroneousTreeValues(node).toString());
            return null;

        }
    }.scan(cut, null);

    assertEquals("testOperatorMissingError: The Erroneous tree "
            + "error values: " + values
            + " do not match expected error values: "
            + expectedValues, values, expectedValues);
}
项目:openjdk-jdk10    文件:JavacParserTest.java   
@Test
void testMissingParenthesisError() throws IOException {

    String code = "package test; public class ErrorTest { "
            + "void f() {String s = new String; } }";
    CompilationUnitTree cut = getCompilationUnitTree(code);
    final List<String> values = new ArrayList<>();
    final List<String> expectedValues =
            new ArrayList<>(Arrays.asList("[new String()]"));

    new TreeScanner<Void, Void>() {
        @Override
        public Void visitErroneous(ErroneousTree node, Void p) {
            values.add(getErroneousTreeValues(node).toString());
            return null;
        }
    }.scan(cut, null);

    assertEquals("testMissingParenthesisError: The Erroneous tree "
            + "error values: " + values
            + " do not match expected error values: "
            + expectedValues, values, expectedValues);
}
项目:openjdk-jdk10    文件:JavacParserTest.java   
@Test
void testMissingClassError() throws IOException {

    String code = "package Test; clas ErrorTest {  "
            + "void f() {String s = new String(); } }";
    CompilationUnitTree cut = getCompilationUnitTree(code);
    final List<String> values = new ArrayList<>();
    final List<String> expectedValues =
            new ArrayList<>(Arrays.asList("[, clas]", "[]"));

    new TreeScanner<Void, Void>() {
        @Override
        public Void visitErroneous(ErroneousTree node, Void p) {
            values.add(getErroneousTreeValues(node).toString());
            return null;
        }
    }.scan(cut, null);

    assertEquals("testMissingClassError: The Erroneous tree "
            + "error values: " + values
            + " do not match expected error values: "
            + expectedValues, values, expectedValues);
}
项目:openjdk-jdk10    文件:JavacParserTest.java   
@Test
void testSwitchError() throws IOException {

    String code = "package test; public class ErrorTest { "
            + "int numDays; void m1(int i) { switchh {i} { case 1: "
            + "numDays = 31; break; } } }";
    CompilationUnitTree cut = getCompilationUnitTree(code);
    final List<String> values = new ArrayList<>();
    final List<String> expectedValues =
            new ArrayList<>(Arrays.asList("[switchh]", "[i]"));

    new TreeScanner<Void, Void>() {
        @Override
        public Void visitErroneous(ErroneousTree node, Void p) {
            values.add(getErroneousTreeValues(node).toString());
            return null;
        }
    }.scan(cut, null);

    assertEquals("testSwitchError: The Erroneous tree "
            + "error values: " + values
            + " do not match expected error values: "
            + expectedValues, values, expectedValues);
}
项目:openjdk-jdk10    文件:JavacParserTest.java   
@Test
void testMethodError() throws IOException {

    String code = "package Test; class ErrorTest {  "
            + "static final void f) {String s = new String(); } }";
    CompilationUnitTree cut = cut = getCompilationUnitTree(code);

    final List<String> values = new ArrayList<>();
    final List<String> expectedValues =
            new ArrayList<>(Arrays.asList("[\nstatic final void f();]"));

    new TreeScanner<Void, Void>() {
        @Override
        public Void visitErroneous(ErroneousTree node, Void p) {
            values.add(normalize(getErroneousTreeValues(node).toString()));
            return null;
        }
    }.scan(cut, null);

    assertEquals("testMethodError: The Erroneous tree "
            + "error value: " + values
            + " does not match expected error values: "
            + expectedValues, values, expectedValues);
}
项目:openjdk9    文件:JavacParserTest.java   
@Test
void testOperatorMissingError() throws IOException {

    String code = "package test; public class ErrorTest { "
            + "void method() { int x = y  z } }";
    CompilationUnitTree cut = getCompilationUnitTree(code);
    final List<String> values = new ArrayList<>();
    final List<String> expectedValues =
            new ArrayList<>(Arrays.asList("[z]"));

    new TreeScanner<Void, Void>() {
        @Override
        public Void visitErroneous(ErroneousTree node, Void p) {
            values.add(getErroneousTreeValues(node).toString());
            return null;

        }
    }.scan(cut, null);

    assertEquals("testSwitchError: The Erroneous tree "
            + "error values: " + values
            + " do not match expected error values: "
            + expectedValues, values, expectedValues);
}
项目:openjdk9    文件:JavacParserTest.java   
@Test
void testMissingParenthesisError() throws IOException {

    String code = "package test; public class ErrorTest { "
            + "void f() {String s = new String; } }";
    CompilationUnitTree cut = getCompilationUnitTree(code);
    final List<String> values = new ArrayList<>();
    final List<String> expectedValues =
            new ArrayList<>(Arrays.asList("[new String()]"));

    new TreeScanner<Void, Void>() {
        @Override
        public Void visitErroneous(ErroneousTree node, Void p) {
            values.add(getErroneousTreeValues(node).toString());
            return null;
        }
    }.scan(cut, null);

    assertEquals("testSwitchError: The Erroneous tree "
            + "error values: " + values
            + " do not match expected error values: "
            + expectedValues, values, expectedValues);
}
项目:openjdk9    文件:JavacParserTest.java   
@Test
void testMissingClassError() throws IOException {

    String code = "package Test; clas ErrorTest {  "
            + "void f() {String s = new String(); } }";
    CompilationUnitTree cut = getCompilationUnitTree(code);
    final List<String> values = new ArrayList<>();
    final List<String> expectedValues =
            new ArrayList<>(Arrays.asList("[, clas]", "[]"));

    new TreeScanner<Void, Void>() {
        @Override
        public Void visitErroneous(ErroneousTree node, Void p) {
            values.add(getErroneousTreeValues(node).toString());
            return null;
        }
    }.scan(cut, null);

    assertEquals("testSwitchError: The Erroneous tree "
            + "error values: " + values
            + " do not match expected error values: "
            + expectedValues, values, expectedValues);
}
项目:openjdk9    文件:JavacParserTest.java   
@Test
void testSwitchError() throws IOException {

    String code = "package test; public class ErrorTest { "
            + "int numDays; void m1(int i) { switchh {i} { case 1: "
            + "numDays = 31; break; } } }";
    CompilationUnitTree cut = getCompilationUnitTree(code);
    final List<String> values = new ArrayList<>();
    final List<String> expectedValues =
            new ArrayList<>(Arrays.asList("[switchh]", "[i]"));

    new TreeScanner<Void, Void>() {
        @Override
        public Void visitErroneous(ErroneousTree node, Void p) {
            values.add(getErroneousTreeValues(node).toString());
            return null;
        }
    }.scan(cut, null);

    assertEquals("testSwitchError: The Erroneous tree "
            + "error values: " + values
            + " do not match expected error values: "
            + expectedValues, values, expectedValues);
}
项目:openjdk9    文件:JavacParserTest.java   
@Test
void testMethodError() throws IOException {

    String code = "package Test; class ErrorTest {  "
            + "static final void f) {String s = new String(); } }";
    CompilationUnitTree cut = cut = getCompilationUnitTree(code);

    final List<String> values = new ArrayList<>();
    final List<String> expectedValues =
            new ArrayList<>(Arrays.asList("[\nstatic final void f();]"));

    new TreeScanner<Void, Void>() {
        @Override
        public Void visitErroneous(ErroneousTree node, Void p) {
            values.add(normalize(getErroneousTreeValues(node).toString()));
            return null;
        }
    }.scan(cut, null);

    assertEquals("testMethodError: The Erroneous tree "
            + "error value: " + values
            + " does not match expected error values: "
            + expectedValues, values, expectedValues);
}
项目:lookaside_java-1.8.0-openjdk    文件:JavacParserTest.java   
@Test
void testOperatorMissingError() throws IOException {

    String code = "package test; public class ErrorTest { "
            + "void method() { int x = y  z } }";
    CompilationUnitTree cut = getCompilationUnitTree(code);
    final List<String> values = new ArrayList<>();
    final List<String> expectedValues =
            new ArrayList<>(Arrays.asList("[z]"));

    new TreeScanner<Void, Void>() {
        @Override
        public Void visitErroneous(ErroneousTree node, Void p) {
            values.add(getErroneousTreeValues(node).toString());
            return null;

        }
    }.scan(cut, null);

    assertEquals("testSwitchError: The Erroneous tree "
            + "error values: " + values
            + " do not match expected error values: "
            + expectedValues, values, expectedValues);
}
项目:lookaside_java-1.8.0-openjdk    文件:JavacParserTest.java   
@Test
void testMissingParenthesisError() throws IOException {

    String code = "package test; public class ErrorTest { "
            + "void f() {String s = new String; } }";
    CompilationUnitTree cut = getCompilationUnitTree(code);
    final List<String> values = new ArrayList<>();
    final List<String> expectedValues =
            new ArrayList<>(Arrays.asList("[new String()]"));

    new TreeScanner<Void, Void>() {
        @Override
        public Void visitErroneous(ErroneousTree node, Void p) {
            values.add(getErroneousTreeValues(node).toString());
            return null;
        }
    }.scan(cut, null);

    assertEquals("testSwitchError: The Erroneous tree "
            + "error values: " + values
            + " do not match expected error values: "
            + expectedValues, values, expectedValues);
}
项目:lookaside_java-1.8.0-openjdk    文件:JavacParserTest.java   
@Test
void testMissingClassError() throws IOException {

    String code = "package Test; clas ErrorTest {  "
            + "void f() {String s = new String(); } }";
    CompilationUnitTree cut = getCompilationUnitTree(code);
    final List<String> values = new ArrayList<>();
    final List<String> expectedValues =
            new ArrayList<>(Arrays.asList("[, clas]", "[]"));

    new TreeScanner<Void, Void>() {
        @Override
        public Void visitErroneous(ErroneousTree node, Void p) {
            values.add(getErroneousTreeValues(node).toString());
            return null;
        }
    }.scan(cut, null);

    assertEquals("testSwitchError: The Erroneous tree "
            + "error values: " + values
            + " do not match expected error values: "
            + expectedValues, values, expectedValues);
}
项目:lookaside_java-1.8.0-openjdk    文件:JavacParserTest.java   
@Test
void testSwitchError() throws IOException {

    String code = "package test; public class ErrorTest { "
            + "int numDays; void m1(int i) { switchh {i} { case 1: "
            + "numDays = 31; break; } } }";
    CompilationUnitTree cut = getCompilationUnitTree(code);
    final List<String> values = new ArrayList<>();
    final List<String> expectedValues =
            new ArrayList<>(Arrays.asList("[switchh]", "[i]"));

    new TreeScanner<Void, Void>() {
        @Override
        public Void visitErroneous(ErroneousTree node, Void p) {
            values.add(getErroneousTreeValues(node).toString());
            return null;
        }
    }.scan(cut, null);

    assertEquals("testSwitchError: The Erroneous tree "
            + "error values: " + values
            + " do not match expected error values: "
            + expectedValues, values, expectedValues);
}
项目:lookaside_java-1.8.0-openjdk    文件:JavacParserTest.java   
@Test
void testMethodError() throws IOException {

    String code = "package Test; class ErrorTest {  "
            + "static final void f) {String s = new String(); } }";
    CompilationUnitTree cut = cut = getCompilationUnitTree(code);

    final List<String> values = new ArrayList<>();
    final List<String> expectedValues =
            new ArrayList<>(Arrays.asList("[\nstatic final void f();]"));

    new TreeScanner<Void, Void>() {
        @Override
        public Void visitErroneous(ErroneousTree node, Void p) {
            values.add(normalize(getErroneousTreeValues(node).toString()));
            return null;
        }
    }.scan(cut, null);

    assertEquals("testMethodError: The Erroneous tree "
            + "error value: " + values
            + " does not match expected error values: "
            + expectedValues, values, expectedValues);
}
项目:jsr308-langtools    文件:JavacParserTest.java   
@Test
void testOperatorMissingError() throws IOException {

    String code = "package test; public class ErrorTest { "
            + "void method() { int x = y  z } }";
    CompilationUnitTree cut = getCompilationUnitTree(code);
    final List<String> values = new ArrayList<>();
    final List<String> expectedValues =
            new ArrayList<>(Arrays.asList("[z]"));

    new TreeScanner<Void, Void>() {
        @Override
        public Void visitErroneous(ErroneousTree node, Void p) {
            values.add(getErroneousTreeValues(node).toString());
            return null;

        }
    }.scan(cut, null);

    assertEquals("testSwitchError: The Erroneous tree "
            + "error values: " + values
            + " do not match expected error values: "
            + expectedValues, values, expectedValues);
}
项目:jsr308-langtools    文件:JavacParserTest.java   
@Test
void testMissingParenthesisError() throws IOException {

    String code = "package test; public class ErrorTest { "
            + "void f() {String s = new String; } }";
    CompilationUnitTree cut = getCompilationUnitTree(code);
    final List<String> values = new ArrayList<>();
    final List<String> expectedValues =
            new ArrayList<>(Arrays.asList("[new String()]"));

    new TreeScanner<Void, Void>() {
        @Override
        public Void visitErroneous(ErroneousTree node, Void p) {
            values.add(getErroneousTreeValues(node).toString());
            return null;
        }
    }.scan(cut, null);

    assertEquals("testSwitchError: The Erroneous tree "
            + "error values: " + values
            + " do not match expected error values: "
            + expectedValues, values, expectedValues);
}
项目:jsr308-langtools    文件:JavacParserTest.java   
@Test
void testMissingClassError() throws IOException {

    String code = "package Test; clas ErrorTest {  "
            + "void f() {String s = new String(); } }";
    CompilationUnitTree cut = getCompilationUnitTree(code);
    final List<String> values = new ArrayList<>();
    final List<String> expectedValues =
            new ArrayList<>(Arrays.asList("[, clas]", "[]"));

    new TreeScanner<Void, Void>() {
        @Override
        public Void visitErroneous(ErroneousTree node, Void p) {
            values.add(getErroneousTreeValues(node).toString());
            return null;
        }
    }.scan(cut, null);

    assertEquals("testSwitchError: The Erroneous tree "
            + "error values: " + values
            + " do not match expected error values: "
            + expectedValues, values, expectedValues);
}
项目:jsr308-langtools    文件:JavacParserTest.java   
@Test
void testSwitchError() throws IOException {

    String code = "package test; public class ErrorTest { "
            + "int numDays; void m1(int i) { switchh {i} { case 1: "
            + "numDays = 31; break; } } }";
    CompilationUnitTree cut = getCompilationUnitTree(code);
    final List<String> values = new ArrayList<>();
    final List<String> expectedValues =
            new ArrayList<>(Arrays.asList("[switchh]", "[i]"));

    new TreeScanner<Void, Void>() {
        @Override
        public Void visitErroneous(ErroneousTree node, Void p) {
            values.add(getErroneousTreeValues(node).toString());
            return null;
        }
    }.scan(cut, null);

    assertEquals("testSwitchError: The Erroneous tree "
            + "error values: " + values
            + " do not match expected error values: "
            + expectedValues, values, expectedValues);
}
项目:jsr308-langtools    文件:JavacParserTest.java   
@Test
void testMethodError() throws IOException {

    String code = "package Test; class ErrorTest {  "
            + "static final void f) {String s = new String(); } }";
    CompilationUnitTree cut = cut = getCompilationUnitTree(code);

    final List<String> values = new ArrayList<>();
    final List<String> expectedValues =
            new ArrayList<>(Arrays.asList("[\nstatic final void f();]"));

    new TreeScanner<Void, Void>() {
        @Override
        public Void visitErroneous(ErroneousTree node, Void p) {
            values.add(normalize(getErroneousTreeValues(node).toString()));
            return null;
        }
    }.scan(cut, null);

    assertEquals("testMethodError: The Erroneous tree "
            + "error value: " + values
            + " does not match expected error values: "
            + expectedValues, values, expectedValues);
}
项目:infobip-open-jdk-8    文件:JavacParserTest.java   
@Test
void testOperatorMissingError() throws IOException {

    String code = "package test; public class ErrorTest { "
            + "void method() { int x = y  z } }";
    CompilationUnitTree cut = getCompilationUnitTree(code);
    final List<String> values = new ArrayList<>();
    final List<String> expectedValues =
            new ArrayList<>(Arrays.asList("[z]"));

    new TreeScanner<Void, Void>() {
        @Override
        public Void visitErroneous(ErroneousTree node, Void p) {
            values.add(getErroneousTreeValues(node).toString());
            return null;

        }
    }.scan(cut, null);

    assertEquals("testSwitchError: The Erroneous tree "
            + "error values: " + values
            + " do not match expected error values: "
            + expectedValues, values, expectedValues);
}
项目:infobip-open-jdk-8    文件:JavacParserTest.java   
@Test
void testMissingParenthesisError() throws IOException {

    String code = "package test; public class ErrorTest { "
            + "void f() {String s = new String; } }";
    CompilationUnitTree cut = getCompilationUnitTree(code);
    final List<String> values = new ArrayList<>();
    final List<String> expectedValues =
            new ArrayList<>(Arrays.asList("[new String()]"));

    new TreeScanner<Void, Void>() {
        @Override
        public Void visitErroneous(ErroneousTree node, Void p) {
            values.add(getErroneousTreeValues(node).toString());
            return null;
        }
    }.scan(cut, null);

    assertEquals("testSwitchError: The Erroneous tree "
            + "error values: " + values
            + " do not match expected error values: "
            + expectedValues, values, expectedValues);
}
项目:infobip-open-jdk-8    文件:JavacParserTest.java   
@Test
void testMissingClassError() throws IOException {

    String code = "package Test; clas ErrorTest {  "
            + "void f() {String s = new String(); } }";
    CompilationUnitTree cut = getCompilationUnitTree(code);
    final List<String> values = new ArrayList<>();
    final List<String> expectedValues =
            new ArrayList<>(Arrays.asList("[, clas]", "[]"));

    new TreeScanner<Void, Void>() {
        @Override
        public Void visitErroneous(ErroneousTree node, Void p) {
            values.add(getErroneousTreeValues(node).toString());
            return null;
        }
    }.scan(cut, null);

    assertEquals("testSwitchError: The Erroneous tree "
            + "error values: " + values
            + " do not match expected error values: "
            + expectedValues, values, expectedValues);
}
项目:infobip-open-jdk-8    文件:JavacParserTest.java   
@Test
void testSwitchError() throws IOException {

    String code = "package test; public class ErrorTest { "
            + "int numDays; void m1(int i) { switchh {i} { case 1: "
            + "numDays = 31; break; } } }";
    CompilationUnitTree cut = getCompilationUnitTree(code);
    final List<String> values = new ArrayList<>();
    final List<String> expectedValues =
            new ArrayList<>(Arrays.asList("[switchh]", "[i]"));

    new TreeScanner<Void, Void>() {
        @Override
        public Void visitErroneous(ErroneousTree node, Void p) {
            values.add(getErroneousTreeValues(node).toString());
            return null;
        }
    }.scan(cut, null);

    assertEquals("testSwitchError: The Erroneous tree "
            + "error values: " + values
            + " do not match expected error values: "
            + expectedValues, values, expectedValues);
}
项目:infobip-open-jdk-8    文件:JavacParserTest.java   
@Test
void testMethodError() throws IOException {

    String code = "package Test; class ErrorTest {  "
            + "static final void f) {String s = new String(); } }";
    CompilationUnitTree cut = cut = getCompilationUnitTree(code);

    final List<String> values = new ArrayList<>();
    final List<String> expectedValues =
            new ArrayList<>(Arrays.asList("[\nstatic final void f();]"));

    new TreeScanner<Void, Void>() {
        @Override
        public Void visitErroneous(ErroneousTree node, Void p) {
            values.add(normalize(getErroneousTreeValues(node).toString()));
            return null;
        }
    }.scan(cut, null);

    assertEquals("testMethodError: The Erroneous tree "
            + "error value: " + values
            + " does not match expected error values: "
            + expectedValues, values, expectedValues);
}
项目:OLD-OpenJDK8    文件:JavacParserTest.java   
@Test
void testOperatorMissingError() throws IOException {

    String code = "package test; public class ErrorTest { "
            + "void method() { int x = y  z } }";
    CompilationUnitTree cut = getCompilationUnitTree(code);
    final List<String> values = new ArrayList<>();
    final List<String> expectedValues =
            new ArrayList<>(Arrays.asList("[z]"));

    new TreeScanner<Void, Void>() {
        @Override
        public Void visitErroneous(ErroneousTree node, Void p) {
            values.add(getErroneousTreeValues(node).toString());
            return null;

        }
    }.scan(cut, null);

    assertEquals("testSwitchError: The Erroneous tree "
            + "error values: " + values
            + " do not match expected error values: "
            + expectedValues, values, expectedValues);
}
项目:OLD-OpenJDK8    文件:JavacParserTest.java   
@Test
void testMissingParenthesisError() throws IOException {

    String code = "package test; public class ErrorTest { "
            + "void f() {String s = new String; } }";
    CompilationUnitTree cut = getCompilationUnitTree(code);
    final List<String> values = new ArrayList<>();
    final List<String> expectedValues =
            new ArrayList<>(Arrays.asList("[new String()]"));

    new TreeScanner<Void, Void>() {
        @Override
        public Void visitErroneous(ErroneousTree node, Void p) {
            values.add(getErroneousTreeValues(node).toString());
            return null;
        }
    }.scan(cut, null);

    assertEquals("testSwitchError: The Erroneous tree "
            + "error values: " + values
            + " do not match expected error values: "
            + expectedValues, values, expectedValues);
}
项目:OLD-OpenJDK8    文件:JavacParserTest.java   
@Test
void testMissingClassError() throws IOException {

    String code = "package Test; clas ErrorTest {  "
            + "void f() {String s = new String(); } }";
    CompilationUnitTree cut = getCompilationUnitTree(code);
    final List<String> values = new ArrayList<>();
    final List<String> expectedValues =
            new ArrayList<>(Arrays.asList("[, clas]", "[]"));

    new TreeScanner<Void, Void>() {
        @Override
        public Void visitErroneous(ErroneousTree node, Void p) {
            values.add(getErroneousTreeValues(node).toString());
            return null;
        }
    }.scan(cut, null);

    assertEquals("testSwitchError: The Erroneous tree "
            + "error values: " + values
            + " do not match expected error values: "
            + expectedValues, values, expectedValues);
}
项目:OLD-OpenJDK8    文件:JavacParserTest.java   
@Test
void testSwitchError() throws IOException {

    String code = "package test; public class ErrorTest { "
            + "int numDays; void m1(int i) { switchh {i} { case 1: "
            + "numDays = 31; break; } } }";
    CompilationUnitTree cut = getCompilationUnitTree(code);
    final List<String> values = new ArrayList<>();
    final List<String> expectedValues =
            new ArrayList<>(Arrays.asList("[switchh]", "[i]"));

    new TreeScanner<Void, Void>() {
        @Override
        public Void visitErroneous(ErroneousTree node, Void p) {
            values.add(getErroneousTreeValues(node).toString());
            return null;
        }
    }.scan(cut, null);

    assertEquals("testSwitchError: The Erroneous tree "
            + "error values: " + values
            + " do not match expected error values: "
            + expectedValues, values, expectedValues);
}
项目:OLD-OpenJDK8    文件:JavacParserTest.java   
@Test
void testMethodError() throws IOException {

    String code = "package Test; class ErrorTest {  "
            + "static final void f) {String s = new String(); } }";
    CompilationUnitTree cut = cut = getCompilationUnitTree(code);

    final List<String> values = new ArrayList<>();
    final List<String> expectedValues =
            new ArrayList<>(Arrays.asList("[\nstatic final void f();]"));

    new TreeScanner<Void, Void>() {
        @Override
        public Void visitErroneous(ErroneousTree node, Void p) {
            values.add(normalize(getErroneousTreeValues(node).toString()));
            return null;
        }
    }.scan(cut, null);

    assertEquals("testMethodError: The Erroneous tree "
            + "error value: " + values
            + " does not match expected error values: "
            + expectedValues, values, expectedValues);
}
项目:incubator-netbeans    文件:TreeDuplicator.java   
@Override
public Tree visitErroneous(ErroneousTree tree, Void p) {
    ErroneousTree n = make.Erroneous(tree.getErrorTrees());
    model.setType(n, model.getType(tree));
    comments.copyComments(tree, n);
    model.setPos(n, model.getPos(tree));
    return n;
}
项目:incubator-netbeans    文件:TreeNode.java   
@Override
public Void visitErroneous(ErroneousTree tree, List<Node> d) {
    List<Node> below = new ArrayList<Node>();

    addCorrespondingType(below);
    addCorrespondingComments(below);
    scan(tree.getErrorTrees(), below);

    d.add(new TreeNode(info, getCurrentPath(), below));
    return null;
}
项目:openjdk-jdk10    文件:JavacParserTest.java   
List<String> getErroneousTreeValues(ErroneousTree node) {

        List<String> values = new ArrayList<>();
        if (node.getErrorTrees() != null) {
            for (Tree t : node.getErrorTrees()) {
                values.add(t.toString());
            }
        } else {
            throw new RuntimeException("ERROR: No Erroneous tree "
                    + "has been created.");
        }
        return values;
    }
项目:openjdk9    文件:JavacParserTest.java   
List<String> getErroneousTreeValues(ErroneousTree node) {

        List<String> values = new ArrayList<>();
        if (node.getErrorTrees() != null) {
            for (Tree t : node.getErrorTrees()) {
                values.add(t.toString());
            }
        } else {
            throw new RuntimeException("ERROR: No Erroneous tree "
                    + "has been created.");
        }
        return values;
    }
项目:lookaside_java-1.8.0-openjdk    文件:JavacParserTest.java   
List<String> getErroneousTreeValues(ErroneousTree node) {

        List<String> values = new ArrayList<>();
        if (node.getErrorTrees() != null) {
            for (Tree t : node.getErrorTrees()) {
                values.add(t.toString());
            }
        } else {
            throw new RuntimeException("ERROR: No Erroneous tree "
                    + "has been created.");
        }
        return values;
    }
项目:oblivion-netbeans-plugin    文件:TreeUtils.java   
public static Name createName(List<? extends ExpressionTree> names) {
    IdentifierTree identifier;
    List<CharSequence> identifierNameList = new ArrayList<>();
    for (ExpressionTree current : names) {
        if (current instanceof ErroneousTree) {
            break;
        }
        identifier = ((IdentifierTree) current);
        identifierNameList.add(identifier.getName());
    }
    return createNameFromString(String.join(DOT_SEPARATOR, identifierNameList),names);
}
项目:jsr308-langtools    文件:JavacParserTest.java   
List<String> getErroneousTreeValues(ErroneousTree node) {

        List<String> values = new ArrayList<>();
        if (node.getErrorTrees() != null) {
            for (Tree t : node.getErrorTrees()) {
                values.add(t.toString());
            }
        } else {
            throw new RuntimeException("ERROR: No Erroneous tree "
                    + "has been created.");
        }
        return values;
    }
项目:infobip-open-jdk-8    文件:JavacParserTest.java   
List<String> getErroneousTreeValues(ErroneousTree node) {

        List<String> values = new ArrayList<>();
        if (node.getErrorTrees() != null) {
            for (Tree t : node.getErrorTrees()) {
                values.add(t.toString());
            }
        } else {
            throw new RuntimeException("ERROR: No Erroneous tree "
                    + "has been created.");
        }
        return values;
    }
项目:OLD-OpenJDK8    文件:JavacParserTest.java   
List<String> getErroneousTreeValues(ErroneousTree node) {

        List<String> values = new ArrayList<>();
        if (node.getErrorTrees() != null) {
            for (Tree t : node.getErrorTrees()) {
                values.add(t.toString());
            }
        } else {
            throw new RuntimeException("ERROR: No Erroneous tree "
                    + "has been created.");
        }
        return values;
    }
项目:compile-testing    文件:TreeDiffer.java   
@Override
public Void visitErroneous(ErroneousTree expected, Tree actual) {
  Optional<ErroneousTree> other = checkTypeAndCast(expected, actual);
  if (!other.isPresent()) {
    addTypeMismatch(expected, actual);
    return null;
  }

  parallelScan(expected.getErrorTrees(), other.get().getErrorTrees());
  return null;
}