Пример #1
0
 private EA.Method getMethodByGuid(string methodGuid)
 {
     EA.Repository repo   = ProjectSetting.getVO().eaRepo;
     EA.Method     mthObj = (EA.Method)repo.GetMethodByGuid(methodGuid);
     if (mthObj != null)
     {
         return(mthObj);
     }
     else
     {
         return(null);
     }
 }
Пример #2
0
        void EASelectObjectToolStripMenuItemClick(object sender, EventArgs e)
        {
            EA.Repository repo = ProjectSetting.getVO().eaRepo;
            if (repo != null)
            {
                // 選択された属性に対する更新処理
                if (selectedAttribute != null)
                {
                    EA.Attribute attr = (EA.Attribute)repo.GetAttributeByGuid(selectedAttribute.guid);
                    if (attr != null)
                    {
                        repo.ShowInProjectView(attr);
                    }
                    else
                    {
                        // 属性がGUIDで空振りしたら要素GUIDで再検索
                        EA.Element elem = (EA.Element)repo.GetElementByGuid(myElement.guid);
                        if (elem != null)
                        {
                            repo.ShowInProjectView(elem);
                        }
                    }
                }

                // 選択された操作に対する更新処理
                if (selectedMethod != null)
                {
                    EA.Method mth = (EA.Method)repo.GetMethodByGuid(selectedMethod.guid);
                    if (mth != null)
                    {
                        repo.ShowInProjectView(mth);
                    }
                    else
                    {
                        // 操作がGUIDで空振りしたら要素GUIDで再検索
                        EA.Element elem = (EA.Element)repo.GetElementByGuid(myElement.guid);
                        if (elem != null)
                        {
                            repo.ShowInProjectView(elem);
                        }
                    }
                }
            }
            else
            {
                MessageBox.Show("EAにアタッチしていないため、選択できません");
            }
        }
Пример #3
0
 /// <summary>
 /// GUIDを指定してEA上のメソッドオブジェクトを取得する
 /// </summary>
 /// <param name="methodGuid">検索対象メソッドのGUID</param>
 /// <returns>合致するGUIDでヒットしたメソッドオブジェクト。ヒットしなかったらnull</returns>
 private static EA.Method getMethodByGuid(string methodGuid)
 {
     EA.Repository repo   = ProjectSetting.getVO().eaRepo;
     EA.Method     mthObj = (EA.Method)repo.GetMethodByGuid(methodGuid);
     return(mthObj);
 }