mirror of https://github.com/acidanthera/audk.git
Added some checks to see if the attributes were set - clears up some warning messages when trying to unset an attribute that was not set.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1024 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
97796eaa70
commit
322b772308
|
@ -340,22 +340,29 @@ public class SpdFileContents {
|
|||
if (instanceVer != null){
|
||||
lc.setRecommendedInstanceVersion(instanceVer);
|
||||
} else {
|
||||
lc.unsetRecommendedInstanceVersion();
|
||||
if (lc.isSetRecommendedInstanceVersion()) {
|
||||
lc.unsetRecommendedInstanceVersion();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
lc.unsetRecommendedInstanceGuid();
|
||||
lc.unsetRecommendedInstanceVersion();
|
||||
if (lc.isSetRecommendedInstanceGuid()) {
|
||||
lc.unsetRecommendedInstanceGuid();
|
||||
}
|
||||
}
|
||||
|
||||
if (stringToList(hdrAttribArch) != null){
|
||||
lc.setSupArchList(stringToList(hdrAttribArch));
|
||||
} else {
|
||||
lc.unsetSupArchList();
|
||||
if (lc.isSetSupArchList()) {
|
||||
lc.unsetSupArchList();
|
||||
}
|
||||
}
|
||||
if (stringToList(hdrAttribModType) != null){
|
||||
lc.setSupModuleList(stringToList(hdrAttribModType));
|
||||
} else {
|
||||
lc.unsetSupModuleList();
|
||||
if (lc.isSetSupModuleList()) {
|
||||
lc.unsetSupModuleList();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -397,22 +404,28 @@ public class SpdFileContents {
|
|||
e.setGuidValue(guid);
|
||||
e.setHelpText(hlp);
|
||||
if (stringToList(guidTypeList) != null) {
|
||||
e.setGuidTypeList(stringToList(guidTypeList));
|
||||
e.setGuidTypeList(stringToList(guidTypeList));
|
||||
}
|
||||
else{
|
||||
if (e.isSetGuidTypeList()) {
|
||||
e.unsetGuidTypeList();
|
||||
}
|
||||
}
|
||||
if (stringToList(archList) != null){
|
||||
e.setSupArchList(stringToList(archList));
|
||||
}
|
||||
else{
|
||||
if (e.isSetSupArchList()) {
|
||||
e.unsetSupArchList();
|
||||
}
|
||||
}
|
||||
if (stringToList(modTypeList) != null) {
|
||||
e.setSupModuleList(stringToList(modTypeList));
|
||||
}
|
||||
else{
|
||||
if (e.isSetSupModuleList()) {
|
||||
e.unsetSupModuleList();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -440,13 +453,17 @@ public class SpdFileContents {
|
|||
e.setSupArchList(stringToList(archList));
|
||||
}
|
||||
else{
|
||||
if (e.isSetSupArchList()) {
|
||||
e.unsetSupArchList();
|
||||
}
|
||||
}
|
||||
if (stringToList(modTypeList) != null) {
|
||||
e.setSupModuleList(stringToList(modTypeList));
|
||||
}
|
||||
else{
|
||||
if (e.isSetSupModuleList()) {
|
||||
e.unsetSupModuleList();
|
||||
}
|
||||
}
|
||||
}
|
||||
cursor.dispose();
|
||||
|
@ -473,13 +490,17 @@ public class SpdFileContents {
|
|||
e.setSupArchList(stringToList(archList));
|
||||
}
|
||||
else{
|
||||
if (e.isSetSupArchList()) {
|
||||
e.unsetSupArchList();
|
||||
}
|
||||
}
|
||||
if (stringToList(modTypeList) != null) {
|
||||
e.setSupModuleList(stringToList(modTypeList));
|
||||
}
|
||||
else{
|
||||
if (e.isSetSupModuleList()) {
|
||||
e.unsetSupModuleList();
|
||||
}
|
||||
}
|
||||
}
|
||||
cursor.dispose();
|
||||
|
@ -989,11 +1010,18 @@ public class SpdFileContents {
|
|||
*/
|
||||
if (hdrAttribArch != null) {
|
||||
lc.setSupArchList(stringToList(hdrAttribArch));
|
||||
} else {
|
||||
if (lc.isSetSupArchList()) {
|
||||
lc.unsetSupArchList();
|
||||
}
|
||||
}
|
||||
|
||||
if (hdrAttribModType != null) {
|
||||
lc.setSupModuleList(stringToList(hdrAttribModType));
|
||||
} else {
|
||||
lc.unsetSupModuleList();
|
||||
if (lc.isSetSupModuleList()) {
|
||||
lc.unsetSupModuleList();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1278,12 +1306,16 @@ public class SpdFileContents {
|
|||
if (archList != null){
|
||||
pe.setSupArchList(stringToList(archList));
|
||||
} else {
|
||||
pe.unsetSupArchList();
|
||||
if (pe.isSetSupArchList()) {
|
||||
pe.unsetSupArchList();
|
||||
}
|
||||
}
|
||||
if (modTypeList != null){
|
||||
pe.setSupModuleList(stringToList(modTypeList));
|
||||
} else {
|
||||
pe.unsetSupModuleList();
|
||||
if (pe.isSetSupModuleList()) {
|
||||
pe.unsetSupModuleList();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -251,7 +251,6 @@ public class SpdLibClassDecls extends IInternalFrame implements TableModelListen
|
|||
vModule.add("UEFI_DRIVER");
|
||||
vModule.add("UEFI_APPLICATION");
|
||||
vModule.add("USER_DEFINED");
|
||||
vModule.add("NONE");
|
||||
|
||||
jTable.getColumnModel().getColumn(cnSupMod).setCellEditor(new ListEditor(vModule));
|
||||
|
||||
|
@ -293,12 +292,8 @@ public class SpdLibClassDecls extends IInternalFrame implements TableModelListen
|
|||
arch = m.getValueAt(row, cnSupArch).toString();
|
||||
}
|
||||
String module = null;
|
||||
// if (lsm.isSelectionEmpty()) {
|
||||
if (m.getValueAt(row, cnSupMod) != null) {
|
||||
module = m.getValueAt(row, cnSupMod).toString();
|
||||
if (module == "NONE") {
|
||||
module = null;
|
||||
}
|
||||
}
|
||||
String[] rowData = {lib, hdr, hlp};
|
||||
if (!dataValidation(rowData)) {
|
||||
|
@ -308,7 +303,9 @@ public class SpdLibClassDecls extends IInternalFrame implements TableModelListen
|
|||
|
||||
// LAH getLibInstances(lib);
|
||||
|
||||
// LAH String guid = nameToGuid(name);
|
||||
if (name != null) {
|
||||
String guid = nameToGuid(name);
|
||||
}
|
||||
|
||||
// LAH WAS sfc.updateSpdLibClass(row, lib, hdr, hlp, guid, ver, arch, module);
|
||||
sfc.updateSpdLibClass(row, lib, hdr, hlp, null, null, arch, module);
|
||||
|
@ -589,8 +586,7 @@ public class SpdLibClassDecls extends IInternalFrame implements TableModelListen
|
|||
//
|
||||
//convert to GUID before storing recommended lib instance.
|
||||
//
|
||||
getLibInstances(row[0]);
|
||||
|
||||
getLibInstances(row[cnClassName]);
|
||||
// LAH recommendGuid = nameToGuid(row[3]);
|
||||
|
||||
// LAH WAS sfc.genSpdLibClassDeclarations(row[0], recommendGuid, row[1], row[2], row[5], null, null, row[4], null, row[6]);
|
||||
|
|
Loading…
Reference in New Issue