Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
ASTRewrite astRewrite = ASTRewrite.create(unit.getAST());
ImportRewrite importRewrite = ImportRewrite.create(unit, true);
AST ast = unit.getAST();
SimpleType targetType =
ast.newSimpleType(ast.newName(importRewrite.addImport(“FxTextfield”)));
astRewrite.replace(sourceTypeRef, targetType, null);
importRewrite.removeImport(“SwingTextfield”);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment