modify ui title

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1374 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
alfred 2006-08-24 02:06:17 +00:00
parent a55ae0f203
commit 821709bd1b
3 changed files with 14 additions and 8 deletions

View File

@ -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 {

View File

@ -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);

View File

@ -28,5 +28,5 @@ public interface UI {
public String getInput(String message);
public String getFilepath(); // necessary ?
public String getFilepath(String title); // necessary ?
}