public class CommentJoinLinesHandler extends java.lang.Object implements JoinRawLinesHandlerDelegate
CANNOT_JOIN, EP_NAME| Constructor and Description |
|---|
CommentJoinLinesHandler() |
| Modifier and Type | Method and Description |
|---|---|
int |
tryJoinLines(Document document,
PsiFile file,
int start,
int end)
Tries to join lines at the specified position of the specified file.
|
int |
tryJoinRawLines(Document document,
PsiFile file,
int start,
int end)
Tries to join lines at the specified position of the specified file.
|
public int tryJoinLines(Document document, PsiFile file, int start, int end)
JoinLinesHandlerDelegatetryJoinLines in interface JoinLinesHandlerDelegatedocument - where the lines arefile - where the lines arestart - offset where the whitespace between lines startsend - offset where the whitespace between lines endsJoinLinesHandlerDelegate.CANNOT_JOIN if this handler was not able
to perform the operation.public int tryJoinRawLines(Document document, PsiFile file, int start, int end)
JoinRawLinesHandlerDelegatetryJoinLines(), this method
is called on an unmodified document.
This joiner is allowed to keep number of lines the same, but it should not increase number of lines in the document.
It's possible that more than one line-break appears between start and end if several empty lines
were selected.
tryJoinRawLines in interface JoinRawLinesHandlerDelegatedocument - where the lines arefile - where the lines arestart - offset right after the last non-space char of first line;end - offset of first non-space char since the next line.