I used Document.addDocumentListener to a a document listener.
I get the error
java.lang.IllegalStateException: Detected document modification from DocumentListener
The assertNotNestedModification method documentation explains we should not use document listeners to change the document which is what I was exactly trying to do.
If this does not work, then I'm wondering what is the proper way to do the following:
I have two virtual files. I need to change the text of the second file depending on the change of the text in first file, e.g. on key press.
Any idea how to do this?
Message was edited by: maida_vale
The two virtual files may represent the same file.