boolean (@Nullable String globalPath, boolean overridden, @Nullable String projectPath) { if (myProjectPathCheckbox.isSelected() != overridden) return true; if (myProjectPathCheckbox.isSelected()) { return !Objects.equals(getCurrentPath(), projectPath); } else { return !Objects.equals(getCurrentPath(), globalPath); } }