Author: tfmorris
Date: 2008-04-15 21:22:22-0700
New Revision: 14364

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

Log:
Add getRoot and deprecate getModel.

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=14364&p1=trunk/src/model/src/org/argouml/model/Facade.java&p2=trunk/src/model/src/org/argouml/model/Facade.java&r1=14363&r2=14364
==============================================================================
--- trunk/src/model/src/org/argouml/model/Facade.java   (original)
+++ trunk/src/model/src/org/argouml/model/Facade.java   2008-04-15 21:22:22-0700
@@ -2055,10 +2055,24 @@
      * @param handle
      *                to the model element.
      * @return model for the model element.
+     * @deprecated for 0.25.4 by tfmorris. Use one of [EMAIL PROTECTED] 
#getRoot(Object)}
+     *             or ... (do we need another method which implements the old,
+     *             as-implemented semantics)
      */
     Object getModel(Object handle);
     
     /**
+     * Get the top level containing element, i.e. the element which has no
+     * owner.  For well-formed models, this will typically be a UML Package,
+     * often a Model.
+     * 
+     * @param handle
+     *                to the model element.
+     * @return the top level element.
+     */
+    Object getRoot(Object handle);
+    
+    /**
      * Return a collection of all Elements which have no owner (ie top level
      * elements).
      * <p>

Modified: trunk/src/model/src/org/argouml/model/ModelManagementFactory.java
Url: 
http://argouml.tigris.org/source/browse/argouml/trunk/src/model/src/org/argouml/model/ModelManagementFactory.java?view=diff&rev=14364&p1=trunk/src/model/src/org/argouml/model/ModelManagementFactory.java&p2=trunk/src/model/src/org/argouml/model/ModelManagementFactory.java&r1=14363&r2=14364
==============================================================================
--- trunk/src/model/src/org/argouml/model/ModelManagementFactory.java   
(original)
+++ trunk/src/model/src/org/argouml/model/ModelManagementFactory.java   
2008-04-15 21:22:22-0700
@@ -37,15 +37,24 @@
 
     /**
      * Sets the root model of the project.
-     *
-     * @param rootModel the new root model.
+     * 
+     * @param rootModel
+     *                the new root model.
+     * @deprecated for 0.25.4 by tfmorris. There may be multiple top level
+     *             packages which make up the model and the model subsystem 
also
+     *             needs to be able to deal with more than one project at a
+     *             time, so the concept of a single root model needs to be
+     *             dropped.
      */
     void setRootModel(Object rootModel);
 
     /**
      * Gets the root model of the project.
-     *
+     * 
      * @return the current root model.
+     * @deprecated for 0.25.4 by tfmorris. Use [EMAIL PROTECTED] 
Facade#getRootElements()}
+     *             for now, but that may need enhancement/change to accommodate
+     *             multiple projects.
      */
     Object getRootModel();
 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to