New project empty script,
add two recordings, first plain text, second formatted text, save.

select formatted item double mouse click to open script:


Exception in thread "AWT-EventQueue-0" java.lang.IllegalStateException: Attempt to mutate in notification
	at java.desktop/javax.swing.text.AbstractDocument.writeLock(AbstractDocument.java:1349)
	at java.desktop/javax.swing.text.AbstractDocument.remove(AbstractDocument.java:590)
	at java.desktop/javax.swing.JEditorPane.setText(JEditorPane.java:1422)
	at ipsk.apps.speechrecorder.script.ui.PromptItemUI.propertyChange(PromptItemUI.java:1802)
	at java.desktop/java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:341)
	at java.desktop/java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:333)
	at ipsk.db.speech.Mediaitem.setText(Mediaitem.java:591)
	at ipsk.apps.speechrecorder.script.ui.BaseMediaitemUI.documentUpdate(BaseMediaitemUI.java:1459)
	at ipsk.apps.speechrecorder.script.ui.PromptItemUI.documentUpdate(PromptItemUI.java:1958)
	at ipsk.apps.speechrecorder.script.ui.PromptItemUI.removeUpdate(PromptItemUI.java:1969)
	at java.desktop/javax.swing.text.AbstractDocument.fireRemoveUpdate(AbstractDocument.java:261)
	at java.desktop/javax.swing.text.AbstractDocument.handleRemove(AbstractDocument.java:628)
	at java.desktop/javax.swing.text.AbstractDocument.remove(AbstractDocument.java:596)
	at java.desktop/javax.swing.JEditorPane.setText(JEditorPane.java:1422)
	at ipsk.apps.speechrecorder.script.ui.BaseMediaitemUI.initializeWidgets(BaseMediaitemUI.java:911)
	at ipsk.apps.speechrecorder.script.ui.PromptItemUI.initializeWidgets(PromptItemUI.java:674)
	at ipsk.apps.speechrecorder.script.ui.PromptItemUI.setPromptItem(PromptItemUI.java:508)
	at ipsk.apps.speechrecorder.script.ui.SectionUI.valueChanged(SectionUI.java:828)
	at java.desktop/javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:219)
	at java.desktop/javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:199)
	at java.desktop/javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:246)
	at java.desktop/javax.swing.DefaultListSelectionModel.changeSelection(DefaultListSelectionModel.java:443)
	at java.desktop/javax.swing.DefaultListSelectionModel.changeSelection(DefaultListSelectionModel.java:453)
	at java.desktop/javax.swing.DefaultListSelectionModel.setSelectionInterval(DefaultListSelectionModel.java:497)
	at java.desktop/javax.swing.JTable.setRowSelectionInterval(JTable.java:2173)
	at ipsk.apps.speechrecorder.script.ui.SectionUI.setTablePromptUnits(SectionUI.java:605)
	at ipsk.apps.speechrecorder.script.ui.SectionUI.setPromptItemsCopy(SectionUI.java:639)
	at ipsk.apps.speechrecorder.script.ui.SectionUI.setSection(SectionUI.java:663)
	at ipsk.apps.speechrecorder.script.ui.ScriptUI.valueChanged(ScriptUI.java:599)
	at java.desktop/javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:219)
	at java.desktop/javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:199)
	at java.desktop/javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:246)
	at java.desktop/javax.swing.DefaultListSelectionModel.changeSelection(DefaultListSelectionModel.java:443)
	at java.desktop/javax.swing.DefaultListSelectionModel.changeSelection(DefaultListSelectionModel.java:453)
	at java.desktop/javax.swing.DefaultListSelectionModel.setSelectionInterval(DefaultListSelectionModel.java:497)
	at java.desktop/javax.swing.JTable.setRowSelectionInterval(JTable.java:2173)
	at ipsk.apps.speechrecorder.script.ui.ScriptUI.setTableSections(ScriptUI.java:534)
	at ipsk.apps.speechrecorder.script.ui.ScriptUI.setSectionsCopy(ScriptUI.java:551)
	at ipsk.apps.speechrecorder.script.ui.ScriptUI.setScript(ScriptUI.java:568)
	at ipsk.apps.speechrecorder.script.ui.ScriptUIDialog.setScript(ScriptUIDialog.java:289)
	at ipsk.apps.speechrecorder.SpeechRecorderUI.doEditScript(SpeechRecorderUI.java:2424)
	at ipsk.apps.speechrecorder.actions.EditScriptAction.actionPerformed(EditScriptAction.java:48)
	at ipsk.apps.speechrecorder.ProgressViewer.editSelectedItem(ProgressViewer.java:229)
	at ipsk.apps.speechrecorder.ProgressViewer$1.mouseClicked(ProgressViewer.java:130)
	at java.desktop/java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:278)
	at java.desktop/java.awt.Component.processMouseEvent(Component.java:6635)
	at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3342)
	at java.desktop/java.awt.Component.processEvent(Component.java:6397)
	at java.desktop/java.awt.Container.processEvent(Container.java:2263)
	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5008)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4840)
	at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4918)
	at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4556)
	at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4488)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2307)
	at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2772)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4840)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:772)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:743)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException
	at ipsk.apps.speechrecorder.session.progress.ProgressManager.setRecIndex(ProgressManager.java:553)
	at ipsk.apps.speechrecorder.ProgressViewer.editSelectedItem(ProgressViewer.java:226)
	at ipsk.apps.speechrecorder.ProgressViewer$1.mouseClicked(ProgressViewer.java:130)
	at java.desktop/java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:278)
	at java.desktop/java.awt.Component.processMouseEvent(Component.java:6635)
	at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3342)
	at java.desktop/java.awt.Component.processEvent(Component.java:6397)
	at java.desktop/java.awt.Container.processEvent(Container.java:2263)
	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5008)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4840)
	at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4918)
	at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4556)
	at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4488)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2307)
	at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2772)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4840)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:772)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:743)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
	
	Fixed: DocumentListener was not always removed from plainTextDocument.
