1. Fix EDKT417: System hangs to setup build preference when there is no target.txt existing

2. Replace the values of ToolCode of SourceFile with the items defined in spec 

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1771 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
hche10x 2006-10-17 06:57:56 +00:00
parent 7b8617fbc9
commit 1fd225e033
3 changed files with 68 additions and 58 deletions

View File

@ -521,19 +521,26 @@ public class EnumerationData {
private void initToolCode() {
vToolCode.removeAllElements();
vToolCode.addElement(DataType.EMPTY_SELECT_ITEM);
vToolCode.addElement("Build_CCode");
vToolCode.addElement("Build_AUTOGEN");
vToolCode.addElement("Build_DPX");
vToolCode.addElement("Build_ASM");
vToolCode.addElement("Build_Assembly");
vToolCode.addElement("Build_Gcc_Assembly");
vToolCode.addElement("Build_IPF_Assembly_Code");
vToolCode.addElement("Build_IPF_PP_Code");
vToolCode.addElement("Build_Library");
vToolCode.addElement("Build_UNI");
vToolCode.addElement("Build_Unicode_Database");
vToolCode.addElement("Build_VFR");
vToolCode.addElement("Build_DUMMY");
// vToolCode.addElement("Build_CCode");
// vToolCode.addElement("Build_AUTOGEN");
// vToolCode.addElement("Build_DPX");
// vToolCode.addElement("Build_ASM");
// vToolCode.addElement("Build_Assembly");
// vToolCode.addElement("Build_Gcc_Assembly");
// vToolCode.addElement("Build_IPF_Assembly_Code");
// vToolCode.addElement("Build_IPF_PP_Code");
// vToolCode.addElement("Build_Library");
// vToolCode.addElement("Build_UNI");
// vToolCode.addElement("Build_Unicode_Database");
// vToolCode.addElement("Build_VFR");
// vToolCode.addElement("Build_DUMMY");
vToolCode.addElement("CC");
vToolCode.addElement("DLINK");
vToolCode.addElement("SLINK");
vToolCode.addElement("PP");
vToolCode.addElement("ASM");
vToolCode.addElement("ASMLINK");
vToolCode.addElement("ASL");
}
private void initPackageUsage() {

View File

@ -52,7 +52,7 @@ public class IFrame extends JFrame implements ActionListener, WindowListener, Co
// 1 - Whne editing module
//
private int intExitType = 0;
/**
Main class, used for test
@ -95,11 +95,11 @@ public class IFrame extends JFrame implements ActionListener, WindowListener, Co
Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
this.setLocation((d.width - intWidth) / 2, (d.height - intHeight) / 2);
}
/**
Start the window full of the screen
**/
Start the window full of the screen
**/
protected void maxWindow() {
Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
this.setLocation(0, 0);
@ -215,49 +215,50 @@ public class IFrame extends JFrame implements ActionListener, WindowListener, Co
this.dispose();
}
}
public int showSaveDialog() {
return JOptionPane.showConfirmDialog(null, "Save all changed files?", "Save", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE);
return JOptionPane.showConfirmDialog(null, "Save all changed files?", "Save", JOptionPane.YES_NO_CANCEL_OPTION,
JOptionPane.WARNING_MESSAGE);
}
/**
Check the input data is empty or not
@param strValue The input data which need be checked
@retval true - The input data is empty
@retval fals - The input data is not empty
**/
public boolean isEmpty(String strValue) {
return Tools.isEmpty(strValue);
}
/**
Display the dialog
**/
public void showDialog() {
this.setVisible(true);
}
Check the input data is empty or not
@param strValue The input data which need be checked
@retval true - The input data is empty
@retval fals - The input data is not empty
**/
public boolean isEmpty(String strValue) {
return Tools.isEmpty(strValue);
}
public void componentResized(ComponentEvent arg0) {
// TODO Auto-generated method stub
}
/**
Display the dialog
**/
public void showDialog() {
this.setVisible(true);
}
public void componentMoved(ComponentEvent arg0) {
// TODO Auto-generated method stub
}
public void componentResized(ComponentEvent arg0) {
// TODO Auto-generated method stub
public void componentShown(ComponentEvent arg0) {
// TODO Auto-generated method stub
}
}
public void componentHidden(ComponentEvent arg0) {
// TODO Auto-generated method stub
}
public void componentMoved(ComponentEvent arg0) {
// TODO Auto-generated method stub
}
public void componentShown(ComponentEvent arg0) {
// TODO Auto-generated method stub
}
public void componentHidden(ComponentEvent arg0) {
// TODO Auto-generated method stub
}
}

View File

@ -162,7 +162,7 @@ public class Preferences extends IFrame {
private JTextField jTextFieldThreadCount = null;
private String threadCount;
private String threadCount = "";
private boolean threadEnabled = false;
@ -547,7 +547,6 @@ public class Preferences extends IFrame {
*
*/
private void init() {
for (int i = 0; i < maxTargetLines; i++) {
targetLines[i] = null;
targetLineNumber[i] = -1;
@ -1119,6 +1118,9 @@ public class Preferences extends IFrame {
File toFile = new File(bakFile);
FileInputStream fromTxt = null;
FileOutputStream toBak = null;
if (!fromFile.exists()) {
fromFile.createNewFile();
}
try {
fromTxt = new FileInputStream(fromFile);
toBak = new FileOutputStream(toFile);