private static void ProcessModelErrorChange(ModelHasError errorLink) { ModelError error = errorLink.Error; // Give the error itself a chance to have an indirect owner. // A ModelError can own itself. InvalidateIndirectErrorOwnerDisplay(error, null, null); DomainClassInfo classInfo = error.GetDomainClass(); ReadOnlyCollection <DomainRoleInfo> playedMetaRoles = classInfo.AllDomainRolesPlayed; int playedMetaRoleCount = playedMetaRoles.Count; for (int i = 0; i < playedMetaRoleCount; ++i) { DomainRoleInfo roleInfo = playedMetaRoles[i]; if (roleInfo.Id != ModelHasError.ErrorDomainRoleId) { LinkedElementCollection <ModelElement> rolePlayers = roleInfo.GetLinkedElements(error); int rolePlayerCount = rolePlayers.Count; for (int j = 0; j < rolePlayerCount; ++j) { ModelElement rolePlayer = rolePlayers[j]; InvalidateErrorOwnerDisplay(rolePlayer); InvalidateIndirectErrorOwnerDisplay(rolePlayer, null, null); } } } }