summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjlin16 <jlin16@6f19259b-4bc3-4df7-8a09-765794883524>2006-06-09 02:13:57 +0000
committerjlin16 <jlin16@6f19259b-4bc3-4df7-8a09-765794883524>2006-06-09 02:13:57 +0000
commit4bf9d8150f41c66ab12f4c1a86d2691b2085d445 (patch)
treeec0b8cd4670889e9c299d8bea343b7d47dafe470
parent716b23718553e6baf18de23e66925d4b2927b0a7 (diff)
downloadedk2-platforms-4bf9d8150f41c66ab12f4c1a86d2691b2085d445.tar.xz
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@447 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--Tools/Source/PackageEditor/src/org/tianocore/packaging/GuidEditor.java3
-rw-r--r--Tools/Source/PackageEditor/src/org/tianocore/packaging/SpdFileContents.java17
2 files changed, 9 insertions, 11 deletions
diff --git a/Tools/Source/PackageEditor/src/org/tianocore/packaging/GuidEditor.java b/Tools/Source/PackageEditor/src/org/tianocore/packaging/GuidEditor.java
index cac74dfc1c..3057f17bab 100644
--- a/Tools/Source/PackageEditor/src/org/tianocore/packaging/GuidEditor.java
+++ b/Tools/Source/PackageEditor/src/org/tianocore/packaging/GuidEditor.java
@@ -84,8 +84,7 @@ public class GuidEditor extends AbstractCellEditor implements TableCellEditor, A
}
else { //User pressed dialog's "OK" button.
currentGuid = dialog.getGuid();
-// button.setText(currentGuid);
-// fireEditingStopped();
+
}
}
diff --git a/Tools/Source/PackageEditor/src/org/tianocore/packaging/SpdFileContents.java b/Tools/Source/PackageEditor/src/org/tianocore/packaging/SpdFileContents.java
index 17a5a0cdb7..b82c2bc7df 100644
--- a/Tools/Source/PackageEditor/src/org/tianocore/packaging/SpdFileContents.java
+++ b/Tools/Source/PackageEditor/src/org/tianocore/packaging/SpdFileContents.java
@@ -16,7 +16,7 @@ import java.io.File;
import java.io.IOException;
import java.util.List;
import java.util.ListIterator;
-
+import java.math.*;
import org.apache.xmlbeans.XmlObject;
import org.apache.xmlbeans.XmlOptions;
import org.apache.xmlbeans.XmlCursor;
@@ -63,7 +63,7 @@ public class SpdFileContents {
private SpdHeaderDocument.SpdHeader spdHdr = null;
- private PackageNameDocument.PackageName spdHdrPkgName = null;
+ private String spdHdrPkgName = null;
private GuidDocument.Guid spdHdrGuid = null;
@@ -209,7 +209,7 @@ public class SpdFileContents {
if (getSpdHdr() == null) {
spdHdr = psaRoot.addNewSpdHeader();
}
- s[0] = getSpdHdrPkgName().getStringValue();
+ s[0] = getSpdHdrPkgName();
s[1] = getSpdHdrGuid().getStringValue();
s[2] = getSpdHdrVer();
s[3] = getSpdHdrAbs().getStringValue();
@@ -1097,7 +1097,7 @@ public class SpdFileContents {
**/
public String getSpdHdrVer() {
if (spdHdr != null)
- return spdHdr.getVersion();
+ return spdHdr.getVersion() + "";
else
return null;
}
@@ -1109,7 +1109,7 @@ public class SpdFileContents {
**/
public void setSpdHdrVer(String ver) {
if (spdHdr != null) {
- spdHdr.setVersion(ver);
+ spdHdr.setVersion(new BigDecimal(ver.toCharArray()));
}
}
@@ -1171,7 +1171,7 @@ public class SpdFileContents {
@return PackageNameDocument.PackageName
**/
- public PackageNameDocument.PackageName getSpdHdrPkgName() {
+ public String getSpdHdrPkgName() {
if (spdHdrPkgName == null) {
spdHdrPkgName = getSpdHdr().getPackageName();
}
@@ -1186,10 +1186,9 @@ public class SpdFileContents {
public void setSpdHdrPkgName(String pkgName) {
if (getSpdHdrPkgName() != null) {
- getSpdHdrPkgName().setStringValue(pkgName);
+ getSpdHdr().setPackageName(pkgName);
} else {
- spdHdrPkgName = getSpdHdr().addNewPackageName();
- spdHdrPkgName.setStringValue(pkgName);
+ getSpdHdr().setPackageName(pkgName);
}
}