MsaOwner usable
authoralfred <alfred@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 29 Sep 2006 09:06:28 +0000 (09:06 +0000)
committeralfred <alfred@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 29 Sep 2006 09:06:28 +0000 (09:06 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1645 6f19259b-4bc3-4df7-8a09-765794883524

Tools/Source/MigrationTools/org/tianocore/migration/MigrationTool.java
Tools/Source/MigrationTools/org/tianocore/migration/ModuleInfo.java
Tools/Source/MigrationTools/org/tianocore/migration/MsaOwner.java

index 03ac23f..4e6b30c 100644 (file)
@@ -53,14 +53,13 @@ public class MigrationTool {
         }\r
 \r
         new MsaWriter(mi).flush();\r
-/*\r
+\r
+        mi.addProtocol("protocol", UsageTypes.ALWAYS_CONSUMED);\r
         mi.addGuid("guid", UsageTypes.ALWAYS_CONSUMED);\r
         mi.addLibraryClass("class", UsageTypes.ALWAYS_CONSUMED);\r
         mi.addPpi("ppi", UsageTypes.ALWAYS_CONSUMED);\r
-        mi.addProtocol("protocol", UsageTypes.ALWAYS_CONSUMED);\r
-*/\r
         mi.getMsaOwner().flush(MigrationTool.ModuleInfoMap.get(mi) + File.separator + "Migration_" + mi.modulename + File.separator + mi.modulename + ".___");\r
-     \r
+        \r
         if (MigrationTool.doCritic) {\r
             Critic.fireAt(ModuleInfoMap.get(mi) + File.separator + "Migration_" + mi.modulename);\r
         }\r
index dd106d5..aa19522 100644 (file)
@@ -60,7 +60,6 @@ public final class ModuleInfo {
 \r
     public final boolean addProtocol (String proname, UsageTypes.Enum usage) {\r
         //protocols.add(proname);\r
-        System.out.println("I'm in");\r
         return msaowner.addProtocol(proname, usage);\r
     }\r
     \r
index 6483de5..65873a3 100644 (file)
@@ -58,11 +58,9 @@ public class MsaOwner {
         }\r
         \r
         LibraryClassDocument.LibraryClass classname;\r
-        List<UsageTypes.Enum> arch = new ArrayList<UsageTypes.Enum>();\r
         classname = libclassdefs.addNewLibraryClass();\r
         classname.setKeyword(name);\r
-        arch.add(usage);\r
-        classname.setSupArchList(arch);\r
+        classname.setUsage(usage);\r
         return true;\r
     }\r
     \r
@@ -80,11 +78,9 @@ public class MsaOwner {
         }\r
         \r
         GuidsDocument.Guids.GuidCNames guid;\r
-        List<UsageTypes.Enum> arch = new ArrayList<UsageTypes.Enum>();\r
         guid = guids.addNewGuidCNames();\r
         guid.setGuidCName(guidname);\r
-        arch.add(usage);\r
-        guid.setSupArchList(arch);\r
+        guid.setUsage(usage);\r
         return true;\r
     }\r
     \r
@@ -103,11 +99,9 @@ public class MsaOwner {
         }\r
         \r
         PPIsDocument.PPIs.Ppi ppi;\r
-        List<UsageTypes.Enum> arch = new ArrayList<UsageTypes.Enum>();\r
         ppi = ppis.addNewPpi();\r
         ppi.setPpiCName(ppiname);\r
-        arch.add(usage);\r
-        ppi.setSupArchList(arch);\r
+        ppi.setUsage(usage);\r
         return true;\r
     }\r
     \r
@@ -140,7 +134,7 @@ public class MsaOwner {
         if (protocols == null) {\r
             protocols = msa.addNewProtocols();\r
         }\r
-        \r
+\r
         Iterator<ProtocolsDocument.Protocols.Protocol> proit = protocols.getProtocolList().iterator();\r
         while (proit.hasNext()) {\r
             if (proit.next().getProtocolCName() == proname) {\r
@@ -148,13 +142,11 @@ public class MsaOwner {
                 return false;\r
             }\r
         }\r
-        \r
+\r
         ProtocolsDocument.Protocols.Protocol protocol;\r
-        List<UsageTypes.Enum> arch = new ArrayList<UsageTypes.Enum>();\r
         protocol = protocols.addNewProtocol();\r
         protocol.setProtocolCName(proname);\r
-        arch.add(usage);\r
-        protocol.setSupArchList(arch);\r
+        protocol.setUsage(usage);\r
         return true;\r
     }\r
     \r