merged part of new changes in new schema, and changed genbuild code accordingly
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@643 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -591,8 +591,7 @@ public class AutoGen {
|
||||
// library class name.
|
||||
//
|
||||
for (int i = 0; i < libClassList.length; i++) {
|
||||
includerName = GlobalData.getLibClassIncluder(libClassList[i]
|
||||
.getStringValue());
|
||||
includerName = GlobalData.getLibClassIncluder(getStringValue((XmlObject)libClassList[i]));
|
||||
if (includerName != null) {
|
||||
str = CommonDefinition.include + " " + "<";
|
||||
str = str + includerName + ">\r\n";
|
||||
@@ -1095,14 +1094,14 @@ public class AutoGen {
|
||||
if (ppiList != null) {
|
||||
for (int i = 0; i < ppiList.length; i++) {
|
||||
isEqual = false;
|
||||
String ppiName = getStringValue((XmlObject)ppiList[i]);
|
||||
for (int j = 0; j < this.mPpiList.size(); j++) {
|
||||
if (this.mPpiList.get(j).equalsIgnoreCase(
|
||||
ppiList[i].getStringValue())) {
|
||||
if (this.mPpiList.get(j).equalsIgnoreCase(ppiName)) {
|
||||
isEqual = true;
|
||||
}
|
||||
}
|
||||
if (!isEqual) {
|
||||
this.mPpiList.add(ppiList[i].getStringValue());
|
||||
this.mPpiList.add(ppiName);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1112,14 +1111,14 @@ public class AutoGen {
|
||||
if (ppiNotifyList != null) {
|
||||
for (int i = 0; i < ppiNotifyList.length; i++) {
|
||||
isEqual = false;
|
||||
String ppiNotifyName = getStringValue((XmlObject)ppiNotifyList[i]);
|
||||
for (int j = 0; j < this.mPpiList.size(); j++) {
|
||||
if (this.mPpiList.get(j).equalsIgnoreCase(
|
||||
ppiNotifyList[i].getStringValue())) {
|
||||
if (this.mPpiList.get(j).equalsIgnoreCase(ppiNotifyName)) {
|
||||
isEqual = true;
|
||||
}
|
||||
}
|
||||
if (!isEqual) {
|
||||
this.mPpiList.add(ppiNotifyList[i].getStringValue());
|
||||
this.mPpiList.add(ppiNotifyName);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1159,14 +1158,14 @@ public class AutoGen {
|
||||
if (protocolList != null) {
|
||||
for (int i = 0; i < protocolList.length; i++) {
|
||||
isEqual = false;
|
||||
String protocolName = getStringValue((XmlObject)protocolList[i]);
|
||||
for (int j = 0; j < this.mProtocolList.size(); j++) {
|
||||
if (this.mProtocolList.get(j).equalsIgnoreCase(
|
||||
protocolList[i].getStringValue())) {
|
||||
if (this.mProtocolList.get(j).equalsIgnoreCase(protocolName)) {
|
||||
isEqual = true;
|
||||
}
|
||||
}
|
||||
if (!isEqual) {
|
||||
this.mProtocolList.add(protocolList[i].getStringValue());
|
||||
this.mProtocolList.add(protocolName);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1177,15 +1176,14 @@ public class AutoGen {
|
||||
if (protocolNotifyList != null) {
|
||||
for (int i = 0; i < protocolNotifyList.length; i++) {
|
||||
isEqual = false;
|
||||
String protocolNotifyName = getStringValue((XmlObject)protocolNotifyList[i]);
|
||||
for (int j = 0; j < this.mProtocolList.size(); j++) {
|
||||
if (this.mProtocolList.get(j).equalsIgnoreCase(
|
||||
protocolNotifyList[i].getStringValue())) {
|
||||
if (this.mProtocolList.get(j).equalsIgnoreCase(protocolNotifyName)) {
|
||||
isEqual = true;
|
||||
}
|
||||
}
|
||||
if (!isEqual) {
|
||||
this.mProtocolList.add(protocolNotifyList[i]
|
||||
.getStringValue());
|
||||
this.mProtocolList.add(protocolNotifyName);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1330,66 +1328,56 @@ public class AutoGen {
|
||||
if (ppiList != null) {
|
||||
for (index = 0; index < ppiList.length; index++) {
|
||||
isEqual = false;
|
||||
String name = getStringValue((XmlObject)ppiList[index]);
|
||||
for (int j = 0; j < this.mPpiList.size(); j++) {
|
||||
if (this.mPpiList.get(j).equalsIgnoreCase(
|
||||
ppiList[index].getStringValue())) {
|
||||
if (this.mPpiList.get(j).equalsIgnoreCase(name)) {
|
||||
isEqual = true;
|
||||
}
|
||||
}
|
||||
if (!isEqual) {
|
||||
this.mPpiList.add(ppiList[index]
|
||||
.getStringValue());
|
||||
this.mPpiList.add(name);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (ppiNotifyList != null) {
|
||||
for (index = 0; index < ppiNotifyList.length; index++) {
|
||||
isEqual = false;
|
||||
String name = getStringValue((XmlObject)ppiNotifyList[index]);
|
||||
for (int j = 0; j < this.mPpiList.size(); j++) {
|
||||
if (this.mPpiList.get(j).equalsIgnoreCase(
|
||||
ppiNotifyList[index]
|
||||
.getStringValue())) {
|
||||
if (this.mPpiList.get(j).equalsIgnoreCase(name)) {
|
||||
isEqual = true;
|
||||
}
|
||||
}
|
||||
if (!isEqual) {
|
||||
this.mPpiList.add(ppiNotifyList[index]
|
||||
.getStringValue());
|
||||
this.mPpiList.add(name);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (protocolList != null) {
|
||||
for (index = 0; index < protocolList.length; index++) {
|
||||
isEqual = false;
|
||||
String name = getStringValue((XmlObject)protocolList[index]);
|
||||
for (int j = 0; j < this.mProtocolList.size(); j++) {
|
||||
if (this.mProtocolList.get(j)
|
||||
.equalsIgnoreCase(
|
||||
protocolList[index]
|
||||
.getStringValue())) {
|
||||
if (this.mProtocolList.get(j).equalsIgnoreCase(name)) {
|
||||
isEqual = true;
|
||||
}
|
||||
}
|
||||
if (!isEqual) {
|
||||
this.mProtocolList.add(protocolList[index]
|
||||
.getStringValue());
|
||||
this.mProtocolList.add(name);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (protocolNotifyList != null) {
|
||||
for (index = 0; index < protocolNotifyList.length; index++) {
|
||||
isEqual = false;
|
||||
String name = getStringValue((XmlObject)protocolNotifyList[index]);
|
||||
for (int j = 0; j < this.mProtocolList.size(); j++) {
|
||||
if (this.mProtocolList.get(j)
|
||||
.equalsIgnoreCase(
|
||||
protocolNotifyList[index]
|
||||
.getStringValue())) {
|
||||
if (this.mProtocolList.get(j).equalsIgnoreCase(name)) {
|
||||
isEqual = true;
|
||||
}
|
||||
}
|
||||
if (!isEqual) {
|
||||
this.mProtocolList
|
||||
.add(protocolNotifyList[index]
|
||||
.getStringValue());
|
||||
this.mProtocolList.add(name);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2015,4 +2003,7 @@ public class AutoGen {
|
||||
|
||||
}
|
||||
|
||||
private String getStringValue(XmlObject xmlDoc) {
|
||||
return xmlDoc.getDomNode().getFirstChild().getNodeValue();
|
||||
}
|
||||
}
|
||||
|
@@ -20,7 +20,6 @@ import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.xmlbeans.XmlObject;
|
||||
import org.tianocore.LibraryClassDocument.LibraryClass;
|
||||
|
||||
@@ -81,7 +80,8 @@ public class AutogenLibOrder {
|
||||
if (libClassConsmList != null) {
|
||||
String[] classStr = new String[libClassConsmList.length];
|
||||
for (int k = 0; k < libClassConsmList.length; k++) {
|
||||
classStr[k] = libClassConsmList[k].getStringValue();
|
||||
//classStr[k] = libClassConsmList[k].getStringValue();
|
||||
classStr[k] = getStringValue((XmlObject)libClassConsmList[k]);
|
||||
}
|
||||
if (this.libInstanceMap.containsKey(libInstance[0])) {
|
||||
throw new Exception(
|
||||
@@ -99,17 +99,17 @@ public class AutogenLibOrder {
|
||||
.getLibraryClassArray(CommonDefinition.AlwaysProduced);
|
||||
if (libClassDeclList != null) {
|
||||
for (int j = 0; j < libClassDeclList.length; j++) {
|
||||
if (this.libClassMap.containsKey(libClassDeclList[j]
|
||||
.getStringValue())) {
|
||||
System.out.println(libClassDeclList[j].getStringValue()
|
||||
//if (this.libClassMap.containsKey(libClassDeclList[j]
|
||||
// .getStringValue())) {
|
||||
String libClassName = getStringValue((XmlObject)libClassDeclList[j]);
|
||||
if (this.libClassMap.containsKey(libClassName)) {
|
||||
System.out.println(libClassName
|
||||
+ " class is already implement by "
|
||||
+ this.libClassMap.get(libClassDeclList[j]
|
||||
.getStringValue()));
|
||||
+ this.libClassMap.get(libClassName));
|
||||
throw new Exception(libClassDeclList
|
||||
+ " is already have library instance!");
|
||||
} else {
|
||||
this.libClassMap.put(libClassDeclList[j]
|
||||
.getStringValue(), libInstance[0]);
|
||||
this.libClassMap.put(libClassName, libInstance[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -286,6 +286,10 @@ public class AutogenLibOrder {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private String getStringValue(XmlObject xmlDoc) {
|
||||
return xmlDoc.getDomNode().getFirstChild().getNodeValue();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user