MavenProfileKind (@NotNull MavenProjectsManager projectsManager, Map<String, MavenProfileKind> profiles) { MavenExplicitProfiles explicitProfiles = projectsManager.getExplicitProfiles(); MavenProfileKind targetState = null; // all profiles should target to the same state for (Map.Entry<String, MavenProfileKind> profile : profiles.entrySet()) { MavenProfileKind profileTargetState = getTargetState(profile, explicitProfiles); if (targetState == null) { targetState = profileTargetState; } else if (!targetState.equals(profileTargetState)) { targetState = null; break; } } return targetState; }