Interface Editor
- All Known Subinterfaces:
HttpRequestEditor
,HttpResponseEditor
,RawEditor
,WebSocketMessageEditor
public interface Editor
Provides the shared behavior between the different editor types.
-
Method Summary
Modifier and TypeMethodDescriptionint
boolean
This will returnOptional.empty()
if the user has not made a selection.void
setCaretPosition
(int position) Set the position of the caret within the current message editor.void
setSearchExpression
(String expression) Update the search expression that is shown in the search bar below the editor.
-
Method Details
-
setSearchExpression
Update the search expression that is shown in the search bar below the editor.- Parameters:
expression
- The search expression.
-
isModified
boolean isModified()- Returns:
- True if the user has modified the contents of the editor since the last time the content was set programmatically.
-
caretPosition
int caretPosition()- Returns:
- The index of the caret position within the current message editor.
-
setCaretPosition
void setCaretPosition(int position) Set the position of the caret within the current message editor.- Parameters:
position
- The index to set the caret position to.
-
selection
This will returnOptional.empty()
if the user has not made a selection.- Returns:
- An
Optional
containing the users current selection in the editor.
-
uiComponent
Component uiComponent()- Returns:
- UI component of the editor, for extensions to add to their own UI.
-