java.lang.Object
org.jline.prompt.impl.DefaultPrompt
org.jline.prompt.impl.DefaultEditorPrompt
- All Implemented Interfaces:
EditorPrompt,Prompt
Default implementation of EditorPrompt interface.
-
Field Summary
Fields inherited from class org.jline.prompt.impl.DefaultPrompt
message, name -
Constructor Summary
ConstructorsConstructorDescriptionDefaultEditorPrompt(String name, String message) DefaultEditorPrompt(String name, String message, String initialText) DefaultEditorPrompt(String name, String message, String initialText, String fileExtension, String title, boolean showLineNumbers, boolean enableWrapping) -
Method Summary
Modifier and TypeMethodDescriptionbooleanWhether to enable text wrapping in the editor.Get the file extension to use for the temporary file.Get the initial text to populate the editor with.getTitle()Get the title to display in the editor.booleanWhether to show line numbers in the editor.Methods inherited from class org.jline.prompt.impl.DefaultPrompt
getFilter, getMessage, getName, getTransformer, setFilter, setTransformerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jline.prompt.Prompt
getFilter, getMessage, getName, getTransformer
-
Constructor Details
-
DefaultEditorPrompt
-
DefaultEditorPrompt
-
DefaultEditorPrompt
-
-
Method Details
-
getInitialText
Description copied from interface:EditorPromptGet the initial text to populate the editor with.- Specified by:
getInitialTextin interfaceEditorPrompt- Returns:
- the initial text, or null for empty
-
getFileExtension
Description copied from interface:EditorPromptGet the file extension to use for the temporary file. This can affect syntax highlighting in the editor.- Specified by:
getFileExtensionin interfaceEditorPrompt- Returns:
- the file extension (without dot), or null for .txt
-
getTitle
Description copied from interface:EditorPromptGet the title to display in the editor.- Specified by:
getTitlein interfaceEditorPrompt- Returns:
- the editor title, or null for default
-
showLineNumbers
public boolean showLineNumbers()Description copied from interface:EditorPromptWhether to show line numbers in the editor.- Specified by:
showLineNumbersin interfaceEditorPrompt- Returns:
- true to show line numbers, false to hide
-
enableWrapping
public boolean enableWrapping()Description copied from interface:EditorPromptWhether to enable text wrapping in the editor.- Specified by:
enableWrappingin interfaceEditorPrompt- Returns:
- true to enable wrapping, false to disable
-