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
This commit is contained in:
Dmitry Batrak
2017-07-27 20:12:09 +03:00
parent 35c3ab3e3d
commit ebb87bee1e
@@ -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