svn commit: r17725 - trunk/src/argouml-app/src/org/argouml/uml/ui/ElementPropPanelFactory.java

Tom Morris <[email protected]>
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: tfmorris
Date: 2010-01-02 14:16:27-0800
New Revision: 17725

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

Log:
Fix mismatch with UML 2 type hierarchy

Modified: trunk/src/argouml-app/src/org/argouml/uml/ui/ElementPropPanelFactory.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/ui/ElementPropPanelFactory.java?view=diff&pathrev=17725&r1=17724&r2=17725
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/ui/ElementPropPanelFactory.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/uml/ui/ElementPropPanelFactory.java	2010-01-02 14:16:27-0800
@@ -1,4 +1,17 @@
-// $Id$
+/* $Id$
+ *******************************************************************************
+ * Copyright (c) 2010 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Michiel van der Wulp - initial implementation
+ *    <see source control change log for other early contributors>
+ *    
+ *******************************************************************************
+ */
 // Copyright (c) 2008, 2009 The Regents of the University of California. All
 // Rights Reserved. Permission to use, copy, modify, and distribute this
 // software and its documentation without fee, and without a written
@@ -120,6 +133,8 @@
 class ElementPropPanelFactory implements PropPanelFactory {
 
     public PropPanel createPropPanel(Object element) {
+        // TODO: This all needs to be reviewed for changes in type hierarchy
+        // for UML 2.x
         if (Model.getFacade().isAElement(element)) {
             // A Subsytem is a Classifier also, so it needs to come before
             // the classifier check
@@ -288,6 +303,7 @@
             if (Model.getFacade().isAAbstraction(element)) {
                 return new PropPanelAbstraction();
             } else if (Model.getFacade().isAPackageImport(element)) {
+                // Type hierarchy has changed for UML 2.x - no longer a Dependency
                 return new PropPanelPermission();
             } else if (Model.getFacade().isAUsage(element)) {
                 return new PropPanelUsage();
@@ -304,6 +320,8 @@
             return new PropPanelGeneralization();
         } else if (Model.getFacade().isAInclude(element)) {
             return new PropPanelInclude();
+        } else if (Model.getFacade().isAPackageImport(element)) {
+            return new PropPanelPermission();
         }
         throw new IllegalArgumentException("Unsupported Relationship type");
     }

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

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.