org.aspectj.org.eclipse.jdt.internal.core.dom.rewrite
Class ImportRewriteAnalyzer
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.core.dom.rewrite.ImportRewriteAnalyzer
public final class ImportRewriteAnalyzer
- extends java.lang.Object
|
Method Summary |
void |
addImport(java.lang.String fullTypeName,
boolean isStatic)
|
java.lang.String[] |
getCreatedImports()
|
java.lang.String[] |
getCreatedStaticImports()
|
MultiTextEdit |
getResultingEdits(IProgressMonitor monitor)
|
boolean |
removeImport(java.lang.String qualifiedName,
boolean isStatic)
|
void |
setFilterImplicitImports(boolean filterImplicitImports)
Specifies that implicit imports (for types in java.lang, types in the same package as the rewrite
compilation unit and types in the compilation unit's main type) should not be created, except if necessary to
resolve an on-demand import conflict. |
void |
setFindAmbiguousImports(boolean findAmbiguousImports)
When set searches for imports that can not be folded into on-demand
imports but must be specified explicitly |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ImportRewriteAnalyzer
public ImportRewriteAnalyzer(ICompilationUnit cu,
CompilationUnit root,
java.lang.String[] importOrder,
int threshold,
int staticThreshold,
boolean restoreExistingImports,
boolean useContextToFilterImplicitImports)
setFilterImplicitImports
public void setFilterImplicitImports(boolean filterImplicitImports)
- Specifies that implicit imports (for types in
java.lang, types in the same package as the rewrite
compilation unit and types in the compilation unit's main type) should not be created, except if necessary to
resolve an on-demand import conflict.
The filter is enabled by default.
Note: ImportRewriteAnalyzer(ICompilationUnit, CompilationUnit, String[], int, int, boolean, boolean) with true as the last
parameter can be used to filter implicit imports when a context is used.
- Parameters:
filterImplicitImports - if true, implicit imports will be filtered- See Also:
ImportRewriteAnalyzer(ICompilationUnit, CompilationUnit, String[], int, int, boolean, boolean)
setFindAmbiguousImports
public void setFindAmbiguousImports(boolean findAmbiguousImports)
- When set searches for imports that can not be folded into on-demand
imports but must be specified explicitly
- Parameters:
findAmbiguousImports - The new value
addImport
public void addImport(java.lang.String fullTypeName,
boolean isStatic)
removeImport
public boolean removeImport(java.lang.String qualifiedName,
boolean isStatic)
getResultingEdits
public MultiTextEdit getResultingEdits(IProgressMonitor monitor)
throws JavaModelException
- Throws:
JavaModelException
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
getCreatedImports
public java.lang.String[] getCreatedImports()
getCreatedStaticImports
public java.lang.String[] getCreatedStaticImports()