org.eclipse.wst.jsdt.core.infer
Class ImportRewriteSupport
java.lang.Object
org.eclipse.wst.jsdt.core.infer.ImportRewriteSupport
public class ImportRewriteSupport
- extends java.lang.Object
Support for extending the automatic import insertion mechanisms
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.
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ImportRewriteSupport
public ImportRewriteSupport()
isImportMatchesType
public boolean isImportMatchesType()
- Returns:
- true if the import value matches a type name, false if the import value is a file path value
isRewriteExisting
public boolean isRewriteExisting()
- Returns:
- true if existing imports should be modified if necessary
getImportString
public java.lang.String getImportString(java.lang.String importName,
boolean isStatic,
java.lang.String lineDelim)
- Returns:
- the string which represents the import
getImportStartPosition
public int getImportStartPosition(JavaScriptUnit root)
- Find the starting position of an import when none already exist
- Returns:
- the starting position, -1 for default action