I'm currently trying to build an editor for a simple test language using Swing components. I want to have a Swing table with all values from child nodes and a "Delete" button. I tried to build a custom table model for it where I get the values from the node, but I get the IDE exception "You can only read model inside of read action". Here are some screenshots of my code:
(The rest of the DailyTimeRecord editor - besides the Swing component - are remnants of the old implementation).
Do I need to refactor the TableModel so it will take a list of column values instead of the node itself? If so, how do I edit the node values when the table is edited? Or is it a completely wrong approach and I should use something entirely different?