# Uses of Class
org.eclipse.jdt.core.dom.rewrite.ImportRewrite

Packages that use ImportRewrite
Package
Description
org.eclipse.jdt.core.dom.rewrite
The Java DOM/AST rewrite is the set of classes that are used to make changes to an existing DOM/AST tree.
org.eclipse.jdt.core.manipulation
Application programming interface for the JDT core manipulation plug-in class.
org.eclipse.jdt.ui
Application programming interfaces for interaction with the Eclipse Java User Interface.
org.eclipse.jdt.ui.text.java.correction
Application programming interfaces for correction proposals.

## Uses of ImportRewrite in org.eclipse.jdt.core.dom.rewrite

Methods in org.eclipse.jdt.core.dom.rewrite that return ImportRewrite
Modifier and Type
Method
Description
`static ImportRewrite`
ImportRewrite.`create(CompilationUnit astRoot, boolean restoreExistingImports)`
Creates an `ImportRewrite` from an AST (`CompilationUnit`).
`static ImportRewrite`
ImportRewrite.`create(ICompilationUnit cu, boolean restoreExistingImports)`
Creates an `ImportRewrite` from an `ICompilationUnit`.

## Uses of ImportRewrite in org.eclipse.jdt.core.manipulation

Methods in org.eclipse.jdt.core.manipulation that return ImportRewrite
Modifier and Type
Method
Description
`static ImportRewrite`
CodeStyleConfiguration.`createImportRewrite(CompilationUnit astRoot, boolean restoreExistingImports)`
Returns a `ImportRewrite` using `create(CompilationUnit, boolean)` and configures the rewriter with the settings as specified in the JDT UI preferences.
`static ImportRewrite`
CodeStyleConfiguration.`createImportRewrite(ICompilationUnit cu, boolean restoreExistingImports)`
Returns a `ImportRewrite` using `create(ICompilationUnit, boolean)` and configures the rewriter with the settings as specified in the JDT UI preferences.

## Uses of ImportRewrite in org.eclipse.jdt.ui

Methods in org.eclipse.jdt.ui that return ImportRewrite
Modifier and Type
Method
Description
`static ImportRewrite`
CodeStyleConfiguration.`createImportRewrite(CompilationUnit astRoot, boolean restoreExistingImports)`
Returns a `ImportRewrite` using `create(CompilationUnit, boolean)` and configures the rewriter with the settings as specified in the JDT UI preferences.
`static ImportRewrite`
CodeStyleConfiguration.`createImportRewrite(ICompilationUnit cu, boolean restoreExistingImports)`
Returns a `ImportRewrite` using `create(ICompilationUnit, boolean)` and configures the rewriter with the settings as specified in the JDT UI preferences.

## Uses of ImportRewrite in org.eclipse.jdt.ui.text.java.correction

Methods in org.eclipse.jdt.ui.text.java.correction that return ImportRewrite
Modifier and Type
Method
Description
`ImportRewrite`
ASTRewriteCorrectionProposal.`createImportRewrite(CompilationUnit astRoot)`
`ImportRewrite`
ASTRewriteCorrectionProposal.`getImportRewrite()`
Returns the import rewrite used for this compilation unit.
Methods in org.eclipse.jdt.ui.text.java.correction with parameters of type ImportRewrite
Modifier and Type
Method
Description
`void`
ASTRewriteCorrectionProposal.`setImportRewrite(ImportRewrite rewrite)`
Sets the import rewrite used for this compilation unit.