Listener for all changes in editor text

已回答

Hello,

I need to add listener to handle all (any) changes in Editor text.

Right now I added few listeners

<typedHandler implementation="EditorTextToBrowserTypedHandler"/>

<editorActionHandler action="EditorBackSpace"
implementationClass="EditorDeleteWriteActionHandler"
order="first"/>
<editorActionHandler action="EditorDelete"
implementationClass="EditorDeleteWriteActionHandler"
order="first"/>


But they don't handle different scenarios. For example, if user duplicate line in IDE using shortcuts or if user delete all line at once.

My goal to listen all changes with text and not when a file is saved (for example), but when a text is changed in an Editor.

Thanks in advance!

Alex.

评论操作 固定链接

com.intellij.openapi.editor.event.DocumentListener

0

请先登录再写评论。