svn commit: r16190 - trunk/src/argouml-app/src/org/argouml/uml/diagram/DiagramFactory.java

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: tfmorris
Date: 2008-11-26 10:12:23-0800
New Revision: 16190

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

Log:
Find correct owner for old-style invocation with new style factory

Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/DiagramFactory.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/DiagramFactory.java?view=diff&rev=16190&p1=trunk/src/argouml-app/src/org/argouml/uml/diagram/DiagramFactory.java&p2=trunk/src/argouml-app/src/org/argouml/uml/diagram/DiagramFactory.java&r1=16189&r2=16190
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/diagram/DiagramFactory.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/uml/diagram/DiagramFactory.java	2008-11-26 10:12:23-0800
@@ -174,9 +174,15 @@
         
         Object factory = factories.get(type);
         if (factory != null) {
+            Object owner;
+            if (machine != null) {
+                owner = machine;
+            } else {
+                owner = namespace;
+            }
             if (factory instanceof DiagramFactoryInterface2) {
                 diagram = ((DiagramFactoryInterface2) factory).createDiagram(
-                        machine, (String) null, settings);
+                        owner, (String) null, settings);
             } else if (factory instanceof DiagramFactoryInterface) {
                 diagram = ((DiagramFactoryInterface) factory).createDiagram(
                         namespace, machine);
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.