CodeFoldingState (@NotNull Editor editor) { ThreadingAssertions.assertEventDispatchThread(); DocumentFoldingInfo info = getDocumentFoldingInfo(editor.getDocument()); if (isFoldingsInitializedInEditor(editor)) { info.loadFromEditor(editor); } return info; }