List of usage examples for org.eclipse.jdt.core.dom Comment delete
public final void delete()
From source file:org.whole.lang.java.JavaImportExportTests.java
License:Open Source License
@SuppressWarnings("unchecked") private boolean performTest(String source) throws Exception { CompilationUnit cu = JDTUtils.parseAsCompilationUnit(source); IEntity model = JDTTransformerVisitor.transform(source, cu); String newSource = PrettyPrinterOperation.toPrettyPrintString(model); CompilationUnit cuReparsed = JDTUtils.parseAsCompilationUnit(newSource); for (Comment element : (List<Comment>) cu.getCommentList()) element.delete(); boolean subtreeMatch = cu.subtreeMatch(new SemanticASTMatcher(), cuReparsed); return subtreeMatch; }