예제 #1
0
 public AssemblyType(AssemblyImporter importer, System.Type systemType)
     : base(importer, systemType)
 {
     _lastPkg = null;
     IsNested ();
     StartPackaging ();
     LookForMe ();
 }
예제 #2
0
 public void ShowOwnedTypeFor(UML.Package package)
 {
     _package = package;
     string name;
     string[] typeList = new string[package.OwnedType.Count];
     for(int i = 0; i < package.OwnedType.Count; i ++)
     {
         name = ((UML.Type)package.OwnedType[i]).Name;
         if (name==null || name==String.Empty)
         {
             name = "<<" + package.OwnedType[i].GetType().Name.Substring(6) + ">>";
         }
         typeList[i] = name;
     }
     base.ShowList(typeList);
 }
예제 #3
0
        public void Begin()
        {
            if (!_namespace.Equals (""))
            {
                char[] sep = {'.'};
                string[] subNs = _namespace.Split (sep);
                string before = "";
                _lastPkg = null;

                if (subNs.Length > 0)
                {
                    foreach (string str in subNs)
                    {
                        if (!before.Equals (""))
                        {
                            before += "."+str;
                        }
                        else
                        {
                            before = str;
                        }
                        Uml2.Package pkg = CreatePackage (before, str);
                        if (_lastPkg != null)
                        {
                            try
                            {
                                _lastPkg.NestedPackage.Add (pkg);
                            }
                            catch (System.Exception ex) { }
                        }
                        _lastPkg = pkg;
                    }
                }
                else
                {
                    _lastPkg = CreatePackage (_namespace, _namespace);
                }
            }
        }
예제 #4
0
 private void StartPackaging()
 {
     if (_systemType.FullName.IndexOf (".") != -1)
     {
         AssemblyPackage pkg = new AssemblyPackage (_importer, _systemType);
         pkg.Begin ();
         _lastPkg = pkg.LastPackage;
     }
 }
예제 #5
0
 public new void Hide()
 {
     _package = null;
     base.Hide();
 }