Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
SimpleName newMethodName = invocation.getAST().newSimpleName(“setDisabled”);
astRewrite.set(invocation, MethodInvocation.NAME_PROPERTY, newMethodName, null);
BooleanLiteral booleanLiteral = (BooleanLiteral) invocation.arguments().get(0);
astRewrite.set(booleanLiteral, BooleanLiteral.BOOLEAN_VALUE_PROPERTY,
!booleanLiteral.booleanValue(), null);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment