Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
### Fixed

- PluginException: Invalid PSI Element CsvFile when file is invalidated during annotation, intention actions, or inspection fixes
- IncorrectOperationException: parent CsvTableEditorSwing already disposed when async PsiTreeChangeListener registration completes

## 4.2.0 - Jan 26, 2026

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

public class CsvTableModelBase<T extends PsiFileHolder> implements CsvTableModel {
private final T myPsiFileHolder;
private volatile boolean myDisposed = false;

private int myCachedRowCount = -1;
private int myCachedColumnCount = -1;
Expand Down Expand Up @@ -55,7 +56,7 @@ protected void addPsiTreeChangeListener() {
.nonBlocking(this::getPsiFile)
.coalesceBy(this)
.finishOnUiThread(ModalityState.any(), pf -> {
if (pf == null) return;
if (pf == null || myDisposed) return;
PsiManager mgr = pf.getManager();
if (mgr == null) return;
mgr.addPsiTreeChangeListener(myPsiTreeChangeListener, myPsiFileHolder);
Expand All @@ -70,6 +71,7 @@ protected void addPsiTreeChangeListener() {

@Override
public void dispose() {
myDisposed = true;
CsvTableModel.super.dispose();
myPsiTreeUpdater.dispose();
}
Expand Down
Loading