add MigrationTool
authoralfred <alfred@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 28 Aug 2006 02:28:24 +0000 (02:28 +0000)
committeralfred <alfred@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 28 Aug 2006 02:28:24 +0000 (02:28 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1393 6f19259b-4bc3-4df7-8a09-765794883524

Tools/Source/MigrationTools/MANIFEST.MF
Tools/Source/MigrationTools/org/tianocore/migration/FirstPanel.java
Tools/Source/MigrationTools/org/tianocore/migration/Guid.java
Tools/Source/MigrationTools/org/tianocore/migration/Macro.java
Tools/Source/MigrationTools/org/tianocore/migration/MigrationTool.java [new file with mode: 0644]
Tools/Source/MigrationTools/org/tianocore/migration/ModuleInfo.java
Tools/Source/MigrationTools/org/tianocore/migration/ModuleReader.java
Tools/Source/MigrationTools/org/tianocore/migration/MsaTreeEditor.java
Tools/Source/MigrationTools/org/tianocore/migration/SourceFileReplacer.java
Tools/bin/MigrationTools
Tools/bin/MigrationTools.bat

index 2786db510b47093d0d7d89481b1de3a604ebcd2b..ae3092ebad41282338942bc8feccf7ae4a21e38e 100644 (file)
@@ -1,2 +1,2 @@
 Manifest-Version: 1.0\r
-Main-Class: org.tianocore.migration.ModuleInfo\r
+Main-Class: org.tianocore.migration.MigrationTool\r
index c35077f0c468c4baabcb7f22835a87bce1fb4df7..d0f9151ed7fe613b7ef2f1c134559d610884aa27 100644 (file)
@@ -65,15 +65,15 @@ public final class FirstPanel extends JPanel implements ActionListener, ItemList
                \r
                mibox = new JCheckBox("Print ModuleInfo", false);\r
                mibox.addItemListener(this);\r
-               ModuleInfo.printModuleInfo = false;\r
+               MigrationTool.printModuleInfo = false;\r
                \r
                criticbox = new JCheckBox("Run Critic", true);\r
                criticbox.addItemListener(this);\r
-               ModuleInfo.doCritic = true;\r
+               MigrationTool.doCritic = true;\r
                \r
                defaultpathbox = new JCheckBox("Use Default Output Path", true);\r
                defaultpathbox.addItemListener(this);\r
-               ModuleInfo.defaultoutput = true;\r
+               MigrationTool.defaultoutput = true;\r
                \r
         JPanel modulePanel = new JPanel();\r
         modulePanel.add(moduleButton);\r
@@ -177,7 +177,7 @@ public final class FirstPanel extends JPanel implements ActionListener, ItemList
         if ( e.getSource() == goButton ) {\r
                try {\r
                        logfile = new PrintWriter(new BufferedWriter(new FileWriter(startpath.replaceAll(Common.strseparate, "$1") + File.separator + "migration.log")));\r
-                       ModuleInfo.triger(startpath);\r
+                       MigrationTool.triger(startpath);\r
                        logfile.flush();\r
                } catch (Exception en) {\r
                        println(en.getMessage());\r
@@ -214,21 +214,21 @@ public final class FirstPanel extends JPanel implements ActionListener, ItemList
                }\r
        } else if (e.getSource() == mibox) {\r
                if (e.getStateChange() == ItemEvent.DESELECTED) {\r
-                       ModuleInfo.printModuleInfo = false;\r
+                       MigrationTool.printModuleInfo = false;\r
                } else if (e.getStateChange() == ItemEvent.SELECTED) {\r
-                       ModuleInfo.printModuleInfo = true;\r
+                       MigrationTool.printModuleInfo = true;\r
                }\r
        } else if (e.getSource() == criticbox) {\r
                if (e.getStateChange() == ItemEvent.DESELECTED) {\r
-                       ModuleInfo.doCritic = false;\r
+                       MigrationTool.doCritic = false;\r
                } else if (e.getStateChange() == ItemEvent.SELECTED) {\r
-                       ModuleInfo.doCritic = true;\r
+                       MigrationTool.doCritic = true;\r
                }\r
        } else if (e.getSource() == defaultpathbox) {\r
                if (e.getStateChange() == ItemEvent.DESELECTED) {\r
-                       ModuleInfo.defaultoutput = false;\r
+                       MigrationTool.defaultoutput = false;\r
                } else if (e.getStateChange() == ItemEvent.SELECTED) {\r
-                       ModuleInfo.defaultoutput = true;\r
+                       MigrationTool.defaultoutput = true;\r
                }\r
        }\r
     }\r
index 61fa2c44b9d4ef65848ba6915c974086fd2a9c5a..ed6a7a77f22796827e301c3622abcb7c9cd738ff 100644 (file)
@@ -45,8 +45,8 @@ public class Guid {
                String temp = null;\r
                \r
                temp = mtr.group();\r
-               if (ModuleInfo.db.hasGuid(temp)) {              // only changed guids registered, because both changed and not changed guids are included in database\r
-                       type = ModuleInfo.db.getGuidType(temp);\r
+               if (MigrationTool.db.hasGuid(temp)) {           // only changed guids registered, because both changed and not changed guids are included in database\r
+                       type = MigrationTool.db.getGuidType(temp);\r
                        if (type.matches("Protocol")) {\r
                                mi.protocol.add(temp);\r
                        } else if (type.matches("Ppi")) {\r
index 615dda06a1a1f435715bffa12230aae50fa81e6d..47c507baf41f4b46b65a47fe71eaa963044e9af1 100644 (file)
@@ -35,7 +35,7 @@ public class Macro {
                String temp = null;\r
                \r
                temp = mtr.group();\r
-               if (ModuleInfo.db.hasMacro(temp)) {                                     // only changed macros registered, because the database of macro has only changed ones\r
+               if (MigrationTool.db.hasMacro(temp)) {                                  // only changed macros registered, because the database of macro has only changed ones\r
                        if (!unmacro.contains(temp)) {\r
                                mi.hashnonlocalmacro.add(temp);\r
                        }\r
diff --git a/Tools/Source/MigrationTools/org/tianocore/migration/MigrationTool.java b/Tools/Source/MigrationTools/org/tianocore/migration/MigrationTool.java
new file mode 100644 (file)
index 0000000..2cef162
--- /dev/null
@@ -0,0 +1,76 @@
+package org.tianocore.migration;\r
+\r
+import java.io.File;\r
+import java.util.Set;\r
+\r
+public class MigrationTool {\r
+       private static final void manipulate(ModuleInfo mi) throws Exception {\r
+\r
+               ModuleReader.ModuleScan(mi);\r
+               //MigrationTool.ui.yesOrNo("go on replace?");\r
+               SourceFileReplacer.flush(mi);   // some adding library actions are taken here,so it must be put before "MsaWriter"\r
+\r
+               //MigrationTool.ui.yesOrNo("go on show?");\r
+               // show result\r
+               if (MigrationTool.printModuleInfo) {\r
+                       MigrationTool.ui.println("\nModule Information : ");\r
+                       MigrationTool.ui.println("Entrypoint : " + mi.entrypoint);\r
+                       show(mi.protocol, "Protocol : ");\r
+                       show(mi.ppi, "Ppi : ");\r
+                       show(mi.guid, "Guid : ");\r
+                       show(mi.hashfuncc, "call : ");\r
+                       show(mi.hashfuncd, "def : ");\r
+                       show(mi.hashEFIcall, "EFIcall : ");\r
+                       show(mi.hashnonlocalmacro, "macro : ");\r
+                       show(mi.hashnonlocalfunc, "nonlocal : ");\r
+                       show(mi.hashr8only, "hashr8only : ");\r
+               }\r
+\r
+               //MigrationTool.ui.yesOrNo("go on msawrite?");\r
+               new MsaWriter(mi).flush();\r
+               //MigrationTool.ui.yesOrNo("go on critic?");\r
+\r
+               if (MigrationTool.doCritic) {\r
+                       Critic.fireAt(mi.outputpath + File.separator + "Migration_" + mi.modulename);\r
+               }\r
+\r
+               //MigrationTool.ui.yesOrNo("go on delete?");\r
+               Common.deleteDir(mi.modulepath + File.separator + "temp");\r
+\r
+               MigrationTool.ui.println("Errors Left : " + MigrationTool.db.error);\r
+               MigrationTool.ui.println("Complete!");\r
+               //MigrationTool.ui.println("Your R9 module was placed here: " + mi.modulepath + File.separator + "result");\r
+               //MigrationTool.ui.println("Your logfile was placed here: " + mi.modulepath);\r
+       }\r
+\r
+       private static final void show(Set<String> hash, String show) {\r
+               MigrationTool.ui.println(show + hash.size());\r
+               MigrationTool.ui.println(hash);\r
+       }\r
+\r
+       public static final void seekModule(String filepath) throws Exception {\r
+               if (ModuleInfo.isModule(filepath)) {\r
+                       manipulate(new ModuleInfo(filepath));\r
+               }\r
+       }\r
+\r
+       public static final void triger(String path) throws Exception {\r
+               MigrationTool.ui.println("Project Migration");\r
+               MigrationTool.ui.println("Copyright (c) 2006, Intel Corporation");\r
+               Common.toDoAll(path, MigrationTool.class.getMethod("seekModule", String.class), null, null, Common.DIR);\r
+       }\r
+\r
+       public static UI ui = null;\r
+       public static Database db = null;\r
+\r
+       public static final String MIGRATIONCOMMENT = "//%$//";\r
+\r
+       public static boolean printModuleInfo = false;\r
+       public static boolean doCritic = false;\r
+       public static boolean defaultoutput = false;\r
+\r
+       public static void main(String[] args) throws Exception {\r
+               ui = FirstPanel.init();\r
+               db = Database.init();\r
+       }\r
+}\r
index 242b5c545026e0961f83a8d23c7afae4a98c4109..3fd446433a97d835eb9c10747e6d880529e0a6ac 100644 (file)
@@ -23,14 +23,14 @@ public final class ModuleInfo {
        ModuleInfo(String modulepath) throws Exception {\r
                this.modulepath = modulepath;\r
                \r
-               if (ModuleInfo.defaultoutput) {\r
+               if (MigrationTool.defaultoutput) {\r
                        this.outputpath = this.modulepath.replaceAll(Common.strseparate, "$1");\r
                } else {\r
-                       ModuleInfo.ui.println("Choose where to place the result");\r
-                       if ((outputpath = ModuleInfo.ui.getFilepath("Please choose where to place the output module")) == null) {\r
+                       MigrationTool.ui.println("Choose where to place the result");\r
+                       if ((outputpath = MigrationTool.ui.getFilepath("Please choose where to place the output module")) == null) {\r
                                outputpath = modulepath; \r
                        }\r
-                       ModuleInfo.ui.println("Output to: " + outputpath);\r
+                       MigrationTool.ui.println("Output to: " + outputpath);\r
                }\r
        }\r
 \r
@@ -79,76 +79,4 @@ public final class ModuleInfo {
                }\r
                return false;\r
        }\r
-\r
-       //---------------------------------------------------------------------------//\r
-       \r
-       private static final void manipulate(ModuleInfo mi) throws Exception {\r
-               \r
-               ModuleReader.ModuleScan(mi);\r
-               //ModuleInfo.ui.yesOrNo("go on replace?");\r
-               SourceFileReplacer.flush(mi);   // some adding library actions are taken here,so it must be put before "MsaWriter"\r
-\r
-               //ModuleInfo.ui.yesOrNo("go on show?");\r
-               // show result\r
-               if (ModuleInfo.printModuleInfo) {\r
-                       ModuleInfo.ui.println("\nModule Information : ");\r
-                       ModuleInfo.ui.println("Entrypoint : " + mi.entrypoint);\r
-                       show(mi.protocol, "Protocol : ");\r
-                       show(mi.ppi, "Ppi : ");\r
-                       show(mi.guid, "Guid : ");\r
-                       show(mi.hashfuncc, "call : ");\r
-                       show(mi.hashfuncd, "def : ");\r
-                       show(mi.hashEFIcall, "EFIcall : ");\r
-                       show(mi.hashnonlocalmacro, "macro : ");\r
-                       show(mi.hashnonlocalfunc, "nonlocal : ");\r
-                       show(mi.hashr8only, "hashr8only : ");\r
-               }\r
-\r
-               //ModuleInfo.ui.yesOrNo("go on msawrite?");\r
-               new MsaWriter(mi).flush();\r
-               //ModuleInfo.ui.yesOrNo("go on critic?");\r
-\r
-               if (ModuleInfo.doCritic) {\r
-               Critic.fireAt(mi.outputpath + File.separator + "Migration_" + mi.modulename);\r
-               }\r
-\r
-               //ModuleInfo.ui.yesOrNo("go on delete?");\r
-               Common.deleteDir(mi.modulepath + File.separator + "temp");\r
-               \r
-               ModuleInfo.ui.println("Errors Left : " + ModuleInfo.db.error);\r
-               ModuleInfo.ui.println("Complete!");\r
-               //ModuleInfo.ui.println("Your R9 module was placed here: " + mi.modulepath + File.separator + "result");\r
-               //ModuleInfo.ui.println("Your logfile was placed here: " + mi.modulepath);\r
-       }\r
-       \r
-       private static final void show(Set<String> hash, String show) {\r
-               ModuleInfo.ui.println(show + hash.size());\r
-               ModuleInfo.ui.println(hash);\r
-       }\r
-       \r
-       public static final void seekModule(String filepath) throws Exception {\r
-               if (ModuleInfo.isModule(filepath)) {\r
-                       manipulate(new ModuleInfo(filepath));\r
-               }\r
-       }\r
-\r
-       public static final void triger(String path) throws Exception {\r
-               ModuleInfo.ui.println("Project Migration");\r
-               ModuleInfo.ui.println("Copyright (c) 2006, Intel Corporation");\r
-               Common.toDoAll(path, ModuleInfo.class.getMethod("seekModule", String.class), null, null, Common.DIR);\r
-       }\r
-       \r
-       public static UI ui = null;\r
-       public static Database db = null;\r
-       \r
-       public static final String migrationcomment = "//%$//";\r
-       \r
-       public static boolean printModuleInfo = false;\r
-       public static boolean doCritic = false;\r
-       public static boolean defaultoutput = false;\r
-       \r
-       public static void main(String[] args) throws Exception {\r
-               ui = FirstPanel.init();\r
-               db = Database.init();\r
-       }\r
 }
\ No newline at end of file
index cf1cabe22a6506640ab4f41985acaa27fa36bc03..e7b62f0b97f102f379635299cca2b693d7df42df 100644 (file)
@@ -32,13 +32,13 @@ public final class ModuleReader {
 \r
                String filename = null;\r
                if (mi.msaorinf.isEmpty()) {\r
-                       ModuleInfo.ui.println("No INF nor MSA file found!");\r
+                       MigrationTool.ui.println("No INF nor MSA file found!");\r
                        System.exit(0);\r
                } else {\r
                        if (mi.msaorinf.size() == 1) {\r
                                filename = (String)mi.msaorinf.toArray()[0];\r
                        } else {\r
-                               filename = ModuleInfo.ui.choose("Found .inf or .msa file for module\n" + mi.modulepath + "\nChoose one Please", mi.msaorinf.toArray());\r
+                               filename = MigrationTool.ui.choose("Found .inf or .msa file for module\n" + mi.modulepath + "\nChoose one Please", mi.msaorinf.toArray());\r
                        }\r
                }\r
                if (filename.contains(".inf")) {\r
@@ -104,7 +104,7 @@ public final class ModuleReader {
                                        }\r
                                        if (mtrinfequation.group(1).matches("DPX_SOURCE")) {\r
                                                if (!mi.localmodulesources.contains(mtrinfequation.group(2))) {\r
-                                                       ModuleInfo.ui.println("DPX File Missing! : " + mtrinfequation.group(2));\r
+                                                       MigrationTool.ui.println("DPX File Missing! : " + mtrinfequation.group(2));\r
                                                }\r
                                        }\r
                                }\r
@@ -113,7 +113,7 @@ public final class ModuleReader {
                                mtrfilename = ptnfilename.matcher(mtrsection.group(2));\r
                                while (mtrfilename.find()) {\r
                                        if (!mi.localmodulesources.contains(mtrfilename.group())) {\r
-                                               ModuleInfo.ui.println("Source File Missing! : " + mtrfilename.group());\r
+                                               MigrationTool.ui.println("Source File Missing! : " + mtrfilename.group());\r
                                        }\r
                                }\r
                        }\r
@@ -141,7 +141,7 @@ public final class ModuleReader {
                                        mtrinclude = ptninclude.matcher(line);\r
                                        if (mtrinclude.find() && mi.localmodulesources.contains(mtrinclude.group(1))) {\r
                                        } else {\r
-                                               line = ModuleInfo.migrationcomment + line;\r
+                                               line = MigrationTool.MIGRATIONCOMMENT + line;\r
                                        }\r
                                }\r
                                outfile.append(line + '\n');\r
@@ -207,8 +207,8 @@ public final class ModuleReader {
                        // find guid\r
                        matguid = Guid.ptnguid.matcher(line);                                                                           // several ways to implement this , which one is faster ? :\r
                        while (matguid.find()) {                                                                                                        // 1.currently , find once , then call to identify which is it\r
-                               if ((temp = Guid.register(matguid, mi, ModuleInfo.db)) != null) {                               // 2.use 3 different matchers , search 3 times to find each\r
-                                       //matguid.appendReplacement(result, ModuleInfo.db.getR9Guidname(temp));         // search the database for all 3 kinds of guids , high cost\r
+                               if ((temp = Guid.register(matguid, mi, MigrationTool.db)) != null) {                            // 2.use 3 different matchers , search 3 times to find each\r
+                                       //matguid.appendReplacement(result, MigrationTool.db.getR9Guidname(temp));              // search the database for all 3 kinds of guids , high cost\r
                                }\r
                        }\r
                        //matguid.appendTail(result);\r
@@ -224,9 +224,9 @@ public final class ModuleReader {
                        // find function call\r
                        matfuncc = Func.ptnfuncc.matcher(line);\r
                        while (matfuncc.find()) {\r
-                               if ((temp = Func.register(matfuncc, mi, ModuleInfo.db)) != null) {\r
-                                       //ModuleInfo.ui.println(ifile + "  dofunc  " + temp);\r
-                                       //matfuncc.appendReplacement(result, ModuleInfo.db.getR9Func(temp));\r
+                               if ((temp = Func.register(matfuncc, mi, MigrationTool.db)) != null) {\r
+                                       //MigrationTool.ui.println(ifile + "  dofunc  " + temp);\r
+                                       //matfuncc.appendReplacement(result, MigrationTool.db.getR9Func(temp));\r
                                }\r
                        }\r
                        //matfuncc.appendTail(result);\r
@@ -235,7 +235,7 @@ public final class ModuleReader {
                        // find macro\r
                        matmacro = Macro.ptntmacro.matcher(line);\r
                        while (matmacro.find()) {\r
-                               if ((temp = Macro.register(matmacro, mi, ModuleInfo.db)) != null) {\r
+                               if ((temp = Macro.register(matmacro, mi, MigrationTool.db)) != null) {\r
                                }\r
                        }\r
                        \r
@@ -247,7 +247,7 @@ public final class ModuleReader {
 \r
                        matfuncd = Func.ptnfuncd.matcher(line);\r
                        while (matfuncd.find()) {\r
-                               if ((temp = Func.register(matfuncd, mi, ModuleInfo.db)) != null) {\r
+                               if ((temp = Func.register(matfuncd, mi, MigrationTool.db)) != null) {\r
                                }\r
                        }\r
                }\r
index 2b5e434a612b69614b9735ab68217548c217ee92..7bdf0281199ca2c57c6b25fcbab17bc79b62106b 100644 (file)
@@ -102,7 +102,7 @@ public class MsaTreeEditor extends JPanel {
        }\r
        \r
        private void addNode() {\r
-               addNode((DefaultMutableTreeNode)(tree.getSelectionPath().getLastPathComponent()), ModuleInfo.ui.getInput("Input Node Name"));\r
+               addNode((DefaultMutableTreeNode)(tree.getSelectionPath().getLastPathComponent()), MigrationTool.ui.getInput("Input Node Name"));\r
        }\r
        \r
        private void addNode(DefaultMutableTreeNode parentNode, Object child) {\r
index 7d9859c815c34cf52b5607d41260fb740d08530b..42a220f6809b007596ea231fa47ef96b2e3cc90c 100644 (file)
@@ -45,7 +45,7 @@ public final class SourceFileReplacer {
                String outname = null;\r
                String inname = null;\r
                /*\r
-               if (ModuleInfo.ui.yesOrNo("Changes will be made to the Source Code.  View details?")) {\r
+               if (MigrationTool.ui.yesOrNo("Changes will be made to the Source Code.  View details?")) {\r
                        showdetails = true;\r
                }\r
                */\r
@@ -60,7 +60,7 @@ public final class SourceFileReplacer {
                                } else {\r
                                        outname = inname;\r
                                }\r
-                               ModuleInfo.ui.println("\nModifying file: " + inname);\r
+                               MigrationTool.ui.println("\nModifying file: " + inname);\r
                                Common.string2file(sourcefilereplace(mi.modulepath + File.separator + "temp" + File.separator + inname), mi.outputpath + File.separator + "Migration_" + mi.modulename + File.separator + outname);\r
                        } else if (inname.contains(".h") || inname.contains(".H") || inname.contains(".dxs") || inname.contains(".uni")) {\r
                                if (inname.contains(".H")) {\r
@@ -68,7 +68,7 @@ public final class SourceFileReplacer {
                                } else {\r
                                        outname = inname;\r
                                }\r
-                               ModuleInfo.ui.println("\nCopying file: " + inname);\r
+                               MigrationTool.ui.println("\nCopying file: " + inname);\r
                                Common.string2file(Common.file2string(mi.modulepath + File.separator + "temp" + File.separator + inname), mi.outputpath + File.separator + "Migration_" + mi.modulename + File.separator + outname);\r
                        }\r
                }\r
@@ -80,7 +80,7 @@ public final class SourceFileReplacer {
        \r
        private static final void addr8only() throws Exception {\r
                String paragraph = null;\r
-               String line = Common.file2string(ModuleInfo.db.DatabasePath + File.separator + "R8Lib.c");\r
+               String line = Common.file2string(MigrationTool.db.DatabasePath + File.separator + "R8Lib.c");\r
                //Common.ensureDir(mi.modulepath + File.separator + "Migration_" + mi.modulename + File.separator + "R8Lib.c");\r
                PrintWriter outfile1 = new PrintWriter(new BufferedWriter(new FileWriter(mi.outputpath + File.separator + "Migration_" + mi.modulename + File.separator + "R8Lib.c")));\r
                PrintWriter outfile2 = new PrintWriter(new BufferedWriter(new FileWriter(mi.outputpath + File.separator + "Migration_" + mi.modulename + File.separator + "R8Lib.h")));\r
@@ -131,7 +131,7 @@ public final class SourceFileReplacer {
                // replace BS -> gBS , RT -> gRT\r
                Matcher mat = pat.matcher(line);\r
                if (mat.find()) {                                                                                               // add a library here\r
-                       ModuleInfo.ui.println("Converting all BS->gBS, RT->gRT");\r
+                       MigrationTool.ui.println("Converting all BS->gBS, RT->gRT");\r
                        line = mat.replaceAll("g$1$2$3");                                                       //unknown correctiveness\r
                }\r
                mat.reset();\r
@@ -148,7 +148,7 @@ public final class SourceFileReplacer {
                Pattern patentrypoint = Pattern.compile("EFI_DRIVER_ENTRY_POINT[^\\}]*\\}");\r
                Matcher matentrypoint = patentrypoint.matcher(line);\r
                if (matentrypoint.find()) {\r
-                       ModuleInfo.ui.println("Deleting Entry_Point");\r
+                       MigrationTool.ui.println("Deleting Entry_Point");\r
                        line = matentrypoint.replaceAll("");\r
                }\r
                */\r
@@ -166,10 +166,10 @@ public final class SourceFileReplacer {
                                mi.hashrequiredr9libs.add("UefiRuntimeServicesTableLib");               //a\r
                                mi.hashrequiredr9libs.add("DxeServicesTableLib");                               //l\r
                        } else {                                                                                                                        //\r
-                               mi.hashrequiredr9libs.add(ModuleInfo.db.getR9Lib(r8thing));                             // add a library here\r
+                               mi.hashrequiredr9libs.add(MigrationTool.db.getR9Lib(r8thing));                          // add a library here\r
                        }\r
                        \r
-                       if ((r9thing = ModuleInfo.db.getR9Func(r8thing)) != null) {\r
+                       if ((r9thing = MigrationTool.db.getR9Func(r8thing)) != null) {\r
                                if (!r8thing.equals(r9thing)) {\r
                                        if (line.contains(r8thing)) {\r
                                                line = line.replaceAll(r8thing, r9thing);\r
@@ -177,7 +177,7 @@ public final class SourceFileReplacer {
                                                Iterator<r8tor9> rt = filefunc.iterator();\r
                                                while (rt.hasNext()) {\r
                                                        temp = rt.next();\r
-                                                       if (ModuleInfo.db.r8only.contains(temp.r8thing)) {\r
+                                                       if (MigrationTool.db.r8only.contains(temp.r8thing)) {\r
                                                                filer8only.add(r8thing);\r
                                                                mi.hashr8only.add(r8thing);\r
                                                                addr8 = true;\r
@@ -195,8 +195,8 @@ public final class SourceFileReplacer {
                it = mi.hashnonlocalmacro.iterator();\r
                while (it.hasNext()) {                                          //macros are all assumed MdePkg currently\r
                        r8thing = it.next();\r
-                       //mi.hashrequiredr9libs.add(ModuleInfo.db.getR9Lib(r8thing));           \r
-                       if ((r9thing = ModuleInfo.db.getR9Macro(r8thing)) != null) {\r
+                       //mi.hashrequiredr9libs.add(MigrationTool.db.getR9Lib(r8thing));                \r
+                       if ((r9thing = MigrationTool.db.getR9Macro(r8thing)) != null) {\r
                                if (line.contains(r8thing)) {\r
                                        line = line.replaceAll(r8thing, r9thing);\r
                                        filemacro.add(new r8tor9(r8thing, r9thing));\r
@@ -263,7 +263,7 @@ public final class SourceFileReplacer {
                show(fileppi, "ppi");\r
                show(fileprotocol, "protocol");\r
                if (!filer8only.isEmpty()) {\r
-                       ModuleInfo.ui.println("Converting r8only : " + filer8only);\r
+                       MigrationTool.ui.println("Converting r8only : " + filer8only);\r
                }\r
 \r
                filefunc.clear();\r
@@ -281,12 +281,12 @@ public final class SourceFileReplacer {
                r8tor9 temp;\r
                if (showdetails) {\r
                        if (!hash.isEmpty()) {\r
-                               ModuleInfo.ui.print("Converting " + sh + " : ");\r
+                               MigrationTool.ui.print("Converting " + sh + " : ");\r
                                while (it.hasNext()) {\r
                                        temp = it.next();\r
-                                       ModuleInfo.ui.print("[" + temp.r8thing + "->" + temp.r9thing + "] ");\r
+                                       MigrationTool.ui.print("[" + temp.r8thing + "->" + temp.r9thing + "] ");\r
                                }\r
-                               ModuleInfo.ui.println("");\r
+                               MigrationTool.ui.println("");\r
                        }\r
                }\r
        }\r
@@ -298,7 +298,7 @@ public final class SourceFileReplacer {
                it = hash.iterator();\r
                while (it.hasNext()) {\r
                        r8thing = it.next();\r
-                       if ((r9thing = ModuleInfo.db.getR9Guidname(r8thing)) != null) {\r
+                       if ((r9thing = MigrationTool.db.getR9Guidname(r8thing)) != null) {\r
                                if (!r8thing.equals(r9thing)) {\r
                                        if (line.contains(r8thing)) {\r
                                                line = line.replaceAll(r8thing, r9thing);\r
index c0d13d4c221f28789330d4adc6a35239d5e3127e..fc47bef2eb0237c4ef4bbae680c7a9838217c005 100644 (file)
@@ -12,4 +12,4 @@
 export CLASSPATH=$CLASSPATH:$WORKSPACE/Tools/bin/MigrationTools.jar
 
 # Run Migration Tool
-java org.tianocore.migration.ModuleInfo
\ No newline at end of file
+java org.tianocore.migration.MigrationTool
\ No newline at end of file
index fd6c5936dd29dd7db394335626a34a190f247848..a29044144bc18a34da36d89540acb378c0fbf6fa 100644 (file)
@@ -29,7 +29,7 @@ if not exist %WORKSPACE%\Tools\bin\MigrationTools.jar (
 )\r
 \r
 @REM Run Migration\r
-call "java" org.tianocore.migration.ModuleInfo\r
+call "java" org.tianocore.migration.MigrationTool\r
 \r
 goto end\r
 \r