Package org.eclipse.jdt.ui
Class CodeStyleConfiguration
java.lang.Object
org.eclipse.jdt.ui.CodeStyleConfiguration
Gives access to the import rewrite configured with the settings as specified in the user interface.
These settings are kept in JDT UI for compatibility reasons.
This class is not intended to be subclassed or instantiated by clients.
- Since:
- 3.2
- Restriction:
- This class is not intended to be subclassed by clients.
- Restriction:
- This class is not intended to be instantiated by clients.
-
Method Summary
Modifier and TypeMethodDescriptionstatic ImportRewrite
createImportRewrite
(CompilationUnit astRoot, boolean restoreExistingImports) Returns aImportRewrite
usingImportRewrite.create(CompilationUnit, boolean)
and configures the rewriter with the settings as specified in the JDT UI preferences.static ImportRewrite
createImportRewrite
(ICompilationUnit cu, boolean restoreExistingImports) Returns aImportRewrite
usingImportRewrite.create(ICompilationUnit, boolean)
and configures the rewriter with the settings as specified in the JDT UI preferences.
-
Method Details
-
createImportRewrite
public static ImportRewrite createImportRewrite(ICompilationUnit cu, boolean restoreExistingImports) throws JavaModelException Returns aImportRewrite
usingImportRewrite.create(ICompilationUnit, boolean)
and configures the rewriter with the settings as specified in the JDT UI preferences.- Parameters:
cu
- the compilation unit to create the rewriter onrestoreExistingImports
- specifies if the existing imports should be kept or removed.- Returns:
- the new rewriter configured with the settings as specified in the JDT UI preferences.
- Throws:
JavaModelException
- thrown when the compilation unit could not be accessed.- See Also:
-
createImportRewrite
public static ImportRewrite createImportRewrite(CompilationUnit astRoot, boolean restoreExistingImports) Returns aImportRewrite
usingImportRewrite.create(CompilationUnit, boolean)
and configures the rewriter with the settings as specified in the JDT UI preferences.- Parameters:
astRoot
- the AST root to create the rewriter onrestoreExistingImports
- specifies if the existing imports should be kept or removed.- Returns:
- the new rewriter configured with the settings as specified in the JDT UI preferences.
- See Also:
-