resource bundles: clear document history if editor provider is unloaded (IDEA-240659)

IDEA-CR-62584: fix current index to myChangePlaces

GitOrigin-RevId: 1e3528be9040085173b8eedb21b29f1140856786
This commit is contained in:
Anna Kozlova
2020-05-14 19:14:55 +00:00
committed by intellij-monorepo-bot
parent 3a2ce802e5
commit dc86b53928
@@ -166,7 +166,9 @@ public class IdeDocumentHistoryImpl extends IdeDocumentHistory implements Dispos
public void extensionRemoved(@NotNull FileEditorProvider provider, @NotNull PluginDescriptor pluginDescriptor) {
String editorTypeId = provider.getEditorTypeId();
Predicate<PlaceInfo> clearStatePredicate = e -> editorTypeId.equals(e.getEditorTypeId());
myChangePlaces.removeIf(clearStatePredicate);
if (myChangePlaces.removeIf(clearStatePredicate)) {
myCurrentIndex = myChangePlaces.size();
}
myBackPlaces.removeIf(clearStatePredicate);
myForwardPlaces.removeIf(clearStatePredicate);
}