I am building a plugin that would open YAML files of specific suffix in a TextEditorWithPreview
. In the preview panel, I am rendering a visual representation of my bespoke YAML using JCEF. I am trying to make the preview re-render whenever the text in the editor panel is changed.
By studying MarkdownPreviewFileEditor, I have discovered that I should be using a DocumentListener
to subscribe to modifications to the file. However, what I am finding is that the events are not debounced and thus cause inordinate number of events to be fired from my plugin.
Can you guide me in the right direction here?
Thanks.