svn commit: r16407 - trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/UMLClassDiagram.java

Bob Tarling <[email protected]>
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: bobtarling
Date: 2008-12-21 16:58:10-0800
New Revision: 16407

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

Log:
Spot an association before a class so that we create an association-class node when relevant rather than class node

Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/UMLClassDiagram.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/UMLClassDiagram.java?view=diff&pathrev=16407&r1=16406&r2=16407
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/UMLClassDiagram.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/UMLClassDiagram.java	2008-12-21 16:58:10-0800
@@ -665,7 +665,9 @@
 
         DiagramSettings settings = getDiagramSettings();
         
-        if (Model.getFacade().isAClass(droppedObject)) {
+        if (Model.getFacade().isAAssociation(droppedObject)) {
+            figNode = new FigNodeAssociation(gm, droppedObject);
+        } else if (Model.getFacade().isAClass(droppedObject)) {
             figNode = new FigClass(droppedObject, bounds, settings);
         } else if (Model.getFacade().isAInterface(droppedObject)) {
             figNode = new FigInterface(droppedObject, bounds, settings);
@@ -677,8 +679,6 @@
             figNode = new FigPackage(droppedObject, bounds, settings);
         } else if (Model.getFacade().isAComment(droppedObject)) {
             figNode = new FigComment(droppedObject, bounds, settings);
-        } else if (Model.getFacade().isAAssociation(droppedObject)) {
-            figNode = new FigNodeAssociation(gm, droppedObject);
         } else if (Model.getFacade().isAEnumeration(droppedObject)) {
             figNode = new FigEnumeration(gm, droppedObject);
         } else if (Model.getFacade().isADataType(droppedObject)) {

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

To unsubscribe from this discussion, e-mail: [[email protected]].
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.