Class ShorthandCompletionCache
java.lang.Object
org.fife.rsta.ac.ShorthandCompletionCache
- Direct Known Subclasses:
JavaScriptShorthandCompletionCache, JavaShorthandCompletionCache
A cache to store completions for Template completions and Comment
completions. Template completions should extend
TemplateCompletion that uses parameterized variables/values.While template completion example:
while --> while(condition) {
//cursor here
}
Comment completion example:
null --> <code>null</code>This is really a convenient place to store these types of completions that are re-used.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionShorthandCompletionCache(org.fife.ui.autocomplete.AbstractCompletionProvider templateProvider, org.fife.ui.autocomplete.AbstractCompletionProvider commentProvider) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCommentCompletion(org.fife.ui.autocomplete.Completion completion) Adds a comment completion to this cache.voidaddShorthandCompletion(org.fife.ui.autocomplete.Completion completion) Adds a shorthand completion to this cache.private static voidaddSorted(List<org.fife.ui.autocomplete.Completion> list, org.fife.ui.autocomplete.Completion completion) voidRemoves all completions from this cache.List<org.fife.ui.autocomplete.Completion> org.fife.ui.autocomplete.AbstractCompletionProviderList<org.fife.ui.autocomplete.Completion> org.fife.ui.autocomplete.AbstractCompletionProvidervoidremoveCommentCompletion(org.fife.ui.autocomplete.Completion completion) Removes a specific comment completion from this cache.voidremoveShorthandCompletion(org.fife.ui.autocomplete.Completion completion) Removes a shorthand completion from this cache.
-
Field Details
-
shorthandCompletion
-
commentCompletion
-
templateProvider
private org.fife.ui.autocomplete.AbstractCompletionProvider templateProvider -
commentProvider
private org.fife.ui.autocomplete.AbstractCompletionProvider commentProvider
-
-
Constructor Details
-
ShorthandCompletionCache
public ShorthandCompletionCache(org.fife.ui.autocomplete.AbstractCompletionProvider templateProvider, org.fife.ui.autocomplete.AbstractCompletionProvider commentProvider)
-
-
Method Details
-
addShorthandCompletion
public void addShorthandCompletion(org.fife.ui.autocomplete.Completion completion) Adds a shorthand completion to this cache.- Parameters:
completion- The completion to add.- See Also:
-
addSorted
private static void addSorted(List<org.fife.ui.autocomplete.Completion> list, org.fife.ui.autocomplete.Completion completion) -
getShorthandCompletions
-
removeShorthandCompletion
public void removeShorthandCompletion(org.fife.ui.autocomplete.Completion completion) Removes a shorthand completion from this cache.- Parameters:
completion- The completion to remove.- See Also:
-
clearCache
public void clearCache()Removes all completions from this cache. -
addCommentCompletion
public void addCommentCompletion(org.fife.ui.autocomplete.Completion completion) Adds a comment completion to this cache.- Parameters:
completion- The completion to add.- See Also:
-
getCommentCompletions
-
removeCommentCompletion
public void removeCommentCompletion(org.fife.ui.autocomplete.Completion completion) Removes a specific comment completion from this cache.- Parameters:
completion- The completion to remove.- See Also:
-
getTemplateProvider
public org.fife.ui.autocomplete.AbstractCompletionProvider getTemplateProvider() -
getCommentProvider
public org.fife.ui.autocomplete.AbstractCompletionProvider getCommentProvider()
-