Class BifTabProvider
java.lang.Object
ortus.boxlang.runtime.cli.providers.AbstractTabProvider
ortus.boxlang.runtime.cli.providers.BifTabProvider
- All Implemented Interfaces:
ITabProvider
Tab completion provider for BoxLang Built-in Functions (BIFs).
This provider handles completions for function calls in BoxLang code.
It matches against available BIF names from the runtime and provides
intelligent completion for function names.
Completion Examples:
- "arrayL" + TAB → completes to "arrayLen("
- "writeO" + TAB → completes to "writeOutput("
- "structK" + TAB → completes to "structKeyExists("
-
Field Summary
Fields inherited from class ortus.boxlang.runtime.cli.providers.AbstractTabProvider
ALPHABETICAL_SORTER, COMPONENT_PREFIX -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanProvideCompletions(String input, int cursorPosition) Can this provider handle completions for the given input? It handles function name completions when the current word starts with a letter and is not a component declaration (bx:).getCompletions(String input, int cursorPosition) Get completions for the given input at the cursor position.intReturns the priority of this provider (higher numbers = higher priority).Methods inherited from class ortus.boxlang.runtime.cli.providers.AbstractTabProvider
createCompletion, findPrefixIndex, findWordEnd, findWordStart, getCurrentWord, getTextAfterPrefix, hasWhitespaceAfterPrefix, isValidInput, isWordBoundary, isWordCharacter, sortCompletionsAlphabeticallyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ortus.boxlang.runtime.cli.providers.ITabProvider
getProviderName
-
Constructor Details
-
BifTabProvider
Constructor with BIF names.- Parameters:
bifNames- Set of available BIF names (case-insensitive)
-
-
Method Details
-
canProvideCompletions
Can this provider handle completions for the given input? It handles function name completions when the current word starts with a letter and is not a component declaration (bx:).- Parameters:
input- The input string to check.cursorPosition- The cursor position in the input.- Returns:
- true if this provider can provide completions.
-
getCompletions
Get completions for the given input at the cursor position.- Parameters:
input- The current input linecursorPosition- The position of the cursor in the input (0-based)- Returns:
- A list of completion suggestions, or empty list if none available
-
getPriority
public int getPriority()Description copied from interface:ITabProviderReturns the priority of this provider (higher numbers = higher priority). When multiple providers can handle the same input, the one with highest priority is used.- Returns:
- Priority value (default: 100)
-