public class TabOutScopesTrackerImpl extends java.lang.Object implements TabOutScopesTracker
Constructor and Description |
---|
TabOutScopesTrackerImpl() |
Modifier and Type | Method and Description |
---|---|
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).
|
void |
registerEmptyScope(Editor editor,
int offset,
int tabOutOffset)
Same as
TabOutScopesTracker.registerEmptyScope(Editor, int) but allows to set custom caret shift on exiting the scope. |
int |
removeScopeEndingAt(Editor editor,
int offset)
Removes a tracked scope (if any) ending at the given offset.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getInstance, registerEmptyScope, registerEmptyScopeAtCaret
public void registerEmptyScope(Editor editor, int offset, int tabOutOffset)
TabOutScopesTracker
TabOutScopesTracker.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).registerEmptyScope
in interface TabOutScopesTracker
tabOutOffset
- position where caret should be moved when Tab is used to exit the scope (should be larger than offset
)public boolean hasScopeEndingAt(Editor editor, int offset)
TabOutScopesTracker
hasScopeEndingAt
in interface TabOutScopesTracker
public int removeScopeEndingAt(Editor editor, int offset)
TabOutScopesTracker
removeScopeEndingAt
in interface TabOutScopesTracker
TabOutScopesTracker.hasScopeEndingAt(Editor, int)
,
TabOutScopesTracker.registerEmptyScope(Editor, int, int)