void (@NotNull VirtualFile file) { TestEditorTabGroup testEditorTabGroup = getActiveTabGroup(); String key = myActiveTabGroupName; if (!testEditorTabGroup.contains(file)) { for (Map.Entry<String, TestEditorTabGroup> next : myTabGroups.entrySet()) { key = next.getKey(); TestEditorTabGroup value = next.getValue(); if (value.contains(file)) { testEditorTabGroup = value; break; } } } testEditorTabGroup.closeTab(file); if (!Objects.equals(key, Default) && testEditorTabGroup.getTabCount() == 0) myTabGroups.remove(key); }