Example #1
0
        public EPackage(SQLPackage eaPackage, SQLRepository repository)
        {
            this.EaPackage  = eaPackage;
            this.Repository = repository;

            if (EAUtil.packageIsModel(EaPackage, Repository))
            {
                helper = new MetamodelHelper(this);
            }
            else
            {
                helper = new SubPackageHelper(this);
            }
        }
        public void EA_OnPostNewDiagram(EA.Repository Repository, EA.EventProperties Info)
        {
            int           diagramID = int.Parse(Info.Get(0).Value.ToString());
            SQLRepository sqlRep    = new SQLRepository(Repository, false);

            EA.Diagram diagram         = Repository.GetDiagramByID(diagramID);
            String     diagramMetatype = diagram.MetaType;

            if (TGGModelingMain.TggSchemaDiagramMetatype.Contains(diagram.MetaType))
            {
                SQLPackage newTGGProject = sqlRep.GetPackageByID(diagram.PackageID);
                if (EAUtil.packageIsModel(newTGGProject, sqlRep) && newTGGProject.Diagrams.Count == 1 && newTGGProject.getRealPackage().StereotypeEx == "")
                {
                    NewTGGProjectDialog tggDialog = new NewTGGProjectDialog(sqlRep, newTGGProject);
                    tggDialog.ShowDialog();
                }
            }
        }