Exemple #1
0
        public static void OpenEaPropertyDlg(this EA.Repository rep, int id, EaType type)
        {
            string dlg;

            switch (type)
            {
            case EaType.Package: dlg = "PKG"; break;

            case EaType.Element: dlg = "ELM"; break;

            case EaType.Attribute: dlg = "ATT"; break;

            case EaType.Operation: dlg = "OP"; break;

            case EaType.Diagram: dlg = "DGM"; break;

            default: dlg = String.Empty; break;
            }
            IWin32Window mainWindow = InternalHelpers.GetMainWindow();

            if (mainWindow != null)
            {
                string ret = rep.CustomCommand("CFormCommandHelper", "ProcessCommand", "Dlg=" + dlg + ";id=" + id + ";hwnd=" + mainWindow.Handle);
            }
        }
        private void insertEcoreDatatypes()
        {
            //insert ecore datatypes file
            String refData = readEcoreDatatypesFile();

            repository.CustomCommand("Repository", "ImportRefData", refData);
        }
Exemple #3
0
 /// <summary>
 /// Synchronize all Tagged Values of an Element with its profile/stereotypes
 /// </summary>
 /// <param name="rep"></param>
 /// <param name="el"></param>
 /// <returns></returns>
 public bool SyncTaggedValues(EA.Repository rep, EA.Element el)
 {
     foreach (EA.TaggedValue tv in _el.TaggedValues)
     {
         // synchronize stereotypes/tagged vales
         var lFqName = Regex.Split(tv.FQName, "::");
         if (lFqName.Length == 3)
         {
             var sProfile    = lFqName[0];
             var sStereotype = lFqName[1];
             //seems not to work
             //ret = ret || el.SynchTaggedValues(sProfile, sStereotype);
             string par  = $"Profile={sProfile};Stereotype={sStereotype};";
             var    ret1 = rep.CustomCommand("Repository", "SynchProfile", par);
             if (ret1 != "True")
             {
                 MessageBox.Show($@"{par}", @"Error synchronize EA.Element");
                 return(false);
             }
         }
     }
     return(true);
 }
Exemple #4
0
 public string CustomCommand(string ClassName, string MethodName, string Parameters)
 {
     return(eaRepository.CustomCommand(ClassName, MethodName, Parameters));
 }