- java.lang.Object
-
- org.jline.prompt.impl.DefaultPrompt
-
- org.jline.prompt.impl.DefaultEditorPrompt
-
- All Implemented Interfaces:
EditorPrompt,Prompt
public class DefaultEditorPrompt extends DefaultPrompt implements EditorPrompt
Default implementation of EditorPrompt interface.
-
-
Field Summary
-
Fields inherited from class org.jline.prompt.impl.DefaultPrompt
message, name
-
-
Constructor Summary
Constructors Constructor Description DefaultEditorPrompt(java.lang.String name, java.lang.String message)DefaultEditorPrompt(java.lang.String name, java.lang.String message, java.lang.String initialText)DefaultEditorPrompt(java.lang.String name, java.lang.String message, java.lang.String initialText, java.lang.String fileExtension, java.lang.String title, boolean showLineNumbers, boolean enableWrapping)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanenableWrapping()Whether to enable text wrapping in the editor.java.lang.StringgetFileExtension()Get the file extension to use for the temporary file.java.lang.StringgetInitialText()Get the initial text to populate the editor with.java.lang.StringgetTitle()Get the title to display in the editor.booleanshowLineNumbers()Whether to show line numbers in the editor.-
Methods inherited from class org.jline.prompt.impl.DefaultPrompt
getFilter, getMessage, getName, getTransformer, setFilter, setTransformer
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jline.prompt.Prompt
getFilter, getMessage, getName, getTransformer
-
-
-
-
Constructor Detail
-
DefaultEditorPrompt
public DefaultEditorPrompt(java.lang.String name, java.lang.String message)
-
DefaultEditorPrompt
public DefaultEditorPrompt(java.lang.String name, java.lang.String message, java.lang.String initialText)
-
DefaultEditorPrompt
public DefaultEditorPrompt(java.lang.String name, java.lang.String message, java.lang.String initialText, java.lang.String fileExtension, java.lang.String title, boolean showLineNumbers, boolean enableWrapping)
-
-
Method Detail
-
getInitialText
public java.lang.String 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
public java.lang.String 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
public java.lang.String 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
-
-