[editor] IJPL-164636 Skip soft wrap force if project is already disposed

(cherry picked from commit a99d957ca0c17037350ca58e8dd97e213117f07a)

IJ-CR-167042

GitOrigin-RevId: dc32e2cd5a519830043135014f159bbc658b2e37
This commit is contained in:
Alexander Trushev
2025-06-24 20:03:36 +02:00
committed by intellij-monorepo-bot
parent 209308acbc
commit 1a296eb6a6

View File

@@ -166,6 +166,11 @@ public final class SoftWrapModelImpl extends InlayModel.SimpleAdapter
}
Project project = editor.getProject();
Document document = editor.getDocument();
if (project != null && project.isDisposed()) {
// TODO: investigate why it happens leading to IJPL-164636
editor.throwDisposalError("Editor " + editor + " is not disposed with project " + project);
return false;
}
if (project != null && PostprocessReformattingAspect.getInstance(project).isDocumentLocked(document)) {
// Disable checking for files in intermediate states - e.g., for files during refactoring.
return false;