svn commit: r14526 - trunk/src/argouml-app/src/org/argouml/uml/ui/TabProps.java

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: bobtarling
Date: 2008-04-29 20:03:05-0700
New Revision: 14526

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

Log:
Show a default diagram panel if no specific panel is found

Modified: trunk/src/argouml-app/src/org/argouml/uml/ui/TabProps.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/ui/TabProps.java?view=diff&rev=14526&p1=trunk/src/argouml-app/src/org/argouml/uml/ui/TabProps.java&p2=trunk/src/argouml-app/src/org/argouml/uml/ui/TabProps.java&r1=14525&r2=14526
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/ui/TabProps.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/uml/ui/TabProps.java	2008-04-29 20:03:05-0700
@@ -399,8 +399,15 @@
             return new PropPanelUMLStateDiagram();
         } else if (diagram instanceof UMLUseCaseDiagram) {
             return new PropPanelUMLUseCaseDiagram();
+        } else {
+            // If we get here then presumably a plugin has provided a
+            // different diagram type. For now lets show something.
+            // TODO: It would be useful to be able to provide a
+            // PropPanelFactory from a plugin which can be called here
+            // in order to provide something more specific that the plugin
+            // requires.
+            return new PropPanelDiagram();
         }
-        throw new IllegalArgumentException("Unsupported diagram type");
     }
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.