mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
EA-38977 - assert: FoldingModelImpl.expandFoldRegion
Don't update fold regions from thread over than EDT
This commit is contained in:
+12
-18
@@ -227,31 +227,25 @@ public class CodeFoldingManagerImpl extends CodeFoldingManager implements Projec
|
||||
if (runnable != null) {
|
||||
runnable.run();
|
||||
}
|
||||
|
||||
UIUtil.invokeLaterIfNeeded(new Runnable() {
|
||||
if (myProject.isDisposed() || editor.isDisposed()) return;
|
||||
foldingModel.runBatchFoldingOperation(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (myProject.isDisposed() || editor.isDisposed()) return;
|
||||
foldingModel.runBatchFoldingOperation(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
DocumentFoldingInfo documentFoldingInfo = getDocumentFoldingInfo(document);
|
||||
Editor[] editors = EditorFactory.getInstance().getEditors(document, myProject);
|
||||
for (Editor otherEditor : editors) {
|
||||
if (otherEditor == editor) continue;
|
||||
documentFoldingInfo.loadFromEditor(otherEditor);
|
||||
break;
|
||||
}
|
||||
documentFoldingInfo.setToEditor(editor);
|
||||
DocumentFoldingInfo documentFoldingInfo = getDocumentFoldingInfo(document);
|
||||
Editor[] editors = EditorFactory.getInstance().getEditors(document, myProject);
|
||||
for (Editor otherEditor : editors) {
|
||||
if (otherEditor == editor) continue;
|
||||
documentFoldingInfo.loadFromEditor(otherEditor);
|
||||
break;
|
||||
}
|
||||
documentFoldingInfo.setToEditor(editor);
|
||||
|
||||
documentFoldingInfo.clear();
|
||||
}
|
||||
});
|
||||
documentFoldingInfo.clear();
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
editor.getFoldingModel().runBatchFoldingOperationDoNotCollapseCaret(operation);
|
||||
UIUtil.invokeLaterIfNeeded(operation);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user