boolean (@NotNull InspectionProfileModifiableModel candidateToDelete) { boolean projectProfileFound = false; boolean ideProfileFound = false; for (SingleInspectionProfilePanel profilePanel : myProfilePanels) { final InspectionProfileModifiableModel profile = profilePanel.getProfile(); if (candidateToDelete == profile) continue; final boolean isProjectProfile = profile.getProfileManager() == myProjectProfileManager; projectProfileFound |= isProjectProfile; ideProfileFound |= !isProjectProfile; if (ideProfileFound && projectProfileFound) break; } return candidateToDelete.getProfileManager() == myProjectProfileManager ? projectProfileFound : ideProfileFound; }