]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Tools/Source/MigrationTools/org/tianocore/migration/ModuleInfo.java
final
[mirror_edk2.git] / Tools / Source / MigrationTools / org / tianocore / migration / ModuleInfo.java
index 9e58ed914ae3e3bafabfcab6e18808d092ce2e13..49dde8b67a84e892822a4f022c2f8281a8941ea3 100644 (file)
@@ -19,15 +19,19 @@ import java.util.*;
        Class ModuleInfo is built for scanning the source files, it contains all the needed\r
 information and all the temporary data.\r
 */\r
-public class ModuleInfo {\r
+public final class ModuleInfo {\r
        ModuleInfo(String modulepath) throws Exception {\r
                this.modulepath = modulepath;\r
                \r
-               ModuleInfo.ui.println("Choose where to place the result");\r
-               if ((outputpath = ModuleInfo.ui.getFilepath()) == null) {\r
-                       outputpath = modulepath; \r
+               if (ModuleInfo.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()) == null) {\r
+                               outputpath = modulepath; \r
+                       }\r
+                       ModuleInfo.ui.println("Output to: " + outputpath);\r
                }\r
-               ModuleInfo.ui.println(outputpath);\r
        }\r
 \r
        public String modulepath = null;\r
@@ -39,21 +43,21 @@ public class ModuleInfo {
        public String moduletype = null;\r
        public String entrypoint = null;\r
        \r
-       public Set<String> localmodulesources = new HashSet<String>();          //contains both .c and .h\r
-       public Set<String> preprocessedccodes = new HashSet<String>();\r
-       public Set<String> msaorinf = new HashSet<String>();                            //only a little, hash may be too big for this\r
+       public final Set<String> localmodulesources = new HashSet<String>();            //contains both .c and .h\r
+       public final Set<String> preprocessedccodes = new HashSet<String>();\r
+       public final Set<String> msaorinf = new HashSet<String>();                              //only a little, hash may be too big for this\r
        \r
-       public Set<String> hashfuncc = new HashSet<String>();\r
-       public Set<String> hashfuncd = new HashSet<String>();\r
-       public Set<String> hashnonlocalfunc = new HashSet<String>();\r
-       public Set<String> hashnonlocalmacro = new HashSet<String>();\r
-       public Set<String> hashEFIcall = new HashSet<String>();\r
-       public Set<String> hashr8only = new HashSet<String>();\r
+       public final Set<String> hashfuncc = new HashSet<String>();\r
+       public final Set<String> hashfuncd = new HashSet<String>();\r
+       public final Set<String> hashnonlocalfunc = new HashSet<String>();\r
+       public final Set<String> hashnonlocalmacro = new HashSet<String>();\r
+       public final Set<String> hashEFIcall = new HashSet<String>();\r
+       public final Set<String> hashr8only = new HashSet<String>();\r
        \r
-       public Set<String> hashrequiredr9libs = new HashSet<String>();  // hashrequiredr9libs is now all added in SourceFileReplacer \r
-       public Set<String> guid = new HashSet<String>();\r
-       public Set<String> protocol = new HashSet<String>();\r
-       public Set<String> ppi = new HashSet<String>();\r
+       public final Set<String> hashrequiredr9libs = new HashSet<String>();    // hashrequiredr9libs is now all added in SourceFileReplacer \r
+       public final Set<String> guid = new HashSet<String>();\r
+       public final Set<String> protocol = new HashSet<String>();\r
+       public final Set<String> ppi = new HashSet<String>();\r
 \r
        public final void enroll(String filepath) throws Exception {\r
                String[] temp;\r
@@ -67,7 +71,7 @@ public class ModuleInfo {
                }\r
        }\r
 \r
-       private static final boolean isModule(String path) {\r
+       public static final boolean isModule(String path) {\r
                String[] list = new File(path).list();\r
                for (int i = 0 ; i < list.length ; i++) {\r
                        if (!new File(list[i]).isDirectory()) {\r
@@ -112,8 +116,8 @@ public class ModuleInfo {
                \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
+               //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
@@ -140,6 +144,7 @@ public class ModuleInfo {
        \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