public class CodeStyleConfiguration extends Object
Modifier and Type | Method and Description |
---|---|
static ImportRewrite |
createImportRewrite(CompilationUnit astRoot,
boolean restoreExistingImports)
Returns a
ImportRewrite using ImportRewrite.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 a
ImportRewrite using ImportRewrite.create(ICompilationUnit, boolean) and
configures the rewriter with the settings as specified in the JDT UI preferences. |
public static ImportRewrite createImportRewrite(ICompilationUnit cu, boolean restoreExistingImports) throws JavaModelException
ImportRewrite
using ImportRewrite.create(ICompilationUnit, boolean)
and
configures the rewriter with the settings as specified in the JDT UI preferences.
cu
- the compilation unit to create the rewriter onrestoreExistingImports
- specifies if the existing imports should be kept or removed.JavaModelException
- thrown when the compilation unit could not be accessed.ImportRewrite.create(ICompilationUnit, boolean)
public static ImportRewrite createImportRewrite(CompilationUnit astRoot, boolean restoreExistingImports)
ImportRewrite
using ImportRewrite.create(CompilationUnit, boolean)
and
configures the rewriter with the settings as specified in the JDT UI preferences.astRoot
- the AST root to create the rewriter onrestoreExistingImports
- specifies if the existing imports should be kept or removed.ImportRewrite.create(CompilationUnit, boolean)
Copyright (c) IBM Corp. and others 2000, 2006. All Rights Reserved.