]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdHeader.java
Use unified global data to get module informations.
[mirror_edk2.git] / Tools / Source / FrameworkWizard / src / org / tianocore / frameworkwizard / platform / ui / FpdHeader.java
index 4ca854c9279ffffe32efd06fe314fadfbbc7e5c9..f065b8e1e21fb9bf867b4135fc44c27aff8d6992 100644 (file)
@@ -20,6 +20,7 @@ import java.awt.event.ActionEvent;
 import java.awt.event.ComponentEvent;\r
 import java.awt.event.FocusAdapter;\r
 import java.awt.event.FocusEvent;\r
+import java.util.Vector;\r
 \r
 import javax.swing.JButton;\r
 import javax.swing.JFrame;\r
@@ -142,7 +143,7 @@ public class FpdHeader extends IInternalFrame {
             jTextFieldBaseName.addFocusListener(new FocusAdapter(){\r
                public void focusLost(FocusEvent e) {\r
                    if (!DataValidation.isUiNameType(jTextFieldBaseName.getText())) {\r
-                       JOptionPane.showMessageDialog(frame, "Package Name is NOT UiNameType.");\r
+                       JOptionPane.showMessageDialog(frame, "Package Name does not match the UiNameType datatype.");\r
                        return;\r
                    }\r
                    if (jTextFieldBaseName.getText().equals(ffc.getFpdHdrPlatformName())) {\r
@@ -170,7 +171,7 @@ public class FpdHeader extends IInternalFrame {
             jTextFieldGuid.addFocusListener(new FocusAdapter(){\r
                 public void focusLost(FocusEvent e) {\r
                     if (!DataValidation.isGuid(jTextFieldGuid.getText())) {\r
-                        JOptionPane.showMessageDialog(frame, "Guid is NOT GuidType.");\r
+                        JOptionPane.showMessageDialog(frame, "Guid must be in registry (8-4-4-4-12) format.");\r
                         return;\r
                     }\r
                     if (jTextFieldGuid.getText().equals(ffc.getFpdHdrGuidValue())) {\r
@@ -198,7 +199,7 @@ public class FpdHeader extends IInternalFrame {
             jTextFieldVersion.addFocusListener(new FocusAdapter(){\r
                 public void focusLost(FocusEvent e) {\r
                     if (!DataValidation.isVersion(jTextFieldVersion.getText())) {\r
-                        JOptionPane.showMessageDialog(frame, "Version is NOT version type.");\r
+                        JOptionPane.showMessageDialog(frame, "Version does not match the Version datatype.");\r
                         return;\r
                     }\r
                     if (jTextFieldVersion.getText().equals(ffc.getFpdHdrVer())) {\r
@@ -242,7 +243,7 @@ public class FpdHeader extends IInternalFrame {
             jTextAreaLicense.addFocusListener(new FocusAdapter(){\r
                 public void focusLost(FocusEvent e) {\r
                     if (jTextAreaLicense.getText().length() == 0) {\r
-                        JOptionPane.showMessageDialog(frame, "License contents could NOT be empty.");\r
+                        JOptionPane.showMessageDialog(frame, "License must be entered!");\r
                         return;\r
                     }\r
                     if (jTextAreaLicense.getText().equals(ffc.getFpdHdrLicense())) {\r
@@ -269,7 +270,7 @@ public class FpdHeader extends IInternalFrame {
             jTextAreaDescription.addFocusListener(new FocusAdapter(){\r
                 public void focusLost(FocusEvent e) {\r
                     if (jTextAreaDescription.getText().length() == 0) {\r
-                        JOptionPane.showMessageDialog(frame, "Description contents could NOT be empty.");\r
+                        JOptionPane.showMessageDialog(frame, "Description must be entered.");\r
                         return;\r
                     }\r
                     if (jTextAreaDescription.getText().equals(ffc.getFpdHdrDescription())) {\r
@@ -385,7 +386,7 @@ public class FpdHeader extends IInternalFrame {
             jTextFieldAbstract.addFocusListener(new FocusAdapter(){\r
                 public void focusLost(FocusEvent e) {\r
                     if (!DataValidation.isAbstract(jTextFieldAbstract.getText())) {\r
-                        JOptionPane.showMessageDialog(frame, "Abstract could NOT be empty.");\r
+                        JOptionPane.showMessageDialog(frame, "Abstract must be entered.");\r
                         return;\r
                     }\r
                     if (jTextFieldAbstract.getText().equals(ffc.getFpdHdrAbs())) {\r
@@ -413,7 +414,7 @@ public class FpdHeader extends IInternalFrame {
             jTextFieldCopyright.addFocusListener(new FocusAdapter(){\r
                 public void focusLost(FocusEvent e) {\r
                     if (!DataValidation.isCopyright(jTextFieldCopyright.getText())) {\r
-                        JOptionPane.showMessageDialog(frame, "Copyright contents could not be empty.");\r
+                        JOptionPane.showMessageDialog(frame, "Copyright must be entered.");\r
                         return;\r
                     }\r
                     if (jTextFieldCopyright.getText().equals(ffc.getFpdHdrCopyright())) {\r
@@ -493,7 +494,7 @@ public class FpdHeader extends IInternalFrame {
     private void init() {\r
         //this.setSize(500, 515);\r
         this.setContentPane(getJContentPane());\r
-        this.setTitle("Package Surface Area Header");\r
+        this.setTitle("Platform Surface Area Header");\r
         initFrame();\r
       \r
     }\r
@@ -534,7 +535,24 @@ public class FpdHeader extends IInternalFrame {
         if (ffc.getFpdHdrSpec() != null) {\r
             jTextFieldSpecification.setText(ffc.getFpdHdrSpec());\r
         }\r
-        ffc.setFpdHdrSpec(jTextFieldSpecification.getText());    \r
+        ffc.setFpdHdrSpec(jTextFieldSpecification.getText());\r
+        \r
+        ffc.genPlatformDefsSkuInfo("0", "DEFAULT");\r
+        Vector<Object> v = new Vector<Object>();\r
+        ffc.getPlatformDefsSupportedArchs(v);\r
+        if (v.size() == 0) {\r
+            v.add("IA32");\r
+            ffc.setPlatformDefsSupportedArchs(v);\r
+        }\r
+        v.removeAllElements();\r
+        ffc.getPlatformDefsBuildTargets(v);\r
+        if (v.size() == 0) {\r
+            v.add("DEBUG");\r
+            ffc.setPlatformDefsBuildTargets(v);\r
+        }\r
+        if (ffc.getPlatformDefsInterDir() == null) {\r
+            ffc.setPlatformDefsInterDir("UNIFIED");\r
+        }\r
     }\r
 \r
     /**\r
@@ -665,16 +683,16 @@ public class FpdHeader extends IInternalFrame {
        public void componentResized(ComponentEvent arg0) {\r
         int intPreferredWidth = 500;\r
         \r
-        resizeComponentWidth(this.jTextFieldBaseName, this.getWidth(), intPreferredWidth);\r
-               resizeComponentWidth(this.jTextFieldGuid, this.getWidth(), intPreferredWidth);\r
-               resizeComponentWidth(this.jTextFieldVersion, this.getWidth(), intPreferredWidth);\r
-        resizeComponentWidth(this.jTextFieldUrl, this.getWidth(), intPreferredWidth);\r
-               resizeComponentWidth(this.jScrollPaneLicense, this.getWidth(), intPreferredWidth);\r
-               resizeComponentWidth(this.jTextFieldCopyright, this.getWidth(), intPreferredWidth);\r
-               resizeComponentWidth(this.jScrollPaneDescription, this.getWidth(), intPreferredWidth);\r
-               resizeComponentWidth(this.jTextFieldSpecification, this.getWidth(), intPreferredWidth);\r
-               resizeComponentWidth(this.jTextFieldAbstract, this.getWidth(), intPreferredWidth);\r
+        Tools.resizeComponentWidth(this.jTextFieldBaseName, this.getWidth(), intPreferredWidth);\r
+        Tools.resizeComponentWidth(this.jTextFieldGuid, this.getWidth(), intPreferredWidth);\r
+        Tools.resizeComponentWidth(this.jTextFieldVersion, this.getWidth(), intPreferredWidth);\r
+        Tools.resizeComponentWidth(this.jTextFieldUrl, this.getWidth(), intPreferredWidth);\r
+        Tools.resizeComponentWidth(this.jScrollPaneLicense, this.getWidth(), intPreferredWidth);\r
+        Tools.resizeComponentWidth(this.jTextFieldCopyright, this.getWidth(), intPreferredWidth);\r
+        Tools.resizeComponentWidth(this.jScrollPaneDescription, this.getWidth(), intPreferredWidth);\r
+        Tools.resizeComponentWidth(this.jTextFieldSpecification, this.getWidth(), intPreferredWidth);\r
+        Tools.resizeComponentWidth(this.jTextFieldAbstract, this.getWidth(), intPreferredWidth);\r
                \r
-               relocateComponentX(this.jButtonGenerateGuid, this.getWidth(), jButtonGenerateGuid.getWidth(), 25);\r
+        Tools.relocateComponentX(this.jButtonGenerateGuid, this.getWidth(), jButtonGenerateGuid.getWidth(), 25);\r
        }\r
 }\r