2. PCD editor: remove attribute SupArchList, SupModList if no value set for them.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1027
6f19259b-4bc3-4df7-8a09-
765794883524
e.setTokenSpaceGuidCName(spaceGuid);\r
e.setDefaultValue(defaultString);\r
e.setHelpText(help);\r
e.setTokenSpaceGuidCName(spaceGuid);\r
e.setDefaultValue(defaultString);\r
e.setHelpText(help);\r
- if (archList != null && archList.length() > 0){\r
+ if (stringToList(archList) != null){\r
e.setSupArchList(stringToList(archList));\r
}\r
e.setSupArchList(stringToList(archList));\r
}\r
- if (modTypeList != null && modTypeList.length() > 0){\r
+ else{\r
+ if (e.isSetSupArchList()) {\r
+ e.unsetSupArchList();\r
+ }\r
+ }\r
+ if (stringToList(modTypeList) != null) {\r
e.setSupModuleList(stringToList(modTypeList));\r
}\r
e.setSupModuleList(stringToList(modTypeList));\r
}\r
+ else{\r
+ if (e.isSetSupModuleList()) {\r
+ e.unsetSupModuleList();\r
+ }\r
+ }\r
+ \r
} \r
cursor.dispose();\r
}\r
} \r
cursor.dispose();\r
}\r
import javax.swing.JTextArea;\r
import javax.swing.JTextField;\r
\r
import javax.swing.JTextArea;\r
import javax.swing.JTextField;\r
\r
import org.tianocore.PackageSurfaceAreaDocument;\r
import org.tianocore.frameworkwizard.common.DataValidation;\r
import org.tianocore.frameworkwizard.common.Log;\r
import org.tianocore.PackageSurfaceAreaDocument;\r
import org.tianocore.frameworkwizard.common.DataValidation;\r
import org.tianocore.frameworkwizard.common.Log;\r
\r
**/\r
private void initialize() {\r
\r
**/\r
private void initialize() {\r
- this.setTitle("PCD Definition");\r
+ this.setTitle("PCD Declarations");\r
this.setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\r
\r
}\r
this.setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\r
\r
}\r
String defaultVal = m.getValueAt(row, 4) + "";\r
String help = m.getValueAt(row, 5) + "";\r
String usage = getValidUsage(new Boolean(m.getValueAt(row, 6)+""), new Boolean(m.getValueAt(row, 7)+""), new Boolean(m.getValueAt(row, 8)+""), new Boolean(m.getValueAt(row, 9)+""), new Boolean(m.getValueAt(row, 10)+""));\r
String defaultVal = m.getValueAt(row, 4) + "";\r
String help = m.getValueAt(row, 5) + "";\r
String usage = getValidUsage(new Boolean(m.getValueAt(row, 6)+""), new Boolean(m.getValueAt(row, 7)+""), new Boolean(m.getValueAt(row, 8)+""), new Boolean(m.getValueAt(row, 9)+""), new Boolean(m.getValueAt(row, 10)+""));\r
- String archList = vectorToString(iCheckBoxList.getAllCheckedItemsString());\r
- String modTypeList = vectorToString(iCheckBoxList1.getAllCheckedItemsString());\r
+ \r
+ String archList = null;\r
+ if (m.getValueAt(row, 11) != null){\r
+ archList = m.getValueAt(row, 11).toString();\r
+ }\r
+ String modTypeList = null;\r
+ if (m.getValueAt(row, 12) != null) {\r
+ modTypeList = m.getValueAt(row, 12).toString(); \r
+ }\r
if (usage.length() == 0) {\r
JOptionPane.showMessageDialog(frame, "You must choose at least one usage for PCD entry.");\r
return;\r
if (usage.length() == 0) {\r
JOptionPane.showMessageDialog(frame, "You must choose at least one usage for PCD entry.");\r
return;\r