summaryrefslogtreecommitdiff
path: root/Tools/Source/MigrationTools/org/tianocore/migration/ModuleInfo.java
diff options
context:
space:
mode:
Diffstat (limited to 'Tools/Source/MigrationTools/org/tianocore/migration/ModuleInfo.java')
-rw-r--r--Tools/Source/MigrationTools/org/tianocore/migration/ModuleInfo.java80
1 files changed, 4 insertions, 76 deletions
diff --git a/Tools/Source/MigrationTools/org/tianocore/migration/ModuleInfo.java b/Tools/Source/MigrationTools/org/tianocore/migration/ModuleInfo.java
index 242b5c5..3fd4464 100644
--- a/Tools/Source/MigrationTools/org/tianocore/migration/ModuleInfo.java
+++ b/Tools/Source/MigrationTools/org/tianocore/migration/ModuleInfo.java
@@ -23,14 +23,14 @@ public final class ModuleInfo {
ModuleInfo(String modulepath) throws Exception {
this.modulepath = modulepath;
- if (ModuleInfo.defaultoutput) {
+ if (MigrationTool.defaultoutput) {
this.outputpath = this.modulepath.replaceAll(Common.strseparate, "$1");
} else {
- ModuleInfo.ui.println("Choose where to place the result");
- if ((outputpath = ModuleInfo.ui.getFilepath("Please choose where to place the output module")) == null) {
+ MigrationTool.ui.println("Choose where to place the result");
+ if ((outputpath = MigrationTool.ui.getFilepath("Please choose where to place the output module")) == null) {
outputpath = modulepath;
}
- ModuleInfo.ui.println("Output to: " + outputpath);
+ MigrationTool.ui.println("Output to: " + outputpath);
}
}
@@ -79,76 +79,4 @@ public final class ModuleInfo {
}
return false;
}
-
- //---------------------------------------------------------------------------//
-
- private static final void manipulate(ModuleInfo mi) throws Exception {
-
- ModuleReader.ModuleScan(mi);
- //ModuleInfo.ui.yesOrNo("go on replace?");
- SourceFileReplacer.flush(mi); // some adding library actions are taken here,so it must be put before "MsaWriter"
-
- //ModuleInfo.ui.yesOrNo("go on show?");
- // show result
- if (ModuleInfo.printModuleInfo) {
- ModuleInfo.ui.println("\nModule Information : ");
- ModuleInfo.ui.println("Entrypoint : " + mi.entrypoint);
- show(mi.protocol, "Protocol : ");
- show(mi.ppi, "Ppi : ");
- show(mi.guid, "Guid : ");
- show(mi.hashfuncc, "call : ");
- show(mi.hashfuncd, "def : ");
- show(mi.hashEFIcall, "EFIcall : ");
- show(mi.hashnonlocalmacro, "macro : ");
- show(mi.hashnonlocalfunc, "nonlocal : ");
- show(mi.hashr8only, "hashr8only : ");
- }
-
- //ModuleInfo.ui.yesOrNo("go on msawrite?");
- new MsaWriter(mi).flush();
- //ModuleInfo.ui.yesOrNo("go on critic?");
-
- if (ModuleInfo.doCritic) {
- Critic.fireAt(mi.outputpath + File.separator + "Migration_" + mi.modulename);
- }
-
- //ModuleInfo.ui.yesOrNo("go on delete?");
- Common.deleteDir(mi.modulepath + File.separator + "temp");
-
- ModuleInfo.ui.println("Errors Left : " + ModuleInfo.db.error);
- ModuleInfo.ui.println("Complete!");
- //ModuleInfo.ui.println("Your R9 module was placed here: " + mi.modulepath + File.separator + "result");
- //ModuleInfo.ui.println("Your logfile was placed here: " + mi.modulepath);
- }
-
- private static final void show(Set<String> hash, String show) {
- ModuleInfo.ui.println(show + hash.size());
- ModuleInfo.ui.println(hash);
- }
-
- public static final void seekModule(String filepath) throws Exception {
- if (ModuleInfo.isModule(filepath)) {
- manipulate(new ModuleInfo(filepath));
- }
- }
-
- public static final void triger(String path) throws Exception {
- ModuleInfo.ui.println("Project Migration");
- ModuleInfo.ui.println("Copyright (c) 2006, Intel Corporation");
- Common.toDoAll(path, ModuleInfo.class.getMethod("seekModule", String.class), null, null, Common.DIR);
- }
-
- public static UI ui = null;
- public static Database db = null;
-
- public static final String migrationcomment = "//%$//";
-
- public static boolean printModuleInfo = false;
- public static boolean doCritic = false;
- public static boolean defaultoutput = false;
-
- public static void main(String[] args) throws Exception {
- ui = FirstPanel.init();
- db = Database.init();
- }
} \ No newline at end of file