Author: bobtarling Date: 2008-04-13 10:32:34-0700 New Revision: 14335 Modified: trunk/src/model-mdr/src/org/argouml/model/mdr/CoreFactoryMDRImpl.java
Log: Set the namespace to be the namespace as the 'from' classifier. This is typically the direction of drawing when created from diagram or the direction selected in the explorer context menu Modified: trunk/src/model-mdr/src/org/argouml/model/mdr/CoreFactoryMDRImpl.java Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/model-mdr/src/org/argouml/model/mdr/CoreFactoryMDRImpl.java?view=diff&rev=14335&p1=trunk/src/model-mdr/src/org/argouml/model/mdr/CoreFactoryMDRImpl.java&p2=trunk/src/model-mdr/src/org/argouml/model/mdr/CoreFactoryMDRImpl.java&r1=14334&r2=14335 ============================================================================== --- trunk/src/model-mdr/src/org/argouml/model/mdr/CoreFactoryMDRImpl.java (original) +++ trunk/src/model-mdr/src/org/argouml/model/mdr/CoreFactoryMDRImpl.java 2008-04-13 10:32:34-0700 @@ -461,15 +461,13 @@ AggregationKind agg2 = (AggregationKind) aggregationKind2; Namespace ns1 = from.getNamespace(); - Namespace ns2 = to.getNamespace(); - if (ns1 == null || ns2 == null) { - throw new IllegalArgumentException("one of " - + "the classifiers does not " + "belong to a namespace"); + if (ns1 == null) { + throw new IllegalArgumentException("The from " + + "classifiers does not " + "belong to a namespace"); } UmlAssociation assoc = createAssociation(); assoc.setName(""); - assoc.setNamespace((Namespace) modelImpl.getCoreHelper(). - getFirstSharedNamespace(ns1, ns2)); + assoc.setNamespace(ns1); boolean nav1 = true; boolean nav2 = true; @@ -1700,6 +1698,7 @@ * is the namespace. */ void deleteNamespace(Object elem) { + LOG.info("Deleting namespace " + elem); if (!(elem instanceof Namespace)) { throw new IllegalArgumentException("elem: " + elem); } @@ -1710,6 +1709,7 @@ // additional elements that need to be deleted as a result. ownedElements.addAll(((Namespace) elem).getOwnedElement()); for (ModelElement element : ownedElements) { + LOG.info("Deleting " + element); modelImpl.getUmlFactory().delete(element); } } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
