\r
private HashMap<String, String> defaultPcdValue = new HashMap<String, String>();\r
\r
+ private String itemType (String pcdInfo) {\r
+ \r
+ return pcdInfo.substring(pcdInfo.lastIndexOf(" ") + 1);\r
+ }\r
+ \r
/**\r
* look through all pcd data in all ModuleSA, create pcd -> ModuleSA mappings.\r
*/\r
}\r
\r
public ModuleSADocument.ModuleSA getModuleSA(String key) {\r
- String[] s = key.split(" ");\r
+ \r
if (getfpdFrameworkModules().getModuleSAList() == null || getfpdFrameworkModules().getModuleSAList().size() == 0) {\r
removeElement(getfpdFrameworkModules());\r
fpdFrameworkModules = null;\r
return null;\r
}\r
+ String[] s = key.split(" ");\r
+ String archsInKey = "";\r
+ if (s.length > 4) {\r
+ for (int i = 4; i < s.length; ++i) {\r
+ archsInKey += s[i];\r
+ archsInKey += " ";\r
+ }\r
+ archsInKey = archsInKey.trim();\r
+ }\r
+ \r
ListIterator li = getfpdFrameworkModules().getModuleSAList().listIterator();\r
while(li.hasNext()) {\r
ModuleSADocument.ModuleSA moduleSa = (ModuleSADocument.ModuleSA)li.next();\r
continue;\r
}\r
}\r
- //ToDo add arch check for s[4]\r
+ //ToDo add arch check .\r
if (moduleSa.getSupArchList() != null) {\r
- if (!listToString(moduleSa.getSupArchList()).equals(s[4])) {\r
- continue;\r
+ if (listToString(moduleSa.getSupArchList()).equals(archsInKey)) {\r
+ return moduleSa;\r
+ }\r
+ }\r
+ else {\r
+ if (archsInKey.length() == 0) {\r
+ return moduleSa;\r
}\r
}\r
- return moduleSa;\r
}\r
}\r
return null;\r
do {\r
PcdBuildDefinitionDocument.PcdBuildDefinition.PcdData pcdData = (PcdBuildDefinitionDocument.PcdBuildDefinition.PcdData)cursor.getObject();\r
if (pcdData.getCName().equals(cName) && pcdData.getTokenSpaceGuidCName().equals(tsGuid)) {\r
+ //\r
+ // change item type while not updating dynPcdData????\r
+ //\r
pcdData.setItemType(PcdItemTypes.Enum.forString(itemType));\r
if(pcdData.getDatumType().equals("VOID*")) {\r
pcdData.setMaxDatumSize(new Integer(maxSize));\r
// Using existing Pcd type, if this pcd already exists in other ModuleSA\r
//\r
if (pcdConsumer.size() > 0) {\r
- String[] valPart = pcdConsumer.get(0).split(" ");\r
- itemType = valPart[5];\r
+ \r
+ itemType = itemType (pcdConsumer.get(0));\r
}\r
String listValue = moduleSa.getModuleGuid() + " " + moduleSa.getModuleVersion() \r
+ " " + moduleSa.getPackageGuid() + " " + moduleSa.getPackageVersion() + " " + listToString(moduleSa.getSupArchList())\r