Skip to content

Instantly share code, notes, and snippets.

Created August 14, 2015 12:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/4c6031980f736c3d9323 to your computer and use it in GitHub Desktop.
Save anonymous/4c6031980f736c3d9323 to your computer and use it in GitHub Desktop.
ASTNode replacement = astRewrite.createStringPlaceholder(
"// " + unsupportedStmt.toString().trim(), ASTNode.EMPTY_STATEMENT);
astRewrite.replace(unsupportedStmt, replacement, null);
ASTNode toDoComment = astRewrite.createStringPlaceholder(
"// TODO: Method is not supported any more.", ASTNode.EMPTY_STATEMENT);
astRewrite.getListRewrite(unsupportedStmt.getParent(), Block.STATEMENTS_PROPERTY)
.insertBefore(toDoComment, unsupportedStmt, null);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment