boolean (@NotNull Project project, @NotNull InspectionProfileModifiableModel profile, @NotNull ToolDescriptors toolDescriptors) { Descriptor desc = toolDescriptors.getDefaultDescriptor(); if (profile.isToolEnabled(desc.getKey(), null, project) != desc.isEnabled()) { return true; } if (profile.getErrorLevel(desc.getKey(), desc.getScope(), project) != desc.getLevel()) { return true; } if (!Objects.equals(profile.getEditorAttributesKey(desc.getKey(), desc.getScope(), project), desc.getEditorAttributesKey())) { return true; } final List<Descriptor> descriptors = toolDescriptors.getNonDefaultDescriptors(); for (Descriptor descriptor : descriptors) { if (profile.isToolEnabled(descriptor.getKey(), descriptor.getScope(), project) != descriptor.isEnabled()) { return true; } if (profile.getErrorLevel(descriptor.getKey(), descriptor.getScope(), project) != descriptor.getLevel()) { return true; } if (!Objects.equals(profile.getEditorAttributesKey(descriptor.getKey(), descriptor.getScope(), project), descriptor.getEditorAttributesKey())) { return true; } } final List<ScopeToolState> tools = profile.getNonDefaultTools(desc.getKey().toString(), project); if (tools.size() != descriptors.size()) { return true; } for (int i = 0; i < tools.size(); i++) { final ScopeToolState pair = tools.get(i); if (!Comparing.equal(pair.getScope(project), descriptors.get(i).getScope())) { return true; } } return false; }