Author: mvw
Date: 2014-09-14 08:35:44-0700
New Revision: 19951

Modified:
   trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/TabDiagram.java

Log:
Fix some association class related exceptions

Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/TabDiagram.java
Url: 
http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/TabDiagram.java?view=diff&pathrev=19951&r1=19950&r2=19951
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/TabDiagram.java        
(original)
+++ trunk/src/argouml-app/src/org/argouml/uml/diagram/ui/TabDiagram.java        
2014-09-14 08:35:44-0700
@@ -1,6 +1,6 @@
 /* $Id$
  *****************************************************************************
- * Copyright (c) 2009-2012 Contributors - see below
+ * Copyright (c) 2009-2014 Contributors - see below
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,9 +8,10 @@
  *
  * Contributors:
  *    tfmorris
+ *    Michiel van der Wulp
  *****************************************************************************
  *
- * Some portions of this file was previously release using the BSD License:
+ * Some portions of this file were previously released using the BSD License:
  */
 
 // Copyright (c) 1996-2008 The Regents of the University of California. All
@@ -432,8 +433,11 @@
                         || Model.getFacade().isAOperation(targets[i])) {
                     // Assuming the target is some model element.
                     Object container = 
Model.getFacade().getModelElementContainer(targets[i]);
-                    FigCompartmentBox theContainer =
-                        (FigCompartmentBox) manager.presentationFor(container);
+                    Fig tc = manager.presentationFor(container);
+                    if (tc instanceof FigAssociationClass) {
+                        tc = ((FigAssociationClass) tc).getAssociationClass();
+                    }
+                    FigCompartmentBox theContainer = (FigCompartmentBox) tc;
                     if (theContainer != null) {
                         for (FigCompartment fc : 
theContainer.getCompartments()) {
                             for (Object o : fc.getFigs()) {

------------------------------------------------------
http://argouml.tigris.org/ds/viewMessage.do?dsForumId=5905&dsMessageId=3088415

To unsubscribe from this discussion, e-mail: 
[[email protected]].

Reply via email to