void (@NotNull Project project, @NotNull Dialog dialog) { ThreadingAssertions.assertEventDispatchThread(); if (LOG.isDebugEnabled()) { LOG.debug("enterModal:" + dialog.getName() + " ; for project: " + project.getName()); } ourModalityStateMulticaster.getMulticaster().beforeModalityStateChanged(true, dialog); List<Dialog> modalEntitiesList = projectToModalEntities.computeIfAbsent(project, __->ContainerUtil.createLockFreeCopyOnWriteList()); modalEntitiesList.add(dialog); Stack<ModalityState> modalEntitiesStack = projectToModalEntitiesStack.computeIfAbsent(project, __->new Stack<>(ModalityState.nonModal())); modalEntitiesStack.push(new ModalityStateEx(ourModalEntities)); }