/// <summary>
        /// Adds a model element in this model element
        /// </summary>
        /// <param name="copy"></param>
        public override void AddModelElement(Utils.IModelElement element)
        {
            {
                StructureElement item = element as StructureElement;
                if (item != null)
                {
                    appendElements(item);
                }
            }
            {
                Procedure item = element as Procedure;
                if (item != null)
                {
                    appendProcedures(item);
                }
            }
            {
                Rules.Rule item = element as Rules.Rule;
                if (item != null)
                {
                    appendRules(item);
                }
            }

            base.AddModelElement(element);
        }
 /// <summary>
 /// Constructor
 /// </summary>
 public MarkAsVerifiedVisitor(Utils.IModelElement element)
 {
     if (element is DataDictionary.ModelElement)
     {
         visit((DataDictionary.ModelElement)element);
         dispatch((DataDictionary.ModelElement)element);
     }
 }
            public override void visit(XmlBooster.IXmlBBase obj, bool visitSubNodes)
            {
                Utils.IModelElement element = obj as Utils.IModelElement;

                if (element != null)
                {
                    element.Messages.Clear();
                }
            }
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="name"></param>
        /// <param name="value"></param>
        public BaseTreeNode(Utils.IModelElement value, string name = null, bool isFolder = false)
            : base(name)
        {
            Model = value;

            if (name != null)
            {
                DefaultName = name;
            }

            setImageIndex(isFolder);
            RefreshNode();
        }
Example #5
0
 /// <summary>
 /// Selects the model element in all opened sub windows
 /// </summary>
 /// <param name="model"></param>
 /// <param name="getFocus">Indicates whether the focus should be given to the enclosing form</param>
 public void Select(Utils.IModelElement model, bool getFocus = false)
 {
     if (model != null)
     {
         foreach (IBaseForm form in SubWindows)
         {
             BaseTreeView treeView = form.TreeView;
             if (treeView != null)
             {
                 treeView.Select(model, getFocus);
             }
         }
     }
 }
        /// <summary>
        /// Adds a model element in this model element
        /// </summary>
        /// <param name="copy"></param>
        public override void AddModelElement(Utils.IModelElement element)
        {
            {
                Parameter item = element as Parameter;
                if (item != null)
                {
                    appendParameters(item);
                }
            }
            {
                Rules.Rule item = element as Rules.Rule;
                if (item != null)
                {
                    appendRules(item);
                }
            }

            base.AddModelElement(element);
        }
        /// <summary>
        /// Sets the image index for this node
        /// </summary>
        /// <param name="isFolder">Indicates whether this item represents a folder</param>
        protected virtual void setImageIndex(bool isFolder)
        {
            if (ImageIndex == -1)
            {
                // Image index not yet selected
                ImageIndex = BaseTreeView.ModelImageIndex;

                if (isFolder)
                {
                    ImageIndex = BaseTreeView.ClosedFolderImageIndex;
                }
                else
                {
                    Utils.IModelElement element = Model;
                    while (element != null && ImageIndex == BaseTreeView.ModelImageIndex)
                    {
                        element = element.Enclosing as IModelElement;
                        if (element is DataDictionary.Tests.Frame ||
                            element is DataDictionary.Tests.SubSequence ||
                            element is DataDictionary.Tests.TestCase ||
                            element is DataDictionary.Tests.Step)
                        {
                            ImageIndex = BaseTreeView.TestImageIndex;
                        }

                        if (element is DataDictionary.Specification.Specification ||
                            element is DataDictionary.Specification.Chapter ||
                            element is DataDictionary.Specification.Paragraph)
                        {
                            ImageIndex = BaseTreeView.RequirementImageIndex;
                        }
                    }
                }
            }

            SelectedImageIndex = ImageIndex;
        }
 /// <summary>
 /// Adds a model element in this model element
 /// </summary>
 /// <param name="copy"></param>
 public override void AddModelElement(Utils.IModelElement element)
 {
     {
         Types.NameSpace item = element as Types.NameSpace;
         if (item != null)
         {
             appendNameSpaces(item);
         }
     }
     {
         Rules.RuleDisabling item = element as Rules.RuleDisabling;
         if (item != null)
         {
             appendRuleDisablings(item);
         }
     }
     {
         Tests.Frame item = element as Tests.Frame;
         if (item != null)
         {
             appendTests(item);
         }
     }
 }