mirror of https://github.com/acidanthera/audk.git
1. Fix EDKT379: Check if Constructor exists in a library when user adds a destructor
2. Fix EDKT378: Can not add any external definitions to a new created MSA file by wizard 3. Fix a bug in function wrapStringByWord of Tools.java git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1753 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
0915a2ce53
commit
aa197375d8
|
@ -332,6 +332,13 @@ public class Tools {
|
|||
String strTemp = "";
|
||||
boolean isCopied = true;
|
||||
|
||||
if (arg0 == null) {
|
||||
return "";
|
||||
}
|
||||
if (arg0.length() <= 0) {
|
||||
return "";
|
||||
}
|
||||
|
||||
//
|
||||
// Convert string to array by " "
|
||||
//
|
||||
|
|
|
@ -472,11 +472,13 @@ public class ModuleExterns extends IInternalFrame implements ItemListener {
|
|||
// Save pcd and flash map information first
|
||||
//
|
||||
Externs ex = Externs.Factory.newInstance();
|
||||
if (this.externs.getPcdIsDriver() != null) {
|
||||
ex.setPcdIsDriver(this.externs.getPcdIsDriver());
|
||||
}
|
||||
if (this.externs.getTianoR8FlashMapH()) {
|
||||
ex.setTianoR8FlashMapH(this.externs.getTianoR8FlashMapH());
|
||||
if (this.externs != null) {
|
||||
if (this.externs.getPcdIsDriver() != null) {
|
||||
ex.setPcdIsDriver(this.externs.getPcdIsDriver());
|
||||
}
|
||||
if (this.externs.getTianoR8FlashMapH()) {
|
||||
ex.setTianoR8FlashMapH(this.externs.getTianoR8FlashMapH());
|
||||
}
|
||||
}
|
||||
this.externs = ex;
|
||||
|
||||
|
|
|
@ -734,6 +734,10 @@ public class ExternsDlg extends IDialog implements ItemListener {
|
|||
Log.wrn("Update Externs", "At least one of Constructor or Destructor should have a value");
|
||||
return false;
|
||||
}
|
||||
if (isEmpty(this.jTextFieldConstructor.getText()) && !isEmpty(this.jTextFieldDestructor.getText())) {
|
||||
Log.wrn("Update Externs", "You must define a Constructor at the same time when you declare a Destructor");
|
||||
return false;
|
||||
}
|
||||
if (!isEmpty(this.jTextFieldConstructor.getText())) {
|
||||
if (!DataValidation.isC_NameType(this.jTextFieldConstructor.getText())) {
|
||||
Log.wrn("Update Externs", "Incorrect data type for Constructor");
|
||||
|
|
Loading…
Reference in New Issue