Author: tfmorris Date: 2008-08-28 22:07:54-0700 New Revision: 15642 Modified: trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/ModelEventPumpMDRImpl.java
Log: Issue 4994: Turn off read-only veto checking for (metamodel) associations Modified: trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/ModelEventPumpMDRImpl.java Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/ModelEventPumpMDRImpl.java?view=diff&rev=15642&p1=trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/ModelEventPumpMDRImpl.java&p2=trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/ModelEventPumpMDRImpl.java&r1=15641&r2=15642 ============================================================================== --- trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/ModelEventPumpMDRImpl.java (original) +++ trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/ModelEventPumpMDRImpl.java 2008-08-28 22:07:54-0700 @@ -382,10 +382,13 @@ } } } else if (e instanceof AssociationEvent) { - RefObject element = ((AssociationEvent) e).getFixedElement(); - if (isReadOnly(element)) { - throw new VetoChangeException(element, element); - } + // TODO: association changes are too hard to check easily + // we don't know which end of the association is significant + // without checking the metamodel for navigability of the ends +// RefObject element = ((AssociationEvent) e).getFixedElement(); +// if (isReadOnly(element)) { +// throw new VetoChangeException(element, element); +// } } else if (e instanceof AttributeEvent) { RefObject element = (RefObject) ((AttributeEvent) e) .getSource(); @@ -813,11 +816,14 @@ names.put(typeName, new HashSet<String>()); } boolean added = names.get(typeName).add(propertyName); - if (!added) { - LOG.debug("Duplicate property name found - " + typeName + ":" - + propertyName); - } else { - LOG.debug("Added property name - " + typeName + ":" + propertyName); + if (LOG.isDebugEnabled()) { + if (!added) { + LOG.debug("Duplicate property name found - " + typeName + ":" + + propertyName); + } else { + LOG.debug("Added property name - " + typeName + ":" + + propertyName); + } } return added; } @@ -993,8 +999,10 @@ if (!list.contains(item)) { list.add(item); } else { - LOG.debug("Duplicate registration attempt for " + key + ":" - + subkeys + " Listener: " + item); + if (LOG.isDebugEnabled()) { + LOG.debug("Duplicate registration attempt for " + key + ":" + + subkeys + " Listener: " + item); + } } } } @@ -1037,9 +1045,11 @@ map.remove(key); return; } - if (!list.contains(item)) { - LOG.debug("Attempt to unregister non-existant registration" + key - + " Listener: " + item); + if (LOG.isDebugEnabled()) { + if (!list.contains(item)) { + LOG.debug("Attempt to unregister non-existant registration" + + key + " Listener: " + item); + } } while (list.contains(item)) { list.remove(item); --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
