Ignore:
Timestamp:
Aug 27, 2010, 5:42:34 PM (11 years ago)
Author:
kopal
Message:
  • ModelElements like WorkspaceModel and PluginModel now have a Parent which also is a PluginModel or a WorkspaceModel
  • PluginModel now have a method to get all "children" (other PluginModels having this one as Parent)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/CrypPlugins/WorkspaceManager/Model/PluginModel.cs

    r1872 r1878  
    428428        }
    429429
     430        /// <summary>
     431        /// Get the children of this PluginModel by iterating through all PluginModels of
     432        /// the WorkSpace this PluginModel belongs to. All Plugins having this one as Parent
     433        /// are returned in this list
     434        /// </summary>
     435        /// <returns></returns>
     436        public List<PluginModel> getChildren()
     437        {
     438            List<PluginModel> children = new List<PluginModel>();
     439         
     440            foreach (PluginModel pluginModel in this.WorkspaceModel.AllPluginModels)
     441            {
     442                if (pluginModel.Parent == this)
     443                {
     444                    children.Add(pluginModel);
     445                }
     446            }           
     447            return children;
     448        }
     449
    430450        #endregion
    431451    }
Note: See TracChangeset for help on using the changeset viewer.