From: alfred Date: Thu, 24 Aug 2006 02:06:17 +0000 (+0000) Subject: modify ui title X-Git-Tag: edk2-stable201903~24499 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=821709bd1b37f1a61fe5c998530083665eb2c854 modify ui title git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1374 6f19259b-4bc3-4df7-8a09-765794883524 --- diff --git a/Tools/Source/MigrationTools/org/tianocore/migration/FirstPanel.java b/Tools/Source/MigrationTools/org/tianocore/migration/FirstPanel.java index 83cf9b60d2..7241c1b331 100644 --- a/Tools/Source/MigrationTools/org/tianocore/migration/FirstPanel.java +++ b/Tools/Source/MigrationTools/org/tianocore/migration/FirstPanel.java @@ -158,7 +158,8 @@ public final class FirstPanel extends JPanel implements ActionListener, ItemList //---------------------------------------------------------------------------------------// - public String getFilepath() { + public String getFilepath(String title) { + fc.setDialogTitle(title); if (fc.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) { log.append(fc.getSelectedFile().getAbsolutePath() + "\n"); return fc.getSelectedFile().getAbsolutePath(); @@ -170,7 +171,8 @@ public final class FirstPanel extends JPanel implements ActionListener, ItemList public void actionPerformed(ActionEvent e) { if ( e.getSource() == moduleButton ) { - modulepath = getFilepath(); + modulepath = getFilepath("Please choose a starting path"); + moduletext.setText(modulepath); } if ( e.getSource() == goButton ) { try { diff --git a/Tools/Source/MigrationTools/org/tianocore/migration/ModuleInfo.java b/Tools/Source/MigrationTools/org/tianocore/migration/ModuleInfo.java index 958e6bda4c..242b5c5450 100644 --- a/Tools/Source/MigrationTools/org/tianocore/migration/ModuleInfo.java +++ b/Tools/Source/MigrationTools/org/tianocore/migration/ModuleInfo.java @@ -27,7 +27,7 @@ public final class ModuleInfo { this.outputpath = this.modulepath.replaceAll(Common.strseparate, "$1"); } else { ModuleInfo.ui.println("Choose where to place the result"); - if ((outputpath = ModuleInfo.ui.getFilepath()) == null) { + if ((outputpath = ModuleInfo.ui.getFilepath("Please choose where to place the output module")) == null) { outputpath = modulepath; } ModuleInfo.ui.println("Output to: " + outputpath); @@ -85,9 +85,10 @@ public final class ModuleInfo { 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 : "); @@ -102,13 +103,16 @@ public final class ModuleInfo { 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); diff --git a/Tools/Source/MigrationTools/org/tianocore/migration/UI.java b/Tools/Source/MigrationTools/org/tianocore/migration/UI.java index c9a0deb028..2ad306d132 100644 --- a/Tools/Source/MigrationTools/org/tianocore/migration/UI.java +++ b/Tools/Source/MigrationTools/org/tianocore/migration/UI.java @@ -28,5 +28,5 @@ public interface UI { public String getInput(String message); - public String getFilepath(); // necessary ? + public String getFilepath(String title); // necessary ? }