org.eclipse.wst.jsdt.ui

## Class CodeStyleConfiguration

- java.lang.Object
- - org.eclipse.wst.jsdt.ui.CodeStyleConfiguration

    public class CodeStyleConfiguration
    extends java.lang.Object

Provisional API: This class/interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.

### Method Summary

All Methods Static Methods Concrete Methods
`static ImportRewrite` `createImportRewrite(IJavaScriptUnit cu, boolean restoreExistingImports)` Returns a `ImportRewrite` using `ImportRewrite.create(IJavaScriptUnit, boolean)` and configures the rewriter with the settings as specified in the JDT UI preferences.
`static ImportRewrite` `createImportRewrite(JavaScriptUnit astRoot, boolean restoreExistingImports)` Returns a `ImportRewrite` using `ImportRewrite.create(JavaScriptUnit, boolean)` and configures the rewriter with the settings as specified in the JDT UI preferences.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Method Detail

#### createImportRewrite

    public static ImportRewrite createImportRewrite(IJavaScriptUnit cu,
                                                    boolean restoreExistingImports)
                                             throws JavaScriptModelException

Returns a `ImportRewrite` using `ImportRewrite.create(IJavaScriptUnit, boolean)` and configures the rewriter with the settings as specified in the JDT UI preferences.

Parameters:
  `cu` - the compilation unit to create the rewriter on
  `restoreExistingImports` - 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:
  `JavaScriptModelException` - thrown when the compilation unit could not be accessed.
See Also:
  `ImportRewrite.create(IJavaScriptUnit, boolean)`

#### createImportRewrite

    public static ImportRewrite createImportRewrite(JavaScriptUnit astRoot,
                                                    boolean restoreExistingImports)

Returns a `ImportRewrite` using `ImportRewrite.create(JavaScriptUnit, boolean)` and configures the rewriter with the settings as specified in the JDT UI preferences.

Parameters:
  `astRoot` - the AST root to create the rewriter on
  `restoreExistingImports` - 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:
  `ImportRewrite.create(JavaScriptUnit, boolean)`