Example #1
0
        private EntityMethod CreateEntityMethod(XmlNode element)
        {
            EntityMethod method = new EntityMethod();

            if (element.Attributes["xmi:id"] != null)
            {
                method.Id = element.Attributes["xmi:id"].Value;
            }

            if (element.Attributes["name"] != null)
            {
                method.Name = element.Attributes["name"].Value;
            }

            if (element.Attributes["visibility"] != null)
            {
                method.MethodModifier += element.Attributes["visibility"].Value;
            }

            if (element.Attributes["isAbstract"] != null && XmiLoader.ParseBool(element.Attributes["isAbstract"]))
            {
                method.MethodModifier += " abstract";
            }

            if (element.Attributes["isStatic"] != null && element.Attributes["isStatic"].Value.CompareTo("static") == 0)
            {
                method.MethodModifier += " static";
            }

            return(method);
        }
Example #2
0
        private EntityClass CreateEntityClass(XmlNode element)
        {
            EntityClass entity = new EntityClass();

            entity.Project = Project;

            if (element.Attributes["xmi:id"] != null)
            {
                entity.Id = element.Attributes["xmi:id"].Value;
            }

            if (element.Attributes["name"] != null)
            {
                entity.Name = element.Attributes["name"].Value;
            }

            if (element.Attributes["visibility"] != null)
            {
                entity.Visibility = element.Attributes["visibility"].Value;
            }

            if (element.Attributes["isAbstract"] != null)
            {
                entity.IsAbstract = XmiLoader.ParseBool(element.Attributes["isAbstract"]);
            }

            return(entity);
        }