public final class DocumentEventUtil
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static int |
getMoveOffsetAfterDeletion(DocumentEvent e)
This method should be used instead of
DocumentEvent.getMoveOffset() to obtain a relevant move offset
corresponding to the document content when calling from the DocumentListener.documentChanged(com.intellij.openapi.editor.event.DocumentEvent) listener method
notifying about a move deletion . |
static int |
getMoveOffsetBeforeInsertion(DocumentEvent e)
This method should be used instead of
DocumentEvent.getMoveOffset() to obtain a relevant move offset
corresponding to the document content when calling from the DocumentListener.beforeDocumentChange(com.intellij.openapi.editor.event.DocumentEvent) listener method
notifying about a move insertion . |
static boolean |
isMoveDeletion(DocumentEvent e)
Tells whether the event notifies about a deletion that, together with a preceding insertion, makes up a text movement.
|
static boolean |
isMoveInsertion(DocumentEvent e)
Moving a text fragment using
DocumentEx.moveText(int, int, int) is accomplished by a combination of insertion and deletion. |
public static boolean isMoveInsertion(DocumentEvent e)
DocumentEx.moveText(int, int, int)
is accomplished by a combination of insertion and deletion.
This method tells whether the event notifies about an insertion that, together with a subsequent deletion, makes up the text movement.
A move insertion event is also the one during which all range markers contained in the text fragment being moved are evacuated to
their destination.public static boolean isMoveDeletion(DocumentEvent e)
public static int getMoveOffsetBeforeInsertion(DocumentEvent e)
DocumentEvent.getMoveOffset()
to obtain a relevant move offset
corresponding to the document content when calling from the DocumentListener.beforeDocumentChange(com.intellij.openapi.editor.event.DocumentEvent)
listener method
notifying about a move insertion
.public static int getMoveOffsetAfterDeletion(DocumentEvent e)
DocumentEvent.getMoveOffset()
to obtain a relevant move offset
corresponding to the document content when calling from the DocumentListener.documentChanged(com.intellij.openapi.editor.event.DocumentEvent)
listener method
notifying about a move deletion
.