void (@Nullable Project project, boolean inDistractionFree) { if (project == null) return; boolean inPresentation = UISettings.getInstance().getPresentationMode(); log(String.format("Will restore tool windows for presentation=%b", inPresentation)); ToolWindowManagerEx manager = ToolWindowManagerEx.getInstanceEx(project); DesktopLayout restoreLayout = manager.getLayoutToRestoreLater(); if (shouldStoreOrRestoreToolWindowLayout(inPresentation, inDistractionFree) && restoreLayout != null) { manager.setLayout(restoreLayout); manager.setLayoutToRestoreLater(null); } }