- All Superinterfaces:
BaseBuilder<EditorBuilder>
- All Known Implementing Classes:
DefaultEditorBuilder
Builder interface for editor prompts.
EditorBuilder extends BaseBuilder to provide a consistent fluent API
for creating editor prompts. The name() and message() methods are inherited
from BaseBuilder, ensuring API consistency across all prompt types.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionenableWrapping(boolean enableWrapping) Set whether to enable text wrapping.fileExtension(String fileExtension) Set the file extension for syntax highlighting.initialText(String initialText) Set the initial text for the editor.showLineNumbers(boolean showLineNumbers) Set whether to show line numbers.Set the title for the editor.Methods inherited from interface org.jline.prompt.BaseBuilder
addPrompt, filter, message, name, transformer
-
Method Details
-
initialText
Set the initial text for the editor.- Parameters:
initialText- the initial text- Returns:
- this builder
-
fileExtension
Set the file extension for syntax highlighting.- Parameters:
fileExtension- the file extension (without dot)- Returns:
- this builder
-
title
Set the title for the editor.- Parameters:
title- the editor title- Returns:
- this builder
-
showLineNumbers
Set whether to show line numbers.- Parameters:
showLineNumbers- true to show line numbers- Returns:
- this builder
-
enableWrapping
Set whether to enable text wrapping.- Parameters:
enableWrapping- true to enable wrapping- Returns:
- this builder
-