public interface TabOutScopesTracker
Modifier and Type | Method and Description |
---|---|
static TabOutScopesTracker |
getInstance() |
boolean |
hasScopeEndingAt(Editor editor,
int offset)
Checks whether given offset is at the end of tracked scope (so if caret is located at that offset, Tab key can be used to move out of
the scope).
|
default void |
registerEmptyScope(Editor editor,
int offset)
Registers a new scope (empty at the time of call) at the given offset.
|
void |
registerEmptyScope(Editor editor,
int offset,
int tabOutOffset)
Same as
registerEmptyScope(Editor, int) but allows to set custom caret shift on exiting the scope. |
default void |
registerEmptyScopeAtCaret(Editor editor)
Registers a new scope (empty at the time of call) at caret offset.
|
int |
removeScopeEndingAt(Editor editor,
int offset)
Removes a tracked scope (if any) ending at the given offset.
|
static TabOutScopesTracker getInstance()
default void registerEmptyScopeAtCaret(Editor editor)
default void registerEmptyScope(Editor editor, int offset)
void registerEmptyScope(Editor editor, int offset, int tabOutOffset)
registerEmptyScope(Editor, int)
but allows to set custom caret shift on exiting the scope. This is for the cases when scope suffix contains more than one character (e.g. a closing parenthesis and a semicolon).tabOutOffset
- position where caret should be moved when Tab is used to exit the scope (should be larger than offset
)boolean hasScopeEndingAt(Editor editor, int offset)
int removeScopeEndingAt(Editor editor, int offset)
hasScopeEndingAt(Editor, int)
,
registerEmptyScope(Editor, int, int)