void () { ((AdvancedSettingsImpl) AdvancedSettings.getInstance()).setSetting(FileEditorManagerImpl.EDITOR_OPEN_INACTIVE_SPLITTER, false, getTestRootDisposable()); VirtualFile file = getFile("/src/1.txt"); VirtualFile file2 = getFile("/src/2.txt"); manager.openFile(file, false); EditorWindow primaryWindow = manager.getCurrentWindow(); assertNotNull(primaryWindow); manager.createSplitter(SwingConstants.VERTICAL, primaryWindow); EditorWindow secondaryWindow = manager.getNextWindow(primaryWindow); manager.openFileImpl2(secondaryWindow, file2, new FileEditorOpenOptions().withRequestFocus(true)); manager.closeFile(file, secondaryWindow); // with the changed setting, we want to open the file in the current splitter ( new OpenFileDescriptor(getProject(), file).setUseCurrentWindow(true).navigate(true); assertEquals(2, secondaryWindow.getTabCount()); }