mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-29 16:44:10 +02:00
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:
parent
a55ae0f203
commit
821709bd1b
@ -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) {
|
if (fc.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) {
|
||||||
log.append(fc.getSelectedFile().getAbsolutePath() + "\n");
|
log.append(fc.getSelectedFile().getAbsolutePath() + "\n");
|
||||||
return fc.getSelectedFile().getAbsolutePath();
|
return fc.getSelectedFile().getAbsolutePath();
|
||||||
@ -170,7 +171,8 @@ public final class FirstPanel extends JPanel implements ActionListener, ItemList
|
|||||||
|
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
if ( e.getSource() == moduleButton ) {
|
if ( e.getSource() == moduleButton ) {
|
||||||
modulepath = getFilepath();
|
modulepath = getFilepath("Please choose a starting path");
|
||||||
|
moduletext.setText(modulepath);
|
||||||
}
|
}
|
||||||
if ( e.getSource() == goButton ) {
|
if ( e.getSource() == goButton ) {
|
||||||
try {
|
try {
|
||||||
|
@ -27,7 +27,7 @@ public final class ModuleInfo {
|
|||||||
this.outputpath = this.modulepath.replaceAll(Common.strseparate, "$1");
|
this.outputpath = this.modulepath.replaceAll(Common.strseparate, "$1");
|
||||||
} else {
|
} else {
|
||||||
ModuleInfo.ui.println("Choose where to place the result");
|
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;
|
outputpath = modulepath;
|
||||||
}
|
}
|
||||||
ModuleInfo.ui.println("Output to: " + outputpath);
|
ModuleInfo.ui.println("Output to: " + outputpath);
|
||||||
@ -85,9 +85,10 @@ public final class ModuleInfo {
|
|||||||
private static final void manipulate(ModuleInfo mi) throws Exception {
|
private static final void manipulate(ModuleInfo mi) throws Exception {
|
||||||
|
|
||||||
ModuleReader.ModuleScan(mi);
|
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"
|
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
|
// show result
|
||||||
if (ModuleInfo.printModuleInfo) {
|
if (ModuleInfo.printModuleInfo) {
|
||||||
ModuleInfo.ui.println("\nModule Information : ");
|
ModuleInfo.ui.println("\nModule Information : ");
|
||||||
@ -102,13 +103,16 @@ public final class ModuleInfo {
|
|||||||
show(mi.hashnonlocalfunc, "nonlocal : ");
|
show(mi.hashnonlocalfunc, "nonlocal : ");
|
||||||
show(mi.hashr8only, "hashr8only : ");
|
show(mi.hashr8only, "hashr8only : ");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//ModuleInfo.ui.yesOrNo("go on msawrite?");
|
||||||
new MsaWriter(mi).flush();
|
new MsaWriter(mi).flush();
|
||||||
|
//ModuleInfo.ui.yesOrNo("go on critic?");
|
||||||
|
|
||||||
if (ModuleInfo.doCritic) {
|
if (ModuleInfo.doCritic) {
|
||||||
Critic.fireAt(mi.outputpath + File.separator + "Migration_" + mi.modulename);
|
Critic.fireAt(mi.outputpath + File.separator + "Migration_" + mi.modulename);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//ModuleInfo.ui.yesOrNo("go on delete?");
|
||||||
Common.deleteDir(mi.modulepath + File.separator + "temp");
|
Common.deleteDir(mi.modulepath + File.separator + "temp");
|
||||||
|
|
||||||
ModuleInfo.ui.println("Errors Left : " + ModuleInfo.db.error);
|
ModuleInfo.ui.println("Errors Left : " + ModuleInfo.db.error);
|
||||||
|
@ -28,5 +28,5 @@ public interface UI {
|
|||||||
|
|
||||||
public String getInput(String message);
|
public String getInput(String message);
|
||||||
|
|
||||||
public String getFilepath(); // necessary ?
|
public String getFilepath(String title); // necessary ?
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user