diff options
author | jlin16 <jlin16@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-07-13 06:18:09 +0000 |
---|---|---|
committer | jlin16 <jlin16@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-07-13 06:18:09 +0000 |
commit | 410e0e9f02d5cba8a9eccb7da0b6ea75e4f462a4 (patch) | |
tree | f03820e1bf8da64a9e1a08af7cf5f5846f3a3de6 | |
parent | 738e75b619ddbf084cf0ee3b7ef545ce254e03ba (diff) | |
download | edk2-410e0e9f02d5cba8a9eccb7da0b6ea75e4f462a4.zip edk2-410e0e9f02d5cba8a9eccb7da0b6ea75e4f462a4.tar.gz edk2-410e0e9f02d5cba8a9eccb7da0b6ea75e4f462a4.tar.bz2 |
1. adjust contents layout of SPD header editor, FPD header editor.
2. modify globla data to reflect new added module information.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@956 6f19259b-4bc3-4df7-8a09-765794883524
5 files changed, 48 insertions, 51 deletions
diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/packaging/ui/SpdHeader.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/packaging/ui/SpdHeader.java index 7781a3d..7aff45a 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/packaging/ui/SpdHeader.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/packaging/ui/SpdHeader.java @@ -277,7 +277,7 @@ public class SpdHeader extends IInternalFrame { private JTextField getJTextFieldSpecification() {
if (jTextFieldSpecification == null) {
jTextFieldSpecification = new JTextField();
- jTextFieldSpecification.setBounds(new java.awt.Rectangle(160, 305, 320, 20));
+ jTextFieldSpecification.setBounds(new java.awt.Rectangle(161,330,320,20));
jTextFieldSpecification.setEditable(false);
jTextFieldSpecification.setPreferredSize(new java.awt.Dimension(320,20));
jTextFieldSpecification.addFocusListener(new FocusAdapter(){
@@ -332,7 +332,7 @@ public class SpdHeader extends IInternalFrame { private JScrollPane getJScrollPaneLicense() {
if (jScrollPaneLicense == null) {
jScrollPaneLicense = new JScrollPane();
- jScrollPaneLicense.setBounds(new java.awt.Rectangle(160, 85, 320, 80));
+ jScrollPaneLicense.setBounds(new java.awt.Rectangle(161,108,320,80));
jScrollPaneLicense.setHorizontalScrollBarPolicy(javax.swing.JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
jScrollPaneLicense.setPreferredSize(new java.awt.Dimension(320,80));
jScrollPaneLicense.setViewportView(getJTextAreaLicense());
@@ -349,7 +349,7 @@ public class SpdHeader extends IInternalFrame { private JScrollPane getJScrollPaneDescription() {
if (jScrollPaneDescription == null) {
jScrollPaneDescription = new JScrollPane();
- jScrollPaneDescription.setBounds(new java.awt.Rectangle(160, 220, 320, 80));
+ jScrollPaneDescription.setBounds(new java.awt.Rectangle(160,244,320,80));
jScrollPaneDescription.setHorizontalScrollBarPolicy(javax.swing.JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
jScrollPaneDescription.setViewportView(getJTextAreaDescription());
}
@@ -365,7 +365,7 @@ public class SpdHeader extends IInternalFrame { private JTextField getJTextFieldAbstract() {
if (jTextFieldAbstract == null) {
jTextFieldAbstract = new JTextField();
- jTextFieldAbstract.setBounds(new java.awt.Rectangle(160,195,320,20));
+ jTextFieldAbstract.setBounds(new java.awt.Rectangle(161,220,320,20));
jTextFieldAbstract.setPreferredSize(new java.awt.Dimension(320, 20));
jTextFieldAbstract.addFocusListener(new FocusAdapter(){
public void focusLost(FocusEvent e){
@@ -390,7 +390,7 @@ public class SpdHeader extends IInternalFrame { private JTextField getJTextFieldCopyright() {
if (jTextFieldCopyright == null) {
jTextFieldCopyright = new JTextField();
- jTextFieldCopyright.setBounds(new java.awt.Rectangle(160,330,320, 20));
+ jTextFieldCopyright.setBounds(new java.awt.Rectangle(160,86,320,20));
jTextFieldCopyright.setPreferredSize(new java.awt.Dimension(320,20));
jTextFieldCopyright.addFocusListener(new FocusAdapter(){
public void focusLost(FocusEvent e){
@@ -414,7 +414,7 @@ public class SpdHeader extends IInternalFrame { private JTextField getJTextField() {
if (jTextField == null) {
jTextField = new JTextField();
- jTextField.setBounds(new java.awt.Rectangle(160,170,320,20));
+ jTextField.setBounds(new java.awt.Rectangle(161,195,320,20));
jTextField.setPreferredSize(new java.awt.Dimension(320, 20));
jTextField.addFocusListener(new FocusAdapter(){
public void focusLost(FocusEvent e){
@@ -514,27 +514,27 @@ public class SpdHeader extends IInternalFrame { private JPanel getJContentPane() {
if (jContentPane == null) {
jLabel = new JLabel();
- jLabel.setBounds(new java.awt.Rectangle(15,170,140,20));
+ jLabel.setBounds(new java.awt.Rectangle(16,195,140,20));
jLabel.setText("URL");
jContentPane = new JPanel();
jContentPane.setLayout(null);
jContentPane.setLocation(new java.awt.Point(0, 0));
jContentPane.setPreferredSize(new java.awt.Dimension(500, 524));
jLabelAbstract = new JLabel();
- jLabelAbstract.setBounds(new java.awt.Rectangle(15, 220, 140, 20));
+ jLabelAbstract.setBounds(new java.awt.Rectangle(16,245,140,20));
jLabelAbstract.setText("Description");
jLabelSpecification = new JLabel();
jLabelSpecification.setText("Specification");
- jLabelSpecification.setBounds(new java.awt.Rectangle(15, 305, 140, 20));
+ jLabelSpecification.setBounds(new java.awt.Rectangle(16,330,140,20));
jLabelDescription = new JLabel();
jLabelDescription.setText("Abstract");
- jLabelDescription.setBounds(new java.awt.Rectangle(15, 195, 140, 20));
+ jLabelDescription.setBounds(new java.awt.Rectangle(16,220,140,20));
jLabelCopyright = new JLabel();
jLabelCopyright.setText("Copyright");
- jLabelCopyright.setBounds(new java.awt.Rectangle(15, 330, 140, 20));
+ jLabelCopyright.setBounds(new java.awt.Rectangle(15,86,140,20));
jLabelLicense = new JLabel();
jLabelLicense.setText("License");
- jLabelLicense.setBounds(new java.awt.Rectangle(15, 85, 140, 20));
+ jLabelLicense.setBounds(new java.awt.Rectangle(16,110,140,20));
jLabelVersion = new JLabel();
jLabelVersion.setText("Version");
jLabelVersion.setBounds(new java.awt.Rectangle(15, 60, 140, 20));
@@ -570,16 +570,16 @@ public class SpdHeader extends IInternalFrame { jStarLabel3 = new StarLabel();
jStarLabel3.setLocation(new java.awt.Point(0, 60));
jStarLabel4 = new StarLabel();
- jStarLabel4.setLocation(new java.awt.Point(0, 85));
+ jStarLabel4.setLocation(new java.awt.Point(1,110));
jStarLabel5 = new StarLabel();
- jStarLabel5.setLocation(new java.awt.Point(0, 330));
+ jStarLabel5.setLocation(new java.awt.Point(0,86));
jStarLabel6 = new StarLabel();
- jStarLabel6.setLocation(new java.awt.Point(0, 195));
+ jStarLabel6.setLocation(new java.awt.Point(1,220));
jStarLabel7 = new StarLabel();
- jStarLabel7.setLocation(new java.awt.Point(0, 305));
+ jStarLabel7.setLocation(new java.awt.Point(1,330));
jStarLabel7.setEnabled(false);
jStarLabel9 = new StarLabel();
- jStarLabel9.setLocation(new java.awt.Point(0, 220));
+ jStarLabel9.setLocation(new java.awt.Point(1,245));
jContentPane.add(jStarLabel1, null);
jContentPane.add(jStarLabel2, null);
jContentPane.add(jStarLabel3, null);
diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFrameworkModules.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFrameworkModules.java index c2d9985..c6af497 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFrameworkModules.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFrameworkModules.java @@ -362,7 +362,7 @@ public class FpdFrameworkModules extends IInternalFrame { GlobalData.initInfo("Tools" + File.separator + "Conf" + File.separator + "FrameworkDatabase.db", System.getenv("WORKSPACE"));
}
catch(Exception e){
- JOptionPane.showMessageDialog(frame, "FrameworkDatabase Corrupted.");
+ JOptionPane.showMessageDialog(frame, "Error occurred when getting module data.");
}
if (ffc == null){
@@ -447,8 +447,8 @@ public class FpdFrameworkModules extends IInternalFrame { }
if (keyPart[3] != null && keyPart[3].length() > 0 && !keyPart[3].equals("null")){
if(!pi.getVersion().equals(keyPart[3])){
- continue;
- }
+ continue;
+ }
}
Set<ModuleIdentification> smi = GlobalData.getModules(pi);
Iterator ismi = smi.iterator();
diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdHeader.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdHeader.java index 73791fe..53fb6e4 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdHeader.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdHeader.java @@ -278,7 +278,7 @@ public class FpdHeader extends IInternalFrame { private JTextField getJTextFieldSpecification() {
if (jTextFieldSpecification == null) {
jTextFieldSpecification = new JTextField();
- jTextFieldSpecification.setBounds(new java.awt.Rectangle(160, 305, 320, 20));
+ jTextFieldSpecification.setBounds(new java.awt.Rectangle(160,328,320,20));
jTextFieldSpecification.setEditable(false);
jTextFieldSpecification.setPreferredSize(new java.awt.Dimension(320,20));
jTextFieldSpecification.addFocusListener(new FocusAdapter(){
@@ -333,7 +333,7 @@ public class FpdHeader extends IInternalFrame { private JScrollPane getJScrollPaneLicense() {
if (jScrollPaneLicense == null) {
jScrollPaneLicense = new JScrollPane();
- jScrollPaneLicense.setBounds(new java.awt.Rectangle(160, 85, 320, 80));
+ jScrollPaneLicense.setBounds(new java.awt.Rectangle(160,107,320,80));
jScrollPaneLicense.setHorizontalScrollBarPolicy(javax.swing.JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
jScrollPaneLicense.setPreferredSize(new java.awt.Dimension(320,80));
jScrollPaneLicense.setViewportView(getJTextAreaLicense());
@@ -350,7 +350,7 @@ public class FpdHeader extends IInternalFrame { private JScrollPane getJScrollPaneDescription() {
if (jScrollPaneDescription == null) {
jScrollPaneDescription = new JScrollPane();
- jScrollPaneDescription.setBounds(new java.awt.Rectangle(160, 220, 320, 80));
+ jScrollPaneDescription.setBounds(new java.awt.Rectangle(160,243,320,80));
jScrollPaneDescription.setHorizontalScrollBarPolicy(javax.swing.JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
jScrollPaneDescription.setViewportView(getJTextAreaDescription());
}
@@ -366,7 +366,7 @@ public class FpdHeader extends IInternalFrame { private JTextField getJTextFieldAbstract() {
if (jTextFieldAbstract == null) {
jTextFieldAbstract = new JTextField();
- jTextFieldAbstract.setBounds(new java.awt.Rectangle(160,195,320,20));
+ jTextFieldAbstract.setBounds(new java.awt.Rectangle(160,218,320,20));
jTextFieldAbstract.setPreferredSize(new java.awt.Dimension(320, 20));
jTextFieldAbstract.addFocusListener(new FocusAdapter(){
public void focusLost(FocusEvent e) {
@@ -391,7 +391,7 @@ public class FpdHeader extends IInternalFrame { private JTextField getJTextFieldCopyright() {
if (jTextFieldCopyright == null) {
jTextFieldCopyright = new JTextField();
- jTextFieldCopyright.setBounds(new java.awt.Rectangle(160,330,320, 20));
+ jTextFieldCopyright.setBounds(new java.awt.Rectangle(160,85,320,20));
jTextFieldCopyright.setPreferredSize(new java.awt.Dimension(320,20));
jTextFieldCopyright.addFocusListener(new FocusAdapter(){
public void focusLost(FocusEvent e) {
@@ -415,7 +415,7 @@ public class FpdHeader extends IInternalFrame { private JTextField getJTextField() {
if (jTextField == null) {
jTextField = new JTextField();
- jTextField.setBounds(new java.awt.Rectangle(160,170,320,20));
+ jTextField.setBounds(new java.awt.Rectangle(160,193,320,20));
jTextField.setPreferredSize(new Dimension(320, 20));
jTextField.addFocusListener(new FocusAdapter(){
public void focusLost(FocusEvent e){
@@ -520,27 +520,27 @@ public class FpdHeader extends IInternalFrame { private JPanel getJContentPane() {
if (jContentPane == null) {
jLabel = new JLabel();
- jLabel.setBounds(new java.awt.Rectangle(15,170,140,20));
+ jLabel.setBounds(new java.awt.Rectangle(15,193,140,20));
jLabel.setText("URL");
jContentPane = new JPanel();
jContentPane.setLayout(null);
jContentPane.setLocation(new java.awt.Point(0, 0));
jContentPane.setSize(new java.awt.Dimension(500,423));
jLabelAbstract = new JLabel();
- jLabelAbstract.setBounds(new java.awt.Rectangle(15, 195, 140, 20));
+ jLabelAbstract.setBounds(new java.awt.Rectangle(15,218,140,20));
jLabelAbstract.setText("Abstract");
jLabelSpecification = new JLabel();
jLabelSpecification.setText("Specification");
- jLabelSpecification.setBounds(new java.awt.Rectangle(15, 305, 140, 20));
+ jLabelSpecification.setBounds(new java.awt.Rectangle(15,328,140,20));
jLabelDescription = new JLabel();
jLabelDescription.setText("Description");
- jLabelDescription.setBounds(new java.awt.Rectangle(15, 220, 140, 20));
+ jLabelDescription.setBounds(new java.awt.Rectangle(15,243,140,20));
jLabelCopyright = new JLabel();
jLabelCopyright.setText("Copyright");
- jLabelCopyright.setBounds(new java.awt.Rectangle(15, 330, 140, 20));
+ jLabelCopyright.setBounds(new java.awt.Rectangle(15,85,140,20));
jLabelLicense = new JLabel();
jLabelLicense.setText("License");
- jLabelLicense.setBounds(new java.awt.Rectangle(15, 85, 140, 20));
+ jLabelLicense.setBounds(new java.awt.Rectangle(15,108,140,20));
jLabelVersion = new JLabel();
jLabelVersion.setText("Version");
jLabelVersion.setBounds(new java.awt.Rectangle(15, 60, 140, 20));
@@ -576,18 +576,18 @@ public class FpdHeader extends IInternalFrame { jStarLabel3 = new StarLabel();
jStarLabel3.setLocation(new java.awt.Point(0, 60));
jStarLabel4 = new StarLabel();
- jStarLabel4.setLocation(new java.awt.Point(0, 85));
+ jStarLabel4.setLocation(new java.awt.Point(0,108));
jStarLabel5 = new StarLabel();
- jStarLabel5.setLocation(new java.awt.Point(0, 330));
+ jStarLabel5.setLocation(new java.awt.Point(0,85));
jStarLabel6 = new StarLabel();
- jStarLabel6.setLocation(new java.awt.Point(0, 195));
+ jStarLabel6.setLocation(new java.awt.Point(0,218));
jStarLabel7 = new StarLabel();
- jStarLabel7.setLocation(new java.awt.Point(0, 305));
+ jStarLabel7.setLocation(new java.awt.Point(0,328));
jStarLabel7.setEnabled(false);
jStarLabel8 = new StarLabel();
- jStarLabel8.setLocation(new java.awt.Point(0, 220));
+ jStarLabel8.setLocation(new java.awt.Point(0,243));
jStarLabel9 = new StarLabel();
- jStarLabel9.setLocation(new java.awt.Point(0, 280));
+ jStarLabel9.setLocation(new java.awt.Point(0,303));
jStarLabel9.setVisible(false);
jContentPane.add(jStarLabel1, null);
jContentPane.add(jStarLabel2, null);
diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/global/GlobalData.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/global/GlobalData.java index bdb278c..21e706b 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/global/GlobalData.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/global/GlobalData.java @@ -59,7 +59,7 @@ public class GlobalData { ///
/// Be used to ensure Global data will be initialized only once.
///
- private static boolean globalFlag = false;
+// private static boolean globalFlag = false;
///
/// Framework Database information: package list and platform list
@@ -146,13 +146,6 @@ public class GlobalData { Framework Dababase or SPD or MSA file is not valid
**/
public synchronized static void initInfo(String workspaceDatabaseFile, String workspaceDir) throws Exception {
- //
- // ensure this method will be revoked only once
- //
- if (globalFlag) {
- return;
- }
- globalFlag = true;
//
// Backup workspace directory. It will be used by other method
@@ -177,7 +170,9 @@ public class GlobalData { DbPathAndFilename dbPath = (DbPathAndFilename)iter.next();
String fileName = dbPath.getStringValue();
Spd spd = new Spd(new File(workspaceDir + File.separatorChar + fileName));
- packageList.add(spd.getPackageId());
+ if (!packageList.contains(spd.getPackageId())) {
+ packageList.add(spd.getPackageId());
+ }
spdTable.put(spd.getPackageId(), spd);
}
@@ -342,9 +337,7 @@ public class GlobalData { }
public synchronized static Map<String, XmlObject> getNativeMsa(File msaFile) throws Exception {
- if (! msaFile.exists()) {
- throw new Exception("Surface Area file [" + msaFile.getPath() + "] can't found.");
- }
+
try {
ModuleSurfaceAreaDocument doc = (ModuleSurfaceAreaDocument)XmlObject.Factory.parse(msaFile);
//
diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/global/SurfaceAreaQuery.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/global/SurfaceAreaQuery.java index 8ecc71b..1f6ea98 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/global/SurfaceAreaQuery.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/global/SurfaceAreaQuery.java @@ -976,7 +976,11 @@ public class SurfaceAreaQuery { // which in MsaHeader.
//
String name = msaHeader.getModuleName();
- String moduleType = msaHeader.getModuleType().toString();
+ String moduleType = "";
+ if (msaHeader.getModuleType() != null) {
+ moduleType = msaHeader.getModuleType().toString();
+ }
+
String guid = msaHeader.getGuidValue();
String version = msaHeader.getVersion();
|