From ebb87bee1eb6313344cfdcf5e36db4a5c6d1a220 Mon Sep 17 00:00:00 2001 From: Dmitry Batrak Date: Thu, 27 Jul 2017 19:40:19 +0300 Subject: [PATCH] fix order of folding-related code execution on editor disposal previously, relations between fold regions and PSI elements were cleaned before they could be used to extract folding state for save in EditorHistoryManager --- .../openapi/fileEditor/impl/text/PsiAwareTextEditorImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/lang-impl/src/com/intellij/openapi/fileEditor/impl/text/PsiAwareTextEditorImpl.java b/platform/lang-impl/src/com/intellij/openapi/fileEditor/impl/text/PsiAwareTextEditorImpl.java index 7ff9638a5932..5a29a62adfaf 100644 --- a/platform/lang-impl/src/com/intellij/openapi/fileEditor/impl/text/PsiAwareTextEditorImpl.java +++ b/platform/lang-impl/src/com/intellij/openapi/fileEditor/impl/text/PsiAwareTextEditorImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * Copyright 2000-2017 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -97,11 +97,11 @@ public class PsiAwareTextEditorImpl extends TextEditorImpl { @Override public void dispose() { + super.dispose(); CodeFoldingManager foldingManager = CodeFoldingManager.getInstance(myProject); if (foldingManager != null) { foldingManager.releaseFoldings(getEditor()); } - super.dispose(); } @Override