public interface CodeBlockSupportHandler
if/elsif/else/end
).
Used to:
Modifier and Type | Field and Description |
---|---|
static LanguageExtension<CodeBlockSupportHandler> |
EP |
Modifier and Type | Method and Description |
---|---|
static TextRange |
findCodeBlockRange(Editor editor,
PsiFile psiFile)
Attempts to find code block range using extension points.
|
static java.util.List<TextRange> |
findMarkersRanges(PsiElement markerPsiElement) |
static java.util.List<TextRange> |
findMarkersRanges(PsiFile psiFile,
Language language,
int offset) |
java.util.List<TextRange> |
getCodeBlockMarkerRanges(PsiElement elementAtCursor)
Checks if code block marker (or keyword) is under cursor and collects related markers: e.g.
|
TextRange |
getCodeBlockRange(PsiElement elementAtCursor)
Checks if cursor is inside the block supported by this handler.
|
static final LanguageExtension<CodeBlockSupportHandler> EP
java.util.List<TextRange> getCodeBlockMarkerRanges(PsiElement elementAtCursor)
if
/elsif
/else
if cursor is on the else
from this compound statement.TextRange getCodeBlockRange(PsiElement elementAtCursor)
static TextRange findCodeBlockRange(Editor editor, PsiFile psiFile)
static java.util.List<TextRange> findMarkersRanges(PsiElement markerPsiElement)
markerPsiElement
is one of these markers.static java.util.List<TextRange> findMarkersRanges(PsiFile psiFile, Language language, int offset)
language
- language helps to use a proper psi subtree in case of multi-root psi treespsiFile
at offset
.findMarkersRanges(PsiElement)