X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=Tools%2FJava%2FSource%2FMigrationTools%2Forg%2Ftianocore%2Fmigration%2FMigrationTool.java;h=c65a425df4d6789547f2d1783be4eb2bf9f572f8;hp=7ed4113ad4014276d7c63c9555bc6339f9be0048;hb=bea097126098819ea74d8564ec1e174d24dd264b;hpb=015849a4508ec793072dd648264c0f142f7db645 diff --git a/Tools/Java/Source/MigrationTools/org/tianocore/migration/MigrationTool.java b/Tools/Java/Source/MigrationTools/org/tianocore/migration/MigrationTool.java index 7ed4113ad4..c65a425df4 100644 --- a/Tools/Java/Source/MigrationTools/org/tianocore/migration/MigrationTool.java +++ b/Tools/Java/Source/MigrationTools/org/tianocore/migration/MigrationTool.java @@ -116,13 +116,19 @@ public class MigrationTool { * This method designates the location of temp directory. * * @param modulepath - * @return + * @return String */ public static final String getTempDir(String modulepath) { return "C:" + File.separator + "MigrationTool_Temp" + modulepath.replace(startpath, ""); } + /** + * This method is the default output path generating scheme. + * + * @param inputpath + * @return String + */ private static final String assignOutPutPath(String inputpath) { if (MigrationTool.defaultoutput) { return inputpath.replaceAll(Common.STRSEPARATER, "$1"); @@ -133,6 +139,14 @@ public class MigrationTool { } } + /** + * This function is called by main loop of the MigrationTool which + * verifies whether a dir contains a module, thus generating a map + * which shows the corresponding path for each module. + * + * @param filepath + * @throws Exception + */ public static final void seekModule(String filepath) throws Exception { if (ModuleInfo.isModule(filepath)) { ModuleInfoMap.put(new ModuleInfo(filepath), @@ -140,6 +154,12 @@ public class MigrationTool { } } + /** + * This is the main loop of the tool. + * + * @param path + * @throws Exception + */ public static final void startMigrateAll(String path) throws Exception { startpath = path; MigrationTool.ui.println("Project Migration"); @@ -162,8 +182,14 @@ public class MigrationTool { Common.deleteDir("C:" + File.separator + "MigrationTool_Temp"); } + /** + * This main method initializes the environment. + * + * @param args + * @throws Exception + */ public static void main(String[] args) throws Exception { ui = FirstPanel.getInstance(); db = Database.getInstance(); } -} +} \ No newline at end of file