- All Superinterfaces:
Prompt
- All Known Implementing Classes:
DefaultEditorPrompt
Interface for editor prompts.
An editor prompt opens an external editor for multi-line text input.
-
Method Summary
Modifier and TypeMethodDescriptiondefault booleanWhether to enable text wrapping in the editor.default StringGet the file extension to use for the temporary file.default StringGet the initial text to populate the editor with.default StringgetTitle()Get the title to display in the editor.default booleanWhether to show line numbers in the editor.Methods inherited from interface org.jline.prompt.Prompt
getFilter, getMessage, getName, getTransformer
-
Method Details
-
getInitialText
Get the initial text to populate the editor with.- Returns:
- the initial text, or null for empty
-
getFileExtension
Get the file extension to use for the temporary file. This can affect syntax highlighting in the editor.- Returns:
- the file extension (without dot), or null for .txt
-
getTitle
Get the title to display in the editor.- Returns:
- the editor title, or null for default
-
showLineNumbers
default boolean showLineNumbers()Whether to show line numbers in the editor.- Returns:
- true to show line numbers, false to hide
-
enableWrapping
default boolean enableWrapping()Whether to enable text wrapping in the editor.- Returns:
- true to enable wrapping, false to disable
-