public class JavaCompletionProvider extends org.fife.ui.autocomplete.LanguageAwareCompletionProvider
EMPTY_STRING| 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<org.fife.ui.autocomplete.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<org.fife.ui.autocomplete.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 shorthand completion cache (template and comment completions).
|
clearParameterizedCompletionParams, getCommentCompletionProvider, getCompletionsImpl, getDefaultCompletionProvider, getDocCommentCompletionProvider, getParameterListEnd, getParameterListSeparator, getParameterListStart, getStringCompletionProvider, getToolTipText, isAutoActivateOkay, setCommentCompletionProvider, setDefaultCompletionProvider, setDocCommentCompletionProvider, setParameterizedCompletionParams, setStringCompletionProvidergetCompletions, getListCellRenderer, getParameterChoicesProvider, getParent, setAutoActivationRules, setListCellRenderer, setParameterChoicesProvider, setParentpublic 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)
getAlreadyEnteredText in interface org.fife.ui.autocomplete.CompletionProvidergetAlreadyEnteredText in class org.fife.ui.autocomplete.LanguageAwareCompletionProviderpublic CompilationUnit getCompilationUnit()
public java.util.List<org.fife.ui.autocomplete.Completion> getCompletionsAt(javax.swing.text.JTextComponent tc, java.awt.Point p)
getCompletionsAt in interface org.fife.ui.autocomplete.CompletionProvidergetCompletionsAt in class org.fife.ui.autocomplete.LanguageAwareCompletionProviderpublic 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<org.fife.ui.autocomplete.ParameterizedCompletion> getParameterizedCompletions(javax.swing.text.JTextComponent tc)
getParameterizedCompletions in interface org.fife.ui.autocomplete.CompletionProvidergetParameterizedCompletions in class org.fife.ui.autocomplete.LanguageAwareCompletionProviderpublic 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)
cache - The cache to use.