boolean (Module[] modules) { if (!ProjectAttachProcessor.canAttachToProject()) { return !PlatformUtils.isIntelliJ(); } for (Module module : modules) { String moduleFile = module.getModuleFilePath(); Project project = module.getProject(); if (!ProjectKt.isDirectoryBased(project)) { continue; } Path ideaDir = ProjectKt.getStateStore(project).getDirectoryStorePath(); if (ideaDir != null && PathUtilRt.getParentPath(moduleFile).equals(FileUtil.toSystemIndependentName(ideaDir.toString()))) { return true; } } return false; }