void (@NotNull IdeFrameImpl tabFrame, @NotNull IdeFrameImpl target) { Foundation.executeOnMainThread(true, false, () -> { ID window = MacUtil.getWindowFromJavaWindow(target); ID tabGroup = Foundation.invoke(window, "tabGroup"); ID tab = MacUtil.getWindowFromJavaWindow(tabFrame); Foundation.invoke(tabGroup, "addWindow:", tab); Foundation.invoke(tabGroup, "setSelectedWindow:", tab); ApplicationManager.getApplication().invokeLater(() -> MacWinTabsHandlerV2.updateTabBarsAfterMove(tabFrame, target, -1)); }); }