Java org.eclipse.jdt.core.dom.rewrite ImportRewrite fields, constructors, methods, implement or subclass

Example usage for Java org.eclipse.jdt.core.dom.rewrite ImportRewrite fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.eclipse.jdt.core.dom.rewrite ImportRewrite.

The text is from its open source code.

Method

StringaddImport(ITypeBinding binding)
Adds a new import to the rewriter's record and returns a type reference that can be used in the code.
StringaddImport(String qualifiedTypeName)
Adds a new import to the rewriter's record and returns a type reference that can be used in the code.
StringaddImport(ITypeBinding binding, ImportRewriteContext context)
Adds a new import to the rewriter's record and returns a type reference that can be used in the code.
TypeaddImport(ITypeBinding binding, AST ast)
Adds a new import to the rewriter's record and returns a Type that can be used in the code.
StringaddImport(String qualifiedTypeName, ImportRewriteContext context)
Adds a new import to the rewriter's record and returns a type reference that can be used in the code.
TypeaddImportFromSignature(String typeSig, AST ast)
Adds a new import to the rewriter's record and returns a Type node that can be used in the code as a reference to the type.
StringaddStaticImport(IBinding binding)
Adds a new static import to the rewriter's record and returns a name - single member name if import is successful, else qualified name.
ImportRewritecreate(ICompilationUnit cu, boolean restoreExistingImports)
Creates an ImportRewrite from an ICompilationUnit .
ImportRewritecreate(CompilationUnit astRoot, boolean restoreExistingImports)
Creates an ImportRewrite from an AST ( CompilationUnit ).
String[]getAddedImports()
Returns all non-static imports that are recorded to be added.
String[]getAddedStaticImports()
Returns all static imports that are recorded to be added.
ICompilationUnitgetCompilationUnit()
The compilation unit for which this import rewrite was created for.
String[]getCreatedImports()
Returns all new non-static imports created by the last invocation of #rewriteImports(IProgressMonitor) or null if these methods have not been called yet.
String[]getCreatedStaticImports()
Returns all new static imports created by the last invocation of #rewriteImports(IProgressMonitor) or null if these methods have not been called yet.
booleanhasRecordedChanges()
Returns true if imports have been recorded to be added or removed.
booleanremoveImport(String qualifiedName)
Records to remove a import.
TextEditrewriteImports(IProgressMonitor monitor)
Converts all modifications recorded by this rewriter into an object representing the corresponding text edits to the source code of the rewrite's compilation unit.
voidsetImportOrder(String[] order)
Defines the import groups and order to be used by the ImportRewrite .
voidsetOnDemandImportThreshold(int threshold)
Sets the on-demand import threshold for normal (non-static) imports.
voidsetStaticOnDemandImportThreshold(int threshold)
Sets the on-demand import threshold for static imports.
voidsetUseContextToFilterImplicitImports(boolean useContextToFilterImplicitImports)
Sets whether a context should be used to properly filter implicit imports.