public class CodeStyleConfiguration extends Object
This class is not intended to be subclassed or instantiated by clients.
Modifier and Type | Field and Description |
---|---|
static String |
ORGIMPORTS_IMPORTORDER
A named preference that holds a list of semicolon separated package names.
|
static String |
ORGIMPORTS_ONDEMANDTHRESHOLD
A named preference that specifies the number of imports added before a star-import declaration is used.
|
static String |
ORGIMPORTS_STATIC_ONDEMANDTHRESHOLD
A named preference that specifies the number of static imports added before a star-import declaration is used.
|
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 final String ORGIMPORTS_IMPORTORDER
Value is of type String
: semicolon separated list of package
names
public static final String ORGIMPORTS_ONDEMANDTHRESHOLD
Value is of type Integer
: positive value specifying the number of non star-import is used
public static final String ORGIMPORTS_STATIC_ONDEMANDTHRESHOLD
Value is of type Integer
: positive value specifying the number of non star-import is used
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) 2000, 2018 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.