-
- All Superinterfaces:
Prompt
- All Known Implementing Classes:
DefaultEditorPrompt
public interface EditorPrompt extends Prompt
Interface for editor prompts. An editor prompt opens an external editor for multi-line text input.
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default booleanenableWrapping()Whether to enable text wrapping in the editor.default java.lang.StringgetFileExtension()Get the file extension to use for the temporary file.default java.lang.StringgetInitialText()Get the initial text to populate the editor with.default java.lang.StringgetTitle()Get the title to display in the editor.default booleanshowLineNumbers()Whether to show line numbers in the editor.-
Methods inherited from interface org.jline.prompt.Prompt
getFilter, getMessage, getName, getTransformer
-
-
-
-
Method Detail
-
getInitialText
default java.lang.String getInitialText()
Get the initial text to populate the editor with.- Returns:
- the initial text, or null for empty
-
getFileExtension
default java.lang.String 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
default java.lang.String 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
-
-