public class JavaCompletionProvider
extends LanguageAwareCompletionProvider
| Constructor and Description |
|---|
JavaCompletionProvider()
Constructor.
|
JavaCompletionProvider(JarManager jarManager)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addJar(LibraryInfo info)
Adds a jar to the "build path."
|
void |
clearJars()
Removes all jars from the "build path."
|
java.lang.String |
getAlreadyEnteredText(javax.swing.text.JTextComponent comp)
Defers to the source-analyzing completion provider.
|
CompilationUnit |
getCompilationUnit() |
java.util.List<Completion> |
getCompletionsAt(javax.swing.text.JTextComponent tc,
java.awt.Point p) |
java.util.List<LibraryInfo> |
getJars()
Returns the jars on the "build path."
|
java.util.List<ParameterizedCompletion> |
getParameterizedCompletions(javax.swing.text.JTextComponent tc) |
boolean |
removeJar(java.io.File jar)
Removes a jar from the "build path."
|
void |
setCompilationUnit(CompilationUnit cu) |
void |
setShorthandCompletionCache(ShorthandCompletionCache cache)
Set short hand completion cache (template and comment completions)
|
public JavaCompletionProvider()
public JavaCompletionProvider(JarManager jarManager)
jarManager - The jar manager to use when looking up completion
choices. This can be passed in to share a single jar manager
across multiple RSyntaxTextAreas. This may also be
null, in which case this completion provider will
have a unique JarManager.public void addJar(LibraryInfo info) throws java.io.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).java.io.IOException - If an IO error occurs.removeJar(File),
getJars()public void clearJars()
removeJar(File),
addJar(LibraryInfo),
getJars()public java.lang.String getAlreadyEnteredText(javax.swing.text.JTextComponent comp)
public CompilationUnit getCompilationUnit()
public java.util.List<Completion> getCompletionsAt(javax.swing.text.JTextComponent tc,
java.awt.Point p)
public java.util.List<LibraryInfo> getJars()
LibraryInfos. Modifying a
LibraryInfo in this list will have no effect on
this completion provider; in order to do that, you must re-add
the jar via addJar(LibraryInfo). If there are
no jars on the "build path," this will be an empty list.addJar(LibraryInfo)public java.util.List<ParameterizedCompletion> getParameterizedCompletions(javax.swing.text.JTextComponent tc)
public boolean removeJar(java.io.File jar)
jar - The jar to remove.false
if the jar was not on the build path.addJar(LibraryInfo)public void setCompilationUnit(CompilationUnit cu)
public void setShorthandCompletionCache(ShorthandCompletionCache cache)