-
- All Superinterfaces:
BaseBuilder<EditorBuilder>
- All Known Implementing Classes:
DefaultEditorBuilder
public interface EditorBuilder extends BaseBuilder<EditorBuilder>
Builder interface for editor prompts.EditorBuilder extends
BaseBuilderto 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:
BaseBuilder,EditorPrompt
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description EditorBuilderenableWrapping(boolean enableWrapping)Set whether to enable text wrapping.EditorBuilderfileExtension(java.lang.String fileExtension)Set the file extension for syntax highlighting.EditorBuilderinitialText(java.lang.String initialText)Set the initial text for the editor.EditorBuildershowLineNumbers(boolean showLineNumbers)Set whether to show line numbers.EditorBuildertitle(java.lang.String title)Set the title for the editor.-
Methods inherited from interface org.jline.prompt.BaseBuilder
addPrompt, filter, message, name, transformer
-
-
-
-
Method Detail
-
initialText
EditorBuilder initialText(java.lang.String initialText)
Set the initial text for the editor.- Parameters:
initialText- the initial text- Returns:
- this builder
-
fileExtension
EditorBuilder fileExtension(java.lang.String fileExtension)
Set the file extension for syntax highlighting.- Parameters:
fileExtension- the file extension (without dot)- Returns:
- this builder
-
title
EditorBuilder title(java.lang.String title)
Set the title for the editor.- Parameters:
title- the editor title- Returns:
- this builder
-
showLineNumbers
EditorBuilder showLineNumbers(boolean showLineNumbers)
Set whether to show line numbers.- Parameters:
showLineNumbers- true to show line numbers- Returns:
- this builder
-
enableWrapping
EditorBuilder enableWrapping(boolean enableWrapping)
Set whether to enable text wrapping.- Parameters:
enableWrapping- true to enable wrapping- Returns:
- this builder
-
-