|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.fife.rsta.ac.java.JarManager
public class JarManager
Manages a list of jars and gets completions from them. This can be shared
amongst multiple JavaCompletionProvider instances.
| Constructor Summary | |
|---|---|
JarManager()
Constructor. |
|
| Method Summary | |
|---|---|
void |
addCompletions(CompletionProvider p,
String text,
Set addTo)
Adds completions matching the specified text to a list. |
boolean |
addJar(JarInfo info)
Adds a jar to read from. |
void |
clearJars()
Removes all jars from the "build path." |
static boolean |
getCheckModifiedDatestamps()
Returns whether the "last modified" time stamp on jars and class directories should be checked whenever completions are requested, and if the jar/directory has been modified since the last time, reload any cached class file data. |
ClassFile |
getClassEntry(String className)
|
List |
getClassesInPackage(String pkgName,
boolean inPkg)
|
List |
getClassesWithUnqualifiedName(String name,
List importDeclarations)
Returns a list of all classes/interfaces/enums with a given (unqualified) name. |
List |
getJars()
Returns the jars on the "build path." |
SortedMap |
getPackageEntry(String pkgName)
|
File |
getSourceLocForClass(String className)
|
boolean |
removeJar(File jar)
Removes a jar from the "build path." |
static void |
setCheckModifiedDatestamps(boolean check)
Sets whether the "last modified" time stamp on jars and class directories should be checked whenever completions are requested, and if the jar/directory has been modified since the last time, reload any cached class file data. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JarManager()
| Method Detail |
|---|
public void addCompletions(CompletionProvider p,
String text,
Set addTo)
p - The parent completion provider.text - The text to match.addTo - The list to add completion choices to.
public boolean addJar(JarInfo info)
throws IOException
info - The jar to add. If this is null, then
the current JVM's main JRE jar (rt.jar, or classes.jar on OS X)
will be added. If this jar has already been added, adding it
again will do nothing (except possibly update its attached source
location).
IOException - If an IO error occurs.getJars(),
removeJar(File)public void clearJars()
removeJar(File),
addJar(JarInfo),
getJars()public static boolean getCheckModifiedDatestamps()
check - Whether to check if any jars/directories have been
modified since the last access, and clear any cached completion
information if so.setCheckModifiedDatestamps(boolean)public ClassFile getClassEntry(String className)
public List getClassesWithUnqualifiedName(String name,
List importDeclarations)
name - The unqualified name of a type declaration.importDeclarations - The imports of the compilation unit, if any.
null if there are none.
public List getClassesInPackage(String pkgName,
boolean inPkg)
pkgName - A package name.
public List getJars()
JarInfos. Modifying a JarInfo in
this list will have no effect on this completion provider; in
order to do that, you must re-add the jar via
addJar(JarInfo). If there are no jars on the
"build path," this will be an empty list.addJar(JarInfo)public SortedMap getPackageEntry(String pkgName)
public File getSourceLocForClass(String className)
public boolean removeJar(File jar)
jar - The jar to remove.
false
if the jar was not on the build path.addJar(JarInfo),
getJars()public static void setCheckModifiedDatestamps(boolean check)
check - Whether to check if any jars/directories have been
modified since the last access, and clear any cached completion
information if so.getCheckModifiedDatestamps()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||