svn commit: r13130 - trunk/src/model/src/org/argouml/model/Facade.java

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: tfmorris
Date: 2007-07-24 10:52:14-0700
New Revision: 13130

Modified:
   trunk/src/model/src/org/argouml/model/Facade.java

Log:
Update Javadoc for getModel().  No functional change.

Modified: trunk/src/model/src/org/argouml/model/Facade.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/model/src/org/argouml/model/Facade.java?view=diff&rev=13130&p1=trunk/src/model/src/org/argouml/model/Facade.java&p2=trunk/src/model/src/org/argouml/model/Facade.java&r1=13129&r2=13130
==============================================================================
--- trunk/src/model/src/org/argouml/model/Facade.java	(original)
+++ trunk/src/model/src/org/argouml/model/Facade.java	2007-07-24 10:52:14-0700
@@ -2005,12 +2005,24 @@
     Collection getSentMessages(Object handle);
 
     /**
-     * Get the Model of a ModelElement.
-     * If no containing Model can be found, the outermost
-     * containing ModelElement is returned (which could be
-     * the original element itself if it has no owner).
-     *
-     * @param handle to the model element.
+     * Get the containing Model of a ModelElement.
+     * <p>
+     * If no containing Model can be found, the outermost containing
+     * ModelElement is returned (which could be the original element itself if
+     * it has no owner).
+     * <p>
+     * TODO: This currently (MDR implementation) returns the innermost
+     * containing Model, but there are circumstances where it is used that
+     * really expect the outermost containing Model or root package (e.g. where
+     * it's being used to test if two elements are from disjoint namespace
+     * hierarchies). This probably needs to be split into two separate methods
+     * with different semantics. Note also that some code uses
+     * org.argouml.kernel.Project#getRoot() to navigate down from the top
+     * instead of up from the bottom. We need to use a consistent algorithm for
+     * this. - tfm 20070724
+     * 
+     * @param handle
+     *                to the model element.
      * @return model for the model element.
      */
     Object getModel(Object handle);
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.