Created
August 14, 2015 12:32
-
-
Save anonymous/67480175a65d97a5f3df to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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