Пример #1
0
        /// <summary>
        /// 実装Javaファイルリンクのクリックイベント
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void ImplFileLinkLabelLinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            ElementReferenceVO elemref = (ElementReferenceVO)((LinkLabel)sender).Tag;

            //Javaファイルをエディタで開く
            System.Diagnostics.Process p =
                System.Diagnostics.Process.Start(elemref.genfile);
        }
Пример #2
0
        /// <summary>
        /// elementタグの出力処理
        /// </summary>
        /// <param name="elemvo">要素VO</param>
        /// <param name="depth">深さ</param>
        /// <param name="sw">出力用に開かれたStreamWriter</param>
        private static void outputElementPropertyXml(ElementVO elemvo, int depth, StreamWriter sw)
        {
            sw.Write(indent(depth) + "<element ");
            if (elemvo.changed != ' ')
            {
                sw.Write("changed=\"" + elemvo.changed + "\" ");
                if (elemvo.propertyChanged != ' ')
                {
                    sw.Write("propChanged=\"" + elemvo.propertyChanged + "\" ");
                }
            }
            sw.Write("guid=\"" + escapeXML(elemvo.guid) + "\" ");
            sw.Write("tpos=\"" + elemvo.treePos + "\" ");
            sw.Write("type=\"" + elemvo.eaType + "\" ");
            sw.Write("name=\"" + escapeXML(elemvo.name) + "\" ");
            sw.Write("alias=\"" + escapeXML(elemvo.alias) + "\" ");
            sw.Write("elementId=\"" + elemvo.elementId + "\" ");
            sw.Write("parentId=\"" + elemvo.parentID + "\"");

            if (elemvo.stereoType != null)
            {
                sw.Write(" stereotype=\"" + elemvo.stereoType + "\"");
            }
            sw.WriteLine(">");

            ElementReferenceVO elemref = elemvo.elementReferenceVO;

            if (elemref != null)
            {
                sw.Write(indent(depth + 1) + "<ref ");
                sw.Write("gentype=\"" + escapeXML(elemref.gentype) + "\" ");
                sw.Write("fqcn=\"" + escapeXML(elemref.fqcn) + "\" ");
                sw.Write("genfile=\"" + escapeXML(elemref.genfile) + "\"");
                sw.WriteLine("/>");
            }

            // ノートが入っていたら notes タグを出力
            if (elemvo.notes != null)
            {
                sw.WriteLine(indent(depth + 1) + "<notes>" + escapeXML(elemvo.notes) + "</notes>");
            }

            if (elemvo.propertyChanged == 'U' && elemvo.srcElementProperty != null && elemvo.destElementProperty != null)
            {
                depth++;

                // srcElementProperty を出力
                sw.WriteLine(indent(depth) + "<srcElementProperty>");
                outputElementDiffedProperty(elemvo.srcElementProperty, depth + 1, sw);
                sw.WriteLine(indent(depth) + "</srcElementProperty>");

                // destElementProperty を出力
                sw.WriteLine(indent(depth) + "<destElementProperty>");
                outputElementDiffedProperty(elemvo.destElementProperty, depth + 1, sw);
                sw.WriteLine(indent(depth) + "</destElementProperty>");
            }
        }
        private static ElementReferenceVO getElementRefFromEAObject(EA.Element eaElementObj)
        {
            ElementReferenceVO outElemRef = new ElementReferenceVO();

            outElemRef.gentype = excludeSpecialChar(eaElementObj.Gentype);
            outElemRef.fqcn    = excludeSpecialChar(eaElementObj.Tag);
            outElemRef.genfile = excludeSpecialChar(eaElementObj.Genfile);

            return(outElemRef);
        }
Пример #4
0
        /// <summary>
        /// XMLのelementRefノードを読み取り、ElementReferenceVOを返却する
        /// </summary>
        /// <param name="refNode">elementRefferenceノード</param>
        /// <returns></returns>
        private static ElementReferenceVO readElementReference(XmlNode refNode)
        {
            ElementReferenceVO ervo = new ElementReferenceVO();

            foreach (XmlAttribute attr in refNode.Attributes)
            {
                switch (attr.Name)
                {
                case "gentype":
                    ervo.gentype = attr.Value;
                    break;

                case "fqcn":
                    ervo.fqcn = attr.Value;
                    break;

                case "genfile":
                    ervo.genfile = attr.Value;
                    break;
                }
            }

            return(ervo);
        }
Пример #5
0
        public static void writeElementXml(ElementVO elemvo, int depth, StreamWriter sw)
        {
            sw.Write(indent(depth) + "<element ");
            if (elemvo.changed != ' ')
            {
                sw.Write("changed=\"" + elemvo.changed + "\" ");
            }
            sw.Write("guid=\"" + escapeXML(elemvo.guid) + "\" ");
            sw.Write("tpos=\"" + elemvo.treePos + "\" ");
            sw.Write("type=\"" + elemvo.eaType + "\" ");
            sw.Write("name=\"" + escapeXML(elemvo.name) + "\" ");
            sw.Write("alias=\"" + escapeXML(elemvo.alias) + "\" ");
            sw.Write("elementId=\"" + elemvo.elementId + "\" ");
            sw.Write("parentId=\"" + elemvo.parentID + "\"");

            if (elemvo.stereoType != null)
            {
                sw.Write(" stereotype=\"" + elemvo.stereoType + "\"");
            }
            sw.WriteLine(">");

            ElementReferenceVO elemref = elemvo.elementReferenceVO;

            if (elemref != null)
            {
                sw.Write(indent(depth + 1) + "<ref ");
                sw.Write("gentype=\"" + escapeXML(elemref.gentype) + "\" ");
                sw.Write("fqcn=\"" + escapeXML(elemref.fqcn) + "\" ");
                sw.Write("genfile=\"" + escapeXML(elemref.genfile) + "\"");
                sw.WriteLine("/>");
            }

            if (elemvo.notes != null)
            {
                sw.WriteLine(indent(depth + 1) + "<notes>" + escapeXML(elemvo.notes) + "</notes>");
            }

            // 1.2.1 クラスのタグ付き値出力
            if (elemvo.taggedValues.Count > 0)
            {
                outputClassTags(elemvo, depth + 1, sw);
            }

            // 1.2.2 クラスの属性出力
            if (elemvo.attributes.Count > 0)
            {
                outputClassAttributes(elemvo, depth + 1, sw);
            }

            // 1.2.3 クラスの操作(メソッド)出力
            if (elemvo.methods.Count > 0)
            {
                outputClassMethods(elemvo, depth + 1, sw);
            }

            // elementの閉じタグ
            if (depth == 0)
            {
                sw.Write("</element>");
            }
            else
            {
                sw.WriteLine(indent(depth) + "</element>");
            }
        }