1. Change ToolCode from text field to drop down list, and user can enter their custom...
authorhche10x <hche10x@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 28 Jul 2006 05:03:19 +0000 (05:03 +0000)
committerhche10x <hche10x@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 28 Jul 2006 05:03:19 +0000 (05:03 +0000)
2. Fix some coding style issue

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1133 6f19259b-4bc3-4df7-8a09-765794883524

25 files changed:
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/FrameworkWizardUI.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/EnumerationData.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/FileOperation.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Tools.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/IComboBox.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleDefinitions.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleEvents.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleProtocols.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleSourceFiles.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/MsaHeader.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/BootModesDlg.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/DataHubsDlg.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/EventsDlg.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/ExternsDlg.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/GuidsDlg.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/HiiPackagesDlg.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/HobsDlg.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/LibraryClassDefsDlg.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/PCDsDlg.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/PackageDepDlg.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/PpisDlg.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/ProtocolsDlg.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/SourceFilesDlg.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/SystemTablesDlg.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/VariablesDlg.java

index 2b6b25f..3c960b4 100644 (file)
@@ -2599,10 +2599,12 @@ public class FrameworkWizardUI extends IFrame implements MouseListener, TreeSele
      \r
      **/\r
     private void doubleClickModuleTreeNode() {\r
-        Identification id = iTree.getSelectNode().getId();\r
-        int intCategory = iTree.getSelectCategory();\r
+        Identification id = null;\r
+        int intCategory = -1;\r
         String path = null;\r
         try {\r
+            id = iTree.getSelectNode().getId();\r
+            intCategory = iTree.getSelectCategory();\r
             //          \r
             // If the node is not opened yet\r
             // Insert top level elements first\r
@@ -2894,8 +2896,7 @@ public class FrameworkWizardUI extends IFrame implements MouseListener, TreeSele
                 try {\r
                     wt.addPackageToDatabase(smb.getPid());\r
                 } catch (Exception e) {\r
-                    // TODO Auto-generated catch block\r
-                    e.printStackTrace();\r
+                    Log.err("addPackageToDatabase", e.getMessage());\r
                 }\r
                 vPackageList.addElement(smb.getPid());\r
 \r
@@ -2932,8 +2933,7 @@ public class FrameworkWizardUI extends IFrame implements MouseListener, TreeSele
                 try {\r
                     wt.addPlatformToDatabase(smb.getFid());\r
                 } catch (Exception e) {\r
-                    // TODO Auto-generated catch block\r
-                    e.printStackTrace();\r
+                    Log.err("addPlatformToDatabase", e.getMessage());\r
                 }\r
                 vPlatformList.addElement(smb.getFid());\r
                 //\r
index bf050e0..126bd1d 100644 (file)
@@ -84,6 +84,8 @@ public class EnumerationData {
     \r
     public Vector<String> vSourceFilesFileType = new Vector<String>();\r
     \r
+    public Vector<String> vToolCode = new Vector<String>();\r
+    \r
     //\r
     // Used by Package Dependencies\r
     //\r
@@ -203,6 +205,7 @@ public class EnumerationData {
         //\r
         initSourceFilesToolChainFamily();\r
         initSourceFilesFileType();\r
+        initToolCode();\r
         \r
         //\r
         // Used by Package Dependencies\r
@@ -491,6 +494,18 @@ public class EnumerationData {
         vSourceFilesFileType.addElement("EFI");\r
     }\r
     \r
+    private void initToolCode() {\r
+        vToolCode.removeAllElements();\r
+        vToolCode.addElement(DataType.EMPTY_SELECT_ITEM);\r
+        vToolCode.addElement("CC");\r
+        vToolCode.addElement("DLINK");\r
+        vToolCode.addElement("SLINK");\r
+        vToolCode.addElement("PP");\r
+        vToolCode.addElement("ASM");\r
+        vToolCode.addElement("ASMLINK");\r
+        vToolCode.addElement("ASL");\r
+    }\r
+    \r
     private void initPackageUsage() {\r
         vPackageUsage.removeAllElements();\r
         vPackageUsage.addElement("ALWAYS_CONSUMED");\r
@@ -1010,4 +1025,12 @@ public class EnumerationData {
     public void setVPackageUsage(Vector<String> packageUsage) {\r
         vPackageUsage = packageUsage;\r
     }\r
+\r
+    public Vector<String> getVToolCode() {\r
+        return vToolCode;\r
+    }\r
+\r
+    public void setVToolCode(Vector<String> toolCode) {\r
+        vToolCode = toolCode;\r
+    }\r
 }\r
index b0802a6..7f15de8 100644 (file)
@@ -40,26 +40,8 @@ public class FileOperation {
      **/\r
     public static void newFolder(String folderPath) throws Exception {\r
         folderPath = Tools.convertPathToCurrentOsType(folderPath);\r
-        String temp = "";\r
-        while (folderPath.length() > 0) {\r
-            if (folderPath.indexOf(DataType.FILE_SEPARATOR) > -1) {\r
-                temp = temp + folderPath.substring(0, folderPath.indexOf(DataType.FILE_SEPARATOR));\r
-                if (temp.endsWith(":")) {\r
-                    temp = Tools.addFileSeparator(temp);\r
-                    folderPath = folderPath.substring(folderPath.indexOf(DataType.FILE_SEPARATOR) + DataType.FILE_SEPARATOR.length());\r
-                    continue;\r
-                }\r
-                temp = Tools.addFileSeparator(temp);\r
-                folderPath = folderPath.substring(folderPath.indexOf(DataType.FILE_SEPARATOR) + DataType.FILE_SEPARATOR.length());    \r
-            } else {\r
-                temp = Tools.addFileSeparator(temp) + folderPath;\r
-                folderPath = "";\r
-            }\r
-            File f = new File(temp);\r
-            if (!f.exists()) {\r
-                f.mkdir();\r
-            }\r
-        }\r
+        File f = new File(folderPath);\r
+        f.mkdirs();\r
     }\r
 \r
     /**\r
index 59204a8..7cb2e9d 100644 (file)
@@ -320,7 +320,7 @@ public class Tools {
      \r
      **/\r
     public static void showInformationMessage(String arg0) {\r
-        JOptionPane.showConfirmDialog(null, arg0, "Error", JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE);\r
+        JOptionPane.showConfirmDialog(null, arg0, "Info", JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE);\r
     }\r
 \r
     /**\r
index 13d7771..bba0866 100644 (file)
@@ -92,7 +92,8 @@ public class IComboBox extends JComboBox implements KeyListener, MouseListener,
         this.addKeyListener(this);\r
         this.getEditor().getEditorComponent().addKeyListener(this);\r
         this.getEditor().getEditorComponent().addFocusListener(this);\r
-        this.setToolTipText("Double Click to add an entry and finished by press ENTER. Press DELETE can remove selected entry.");\r
+        this.setToolTipText("<html>Double Click to add an entry and finished by press ENTER. <br>"\r
+                            + "Press DELETE can remove selected entry.</html>");\r
     }\r
 \r
     public void keyPressed(KeyEvent arg0) {\r
@@ -122,6 +123,7 @@ public class IComboBox extends JComboBox implements KeyListener, MouseListener,
                 }\r
                 this.setEditable(false);\r
             }\r
+\r
             if (arg0.getKeyCode() == KeyEvent.VK_ESCAPE) {\r
                 closeEdit();\r
             }\r
@@ -160,7 +162,6 @@ public class IComboBox extends JComboBox implements KeyListener, MouseListener,
             this.setEditable(true);\r
             this.getEditor().setItem("");\r
         }\r
-\r
     }\r
 \r
     public void mouseEntered(MouseEvent arg0) {\r
@@ -190,8 +191,5 @@ public class IComboBox extends JComboBox implements KeyListener, MouseListener,
     private void closeEdit() {\r
         this.setEditable(false);\r
         this.getEditor().setItem("");\r
-        if (this.getItemCount() > 0) {\r
-            this.setSelectedIndex(0);\r
-        }\r
     }\r
 }\r
index fa0963d..a427b2f 100644 (file)
@@ -65,9 +65,9 @@ public class ModuleDefinitions extends IInternalFrame {
     private StarLabel jStarLabel2 = null;\r
 \r
     private StarLabel jStarLabel3 = null;\r
-    \r
+\r
     private OpeningModuleType omt = null;\r
-    \r
+\r
     private ClonedFrom cf = null;\r
 \r
     private ModuleSurfaceAreaDocument.ModuleSurfaceArea msa = null;\r
@@ -136,12 +136,12 @@ public class ModuleDefinitions extends IInternalFrame {
         if (iCheckBoxListArch == null) {\r
             iCheckBoxListArch = new ICheckBoxList();\r
             iCheckBoxListArch.addFocusListener(this);\r
-            iCheckBoxListArch.setToolTipText("<html>Deselecting a checkbox will restrict this module<br>" +\r
-                    "for use with the selected architectures, <br>" +\r
-                    "based on the list of items that are checked. <br>" +\r
-                    "If all boxes are checked, <br>" +\r
-                    "then the module will support all <br>" +\r
-                    "current AND FUTURE architectures</html>");\r
+            iCheckBoxListArch.setToolTipText("<html>Deselecting a checkbox will restrict this module<br>"\r
+                                             + "for use with the selected architectures, <br>"\r
+                                             + "based on the list of items that are checked. <br>"\r
+                                             + "If all boxes are checked, <br>"\r
+                                             + "then the module will support all <br>"\r
+                                             + "current AND FUTURE architectures</html>");\r
         }\r
         return iCheckBoxListArch;\r
     }\r
@@ -157,14 +157,14 @@ public class ModuleDefinitions extends IInternalFrame {
             jComboBoxBinaryModule.setBounds(new java.awt.Rectangle(160, 35, 320, 20));\r
             jComboBoxBinaryModule.setPreferredSize(new java.awt.Dimension(320, 20));\r
             jComboBoxBinaryModule.addFocusListener(this);\r
-            jComboBoxBinaryModule.setToolTipText("<html>Modules are either source modules <br>" +\r
-                                                 "which can be compiled or binary <br>" +\r
-                                                 "modules which are linked.  <br>" +\r
-                                                 "A module cannot contain both. <br>" +\r
-                                                 "The GUID numbers should be identical <br>" +\r
-                                                 "for a binary and source MSA, <br>" +\r
-                                                 "but the BINARY MSA should have <br>" +\r
-                                                 "a higher version number.</html>");\r
+            jComboBoxBinaryModule.setToolTipText("<html>Modules are either source modules <br>"\r
+                                                 + "which can be compiled or binary <br>"\r
+                                                 + "modules which are linked.  <br>"\r
+                                                 + "A module cannot contain both. <br>"\r
+                                                 + "The GUID numbers should be identical <br>"\r
+                                                 + "for a binary and source MSA, <br>"\r
+                                                 + "but the BINARY MSA should have <br>"\r
+                                                 "a higher version number.</html>");\r
         }\r
         return jComboBoxBinaryModule;\r
     }\r
@@ -231,7 +231,7 @@ public class ModuleDefinitions extends IInternalFrame {
         this.omt = inOmt;\r
         this.msa = omt.getXmlMsa();\r
         if (msa.getModuleDefinitions() != null) {\r
-            this.cf = msa.getModuleDefinitions().getClonedFrom();    \r
+            this.cf = msa.getModuleDefinitions().getClonedFrom();\r
         }\r
         init(msa.getModuleDefinitions());\r
         this.setVisible(true);\r
@@ -283,7 +283,7 @@ public class ModuleDefinitions extends IInternalFrame {
         this.iCheckBoxListArch.setAllItems(ed.getVSupportedArchitectures());\r
         Tools.generateComboBoxByVector(jComboBoxBinaryModule, ed.getVBoolean());\r
     }\r
-    \r
+\r
     private boolean check() {\r
         if (isEmpty(this.jTextFieldOutputFileBasename.getText())) {\r
             Log.wrn("Update Definitions", "Output File Basename couldn't be empty!");\r
@@ -332,7 +332,7 @@ public class ModuleDefinitions extends IInternalFrame {
             } else {\r
                 md.setBinaryModule(true);\r
             }\r
-            \r
+\r
             //\r
             // Set ClonedFrom field\r
             //\r
@@ -344,9 +344,9 @@ public class ModuleDefinitions extends IInternalFrame {
             // Save Arch list\r
             //\r
             md.setSupportedArchitectures(this.iCheckBoxListArch.getAllCheckedItemsString());\r
-            \r
+\r
             msa.setModuleDefinitions(md);\r
-            \r
+\r
             this.omt.setSaved(false);\r
 \r
         } catch (Exception e) {\r
index d7a4e13..e709334 100644 (file)
@@ -313,7 +313,7 @@ public class ModuleEvents extends IInternalFrame {
         }\r
         return jContentPane;\r
     }\r
-    \r
+\r
     private void showEdit(int index) {\r
         EventsDlg dlg = new EventsDlg(vid.getEvents(index), new IFrame());\r
         int result = dlg.showDialog();\r
index f708840..b62338b 100644 (file)
@@ -307,7 +307,7 @@ public class ModuleProtocols extends IInternalFrame {
         }\r
         return jContentPane;\r
     }\r
-    \r
+\r
     private void showEdit(int index) {\r
         ProtocolsDlg dlg = new ProtocolsDlg(vid.getProtocols(index), new IFrame());\r
         int result = dlg.showDialog();\r
@@ -450,7 +450,7 @@ public class ModuleProtocols extends IInternalFrame {
             Log.err("Update Protocols", e.getMessage());\r
         }\r
     }\r
-    \r
+\r
     /* (non-Javadoc)\r
      * @see javax.swing.event.ListSelectionListener#valueChanged(javax.swing.event.ListSelectionEvent)\r
      *\r
index b2fee47..644302f 100644 (file)
@@ -348,7 +348,8 @@ public class ModuleSourceFiles extends IInternalFrame {
     }\r
 \r
     private void showEdit(int index) {\r
-        SourceFilesDlg sfd = new SourceFilesDlg(this.vSourceFiles.getSourceFiles(index), new IFrame(), omt.getId().getPath());\r
+        SourceFilesDlg sfd = new SourceFilesDlg(this.vSourceFiles.getSourceFiles(index), new IFrame(), omt.getId()\r
+                                                                                                          .getPath());\r
         int result = sfd.showDialog();\r
         if (result == DataType.RETURN_TYPE_OK) {\r
             if (index == -1) {\r
index c161b5d..4f6cc95 100644 (file)
@@ -1052,7 +1052,7 @@ public class MsaHeader extends IInternalFrame {
                 }\r
             }\r
         }\r
-        \r
+\r
         this.save();\r
     }\r
 }\r
index 1ff4c8b..f7cc1a9 100644 (file)
@@ -50,371 +50,386 @@ import org.tianocore.frameworkwizard.module.Identifications.BootModes.BootModesI
  */\r
 public class BootModesDlg extends IDialog {\r
 \r
-  // /\r
-  // / Define class Serial Version UID\r
-  // /\r
-  private static final long serialVersionUID = -3888558623432442561L;\r
+    // /\r
+    // / Define class Serial Version UID\r
+    // /\r
+    private static final long serialVersionUID = -3888558623432442561L;\r
 \r
-  //\r
-  // Define class members\r
-  //\r
-  private JPanel jContentPane = null;\r
+    //\r
+    // Define class members\r
+    //\r
+    private JPanel jContentPane = null;\r
 \r
-  private JLabel jLabelBootModeName = null;\r
+    private JLabel jLabelBootModeName = null;\r
 \r
-  private JComboBox jComboBoxBootModeName = null;\r
+    private JComboBox jComboBoxBootModeName = null;\r
 \r
-  private JLabel jLabelUsage = null;\r
+    private JLabel jLabelUsage = null;\r
 \r
-  private JComboBox jComboBoxUsage = null;\r
+    private JComboBox jComboBoxUsage = null;\r
 \r
-  private StarLabel jStarLabel1 = null;\r
+    private StarLabel jStarLabel1 = null;\r
 \r
-  private StarLabel jStarLabel2 = null;\r
+    private StarLabel jStarLabel2 = null;\r
 \r
-  private JLabel jLabelFeatureFlag = null;\r
+    private JLabel jLabelFeatureFlag = null;\r
 \r
-  private JTextField jTextFieldFeatureFlag = null;\r
+    private JTextField jTextFieldFeatureFlag = null;\r
 \r
-  private JLabel jLabelArch = null;\r
+    private JLabel jLabelArch = null;\r
 \r
-  private JScrollPane jScrollPane = null;\r
+    private JScrollPane jScrollPane = null;\r
 \r
-  private JLabel jLabelHelpText = null;\r
+    private JLabel jLabelHelpText = null;\r
 \r
-  private JTextArea jTextAreaHelpText = null;\r
+    private JTextArea jTextAreaHelpText = null;\r
 \r
-  private JScrollPane jScrollPaneHelpText = null;\r
+    private JScrollPane jScrollPaneHelpText = null;\r
 \r
-  private ArchCheckBox jArchCheckBox = null;\r
+    private ArchCheckBox jArchCheckBox = null;\r
 \r
-  private JButton jButtonOk = null;\r
+    private JButton jButtonOk = null;\r
 \r
-  private JButton jButtonCancel = null;\r
+    private JButton jButtonCancel = null;\r
 \r
-  //\r
-  // Not used by UI\r
-  //\r
-  private BootModesIdentification id = null;\r
+    //\r
+    // Not used by UI\r
+    //\r
+    private BootModesIdentification id = null;\r
+\r
+    private EnumerationData ed = new EnumerationData();\r
+\r
+    /**\r
+     * This method initializes jComboBoxBootModeName\r
+     * \r
+     * @return javax.swing.JComboBox jComboBoxBootModeName\r
+     * \r
+     */\r
+    private JComboBox getJComboBoxBootModeName() {\r
+        if (jComboBoxBootModeName == null) {\r
+            jComboBoxBootModeName = new JComboBox();\r
+            jComboBoxBootModeName.setBounds(new java.awt.Rectangle(160, 10, 320, 20));\r
+            jComboBoxBootModeName.setPreferredSize(new java.awt.Dimension(320, 20));\r
+            jComboBoxBootModeName\r
+                                 .setToolTipText("<html><table>"\r
+                                                 + "<tr><td>FULL</td><td>Boot with full configuration</td></tr>"\r
+                                                 + "<tr><td>MINIMAL</td><td>Boot with minimal configuration</td></tr>"\r
+                                                 + "<tr><td>NO_CHANGE</td><td>Boot assuming no configuration changes</td></tr>"\r
+                                                 + "<tr><td>DIAGNOSTICS</td><td>Boot with full configuration plus diagnostics</td></tr>"\r
+                                                 + "<tr><td>DEFAULT</td><td>Boot with default settings</td></tr>"\r
+                                                 + "<tr><td>BOOT_ON_S#_RESUME</td><td>where # is 2, 3, 4 or 5</td></tr>"\r
+                                                 + "<tr><td>FLASH_UPDATE</td><td>Boot on flash update</td></tr>"\r
+                                                 + "<tr><td>RECOVERY</td><td>Boot in recovery mode</td></tr>"\r
+                                                 + "</table></html>");\r
+        }\r
+        return jComboBoxBootModeName;\r
+    }\r
 \r
-  private EnumerationData ed = new EnumerationData();\r
+    /**\r
+     * This method initializes jComboBoxUsage\r
+     * \r
+     * @return javax.swing.JComboBox jComboBoxUsage\r
+     * \r
+     */\r
+    private JComboBox getJComboBoxUsage() {\r
+        if (jComboBoxUsage == null) {\r
+            jComboBoxUsage = new JComboBox();\r
+            jComboBoxUsage.setBounds(new java.awt.Rectangle(160, 35, 320, 20));\r
+            jComboBoxUsage.setPreferredSize(new java.awt.Dimension(320, 20));\r
+            jComboBoxUsage\r
+                          .setToolTipText("<html><table>"\r
+                                          + "<tr><td>ALWAYS_CONSUMED</td><td>Indicates Supports the specified boot mode</td></tr>"\r
+                                          + "<tr><td>SOMETIMES_CONSUMED</td><td>Indicates Supports the specified boot mode on some execution paths</td></tr>"\r
+                                          + "<tr><td>ALWAYS_PRODUCED</td><td>Always changes the boot mode</td></tr>"\r
+                                          + "<tr><td>SOMETIMES_PRODUCED</td><td>Change the boot mode sometimes</td></tr>"\r
+                                          + "</table></html>");\r
+        }\r
+        return jComboBoxUsage;\r
+    }\r
 \r
-  /**\r
-   * This method initializes jComboBoxBootModeName\r
-   * \r
-   * @return javax.swing.JComboBox jComboBoxBootModeName\r
-   * \r
-   */\r
-  private JComboBox getJComboBoxBootModeName() {\r
-    if (jComboBoxBootModeName == null) {\r
-      jComboBoxBootModeName = new JComboBox();\r
-      jComboBoxBootModeName.setBounds(new java.awt.Rectangle(160, 10, 320, 20));\r
-      jComboBoxBootModeName.setPreferredSize(new java.awt.Dimension(320, 20));\r
-      jComboBoxBootModeName.setToolTipText("<html><table><tr><td>FULL</td><td>Boot with full configuration</td></tr><tr><td>MINIMAL</td><td>Boot with minimal configuration</td></tr><tr><td>NO_CHANGE</td><td>Boot assuming no configuration changes</td></tr><tr><td>DIAGNOSTICS</td><td>Boot with full configuration plus diagnostics</td></tr><tr><td>DEFAULT</td><td>Boot with default settings</td></tr><tr><td>BOOT_ON_S#_RESUME</td><td>where # is 2, 3, 4 or 5</td></tr><tr><td>FLASH_UPDATE</td><td>Boot on flash update</td></tr><tr><td>RECOVERY</td><td>Boot in recovery mode</td></tr></table></html>");\r
+    /**\r
+     * This method initializes jTextFieldFeatureFlag\r
+     * \r
+     * @return javax.swing.JTextField\r
+     */\r
+    private JTextField getJTextFieldFeatureFlag() {\r
+        if (jTextFieldFeatureFlag == null) {\r
+            jTextFieldFeatureFlag = new JTextField();\r
+            jTextFieldFeatureFlag.setBounds(new java.awt.Rectangle(160, 105, 320, 20));\r
+            jTextFieldFeatureFlag.setPreferredSize(new java.awt.Dimension(320, 20));\r
+            jTextFieldFeatureFlag.setToolTipText("Postfix expression that must evaluate to TRUE or FALSE");\r
+        }\r
+        return jTextFieldFeatureFlag;\r
     }\r
-    return jComboBoxBootModeName;\r
-  }\r
-\r
-  /**\r
-   * This method initializes jComboBoxUsage\r
-   * \r
-   * @return javax.swing.JComboBox jComboBoxUsage\r
-   * \r
-   */\r
-  private JComboBox getJComboBoxUsage() {\r
-    if (jComboBoxUsage == null) {\r
-      jComboBoxUsage = new JComboBox();\r
-      jComboBoxUsage.setBounds(new java.awt.Rectangle(160, 35, 320, 20));\r
-      jComboBoxUsage.setPreferredSize(new java.awt.Dimension(320, 20));\r
-      jComboBoxUsage.setToolTipText("<html><table><tr><td>ALWAYS_CONSUMED</td><td>Indicates Supports the specified boot mode</td></tr><tr><td>SOMETIMES_CONSUMED</td><td>Indicates Supports the specified boot mode on some execution paths</td></tr><tr><td>ALWAYS_PRODUCED</td><td>Always changes the boot mode</td></tr><tr><td>SOMETIMES_PRODUCED</td><td>Change the boot mode sometimes</td></tr></table></html>");\r
+\r
+    /**\r
+     * This method initializes jScrollPane\r
+     * \r
+     * @return javax.swing.JScrollPane\r
+     */\r
+    private JScrollPane getJScrollPane() {\r
+        if (jScrollPane == null) {\r
+            jScrollPane = new JScrollPane();\r
+            jScrollPane.setViewportView(getJContentPane());\r
+        }\r
+        return jScrollPane;\r
     }\r
-    return jComboBoxUsage;\r
-  }\r
-\r
-  /**\r
-   * This method initializes jTextFieldFeatureFlag\r
-   * \r
-   * @return javax.swing.JTextField\r
-   */\r
-  private JTextField getJTextFieldFeatureFlag() {\r
-    if (jTextFieldFeatureFlag == null) {\r
-      jTextFieldFeatureFlag = new JTextField();\r
-      jTextFieldFeatureFlag\r
-          .setBounds(new java.awt.Rectangle(160, 105, 320, 20));\r
-      jTextFieldFeatureFlag.setPreferredSize(new java.awt.Dimension(320, 20));\r
-      jTextFieldFeatureFlag.setToolTipText("Postfix expression that must evaluate to TRUE or FALSE");\r
+\r
+    /**\r
+     * This method initializes jTextAreaHelpText\r
+     * \r
+     * @return javax.swing.JTextArea\r
+     * \r
+     */\r
+    private JTextArea getJTextAreaHelpText() {\r
+        if (jTextAreaHelpText == null) {\r
+            jTextAreaHelpText = new JTextArea();\r
+            jTextAreaHelpText.setLineWrap(true);\r
+            jTextAreaHelpText.setWrapStyleWord(true);\r
+        }\r
+        return jTextAreaHelpText;\r
     }\r
-    return jTextFieldFeatureFlag;\r
-  }\r
-\r
-  /**\r
-   * This method initializes jScrollPane\r
-   * \r
-   * @return javax.swing.JScrollPane\r
-   */\r
-  private JScrollPane getJScrollPane() {\r
-    if (jScrollPane == null) {\r
-      jScrollPane = new JScrollPane();\r
-      jScrollPane.setViewportView(getJContentPane());\r
+\r
+    /**\r
+     * This method initializes jScrollPaneHelpText\r
+     * \r
+     * @return javax.swing.JScrollPane\r
+     * \r
+     */\r
+    private JScrollPane getJScrollPaneHelpText() {\r
+        if (jScrollPaneHelpText == null) {\r
+            jScrollPaneHelpText = new JScrollPane();\r
+            jScrollPaneHelpText.setHorizontalScrollBarPolicy(javax.swing.JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);\r
+            jScrollPaneHelpText.setSize(new java.awt.Dimension(320, 40));\r
+            jScrollPaneHelpText.setPreferredSize(new java.awt.Dimension(320, 40));\r
+            jScrollPaneHelpText.setLocation(new java.awt.Point(160, 60));\r
+            jScrollPaneHelpText.setViewportView(getJTextAreaHelpText());\r
+        }\r
+        return jScrollPaneHelpText;\r
     }\r
-    return jScrollPane;\r
-  }\r
-\r
-  /**\r
-   * This method initializes jTextAreaHelpText\r
-   * \r
-   * @return javax.swing.JTextArea\r
-   * \r
-   */\r
-  private JTextArea getJTextAreaHelpText() {\r
-    if (jTextAreaHelpText == null) {\r
-      jTextAreaHelpText = new JTextArea();\r
-      jTextAreaHelpText.setLineWrap(true);\r
-      jTextAreaHelpText.setWrapStyleWord(true);\r
+\r
+    /**\r
+     * This method initializes jButtonOk\r
+     * \r
+     * @return javax.swing.JButton\r
+     * \r
+     */\r
+    private JButton getJButtonOk() {\r
+        if (jButtonOk == null) {\r
+            jButtonOk = new JButton();\r
+            jButtonOk.setBounds(new java.awt.Rectangle(290, 157, 90, 20));\r
+            jButtonOk.setText("Ok");\r
+            jButtonOk.addActionListener(this);\r
+        }\r
+        return jButtonOk;\r
     }\r
-    return jTextAreaHelpText;\r
-  }\r
-\r
-  /**\r
-   * This method initializes jScrollPaneHelpText\r
-   * \r
-   * @return javax.swing.JScrollPane\r
-   * \r
-   */\r
-  private JScrollPane getJScrollPaneHelpText() {\r
-    if (jScrollPaneHelpText == null) {\r
-      jScrollPaneHelpText = new JScrollPane();\r
-      jScrollPaneHelpText.setHorizontalScrollBarPolicy(javax.swing.JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);\r
-      jScrollPaneHelpText.setSize(new java.awt.Dimension(320, 40));\r
-      jScrollPaneHelpText.setPreferredSize(new java.awt.Dimension(320, 40));\r
-      jScrollPaneHelpText.setLocation(new java.awt.Point(160, 60));\r
-      jScrollPaneHelpText.setViewportView(getJTextAreaHelpText());\r
+\r
+    /**\r
+     * This method initializes jButtonCancel\r
+     * \r
+     * @return javax.swing.JButton\r
+     * \r
+     */\r
+    private JButton getJButtonCancel() {\r
+        if (jButtonCancel == null) {\r
+            jButtonCancel = new JButton();\r
+            jButtonCancel.setBounds(new java.awt.Rectangle(390, 157, 90, 20));\r
+            jButtonCancel.setText("Cancel");\r
+            jButtonCancel.addActionListener(this);\r
+        }\r
+        return jButtonCancel;\r
     }\r
-    return jScrollPaneHelpText;\r
-  }\r
-\r
-  /**\r
-   * This method initializes jButtonOk\r
-   * \r
-   * @return javax.swing.JButton\r
-   * \r
-   */\r
-  private JButton getJButtonOk() {\r
-    if (jButtonOk == null) {\r
-      jButtonOk = new JButton();\r
-      jButtonOk.setBounds(new java.awt.Rectangle(290, 157, 90, 20));\r
-      jButtonOk.setText("Ok");\r
-      jButtonOk.addActionListener(this);\r
+\r
+    public static void main(String[] args) {\r
     }\r
-    return jButtonOk;\r
-  }\r
-\r
-  /**\r
-   * This method initializes jButtonCancel\r
-   * \r
-   * @return javax.swing.JButton\r
-   * \r
-   */\r
-  private JButton getJButtonCancel() {\r
-    if (jButtonCancel == null) {\r
-      jButtonCancel = new JButton();\r
-      jButtonCancel.setBounds(new java.awt.Rectangle(390, 157, 90, 20));\r
-      jButtonCancel.setText("Cancel");\r
-      jButtonCancel.addActionListener(this);\r
+\r
+    /**\r
+     * This method initializes this\r
+     * \r
+     */\r
+    private void init() {\r
+        this.setSize(500, 230);\r
+        this.setContentPane(getJScrollPane());\r
+        this.setTitle("Boot Modes");\r
+        initFrame();\r
+        this.setViewMode(false);\r
+        this.centerWindow();\r
     }\r
-    return jButtonCancel;\r
-  }\r
-\r
-  public static void main(String[] args) {\r
-  }\r
-\r
-  /**\r
-   * This method initializes this\r
-   * \r
-   */\r
-  private void init() {\r
-    this.setSize(500, 230);\r
-    this.setContentPane(getJScrollPane());\r
-    this.setTitle("Boot Modes");\r
-    initFrame();\r
-    this.setViewMode(false);\r
-    this.centerWindow();\r
-  }\r
-\r
-  /**\r
-   * This method initializes this Fill values to all fields if these values are\r
-   * not empty\r
-   * \r
-   * @param inBootModesId\r
-   * \r
-   */\r
-  private void init(BootModesIdentification inBootModesId) {\r
-    init();\r
-    this.id = inBootModesId;\r
-\r
-    if (this.id != null) {\r
-      this.jComboBoxBootModeName.setSelectedItem(id.getName());\r
-      this.jComboBoxUsage.setSelectedItem(id.getUsage());\r
-      this.jTextAreaHelpText.setText(id.getHelp());\r
-      this.jTextFieldFeatureFlag.setText(id.getFeatureFlag());\r
-      this.jArchCheckBox.setSelectedItems(id.getSupArchList());\r
+\r
+    /**\r
+     * This method initializes this Fill values to all fields if these values are\r
+     * not empty\r
+     * \r
+     * @param inBootModesId\r
+     * \r
+     */\r
+    private void init(BootModesIdentification inBootModesId) {\r
+        init();\r
+        this.id = inBootModesId;\r
+\r
+        if (this.id != null) {\r
+            this.jComboBoxBootModeName.setSelectedItem(id.getName());\r
+            this.jComboBoxUsage.setSelectedItem(id.getUsage());\r
+            this.jTextAreaHelpText.setText(id.getHelp());\r
+            this.jTextFieldFeatureFlag.setText(id.getFeatureFlag());\r
+            this.jArchCheckBox.setSelectedItems(id.getSupArchList());\r
+        }\r
     }\r
-  }\r
-\r
-  /**\r
-   * This is the override edit constructor\r
-   * \r
-   * @param inBootModesIdentification\r
-   * @param iFrame\r
-   * \r
-   */\r
-  public BootModesDlg(BootModesIdentification inBootModesIdentification, IFrame iFrame) {\r
-    super(iFrame, true);\r
-    init(inBootModesIdentification);\r
-  }\r
-\r
-  /**\r
-   * Disable all components when the mode is view\r
-   * \r
-   * @param isView\r
-   *          true - The view mode; false - The non-view mode\r
-   * \r
-   */\r
-  public void setViewMode(boolean isView) {\r
-    if (isView) {\r
-      this.jComboBoxBootModeName.setEnabled(!isView);\r
-      this.jComboBoxUsage.setEnabled(!isView);\r
+\r
+    /**\r
+     * This is the override edit constructor\r
+     * \r
+     * @param inBootModesIdentification\r
+     * @param iFrame\r
+     * \r
+     */\r
+    public BootModesDlg(BootModesIdentification inBootModesIdentification, IFrame iFrame) {\r
+        super(iFrame, true);\r
+        init(inBootModesIdentification);\r
     }\r
-  }\r
-\r
-  /**\r
-   * This method initializes jContentPane\r
-   * \r
-   * @return javax.swing.JPanel jContentPane\r
-   * \r
-   */\r
-  private JPanel getJContentPane() {\r
-    if (jContentPane == null) {\r
-      jStarLabel1 = new StarLabel();\r
-      jStarLabel1.setLocation(new java.awt.Point(2, 10));\r
-      jLabelBootModeName = new JLabel();\r
-      jLabelBootModeName.setText("Boot Mode Name");\r
-      jLabelBootModeName.setBounds(new java.awt.Rectangle(15, 10, 145, 20));\r
-      jStarLabel2 = new StarLabel();\r
-      jStarLabel2.setLocation(new java.awt.Point(2, 35));\r
-      jLabelUsage = new JLabel();\r
-      jLabelUsage.setText("Usage");\r
-      jLabelUsage.setBounds(new java.awt.Rectangle(15, 35, 145, 20));\r
-      jLabelHelpText = new JLabel();\r
-      jLabelHelpText.setBounds(new java.awt.Rectangle(15, 60, 145, 20));\r
-      jLabelHelpText.setText("Help Text");\r
-      jLabelFeatureFlag = new JLabel();\r
-      jLabelFeatureFlag.setBounds(new java.awt.Rectangle(15, 105, 145, 20));\r
-      jLabelFeatureFlag.setText("Feature Flag Expression");\r
-      jLabelArch = new JLabel();\r
-      jLabelArch.setBounds(new java.awt.Rectangle(15, 130, 145, 20));\r
-      jLabelArch.setText("Supported Archectures");\r
-      jArchCheckBox = new ArchCheckBox();\r
-      jArchCheckBox.setBounds(new java.awt.Rectangle(160, 130, 320, 20));\r
-      jArchCheckBox.setPreferredSize(new java.awt.Dimension(320, 20));\r
-\r
-      jContentPane = new JPanel();\r
-      jContentPane.setLayout(null);\r
-      jContentPane.setPreferredSize(new java.awt.Dimension(485, 185));\r
-\r
-      jContentPane.add(jLabelBootModeName, null);\r
-      jContentPane.add(getJComboBoxBootModeName(), null);\r
-      jContentPane.add(jLabelUsage, null);\r
-      jContentPane.add(getJComboBoxUsage(), null);\r
-\r
-      jContentPane.add(jStarLabel1, null);\r
-      jContentPane.add(jStarLabel2, null);\r
-      jContentPane.add(jLabelFeatureFlag, null);\r
-      jContentPane.add(getJTextFieldFeatureFlag(), null);\r
-      jContentPane.add(jLabelArch, null);\r
-\r
-      jContentPane.add(jLabelHelpText, null);\r
-      jContentPane.add(getJScrollPaneHelpText(), null);\r
-      jContentPane.add(jArchCheckBox, null);\r
-      jContentPane.add(getJButtonOk(), null);\r
-      jContentPane.add(getJButtonCancel(), null);\r
+\r
+    /**\r
+     * Disable all components when the mode is view\r
+     * \r
+     * @param isView\r
+     *          true - The view mode; false - The non-view mode\r
+     * \r
+     */\r
+    public void setViewMode(boolean isView) {\r
+        if (isView) {\r
+            this.jComboBoxBootModeName.setEnabled(!isView);\r
+            this.jComboBoxUsage.setEnabled(!isView);\r
+        }\r
     }\r
-    return jContentPane;\r
-  }\r
-\r
-  /**\r
-   * This method initializes BootModeName groups and Usage type\r
-   * \r
-   */\r
-  private void initFrame() {\r
-    Tools.generateComboBoxByVector(jComboBoxBootModeName, ed.getVBootModeNames());\r
-    Tools.generateComboBoxByVector(jComboBoxUsage, ed.getVPpiUsage());\r
-  }\r
-\r
-  /*\r
-   * (non-Javadoc)\r
-   * \r
-   * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)\r
-   * \r
-   * Override actionPerformed to listen all actions\r
-   * \r
-   */\r
-  public void actionPerformed(ActionEvent arg0) {\r
-    if (arg0.getSource() == jButtonOk) {\r
-      if (checkAdd()) {\r
-        getCurrentBootModes();\r
-        this.returnType = DataType.RETURN_TYPE_OK;\r
-        this.setVisible(false);\r
-      }\r
+\r
+    /**\r
+     * This method initializes jContentPane\r
+     * \r
+     * @return javax.swing.JPanel jContentPane\r
+     * \r
+     */\r
+    private JPanel getJContentPane() {\r
+        if (jContentPane == null) {\r
+            jStarLabel1 = new StarLabel();\r
+            jStarLabel1.setLocation(new java.awt.Point(2, 10));\r
+            jLabelBootModeName = new JLabel();\r
+            jLabelBootModeName.setText("Boot Mode Name");\r
+            jLabelBootModeName.setBounds(new java.awt.Rectangle(15, 10, 145, 20));\r
+            jStarLabel2 = new StarLabel();\r
+            jStarLabel2.setLocation(new java.awt.Point(2, 35));\r
+            jLabelUsage = new JLabel();\r
+            jLabelUsage.setText("Usage");\r
+            jLabelUsage.setBounds(new java.awt.Rectangle(15, 35, 145, 20));\r
+            jLabelHelpText = new JLabel();\r
+            jLabelHelpText.setBounds(new java.awt.Rectangle(15, 60, 145, 20));\r
+            jLabelHelpText.setText("Help Text");\r
+            jLabelFeatureFlag = new JLabel();\r
+            jLabelFeatureFlag.setBounds(new java.awt.Rectangle(15, 105, 145, 20));\r
+            jLabelFeatureFlag.setText("Feature Flag Expression");\r
+            jLabelArch = new JLabel();\r
+            jLabelArch.setBounds(new java.awt.Rectangle(15, 130, 145, 20));\r
+            jLabelArch.setText("Supported Archectures");\r
+            jArchCheckBox = new ArchCheckBox();\r
+            jArchCheckBox.setBounds(new java.awt.Rectangle(160, 130, 320, 20));\r
+            jArchCheckBox.setPreferredSize(new java.awt.Dimension(320, 20));\r
+\r
+            jContentPane = new JPanel();\r
+            jContentPane.setLayout(null);\r
+            jContentPane.setPreferredSize(new java.awt.Dimension(485, 185));\r
+\r
+            jContentPane.add(jLabelBootModeName, null);\r
+            jContentPane.add(getJComboBoxBootModeName(), null);\r
+            jContentPane.add(jLabelUsage, null);\r
+            jContentPane.add(getJComboBoxUsage(), null);\r
+\r
+            jContentPane.add(jStarLabel1, null);\r
+            jContentPane.add(jStarLabel2, null);\r
+            jContentPane.add(jLabelFeatureFlag, null);\r
+            jContentPane.add(getJTextFieldFeatureFlag(), null);\r
+            jContentPane.add(jLabelArch, null);\r
+\r
+            jContentPane.add(jLabelHelpText, null);\r
+            jContentPane.add(getJScrollPaneHelpText(), null);\r
+            jContentPane.add(jArchCheckBox, null);\r
+            jContentPane.add(getJButtonOk(), null);\r
+            jContentPane.add(getJButtonCancel(), null);\r
+        }\r
+        return jContentPane;\r
     }\r
 \r
-    if (arg0.getSource() == jButtonCancel) {\r
-      this.returnType = DataType.RETURN_TYPE_CANCEL;\r
-      this.setVisible(false);\r
+    /**\r
+     * This method initializes BootModeName groups and Usage type\r
+     * \r
+     */\r
+    private void initFrame() {\r
+        Tools.generateComboBoxByVector(jComboBoxBootModeName, ed.getVBootModeNames());\r
+        Tools.generateComboBoxByVector(jComboBoxUsage, ed.getVPpiUsage());\r
     }\r
-  }\r
-\r
-  /**\r
-   * Data validation for all fields\r
-   * \r
-   * @retval true - All datas are valid\r
-   * @retval false - At least one data is invalid\r
-   * \r
-   */\r
-  public boolean checkAdd() {\r
-    //\r
-    // Check if all fields have correct data types\r
-    //\r
 \r
-    //\r
-    // Check FeatureFlag\r
-    //\r
-    if (!isEmpty(this.jTextFieldFeatureFlag.getText())) {\r
-      if (!DataValidation.isFeatureFlag(this.jTextFieldFeatureFlag.getText())) {\r
-        Log.wrn("Update Boot Modes", "Incorrect data type for Feature Flag");\r
-        return false;\r
-      }\r
+    /*\r
+     * (non-Javadoc)\r
+     * \r
+     * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)\r
+     * \r
+     * Override actionPerformed to listen all actions\r
+     * \r
+     */\r
+    public void actionPerformed(ActionEvent arg0) {\r
+        if (arg0.getSource() == jButtonOk) {\r
+            if (checkAdd()) {\r
+                getCurrentBootModes();\r
+                this.returnType = DataType.RETURN_TYPE_OK;\r
+                this.setVisible(false);\r
+            }\r
+        }\r
+\r
+        if (arg0.getSource() == jButtonCancel) {\r
+            this.returnType = DataType.RETURN_TYPE_CANCEL;\r
+            this.setVisible(false);\r
+        }\r
+    }\r
+\r
+    /**\r
+     * Data validation for all fields\r
+     * \r
+     * @retval true - All datas are valid\r
+     * @retval false - At least one data is invalid\r
+     * \r
+     */\r
+    public boolean checkAdd() {\r
+        //\r
+        // Check if all fields have correct data types\r
+        //\r
+\r
+        //\r
+        // Check FeatureFlag\r
+        //\r
+        if (!isEmpty(this.jTextFieldFeatureFlag.getText())) {\r
+            if (!DataValidation.isFeatureFlag(this.jTextFieldFeatureFlag.getText())) {\r
+                Log.wrn("Update Boot Modes", "Incorrect data type for Feature Flag");\r
+                return false;\r
+            }\r
+        }\r
+\r
+        return true;\r
+    }\r
+\r
+    private BootModesIdentification getCurrentBootModes() {\r
+        String arg0 = this.jComboBoxBootModeName.getSelectedItem().toString();\r
+        String arg1 = this.jComboBoxUsage.getSelectedItem().toString();\r
+\r
+        String arg2 = this.jTextFieldFeatureFlag.getText();\r
+        Vector<String> arg3 = this.jArchCheckBox.getSelectedItemsVector();\r
+        String arg4 = this.jTextAreaHelpText.getText();\r
+        id = new BootModesIdentification(arg0, arg1, arg2, arg3, arg4);\r
+        return id;\r
     }\r
 \r
-    return true;\r
-  }\r
-\r
-  private BootModesIdentification getCurrentBootModes() {\r
-    String arg0 = this.jComboBoxBootModeName.getSelectedItem().toString();\r
-    String arg1 = this.jComboBoxUsage.getSelectedItem().toString();\r
-\r
-    String arg2 = this.jTextFieldFeatureFlag.getText();\r
-    Vector<String> arg3 = this.jArchCheckBox.getSelectedItemsVector();\r
-    String arg4 = this.jTextAreaHelpText.getText();\r
-    id = new BootModesIdentification(arg0, arg1, arg2, arg3, arg4);\r
-    return id;\r
-  }\r
-  \r
-  public BootModesIdentification getId() {\r
-    return id;\r
-  }\r
-\r
-  public void setId(BootModesIdentification id) {\r
-    this.id = id;\r
-  }\r
+    public BootModesIdentification getId() {\r
+        return id;\r
+    }\r
+\r
+    public void setId(BootModesIdentification id) {\r
+        this.id = id;\r
+    }\r
 }\r
index 56a856e..05bd139 100644 (file)
@@ -50,390 +50,393 @@ import org.tianocore.frameworkwizard.module.Identifications.DataHubs.DataHubsIde
  */\r
 public class DataHubsDlg extends IDialog {\r
 \r
-  // /\r
-  // / Define class Serial Version UID\r
-  // /\r
-  private static final long serialVersionUID = -3667906991966638892L;\r
+    // /\r
+    // / Define class Serial Version UID\r
+    // /\r
+    private static final long serialVersionUID = -3667906991966638892L;\r
 \r
-  //\r
-  // Define class members\r
-  //\r
-  private JPanel jContentPane = null;\r
-\r
-  private JLabel jLabelUsage = null;\r
+    //\r
+    // Define class members\r
+    //\r
+    private JPanel jContentPane = null;\r
 \r
-  private JComboBox jComboBoxUsage = null;\r
+    private JLabel jLabelUsage = null;\r
 \r
-  private JLabel jLabelDataHubRecord = null;\r
+    private JComboBox jComboBoxUsage = null;\r
 \r
-  private JTextField jTextFieldDataHubRecord = null;\r
+    private JLabel jLabelDataHubRecord = null;\r
 \r
-  private StarLabel jStarLabel1 = null;\r
+    private JTextField jTextFieldDataHubRecord = null;\r
 \r
-  private StarLabel jStarLabel2 = null;\r
+    private StarLabel jStarLabel1 = null;\r
 \r
-  private JLabel jLabelFeatureFlag = null;\r
+    private StarLabel jStarLabel2 = null;\r
 \r
-  private JTextField jTextFieldFeatureFlag = null;\r
+    private JLabel jLabelFeatureFlag = null;\r
 \r
-  private JLabel jLabelArch = null;\r
+    private JTextField jTextFieldFeatureFlag = null;\r
 \r
-  private JScrollPane jScrollPane = null;\r
+    private JLabel jLabelArch = null;\r
 \r
-  private JLabel jLabelHelpText = null;\r
+    private JScrollPane jScrollPane = null;\r
 \r
-  private JTextArea jTextAreaHelpText = null;\r
+    private JLabel jLabelHelpText = null;\r
 \r
-  private JScrollPane jScrollPaneHelpText = null;\r
+    private JTextArea jTextAreaHelpText = null;\r
 \r
-  private ArchCheckBox jArchCheckBox = null;\r
+    private JScrollPane jScrollPaneHelpText = null;\r
 \r
-  private JButton jButtonOk = null;\r
+    private ArchCheckBox jArchCheckBox = null;\r
 \r
-  private JButton jButtonCancel = null;\r
+    private JButton jButtonOk = null;\r
 \r
-  //\r
-  // Not used by UI\r
-  //\r
-  private DataHubsIdentification id = null;\r
+    private JButton jButtonCancel = null;\r
 \r
-  private EnumerationData ed = new EnumerationData();\r
+    //\r
+    // Not used by UI\r
+    //\r
+    private DataHubsIdentification id = null;\r
+\r
+    private EnumerationData ed = new EnumerationData();\r
+\r
+    /**\r
+     * This method initializes jTextFieldDataHubRecord\r
+     * \r
+     * @return javax.swing.JTextField jTextFieldDataHubRecord\r
+     * \r
+     */\r
+    private JTextField getJTextFieldDataHubRecord() {\r
+        if (jTextFieldDataHubRecord == null) {\r
+            jTextFieldDataHubRecord = new JTextField();\r
+            jTextFieldDataHubRecord.setBounds(new java.awt.Rectangle(160, 10, 320, 20));\r
+            jTextFieldDataHubRecord.setPreferredSize(new java.awt.Dimension(320, 20));\r
+            jTextFieldDataHubRecord.setToolTipText("Enter the C Name of the Data Hub Record");\r
+        }\r
+        return jTextFieldDataHubRecord;\r
+    }\r
 \r
-  /**\r
-   * This method initializes jTextFieldDataHubRecord\r
-   * \r
-   * @return javax.swing.JTextField jTextFieldDataHubRecord\r
-   * \r
-   */\r
-  private JTextField getJTextFieldDataHubRecord() {\r
-    if (jTextFieldDataHubRecord == null) {\r
-      jTextFieldDataHubRecord = new JTextField();\r
-      jTextFieldDataHubRecord\r
-          .setBounds(new java.awt.Rectangle(160, 10, 320, 20));\r
-      jTextFieldDataHubRecord.setPreferredSize(new java.awt.Dimension(320, 20));\r
-      jTextFieldDataHubRecord\r
-          .setToolTipText("Enter the C Name of the Data Hub Record");\r
+    /**\r
+     * This method initializes jComboBoxUsage\r
+     * \r
+     * @return javax.swing.JComboBox jComboBoxUsage\r
+     * \r
+     */\r
+    private JComboBox getJComboBoxUsage() {\r
+        if (jComboBoxUsage == null) {\r
+            jComboBoxUsage = new JComboBox();\r
+            jComboBoxUsage.setBounds(new java.awt.Rectangle(160, 35, 320, 20));\r
+            jComboBoxUsage.setPreferredSize(new java.awt.Dimension(320, 20));\r
+            jComboBoxUsage\r
+                          .setToolTipText("<html><table>"\r
+                                          + "<tr><td>ALWAYS_CONSUMED</td><td>Module always consumes a Data Hub Entry<br>via registering a filter driver.</td></tr>"\r
+                                          + "<tr><td>SOMETIMES_CONSUMED</td><td>Module will use a Data Hub Entry if it exists<br>via registering a filter driver</td></tr>"\r
+                                          + "<tr><td>ALWAYS_PRODUCED</td><td>Always logs data into the Data Hub</td></tr>"\r
+                                          + "<tr><td>SOMETIMES_PRODUCED</td><td>Log data into the Data Hub under<br>certain circumstances</td></tr>"\r
+                                          + "</table></html>");\r
+        }\r
+        return jComboBoxUsage;\r
     }\r
-    return jTextFieldDataHubRecord;\r
-  }\r
-\r
-  /**\r
-   * This method initializes jComboBoxUsage\r
-   * \r
-   * @return javax.swing.JComboBox jComboBoxUsage\r
-   * \r
-   */\r
-  private JComboBox getJComboBoxUsage() {\r
-    if (jComboBoxUsage == null) {\r
-      jComboBoxUsage = new JComboBox();\r
-      jComboBoxUsage.setBounds(new java.awt.Rectangle(160, 35, 320, 20));\r
-      jComboBoxUsage.setPreferredSize(new java.awt.Dimension(320, 20));\r
-      jComboBoxUsage\r
-          .setToolTipText("<html><table><tr><td>ALWAYS_CONSUMED</td><td>Module always consumes a Data Hub Entry<br>via registering a filter driver.</td></tr><tr><td>SOMETIMES_CONSUMED</td><td>Module will use a Data Hub Entry if it exists<br>via registering a filter driver</td></tr><tr><td>ALWAYS_PRODUCED</td><td>Always logs data into the Data Hub</td></tr><tr><td>SOMETIMES_PRODUCED</td><td>Log data into the Data Hub under<br>certain circumstances</td></tr></table></html>");\r
+\r
+    /**\r
+     * This method initializes jTextFieldFeatureFlag\r
+     * \r
+     * @return javax.swing.JTextField\r
+     */\r
+    private JTextField getJTextFieldFeatureFlag() {\r
+        if (jTextFieldFeatureFlag == null) {\r
+            jTextFieldFeatureFlag = new JTextField();\r
+            jTextFieldFeatureFlag.setBounds(new java.awt.Rectangle(160, 105, 320, 20));\r
+            jTextFieldFeatureFlag.setPreferredSize(new java.awt.Dimension(320, 20));\r
+            jTextFieldFeatureFlag.setToolTipText("Postfix expression that must evaluate to TRUE or FALSE");\r
+        }\r
+        return jTextFieldFeatureFlag;\r
     }\r
-    return jComboBoxUsage;\r
-  }\r
-\r
-  /**\r
-   * This method initializes jTextFieldFeatureFlag\r
-   * \r
-   * @return javax.swing.JTextField\r
-   */\r
-  private JTextField getJTextFieldFeatureFlag() {\r
-    if (jTextFieldFeatureFlag == null) {\r
-      jTextFieldFeatureFlag = new JTextField();\r
-      jTextFieldFeatureFlag.setBounds(new java.awt.Rectangle(160, 105, 320, 20));\r
-      jTextFieldFeatureFlag.setPreferredSize(new java.awt.Dimension(320, 20));\r
-      jTextFieldFeatureFlag.setToolTipText("Postfix expression that must evaluate to TRUE or FALSE");\r
+\r
+    /**\r
+     * This method initializes jScrollPane\r
+     * \r
+     * @return javax.swing.JScrollPane\r
+     */\r
+    private JScrollPane getJScrollPane() {\r
+        if (jScrollPane == null) {\r
+            jScrollPane = new JScrollPane();\r
+            jScrollPane.setViewportView(getJContentPane());\r
+        }\r
+        return jScrollPane;\r
     }\r
-    return jTextFieldFeatureFlag;\r
-  }\r
-\r
-  /**\r
-   * This method initializes jScrollPane\r
-   * \r
-   * @return javax.swing.JScrollPane\r
-   */\r
-  private JScrollPane getJScrollPane() {\r
-    if (jScrollPane == null) {\r
-      jScrollPane = new JScrollPane();\r
-      jScrollPane.setViewportView(getJContentPane());\r
+\r
+    /**\r
+     * This method initializes jTextAreaHelpText\r
+     * \r
+     * @return javax.swing.JTextArea\r
+     * \r
+     */\r
+    private JTextArea getJTextAreaHelpText() {\r
+        if (jTextAreaHelpText == null) {\r
+            jTextAreaHelpText = new JTextArea();\r
+            jTextAreaHelpText.setLineWrap(true);\r
+            jTextAreaHelpText.setWrapStyleWord(true);\r
+        }\r
+        return jTextAreaHelpText;\r
     }\r
-    return jScrollPane;\r
-  }\r
-\r
-  /**\r
-   * This method initializes jTextAreaHelpText\r
-   * \r
-   * @return javax.swing.JTextArea\r
-   * \r
-   */\r
-  private JTextArea getJTextAreaHelpText() {\r
-    if (jTextAreaHelpText == null) {\r
-      jTextAreaHelpText = new JTextArea();\r
-      jTextAreaHelpText.setLineWrap(true);\r
-      jTextAreaHelpText.setWrapStyleWord(true);\r
+\r
+    /**\r
+     * This method initializes jScrollPaneHelpText\r
+     * \r
+     * @return javax.swing.JScrollPane\r
+     * \r
+     */\r
+    private JScrollPane getJScrollPaneHelpText() {\r
+        if (jScrollPaneHelpText == null) {\r
+            jScrollPaneHelpText = new JScrollPane();\r
+            jScrollPaneHelpText.setHorizontalScrollBarPolicy(javax.swing.JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);\r
+            jScrollPaneHelpText.setSize(new java.awt.Dimension(320, 40));\r
+            jScrollPaneHelpText.setPreferredSize(new java.awt.Dimension(320, 40));\r
+            jScrollPaneHelpText.setLocation(new java.awt.Point(160, 60));\r
+            jScrollPaneHelpText.setViewportView(getJTextAreaHelpText());\r
+        }\r
+        return jScrollPaneHelpText;\r
     }\r
-    return jTextAreaHelpText;\r
-  }\r
-\r
-  /**\r
-   * This method initializes jScrollPaneHelpText\r
-   * \r
-   * @return javax.swing.JScrollPane\r
-   * \r
-   */\r
-  private JScrollPane getJScrollPaneHelpText() {\r
-    if (jScrollPaneHelpText == null) {\r
-      jScrollPaneHelpText = new JScrollPane();\r
-      jScrollPaneHelpText.setHorizontalScrollBarPolicy(javax.swing.JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);\r
-      jScrollPaneHelpText.setSize(new java.awt.Dimension(320, 40));\r
-      jScrollPaneHelpText.setPreferredSize(new java.awt.Dimension(320,40));\r
-      jScrollPaneHelpText.setLocation(new java.awt.Point(160,60));\r
-      jScrollPaneHelpText.setViewportView(getJTextAreaHelpText());\r
+\r
+    /**\r
+     * This method initializes jButtonOk\r
+     * \r
+     * @return javax.swing.JButton\r
+     * \r
+     */\r
+    private JButton getJButtonOk() {\r
+        if (jButtonOk == null) {\r
+            jButtonOk = new JButton();\r
+            jButtonOk.setBounds(new java.awt.Rectangle(290, 157, 90, 20));\r
+            jButtonOk.setText("Ok");\r
+            jButtonOk.addActionListener(this);\r
+        }\r
+        return jButtonOk;\r
     }\r
-    return jScrollPaneHelpText;\r
-  }\r
-  /**\r
-   * This method initializes jButtonOk\r
-   * \r
-   * @return javax.swing.JButton\r
-   * \r
-   */\r
-  private JButton getJButtonOk() {\r
-    if (jButtonOk == null) {\r
-      jButtonOk = new JButton();\r
-      jButtonOk.setBounds(new java.awt.Rectangle(290, 157, 90, 20));\r
-      jButtonOk.setText("Ok");\r
-      jButtonOk.addActionListener(this);\r
+\r
+    /**\r
+     * This method initializes jButtonCancel\r
+     * \r
+     * @return javax.swing.JButton\r
+     * \r
+     */\r
+    private JButton getJButtonCancel() {\r
+        if (jButtonCancel == null) {\r
+            jButtonCancel = new JButton();\r
+            jButtonCancel.setBounds(new java.awt.Rectangle(390, 157, 90, 20));\r
+            jButtonCancel.setText("Cancel");\r
+            jButtonCancel.addActionListener(this);\r
+        }\r
+        return jButtonCancel;\r
     }\r
-    return jButtonOk;\r
-  }\r
-\r
-  /**\r
-   * This method initializes jButtonCancel\r
-   * \r
-   * @return javax.swing.JButton\r
-   * \r
-   */\r
-  private JButton getJButtonCancel() {\r
-    if (jButtonCancel == null) {\r
-      jButtonCancel = new JButton();\r
-      jButtonCancel.setBounds(new java.awt.Rectangle(390, 157, 90, 20));\r
-      jButtonCancel.setText("Cancel");\r
-      jButtonCancel.addActionListener(this);\r
+\r
+    public static void main(String[] args) {\r
+\r
     }\r
-    return jButtonCancel;\r
-  }\r
-\r
-  public static void main(String[] args) {\r
-\r
-  }\r
-\r
-  /**\r
-   * This method initializes this\r
-   * \r
-   */\r
-  private void init() {\r
-    this.setSize(500, 230);\r
-    this.setContentPane(getJScrollPane());\r
-    this.setTitle("Data Hubs");\r
-    initFrame();\r
-    this.setViewMode(false);\r
-    this.centerWindow();\r
-  }\r
-\r
-  /**\r
-   * This method initializes this Fill values to all fields if these values are\r
-   * not empty\r
-   * \r
-   * @param inDataHubsId\r
-   * \r
-   */\r
-  private void init(DataHubsIdentification inDataHubsId) {\r
-    init();\r
-    this.id = inDataHubsId;\r
-\r
-    if (this.id != null) {\r
-      this.jTextFieldDataHubRecord.setText(id.getName());\r
-      this.jComboBoxUsage.setSelectedItem(id.getUsage());\r
-      this.jTextAreaHelpText.setText(id.getHelp());\r
-      this.jTextFieldFeatureFlag.setText(id.getFeatureFlag());\r
-      this.jArchCheckBox.setSelectedItems(id.getSupArchList());\r
+\r
+    /**\r
+     * This method initializes this\r
+     * \r
+     */\r
+    private void init() {\r
+        this.setSize(500, 230);\r
+        this.setContentPane(getJScrollPane());\r
+        this.setTitle("Data Hubs");\r
+        initFrame();\r
+        this.setViewMode(false);\r
+        this.centerWindow();\r
     }\r
-  }\r
-\r
-  /**\r
-   * This is the override edit constructor\r
-   * \r
-   * @param inDataHubsIdentification\r
-   * @param iFrame\r
-   * \r
-   */\r
-  public DataHubsDlg(DataHubsIdentification inDataHubsIdentification,\r
-      IFrame iFrame) {\r
-    super(iFrame, true);\r
-    init(inDataHubsIdentification);\r
-  }\r
-\r
-  /**\r
-   * Disable all components when the mode is view\r
-   * \r
-   * @param isView\r
-   *          true - The view mode; false - The non-view mode\r
-   * \r
-   */\r
-  public void setViewMode(boolean isView) {\r
-    if (isView) {\r
-      this.jTextFieldDataHubRecord.setEnabled(!isView);\r
-      this.jComboBoxUsage.setEnabled(!isView);\r
+\r
+    /**\r
+     * This method initializes this Fill values to all fields if these values are\r
+     * not empty\r
+     * \r
+     * @param inDataHubsId\r
+     * \r
+     */\r
+    private void init(DataHubsIdentification inDataHubsId) {\r
+        init();\r
+        this.id = inDataHubsId;\r
+\r
+        if (this.id != null) {\r
+            this.jTextFieldDataHubRecord.setText(id.getName());\r
+            this.jComboBoxUsage.setSelectedItem(id.getUsage());\r
+            this.jTextAreaHelpText.setText(id.getHelp());\r
+            this.jTextFieldFeatureFlag.setText(id.getFeatureFlag());\r
+            this.jArchCheckBox.setSelectedItems(id.getSupArchList());\r
+        }\r
     }\r
-  }\r
-\r
-  /**\r
-   * This method initializes jContentPane\r
-   * \r
-   * @return javax.swing.JPanel jContentPane\r
-   * \r
-   */\r
-  private JPanel getJContentPane() {\r
-    if (jContentPane == null) {\r
-      jStarLabel1 = new StarLabel();\r
-      jStarLabel1.setLocation(new java.awt.Point(2, 10));\r
-      jLabelDataHubRecord = new JLabel();\r
-      jLabelDataHubRecord.setBounds(new java.awt.Rectangle(15, 10, 145, 20));\r
-      jLabelDataHubRecord.setText("Data Hub Record");\r
-      jStarLabel2 = new StarLabel();\r
-      jStarLabel2.setLocation(new java.awt.Point(2, 35));\r
-      jLabelUsage = new JLabel();\r
-      jLabelUsage.setText("Usage");\r
-      jLabelUsage.setBounds(new java.awt.Rectangle(15, 35, 145, 20));\r
-      jLabelHelpText = new JLabel();\r
-      jLabelHelpText.setBounds(new java.awt.Rectangle(14, 60, 145, 20));\r
-      jLabelHelpText.setText("Help Text");\r
-      jLabelFeatureFlag = new JLabel();\r
-      jLabelFeatureFlag.setBounds(new java.awt.Rectangle(15, 105, 145, 20));\r
-      jLabelFeatureFlag.setText("Feature Flag Expression");\r
-      jLabelArch = new JLabel();\r
-      jLabelArch.setBounds(new java.awt.Rectangle(15, 130, 145, 20));\r
-      jLabelArch.setText("Supported Architectures");\r
-      jArchCheckBox = new ArchCheckBox();\r
-      jArchCheckBox.setBounds(new java.awt.Rectangle(160, 130, 320, 20));\r
-      jArchCheckBox.setPreferredSize(new java.awt.Dimension(320, 20));\r
-\r
-      jContentPane = new JPanel();\r
-      jContentPane.setLayout(null);\r
-      jContentPane.setPreferredSize(new java.awt.Dimension(485, 185));\r
-\r
-      jContentPane.add(jLabelDataHubRecord, null);\r
-      jContentPane.add(jLabelUsage, null);\r
-      jContentPane.add(jLabelFeatureFlag, null);\r
-      jContentPane.add(jLabelArch, null);\r
-\r
-      jContentPane.add(getJTextFieldDataHubRecord(), null);\r
-      jContentPane.add(getJComboBoxUsage(), null);\r
-      jContentPane.add(getJTextFieldFeatureFlag(), null);\r
-\r
-      jContentPane.add(jStarLabel1, null);\r
-      jContentPane.add(jStarLabel2, null);\r
-\r
-      jContentPane.add(jLabelHelpText, null);\r
-      jContentPane.add(getJScrollPaneHelpText(), null);\r
-      jContentPane.add(jArchCheckBox, null);\r
-      jContentPane.add(getJButtonOk(), null);\r
-      jContentPane.add(getJButtonCancel(), null);\r
+\r
+    /**\r
+     * This is the override edit constructor\r
+     * \r
+     * @param inDataHubsIdentification\r
+     * @param iFrame\r
+     * \r
+     */\r
+    public DataHubsDlg(DataHubsIdentification inDataHubsIdentification, IFrame iFrame) {\r
+        super(iFrame, true);\r
+        init(inDataHubsIdentification);\r
     }\r
-    return jContentPane;\r
-  }\r
-\r
-  /**\r
-   * This method initializes Usage type\r
-   * \r
-   */\r
-  private void initFrame() {\r
-    Tools.generateComboBoxByVector(jComboBoxUsage, ed.getVDataHubUsage());\r
-  }\r
-\r
-  /*\r
-   * (non-Javadoc)\r
-   * \r
-   * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)\r
-   * \r
-   * Override actionPerformed to listen all actions\r
-   * \r
-   */\r
-  public void actionPerformed(ActionEvent arg0) {\r
-    if (arg0.getSource() == jButtonOk) {\r
-      if (checkAdd()) {\r
-        getCurrentDataHubs();\r
-        this.returnType = DataType.RETURN_TYPE_OK;\r
-        this.setVisible(false);\r
-      }\r
+\r
+    /**\r
+     * Disable all components when the mode is view\r
+     * \r
+     * @param isView\r
+     *          true - The view mode; false - The non-view mode\r
+     * \r
+     */\r
+    public void setViewMode(boolean isView) {\r
+        if (isView) {\r
+            this.jTextFieldDataHubRecord.setEnabled(!isView);\r
+            this.jComboBoxUsage.setEnabled(!isView);\r
+        }\r
     }\r
 \r
-    if (arg0.getSource() == jButtonCancel) {\r
-      this.returnType = DataType.RETURN_TYPE_CANCEL;\r
-      this.setVisible(false);\r
+    /**\r
+     * This method initializes jContentPane\r
+     * \r
+     * @return javax.swing.JPanel jContentPane\r
+     * \r
+     */\r
+    private JPanel getJContentPane() {\r
+        if (jContentPane == null) {\r
+            jStarLabel1 = new StarLabel();\r
+            jStarLabel1.setLocation(new java.awt.Point(2, 10));\r
+            jLabelDataHubRecord = new JLabel();\r
+            jLabelDataHubRecord.setBounds(new java.awt.Rectangle(15, 10, 145, 20));\r
+            jLabelDataHubRecord.setText("Data Hub Record");\r
+            jStarLabel2 = new StarLabel();\r
+            jStarLabel2.setLocation(new java.awt.Point(2, 35));\r
+            jLabelUsage = new JLabel();\r
+            jLabelUsage.setText("Usage");\r
+            jLabelUsage.setBounds(new java.awt.Rectangle(15, 35, 145, 20));\r
+            jLabelHelpText = new JLabel();\r
+            jLabelHelpText.setBounds(new java.awt.Rectangle(14, 60, 145, 20));\r
+            jLabelHelpText.setText("Help Text");\r
+            jLabelFeatureFlag = new JLabel();\r
+            jLabelFeatureFlag.setBounds(new java.awt.Rectangle(15, 105, 145, 20));\r
+            jLabelFeatureFlag.setText("Feature Flag Expression");\r
+            jLabelArch = new JLabel();\r
+            jLabelArch.setBounds(new java.awt.Rectangle(15, 130, 145, 20));\r
+            jLabelArch.setText("Supported Architectures");\r
+            jArchCheckBox = new ArchCheckBox();\r
+            jArchCheckBox.setBounds(new java.awt.Rectangle(160, 130, 320, 20));\r
+            jArchCheckBox.setPreferredSize(new java.awt.Dimension(320, 20));\r
+\r
+            jContentPane = new JPanel();\r
+            jContentPane.setLayout(null);\r
+            jContentPane.setPreferredSize(new java.awt.Dimension(485, 185));\r
+\r
+            jContentPane.add(jLabelDataHubRecord, null);\r
+            jContentPane.add(jLabelUsage, null);\r
+            jContentPane.add(jLabelFeatureFlag, null);\r
+            jContentPane.add(jLabelArch, null);\r
+\r
+            jContentPane.add(getJTextFieldDataHubRecord(), null);\r
+            jContentPane.add(getJComboBoxUsage(), null);\r
+            jContentPane.add(getJTextFieldFeatureFlag(), null);\r
+\r
+            jContentPane.add(jStarLabel1, null);\r
+            jContentPane.add(jStarLabel2, null);\r
+\r
+            jContentPane.add(jLabelHelpText, null);\r
+            jContentPane.add(getJScrollPaneHelpText(), null);\r
+            jContentPane.add(jArchCheckBox, null);\r
+            jContentPane.add(getJButtonOk(), null);\r
+            jContentPane.add(getJButtonCancel(), null);\r
+        }\r
+        return jContentPane;\r
     }\r
-  }\r
-\r
-  /**\r
-   * Data validation for all fields\r
-   * \r
-   * @retval true - All datas are valid\r
-   * @retval false - At least one data is invalid\r
-   * \r
-   */\r
-  public boolean checkAdd() {\r
-    //\r
-    // Check if all fields have correct data types\r
-    //\r
 \r
-    //\r
-    // Check DataHubRecord\r
-    //\r
-    if (isEmpty(this.jTextFieldDataHubRecord.getText())) {\r
-      Log.wrn("Update Hubs", "Data Hub Record must not be empty");\r
-      return false;\r
+    /**\r
+     * This method initializes Usage type\r
+     * \r
+     */\r
+    private void initFrame() {\r
+        Tools.generateComboBoxByVector(jComboBoxUsage, ed.getVDataHubUsage());\r
     }\r
 \r
-    if (!isEmpty(this.jTextFieldDataHubRecord.getText())) {\r
-      if (!DataValidation.isC_NameType(this.jTextFieldDataHubRecord.getText())) {\r
-        Log.wrn("Update Hubs", "Incorrect data type for Data Hub Record");\r
-        return false;\r
-      }\r
+    /*\r
+     * (non-Javadoc)\r
+     * \r
+     * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)\r
+     * \r
+     * Override actionPerformed to listen all actions\r
+     * \r
+     */\r
+    public void actionPerformed(ActionEvent arg0) {\r
+        if (arg0.getSource() == jButtonOk) {\r
+            if (checkAdd()) {\r
+                getCurrentDataHubs();\r
+                this.returnType = DataType.RETURN_TYPE_OK;\r
+                this.setVisible(false);\r
+            }\r
+        }\r
+\r
+        if (arg0.getSource() == jButtonCancel) {\r
+            this.returnType = DataType.RETURN_TYPE_CANCEL;\r
+            this.setVisible(false);\r
+        }\r
     }\r
 \r
-    //\r
-    // Check FeatureFlag\r
-    //\r
-    if (!isEmpty(this.jTextFieldFeatureFlag.getText())) {\r
-      if (!DataValidation.isFeatureFlag(this.jTextFieldFeatureFlag.getText())) {\r
-        Log.wrn("Update Hubs", "Incorrect data type for Feature Flag");\r
-        return false;\r
-      }\r
+    /**\r
+     * Data validation for all fields\r
+     * \r
+     * @retval true - All datas are valid\r
+     * @retval false - At least one data is invalid\r
+     * \r
+     */\r
+    public boolean checkAdd() {\r
+        //\r
+        // Check if all fields have correct data types\r
+        //\r
+\r
+        //\r
+        // Check DataHubRecord\r
+        //\r
+        if (isEmpty(this.jTextFieldDataHubRecord.getText())) {\r
+            Log.wrn("Update Hubs", "Data Hub Record must not be empty");\r
+            return false;\r
+        }\r
+\r
+        if (!isEmpty(this.jTextFieldDataHubRecord.getText())) {\r
+            if (!DataValidation.isC_NameType(this.jTextFieldDataHubRecord.getText())) {\r
+                Log.wrn("Update Hubs", "Incorrect data type for Data Hub Record");\r
+                return false;\r
+            }\r
+        }\r
+\r
+        //\r
+        // Check FeatureFlag\r
+        //\r
+        if (!isEmpty(this.jTextFieldFeatureFlag.getText())) {\r
+            if (!DataValidation.isFeatureFlag(this.jTextFieldFeatureFlag.getText())) {\r
+                Log.wrn("Update Hubs", "Incorrect data type for Feature Flag");\r
+                return false;\r
+            }\r
+        }\r
+\r
+        return true;\r
     }\r
 \r
-    return true;\r
-  }\r
+    private DataHubsIdentification getCurrentDataHubs() {\r
+        String arg0 = this.jTextFieldDataHubRecord.getText();\r
+        String arg1 = this.jComboBoxUsage.getSelectedItem().toString();\r
 \r
-  private DataHubsIdentification getCurrentDataHubs() {\r
-    String arg0 = this.jTextFieldDataHubRecord.getText();\r
-    String arg1 = this.jComboBoxUsage.getSelectedItem().toString();\r
+        String arg2 = this.jTextFieldFeatureFlag.getText();\r
+        Vector<String> arg3 = this.jArchCheckBox.getSelectedItemsVector();\r
+        String arg4 = this.jTextAreaHelpText.getText();\r
 \r
-    String arg2 = this.jTextFieldFeatureFlag.getText();\r
-    Vector<String> arg3 = this.jArchCheckBox.getSelectedItemsVector();\r
-    String arg4 = this.jTextAreaHelpText.getText();\r
+        id = new DataHubsIdentification(arg0, arg1, arg2, arg3, arg4);\r
+        return id;\r
+    }\r
 \r
-    id = new DataHubsIdentification(arg0, arg1, arg2, arg3, arg4);\r
-    return id;\r
-  }\r
-  \r
-  public DataHubsIdentification getId() {\r
-    return id;\r
-  }\r
+    public DataHubsIdentification getId() {\r
+        return id;\r
+    }\r
 \r
-  public void setId(DataHubsIdentification id) {\r
-    this.id = id;\r
-  }\r
+    public void setId(DataHubsIdentification id) {\r
+        this.id = id;\r
+    }\r
 }\r
index 477393c..0093884 100644 (file)
@@ -46,467 +46,472 @@ import org.tianocore.frameworkwizard.workspace.WorkspaceTools;
  */\r
 public class EventsDlg extends IDialog {\r
 \r
-  // /\r
-  // / Define class Serial Version UID\r
-  // /\r
-  private static final long serialVersionUID = -4396143706422842331L;\r
+    // /\r
+    // / Define class Serial Version UID\r
+    // /\r
+    private static final long serialVersionUID = -4396143706422842331L;\r
 \r
-  //\r
-  // Define class members\r
-  //\r
-  private JPanel jContentPane = null;\r
+    //\r
+    // Define class members\r
+    //\r
+    private JPanel jContentPane = null;\r
 \r
-  private JLabel jLabelEventType = null;\r
+    private JLabel jLabelEventType = null;\r
 \r
-  private JLabel jLabelC_Name = null;\r
+    private JLabel jLabelC_Name = null;\r
 \r
-  private JComboBox jComboBoxGuidC_Name = null;\r
+    private JComboBox jComboBoxGuidC_Name = null;\r
 \r
-  private JLabel jLabelUsage = null;\r
+    private JLabel jLabelUsage = null;\r
 \r
-  private JLabel jLabelGroup = null;\r
+    private JLabel jLabelGroup = null;\r
 \r
-  private JComboBox jComboBoxUsage = null;\r
+    private JComboBox jComboBoxUsage = null;\r
 \r
-  private JComboBox jComboBoxEventGroup = null;\r
+    private JComboBox jComboBoxEventGroup = null;\r
 \r
-  private StarLabel jStarLabel1 = null;\r
+    private StarLabel jStarLabel1 = null;\r
 \r
-  private StarLabel jStarLabel2 = null;\r
+    private StarLabel jStarLabel2 = null;\r
 \r
-  private StarLabel jStarLabel3 = null;\r
+    private StarLabel jStarLabel3 = null;\r
 \r
-  private StarLabel jStarLabel4 = null;\r
+    private StarLabel jStarLabel4 = null;\r
 \r
-  private JComboBox jComboBoxEventsType = null;\r
+    private JComboBox jComboBoxEventsType = null;\r
 \r
-  private JScrollPane jScrollPane = null;\r
+    private JScrollPane jScrollPane = null;\r
 \r
-  private JLabel jLabelArch = null;\r
+    private JLabel jLabelArch = null;\r
 \r
-  private JLabel jLabelHelpText = null;\r
+    private JLabel jLabelHelpText = null;\r
 \r
-  private JTextArea jTextAreaHelpText = null;\r
+    private JTextArea jTextAreaHelpText = null;\r
 \r
-  private JScrollPane jScrollPaneHelpText = null;\r
+    private JScrollPane jScrollPaneHelpText = null;\r
 \r
-  private JLabel jLabelFeatureFlag = null;\r
+    private JLabel jLabelFeatureFlag = null;\r
 \r
-  private JTextField jTextFieldFeatureFlag = null;\r
+    private JTextField jTextFieldFeatureFlag = null;\r
 \r
-  private ArchCheckBox jArchCheckBox = null;\r
+    private ArchCheckBox jArchCheckBox = null;\r
 \r
-  private JButton jButtonOk = null;\r
+    private JButton jButtonOk = null;\r
 \r
-  private JButton jButtonCancel = null;\r
+    private JButton jButtonCancel = null;\r
 \r
-  //\r
-  // Not used by UI\r
-  //\r
-  private EventsIdentification id = null;\r
+    //\r
+    // Not used by UI\r
+    //\r
+    private EventsIdentification id = null;\r
+\r
+    private EnumerationData ed = new EnumerationData();\r
+\r
+    private WorkspaceTools wt = new WorkspaceTools();\r
+\r
+    /**\r
+     * This method initializes jComboBoxType\r
+     * \r
+     * @return javax.swing.JComboBox jComboBoxType\r
+     * \r
+     */\r
+    private JComboBox getJComboBoxEventsType() {\r
+        if (jComboBoxEventsType == null) {\r
+            jComboBoxEventsType = new JComboBox();\r
+            jComboBoxEventsType.setBounds(new java.awt.Rectangle(160, 10, 320, 20));\r
+            jComboBoxEventsType.setPreferredSize(new java.awt.Dimension(320, 20));\r
+            jComboBoxEventsType\r
+                               .setToolTipText("<html>Select CreateEvents if the Module has an event that is waiting to be signaled.<br>"\r
+                                               + "Select SignalEvents if the Module will signal all events in an event group.<br>"\r
+                                               + "NOTE: Signal events are named by GUID.</html>");\r
+        }\r
+        return jComboBoxEventsType;\r
+    }\r
 \r
-  private EnumerationData ed = new EnumerationData();\r
+    /**\r
+     * This method initializes jTextFieldC_Name\r
+     * \r
+     * @return javax.swing.JTextField jTextFieldC_Name\r
+     * \r
+     */\r
+    private JComboBox getJComboBoxGuidC_Name() {\r
+        if (jComboBoxGuidC_Name == null) {\r
+            jComboBoxGuidC_Name = new JComboBox();\r
+            jComboBoxGuidC_Name.setBounds(new java.awt.Rectangle(160, 35, 320, 20));\r
+            jComboBoxGuidC_Name.setPreferredSize(new java.awt.Dimension(320, 20));\r
+            jComboBoxGuidC_Name.setToolTipText("Select the GUID C Name of the Event");\r
+        }\r
+        return jComboBoxGuidC_Name;\r
+    }\r
 \r
-  private WorkspaceTools wt = new WorkspaceTools();\r
+    /**\r
+     * This method initializes jComboBoxEventsType\r
+     * \r
+     * @return javax.swing.JComboBox\r
+     */\r
+    private JComboBox getJComboBoxEventGroup() {\r
+        if (jComboBoxEventGroup == null) {\r
+            jComboBoxEventGroup = new JComboBox();\r
+            jComboBoxEventGroup.setBounds(new java.awt.Rectangle(160, 60, 320, 20));\r
+            jComboBoxEventGroup.setPreferredSize(new java.awt.Dimension(320, 20));\r
+            jComboBoxEventGroup.setToolTipText("Select Type of Event: Guid or Timer.");\r
+\r
+        }\r
+        return jComboBoxEventGroup;\r
+    }\r
 \r
-  /**\r
-   * This method initializes jComboBoxType\r
-   * \r
-   * @return javax.swing.JComboBox jComboBoxType\r
-   * \r
-   */\r
-  private JComboBox getJComboBoxEventsType() {\r
-    if (jComboBoxEventsType == null) {\r
-      jComboBoxEventsType = new JComboBox();\r
-      jComboBoxEventsType.setBounds(new java.awt.Rectangle(160, 10, 320, 20));\r
-      jComboBoxEventsType.setPreferredSize(new java.awt.Dimension(320, 20));\r
-      jComboBoxEventsType\r
-          .setToolTipText("<html>Select CreateEvents if the Module has an event that is waiting to be signaled.<br>Select SignalEvents if the Module will signal all events in an event group.<br>NOTE: Signal events are named by GUID.</html>");\r
+    /**\r
+     * This method initializes jComboBoxUsage\r
+     * \r
+     * @return javax.swing.JComboBox jComboBoxUsage\r
+     * \r
+     */\r
+    private JComboBox getJComboBoxUsage() {\r
+        if (jComboBoxUsage == null) {\r
+            jComboBoxUsage = new JComboBox();\r
+            jComboBoxUsage.setBounds(new java.awt.Rectangle(160, 85, 320, 20));\r
+            jComboBoxUsage.setPreferredSize(new java.awt.Dimension(320, 20));\r
+            jComboBoxUsage\r
+                          .setToolTipText("<html><table>"\r
+                                          + "<tr><td colspan=2 align=center><b>Create Events</b></td></tr>"\r
+                                          + "<tr><td>ALWAYS_CONSUMED</td><td>Module registers a notification function and REQUIRES that it be<br>"\r
+                                          + "executed for the module to fully function.</td></tr>"\r
+                                          + "<tr><td>SOMETIMES_CONSUMED</td><td>Module registers a notification function and calls the function<br>"\r
+                                          + "when it is signaled</td></tr><tr><td colspan=2 align=center><b>Signal Events</b></td></tr>"\r
+                                          + "<tr><td>ALWAYS_PRODUCED</td><td>Module will Always signal the event</td></tr>"\r
+                                          + "<tr><td>SOMETIMES_PRODUCED</td><td>Module will sometimes signal the event</td></tr>"\r
+                                          + "</table></html>");\r
+        }\r
+        return jComboBoxUsage;\r
     }\r
-    return jComboBoxEventsType;\r
-  }\r
-\r
-  /**\r
-   * This method initializes jTextFieldC_Name\r
-   * \r
-   * @return javax.swing.JTextField jTextFieldC_Name\r
-   * \r
-   */\r
-  private JComboBox getJComboBoxGuidC_Name() {\r
-    if (jComboBoxGuidC_Name == null) {\r
-      jComboBoxGuidC_Name = new JComboBox();\r
-      jComboBoxGuidC_Name.setBounds(new java.awt.Rectangle(160, 35, 320, 20));\r
-      jComboBoxGuidC_Name.setPreferredSize(new java.awt.Dimension(320, 20));\r
-      jComboBoxGuidC_Name.setToolTipText("Select the GUID C Name of the Event");\r
+\r
+    /**\r
+     * This method initializes jScrollPane\r
+     * \r
+     * @return javax.swing.JScrollPane\r
+     */\r
+    private JScrollPane getJScrollPane() {\r
+        if (jScrollPane == null) {\r
+            jScrollPane = new JScrollPane();\r
+            jScrollPane.setViewportView(getJContentPane());\r
+        }\r
+        return jScrollPane;\r
     }\r
-    return jComboBoxGuidC_Name;\r
-  }\r
-\r
-  /**\r
-   * This method initializes jComboBoxEventsType\r
-   * \r
-   * @return javax.swing.JComboBox\r
-   */\r
-  private JComboBox getJComboBoxEventGroup() {\r
-    if (jComboBoxEventGroup == null) {\r
-      jComboBoxEventGroup = new JComboBox();\r
-      jComboBoxEventGroup.setBounds(new java.awt.Rectangle(160, 60, 320, 20));\r
-      jComboBoxEventGroup.setPreferredSize(new java.awt.Dimension(320, 20));\r
-      jComboBoxEventGroup\r
-          .setToolTipText("Select Type of Event: Guid or Timer.");\r
 \r
+    /**\r
+     * This method initializes jTextFieldFeatureFlag\r
+     * \r
+     * @return javax.swing.JTextField\r
+     */\r
+    private JTextField getJTextFieldFeatureFlag() {\r
+        if (jTextFieldFeatureFlag == null) {\r
+            jTextFieldFeatureFlag = new JTextField();\r
+            jTextFieldFeatureFlag.setBounds(new java.awt.Rectangle(160, 155, 320, 20));\r
+            jTextFieldFeatureFlag.setPreferredSize(new java.awt.Dimension(320, 20));\r
+            jTextFieldFeatureFlag.setToolTipText("Postfix expression that must evaluate to TRUE or FALSE");\r
+        }\r
+        return jTextFieldFeatureFlag;\r
     }\r
-    return jComboBoxEventGroup;\r
-  }\r
-\r
-  /**\r
-   * This method initializes jComboBoxUsage\r
-   * \r
-   * @return javax.swing.JComboBox jComboBoxUsage\r
-   * \r
-   */\r
-  private JComboBox getJComboBoxUsage() {\r
-    if (jComboBoxUsage == null) {\r
-      jComboBoxUsage = new JComboBox();\r
-      jComboBoxUsage.setBounds(new java.awt.Rectangle(160, 85, 320, 20));\r
-      jComboBoxUsage.setPreferredSize(new java.awt.Dimension(320, 20));\r
-      jComboBoxUsage\r
-          .setToolTipText("<html><table><tr><td colspan=2 align=center><b>Create Events</b></td></tr><tr><td>ALWAYS_CONSUMED</td><td>Module registers a notification function and REQUIRES that it be<br>executed for the module to fully function.</td></tr><tr><td>SOMETIMES_CONSUMED</td><td>Module registers a notification function and calls the function<br>when it is signaled</td></tr><tr><td colspan=2 align=center><b>Signal Events</b></td></tr><tr><td>ALWAYS_PRODUCED</td><td>Module will Always signal the event</td></tr><tr><td>SOMETIMES_PRODUCED</td><td>Module will sometimes signal the event</td></tr></table></html>");\r
+\r
+    /**\r
+     * This method initializes jTextAreaHelpText\r
+     * \r
+     * @return javax.swing.JTextArea\r
+     * \r
+     */\r
+    private JTextArea getJTextAreaHelpText() {\r
+        if (jTextAreaHelpText == null) {\r
+            jTextAreaHelpText = new JTextArea();\r
+            jTextAreaHelpText.setLineWrap(true);\r
+            jTextAreaHelpText.setWrapStyleWord(true);\r
+        }\r
+        return jTextAreaHelpText;\r
     }\r
-    return jComboBoxUsage;\r
-  }\r
-\r
-  /**\r
-   * This method initializes jScrollPane\r
-   * \r
-   * @return javax.swing.JScrollPane\r
-   */\r
-  private JScrollPane getJScrollPane() {\r
-    if (jScrollPane == null) {\r
-      jScrollPane = new JScrollPane();\r
-      jScrollPane.setViewportView(getJContentPane());\r
+\r
+    /**\r
+     * This method initializes jScrollPaneHelpText\r
+     * \r
+     * @return javax.swing.JScrollPane\r
+     * \r
+     */\r
+    private JScrollPane getJScrollPaneHelpText() {\r
+        if (jScrollPaneHelpText == null) {\r
+            jScrollPaneHelpText = new JScrollPane();\r
+            jScrollPaneHelpText.setHorizontalScrollBarPolicy(javax.swing.JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);\r
+            jScrollPaneHelpText.setSize(new java.awt.Dimension(320, 40));\r
+            jScrollPaneHelpText.setPreferredSize(new java.awt.Dimension(320, 40));\r
+            jScrollPaneHelpText.setLocation(new java.awt.Point(160, 110));\r
+            jScrollPaneHelpText.setViewportView(getJTextAreaHelpText());\r
+        }\r
+        return jScrollPaneHelpText;\r
     }\r
-    return jScrollPane;\r
-  }\r
-\r
-  /**\r
-   * This method initializes jTextFieldFeatureFlag\r
-   * \r
-   * @return javax.swing.JTextField\r
-   */\r
-  private JTextField getJTextFieldFeatureFlag() {\r
-    if (jTextFieldFeatureFlag == null) {\r
-      jTextFieldFeatureFlag = new JTextField();\r
-      jTextFieldFeatureFlag\r
-          .setBounds(new java.awt.Rectangle(160, 155, 320, 20));\r
-      jTextFieldFeatureFlag.setPreferredSize(new java.awt.Dimension(320, 20));\r
-      jTextFieldFeatureFlag\r
-          .setToolTipText("Postfix expression that must evaluate to TRUE or FALSE");\r
+\r
+    /**\r
+     * This method initializes jButtonOk\r
+     * \r
+     * @return javax.swing.JButton\r
+     * \r
+     */\r
+    private JButton getJButtonOk() {\r
+        if (jButtonOk == null) {\r
+            jButtonOk = new JButton();\r
+            jButtonOk.setBounds(new java.awt.Rectangle(290, 202, 90, 20));\r
+            jButtonOk.setText("Ok");\r
+            jButtonOk.addActionListener(this);\r
+        }\r
+        return jButtonOk;\r
     }\r
-    return jTextFieldFeatureFlag;\r
-  }\r
-\r
-  /**\r
-   * This method initializes jTextAreaHelpText\r
-   * \r
-   * @return javax.swing.JTextArea\r
-   * \r
-   */\r
-  private JTextArea getJTextAreaHelpText() {\r
-    if (jTextAreaHelpText == null) {\r
-      jTextAreaHelpText = new JTextArea();\r
-      jTextAreaHelpText.setLineWrap(true);\r
-      jTextAreaHelpText.setWrapStyleWord(true);\r
+\r
+    /**\r
+     * This method initializes jButtonCancel\r
+     * \r
+     * @return javax.swing.JButton\r
+     * \r
+     */\r
+    private JButton getJButtonCancel() {\r
+        if (jButtonCancel == null) {\r
+            jButtonCancel = new JButton();\r
+            jButtonCancel.setBounds(new java.awt.Rectangle(390, 202, 90, 20));\r
+            jButtonCancel.setText("Cancel");\r
+            jButtonCancel.addActionListener(this);\r
+        }\r
+        return jButtonCancel;\r
     }\r
-    return jTextAreaHelpText;\r
-  }\r
-\r
-  /**\r
-   * This method initializes jScrollPaneHelpText\r
-   * \r
-   * @return javax.swing.JScrollPane\r
-   * \r
-   */\r
-  private JScrollPane getJScrollPaneHelpText() {\r
-    if (jScrollPaneHelpText == null) {\r
-      jScrollPaneHelpText = new JScrollPane();\r
-      jScrollPaneHelpText.setHorizontalScrollBarPolicy(javax.swing.JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);\r
-      jScrollPaneHelpText.setSize(new java.awt.Dimension(320,40));\r
-      jScrollPaneHelpText.setPreferredSize(new java.awt.Dimension(320,40));\r
-      jScrollPaneHelpText.setLocation(new java.awt.Point(160,110));\r
-      jScrollPaneHelpText.setViewportView(getJTextAreaHelpText());\r
+\r
+    public static void main(String[] args) {\r
+\r
     }\r
-    return jScrollPaneHelpText;\r
-  }\r
-  \r
-  /**\r
-   * This method initializes jButtonOk\r
-   * \r
-   * @return javax.swing.JButton\r
-   * \r
-   */\r
-  private JButton getJButtonOk() {\r
-    if (jButtonOk == null) {\r
-      jButtonOk = new JButton();\r
-      jButtonOk.setBounds(new java.awt.Rectangle(290, 202, 90, 20));\r
-      jButtonOk.setText("Ok");\r
-      jButtonOk.addActionListener(this);\r
+\r
+    /**\r
+     * This method initializes this\r
+     * \r
+     */\r
+    private void init() {\r
+        this.setSize(500, 275);\r
+        this.setContentPane(getJScrollPane());\r
+        this.setTitle("Events");\r
+        initFrame();\r
+        this.setViewMode(false);\r
+        this.centerWindow();\r
     }\r
-    return jButtonOk;\r
-  }\r
-\r
-  /**\r
-   * This method initializes jButtonCancel\r
-   * \r
-   * @return javax.swing.JButton\r
-   * \r
-   */\r
-  private JButton getJButtonCancel() {\r
-    if (jButtonCancel == null) {\r
-      jButtonCancel = new JButton();\r
-      jButtonCancel.setBounds(new java.awt.Rectangle(390, 202, 90, 20));\r
-      jButtonCancel.setText("Cancel");\r
-      jButtonCancel.addActionListener(this);\r
+\r
+    /**\r
+     * This method initializes this Fill values to all fields if these values are\r
+     * not empty\r
+     * \r
+     * @param inEventsId\r
+     * \r
+     */\r
+    private void init(EventsIdentification inEventsId) {\r
+        init();\r
+        this.id = inEventsId;\r
+\r
+        if (this.id != null) {\r
+            this.jComboBoxGuidC_Name.setSelectedItem(id.getName());\r
+            this.jComboBoxEventsType.setSelectedItem(id.getType());\r
+            this.jComboBoxUsage.setSelectedItem(id.getUsage());\r
+            this.jTextAreaHelpText.setText(id.getHelp());\r
+\r
+            jTextFieldFeatureFlag.setText(id.getFeatureFlag());\r
+            this.jArchCheckBox.setSelectedItems(id.getSupArchList());\r
+            this.jComboBoxEventGroup.setSelectedItem(id.getGroup());\r
+        }\r
     }\r
-    return jButtonCancel;\r
-  }\r
-\r
-  public static void main(String[] args) {\r
-\r
-  }\r
-\r
-  /**\r
-   * This method initializes this\r
-   * \r
-   */\r
-  private void init() {\r
-    this.setSize(500, 275);\r
-    this.setContentPane(getJScrollPane());\r
-    this.setTitle("Events");\r
-    initFrame();\r
-    this.setViewMode(false);\r
-    this.centerWindow();\r
-  }\r
-\r
-  /**\r
-   * This method initializes this Fill values to all fields if these values are\r
-   * not empty\r
-   * \r
-   * @param inEventsId\r
-   * \r
-   */\r
-  private void init(EventsIdentification inEventsId) {\r
-    init();\r
-    this.id = inEventsId;\r
-\r
-    if (this.id != null) {\r
-      this.jComboBoxGuidC_Name.setSelectedItem(id.getName());\r
-      this.jComboBoxEventsType.setSelectedItem(id.getType());\r
-      this.jComboBoxUsage.setSelectedItem(id.getUsage());\r
-      this.jTextAreaHelpText.setText(id.getHelp());\r
-\r
-      jTextFieldFeatureFlag.setText(id.getFeatureFlag());\r
-      this.jArchCheckBox.setSelectedItems(id.getSupArchList());\r
-      this.jComboBoxEventGroup.setSelectedItem(id.getGroup());\r
+\r
+    /**\r
+     * This is the override edit constructor\r
+     * \r
+     * @param inEventsIdentification\r
+     * @param iFrame\r
+     * \r
+     */\r
+    public EventsDlg(EventsIdentification inEventsIdentification, IFrame iFrame) {\r
+        super(iFrame, true);\r
+        init(inEventsIdentification);\r
     }\r
-  }\r
-\r
-  /**\r
-   * This is the override edit constructor\r
-   * \r
-   * @param inEventsIdentification\r
-   * @param iFrame\r
-   * \r
-   */\r
-  public EventsDlg(EventsIdentification inEventsIdentification, IFrame iFrame) {\r
-    super(iFrame, true);\r
-    init(inEventsIdentification);\r
-  }\r
-\r
-  /**\r
-   * Disable all components when the mode is view\r
-   * \r
-   * @param isView\r
-   *          true - The view mode; false - The non-view mode\r
-   * \r
-   */\r
-  public void setViewMode(boolean isView) {\r
-    if (isView) {\r
-      this.jComboBoxGuidC_Name.setEnabled(!isView);\r
-      this.jComboBoxUsage.setEnabled(!isView);\r
+\r
+    /**\r
+     * Disable all components when the mode is view\r
+     * \r
+     * @param isView\r
+     *          true - The view mode; false - The non-view mode\r
+     * \r
+     */\r
+    public void setViewMode(boolean isView) {\r
+        if (isView) {\r
+            this.jComboBoxGuidC_Name.setEnabled(!isView);\r
+            this.jComboBoxUsage.setEnabled(!isView);\r
+        }\r
     }\r
-  }\r
-\r
-  /**\r
-   * This method initializes jContentPane\r
-   * \r
-   * @return javax.swing.JPanel jContentPane\r
-   * \r
-   */\r
-  private JPanel getJContentPane() {\r
-    if (jContentPane == null) {\r
-      jStarLabel1 = new StarLabel();\r
-      jStarLabel1.setLocation(new java.awt.Point(2, 10));\r
-      jLabelEventType = new JLabel();\r
-      jLabelEventType.setText("Select Event Type");\r
-      jLabelEventType.setBounds(new java.awt.Rectangle(15, 10, 145, 20));\r
-\r
-      jStarLabel2 = new StarLabel();\r
-      jStarLabel2.setLocation(new java.awt.Point(2, 35));\r
-      jLabelC_Name = new JLabel();\r
-      jLabelC_Name.setText("Guid C Name");\r
-      jLabelC_Name.setBounds(new java.awt.Rectangle(15, 35, 145, 20));\r
-\r
-      jStarLabel3 = new StarLabel();\r
-      jStarLabel3.setLocation(new java.awt.Point(2, 60));\r
-      jLabelGroup = new JLabel();\r
-      jLabelGroup.setText("Event Group Type");\r
-      jLabelGroup.setBounds(new java.awt.Rectangle(15, 60, 145, 20));\r
-\r
-      jStarLabel4 = new StarLabel();\r
-      jStarLabel4.setLocation(new java.awt.Point(2, 85));\r
-      jLabelUsage = new JLabel();\r
-      jLabelUsage.setText("Usage");\r
-      jLabelUsage.setBounds(new java.awt.Rectangle(15, 85, 140, 20));\r
-\r
-      jLabelHelpText = new JLabel();\r
-      jLabelHelpText.setBounds(new java.awt.Rectangle(15, 110, 145, 20));\r
-      jLabelHelpText.setText("Help Text");\r
-\r
-      jLabelFeatureFlag = new JLabel();\r
-      jLabelFeatureFlag.setBounds(new java.awt.Rectangle(15, 155, 145, 20));\r
-      jLabelFeatureFlag.setText("Feature Flag Expression");\r
-\r
-      jLabelArch = new JLabel();\r
-      jLabelArch.setBounds(new java.awt.Rectangle(15, 180, 145, 20));\r
-      jLabelArch.setText("Supported Architectures");\r
-      jArchCheckBox = new ArchCheckBox();\r
-      jArchCheckBox.setBounds(new java.awt.Rectangle(160, 180, 320, 20));\r
-      jArchCheckBox.setPreferredSize(new java.awt.Dimension(320, 20));\r
-\r
-      jContentPane = new JPanel();\r
-      jContentPane.setLayout(null);\r
-      jContentPane.setPreferredSize(new java.awt.Dimension(485, 230));\r
-\r
-      jContentPane.add(jStarLabel1, null);\r
-      jContentPane.add(jLabelEventType, null);\r
-      jContentPane.add(getJComboBoxEventsType(), null);\r
-      jContentPane.add(jStarLabel2, null);\r
-      jContentPane.add(jLabelC_Name, null);\r
-      jContentPane.add(getJComboBoxGuidC_Name(), null);\r
-      jContentPane.add(jStarLabel3, null);\r
-      jContentPane.add(jLabelGroup, null);\r
-      jContentPane.add(getJComboBoxEventGroup(), null);\r
-      jContentPane.add(jStarLabel4, null);\r
-      jContentPane.add(jLabelUsage, null);\r
-      jContentPane.add(getJComboBoxUsage(), null);\r
-      jContentPane.add(jLabelHelpText, null);\r
-      jContentPane.add(getJScrollPaneHelpText(), null);\r
-      jContentPane.add(jLabelFeatureFlag, null);\r
-      jContentPane.add(getJTextFieldFeatureFlag(), null);\r
-      jContentPane.add(jLabelArch, null);\r
-      jContentPane.add(jArchCheckBox, null);\r
-      jContentPane.add(getJButtonOk(), null);\r
-      jContentPane.add(getJButtonCancel(), null);\r
 \r
+    /**\r
+     * This method initializes jContentPane\r
+     * \r
+     * @return javax.swing.JPanel jContentPane\r
+     * \r
+     */\r
+    private JPanel getJContentPane() {\r
+        if (jContentPane == null) {\r
+            jStarLabel1 = new StarLabel();\r
+            jStarLabel1.setLocation(new java.awt.Point(2, 10));\r
+            jLabelEventType = new JLabel();\r
+            jLabelEventType.setText("Select Event Type");\r
+            jLabelEventType.setBounds(new java.awt.Rectangle(15, 10, 145, 20));\r
+\r
+            jStarLabel2 = new StarLabel();\r
+            jStarLabel2.setLocation(new java.awt.Point(2, 35));\r
+            jLabelC_Name = new JLabel();\r
+            jLabelC_Name.setText("Guid C Name");\r
+            jLabelC_Name.setBounds(new java.awt.Rectangle(15, 35, 145, 20));\r
+\r
+            jStarLabel3 = new StarLabel();\r
+            jStarLabel3.setLocation(new java.awt.Point(2, 60));\r
+            jLabelGroup = new JLabel();\r
+            jLabelGroup.setText("Event Group Type");\r
+            jLabelGroup.setBounds(new java.awt.Rectangle(15, 60, 145, 20));\r
+\r
+            jStarLabel4 = new StarLabel();\r
+            jStarLabel4.setLocation(new java.awt.Point(2, 85));\r
+            jLabelUsage = new JLabel();\r
+            jLabelUsage.setText("Usage");\r
+            jLabelUsage.setBounds(new java.awt.Rectangle(15, 85, 140, 20));\r
+\r
+            jLabelHelpText = new JLabel();\r
+            jLabelHelpText.setBounds(new java.awt.Rectangle(15, 110, 145, 20));\r
+            jLabelHelpText.setText("Help Text");\r
+\r
+            jLabelFeatureFlag = new JLabel();\r
+            jLabelFeatureFlag.setBounds(new java.awt.Rectangle(15, 155, 145, 20));\r
+            jLabelFeatureFlag.setText("Feature Flag Expression");\r
+\r
+            jLabelArch = new JLabel();\r
+            jLabelArch.setBounds(new java.awt.Rectangle(15, 180, 145, 20));\r
+            jLabelArch.setText("Supported Architectures");\r
+            jArchCheckBox = new ArchCheckBox();\r
+            jArchCheckBox.setBounds(new java.awt.Rectangle(160, 180, 320, 20));\r
+            jArchCheckBox.setPreferredSize(new java.awt.Dimension(320, 20));\r
+\r
+            jContentPane = new JPanel();\r
+            jContentPane.setLayout(null);\r
+            jContentPane.setPreferredSize(new java.awt.Dimension(485, 230));\r
+\r
+            jContentPane.add(jStarLabel1, null);\r
+            jContentPane.add(jLabelEventType, null);\r
+            jContentPane.add(getJComboBoxEventsType(), null);\r
+            jContentPane.add(jStarLabel2, null);\r
+            jContentPane.add(jLabelC_Name, null);\r
+            jContentPane.add(getJComboBoxGuidC_Name(), null);\r
+            jContentPane.add(jStarLabel3, null);\r
+            jContentPane.add(jLabelGroup, null);\r
+            jContentPane.add(getJComboBoxEventGroup(), null);\r
+            jContentPane.add(jStarLabel4, null);\r
+            jContentPane.add(jLabelUsage, null);\r
+            jContentPane.add(getJComboBoxUsage(), null);\r
+            jContentPane.add(jLabelHelpText, null);\r
+            jContentPane.add(getJScrollPaneHelpText(), null);\r
+            jContentPane.add(jLabelFeatureFlag, null);\r
+            jContentPane.add(getJTextFieldFeatureFlag(), null);\r
+            jContentPane.add(jLabelArch, null);\r
+            jContentPane.add(jArchCheckBox, null);\r
+            jContentPane.add(getJButtonOk(), null);\r
+            jContentPane.add(getJButtonCancel(), null);\r
+\r
+        }\r
+        return jContentPane;\r
     }\r
-    return jContentPane;\r
-  }\r
-\r
-  /**\r
-   * This method initializes events groups and usage type\r
-   * \r
-   */\r
-  private void initFrame() {\r
-    Tools.generateComboBoxByVector(jComboBoxEventsType, ed.getVEventType());\r
-    Tools.generateComboBoxByVector(jComboBoxEventGroup, ed.getVEventGroup());\r
-    Tools.generateComboBoxByVector(jComboBoxUsage, ed.getVEventUsage());\r
-    Tools.generateComboBoxByVector(jComboBoxGuidC_Name, wt\r
-        .getAllGuidDeclarationsFromWorkspace());\r
-  }\r
-\r
-  /*\r
-   * (non-Javadoc)\r
-   * \r
-   * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)\r
-   * \r
-   * Override actionPerformed to listen all actions\r
-   * \r
-   */\r
-  public void actionPerformed(ActionEvent arg0) {\r
-    if (arg0.getSource() == jButtonOk) {\r
-      if (checkAdd()) {\r
-        getCurrentEvents();\r
-        this.returnType = DataType.RETURN_TYPE_OK;\r
-        this.setVisible(false);\r
-      }\r
+\r
+    /**\r
+     * This method initializes events groups and usage type\r
+     * \r
+     */\r
+    private void initFrame() {\r
+        Tools.generateComboBoxByVector(jComboBoxEventsType, ed.getVEventType());\r
+        Tools.generateComboBoxByVector(jComboBoxEventGroup, ed.getVEventGroup());\r
+        Tools.generateComboBoxByVector(jComboBoxUsage, ed.getVEventUsage());\r
+        Tools.generateComboBoxByVector(jComboBoxGuidC_Name, wt.getAllGuidDeclarationsFromWorkspace());\r
     }\r
 \r
-    if (arg0.getSource() == jButtonCancel) {\r
-      this.returnType = DataType.RETURN_TYPE_CANCEL;\r
-      this.setVisible(false);\r
+    /*\r
+     * (non-Javadoc)\r
+     * \r
+     * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)\r
+     * \r
+     * Override actionPerformed to listen all actions\r
+     * \r
+     */\r
+    public void actionPerformed(ActionEvent arg0) {\r
+        if (arg0.getSource() == jButtonOk) {\r
+            if (checkAdd()) {\r
+                getCurrentEvents();\r
+                this.returnType = DataType.RETURN_TYPE_OK;\r
+                this.setVisible(false);\r
+            }\r
+        }\r
+\r
+        if (arg0.getSource() == jButtonCancel) {\r
+            this.returnType = DataType.RETURN_TYPE_CANCEL;\r
+            this.setVisible(false);\r
+        }\r
     }\r
-  }\r
-\r
-  /**\r
-   * Data validation for all fields\r
-   * \r
-   * @retval true - All datas are valid\r
-   * @retval false - At least one data is invalid\r
-   * \r
-   */\r
-  public boolean checkAdd() {\r
-    //\r
-    // Check if all fields have correct data types\r
-    //\r
 \r
-    //\r
-    // Check Name\r
-    //\r
-    if (isEmpty(this.jComboBoxGuidC_Name.getSelectedItem().toString())) {\r
-      Log.wrn("Update Events", "Event Name couldn't be empty");\r
-      return false;\r
+    /**\r
+     * Data validation for all fields\r
+     * \r
+     * @retval true - All datas are valid\r
+     * @retval false - At least one data is invalid\r
+     * \r
+     */\r
+    public boolean checkAdd() {\r
+        //\r
+        // Check if all fields have correct data types\r
+        //\r
+\r
+        //\r
+        // Check Name\r
+        //\r
+        if (isEmpty(this.jComboBoxGuidC_Name.getSelectedItem().toString())) {\r
+            Log.wrn("Update Events", "Event Name couldn't be empty");\r
+            return false;\r
+        }\r
+\r
+        if (!isEmpty(this.jComboBoxGuidC_Name.getSelectedItem().toString())) {\r
+            if (!DataValidation.isC_NameType(this.jComboBoxGuidC_Name.getSelectedItem().toString())) {\r
+                Log.wrn("Update Events", "Incorrect data type for Event Name");\r
+                return false;\r
+            }\r
+        }\r
+\r
+        //\r
+        // Check FeatureFlag\r
+        //\r
+        if (!isEmpty(this.jTextFieldFeatureFlag.getText())) {\r
+            if (!DataValidation.isFeatureFlag(this.jTextFieldFeatureFlag.getText())) {\r
+                Log.wrn("Update Events", "Incorrect data type for Feature Flag");\r
+                return false;\r
+            }\r
+        }\r
+\r
+        return true;\r
     }\r
 \r
-    if (!isEmpty(this.jComboBoxGuidC_Name.getSelectedItem().toString())) {\r
-      if (!DataValidation.isC_NameType(this.jComboBoxGuidC_Name\r
-          .getSelectedItem().toString())) {\r
-        Log.wrn("Update Events", "Incorrect data type for Event Name");\r
-        return false;\r
-      }\r
+    private EventsIdentification getCurrentEvents() {\r
+        String arg0 = this.jComboBoxGuidC_Name.getSelectedItem().toString();\r
+        String arg1 = this.jComboBoxEventsType.getSelectedItem().toString();\r
+        String arg2 = this.jComboBoxUsage.getSelectedItem().toString();\r
+\r
+        String arg3 = this.jTextFieldFeatureFlag.getText();\r
+        Vector<String> arg4 = this.jArchCheckBox.getSelectedItemsVector();\r
+        String arg5 = this.jTextAreaHelpText.getText();\r
+        String arg6 = this.jComboBoxEventGroup.getSelectedItem().toString();\r
+        id = new EventsIdentification(arg0, arg1, arg2, arg3, arg4, arg5, arg6);\r
+        return id;\r
     }\r
 \r
-    //\r
-    // Check FeatureFlag\r
-    //\r
-    if (!isEmpty(this.jTextFieldFeatureFlag.getText())) {\r
-      if (!DataValidation.isFeatureFlag(this.jTextFieldFeatureFlag.getText())) {\r
-        Log.wrn("Update Events", "Incorrect data type for Feature Flag");\r
-        return false;\r
-      }\r
+    public EventsIdentification getId() {\r
+        return id;\r
     }\r
 \r
-    return true;\r
-  }\r
-\r
-  private EventsIdentification getCurrentEvents() {\r
-    String arg0 = this.jComboBoxGuidC_Name.getSelectedItem().toString();\r
-    String arg1 = this.jComboBoxEventsType.getSelectedItem().toString();\r
-    String arg2 = this.jComboBoxUsage.getSelectedItem().toString();\r
-\r
-    String arg3 = this.jTextFieldFeatureFlag.getText();\r
-    Vector<String> arg4 = this.jArchCheckBox.getSelectedItemsVector();\r
-    String arg5 = this.jTextAreaHelpText.getText();\r
-    String arg6 = this.jComboBoxEventGroup.getSelectedItem().toString();\r
-    id = new EventsIdentification(arg0, arg1, arg2, arg3, arg4, arg5, arg6);\r
-    return id;\r
-  }\r
-  \r
-  public EventsIdentification getId() {\r
-    return id;\r
-  }\r
-\r
-  public void setId(EventsIdentification id) {\r
-    this.id = id;\r
-  }\r
+    public void setId(EventsIdentification id) {\r
+        this.id = id;\r
+    }\r
 }\r
index bca2a5c..7198b29 100644 (file)
@@ -224,7 +224,7 @@ public class ExternsDlg extends IDialog implements ItemListener {
             if (id.getType().equals(EnumerationData.EXTERNS_PCD_IS_DRIVER)) {\r
                 this.jComboBoxPcdIsDriver.setSelectedItem(id.getName());\r
             } else {\r
-                this.jTextFieldC_Name.setText(id.getName());    \r
+                this.jTextFieldC_Name.setText(id.getName());\r
             }\r
             this.jComboBoxType.setSelectedItem(id.getType());\r
             this.jTextFieldFeatureFlag.setText(id.getFeatureFlag());\r
@@ -380,7 +380,7 @@ public class ExternsDlg extends IDialog implements ItemListener {
         if (this.jComboBoxType.getSelectedItem().toString().equals(EnumerationData.EXTERNS_PCD_IS_DRIVER)) {\r
             arg0 = this.jComboBoxPcdIsDriver.getSelectedItem().toString();\r
         } else {\r
-            arg0 = this.jTextFieldC_Name.getText();    \r
+            arg0 = this.jTextFieldC_Name.getText();\r
         }\r
         String arg1 = this.jComboBoxType.getSelectedItem().toString();\r
 \r
index 7bfff4d..7b42c44 100644 (file)
@@ -44,373 +44,379 @@ import org.tianocore.frameworkwizard.workspace.WorkspaceTools;
  */\r
 public class GuidsDlg extends IDialog {\r
 \r
-  // /\r
-  // / Define class Serial Version UID\r
-  // /\r
-  private static final long serialVersionUID = 6710858997766979803L;\r
+    // /\r
+    // / Define class Serial Version UID\r
+    // /\r
+    private static final long serialVersionUID = 6710858997766979803L;\r
 \r
-  //\r
-  // Define class members\r
-  //\r
-  private JPanel jContentPane = null;\r
-\r
-  private JLabel jLabelC_Name = null;\r
+    //\r
+    // Define class members\r
+    //\r
+    private JPanel jContentPane = null;\r
 \r
-  private JComboBox jComboBoxCName = null;\r
+    private JLabel jLabelC_Name = null;\r
 \r
-  private JLabel jLabelUsage = null;\r
+    private JComboBox jComboBoxCName = null;\r
 \r
-  private JComboBox jComboBoxUsage = null;\r
+    private JLabel jLabelUsage = null;\r
 \r
-  private StarLabel jStarLabel1 = null;\r
+    private JComboBox jComboBoxUsage = null;\r
 \r
-  private StarLabel jStarLabel2 = null;\r
+    private StarLabel jStarLabel1 = null;\r
 \r
-  private JLabel jLabelFeatureFlag = null;\r
+    private StarLabel jStarLabel2 = null;\r
 \r
-  private JTextField jTextFieldFeatureFlag = null;\r
+    private JLabel jLabelFeatureFlag = null;\r
 \r
-  private JLabel jLabelArch = null;\r
+    private JTextField jTextFieldFeatureFlag = null;\r
 \r
-  private JScrollPane jScrollPane = null;\r
+    private JLabel jLabelArch = null;\r
 \r
-  private JLabel jLabelHelpText = null;\r
+    private JScrollPane jScrollPane = null;\r
 \r
-  private JTextArea jTextAreaHelpText = null;\r
+    private JLabel jLabelHelpText = null;\r
 \r
-  private JScrollPane jScrollPaneHelpText = null;\r
-  \r
-  private ArchCheckBox jArchCheckBox = null;\r
+    private JTextArea jTextAreaHelpText = null;\r
 \r
-  private JButton jButtonOk = null;\r
+    private JScrollPane jScrollPaneHelpText = null;\r
 \r
-  private JButton jButtonCancel = null;\r
+    private ArchCheckBox jArchCheckBox = null;\r
 \r
-  //\r
-  // Not used by UI\r
-  //\r
-  private GuidsIdentification id = null;\r
+    private JButton jButtonOk = null;\r
 \r
-  private EnumerationData ed = new EnumerationData();\r
+    private JButton jButtonCancel = null;\r
 \r
-  private WorkspaceTools wt = new WorkspaceTools();\r
+    //\r
+    // Not used by UI\r
+    //\r
+    private GuidsIdentification id = null;\r
+\r
+    private EnumerationData ed = new EnumerationData();\r
+\r
+    private WorkspaceTools wt = new WorkspaceTools();\r
+\r
+    /**\r
+     * This method initializes jTextFieldC_Name\r
+     * \r
+     * @return javax.swing.JTextField jTextFieldC_Name\r
+     * \r
+     */\r
+    private JComboBox getJComboBoxCName() {\r
+        if (jComboBoxCName == null) {\r
+            jComboBoxCName = new JComboBox();\r
+            jComboBoxCName.setBounds(new java.awt.Rectangle(160, 10, 320, 20));\r
+            jComboBoxCName.setPreferredSize(new java.awt.Dimension(320, 20));\r
+            jComboBoxCName.setToolTipText("Select the C Name of the GUID");\r
+        }\r
+        return jComboBoxCName;\r
+    }\r
 \r
-  /**\r
-   * This method initializes jTextFieldC_Name\r
-   * \r
-   * @return javax.swing.JTextField jTextFieldC_Name\r
-   * \r
-   */\r
-  private JComboBox getJComboBoxCName() {\r
-    if (jComboBoxCName == null) {\r
-      jComboBoxCName = new JComboBox();\r
-      jComboBoxCName.setBounds(new java.awt.Rectangle(160, 10, 320, 20));\r
-      jComboBoxCName.setPreferredSize(new java.awt.Dimension(320, 20));\r
-      jComboBoxCName.setToolTipText("Select the C Name of the GUID");\r
+    /**\r
+     * This method initializes jComboBoxUsage\r
+     * \r
+     * @return javax.swing.JComboBox jComboBoxUsage\r
+     * \r
+     */\r
+    private JComboBox getJComboBoxUsage() {\r
+        if (jComboBoxUsage == null) {\r
+            jComboBoxUsage = new JComboBox();\r
+            jComboBoxUsage.setBounds(new java.awt.Rectangle(160, 35, 320, 20));\r
+            jComboBoxUsage.setPreferredSize(new java.awt.Dimension(320, 20));\r
+            jComboBoxUsage\r
+                          .setToolTipText("<html><table>"\r
+                                          + "<tr><td>ALWAYS_CONSUMED</td><td>Module always consumes the GUID</td></tr>"\r
+                                          + "<tr><td>SOMETIMES_CONSUMED</td><td>Module will use the GUID only if it is present</td></tr>"\r
+                                          + "<tr><td>ALWAYS_PRODUCED</td><td>Module always produces the GUID</td></tr>"\r
+                                          + "<tr><td>SOMETIMES_PRODUCED</td><td>Module will sometimes produce the GUID</td></tr>"\r
+                                          + "<tr><td>DEFAULT</td><td>Default is the the GUID that specified the<br>instance of the package</td></tr>"\r
+                                          + "</table></html>");\r
+        }\r
+        return jComboBoxUsage;\r
     }\r
-    return jComboBoxCName;\r
-  }\r
-\r
-  /**\r
-   * This method initializes jComboBoxUsage\r
-   * \r
-   * @return javax.swing.JComboBox jComboBoxUsage\r
-   * \r
-   */\r
-  private JComboBox getJComboBoxUsage() {\r
-    if (jComboBoxUsage == null) {\r
-      jComboBoxUsage = new JComboBox();\r
-      jComboBoxUsage.setBounds(new java.awt.Rectangle(160, 35, 320, 20));\r
-      jComboBoxUsage.setPreferredSize(new java.awt.Dimension(320, 20));\r
-      jComboBoxUsage.setToolTipText("<html><table><tr><td>ALWAYS_CONSUMED</td><td>Module always consumes the GUID</td></tr><tr><td>SOMETIMES_CONSUMED</td><td>Module will use the GUID only if it is present</td></tr><tr><td>ALWAYS_PRODUCED</td><td>Module always produces the GUID</td></tr><tr><td>SOMETIMES_PRODUCED</td><td>Module will sometimes produce the GUID</td></tr><tr><td>DEFAULT</td><td>Default is the the GUID that specified the<br>instance of the package</td></tr></table></html>");\r
+\r
+    /**\r
+     * This method initializes jTextFieldFeatureFlag\r
+     * \r
+     * @return javax.swing.JTextField\r
+     \r
+     */\r
+    private JTextField getJTextFieldFeatureFlag() {\r
+        if (jTextFieldFeatureFlag == null) {\r
+            jTextFieldFeatureFlag = new JTextField();\r
+            jTextFieldFeatureFlag.setBounds(new java.awt.Rectangle(160, 105, 320, 20));\r
+            jTextFieldFeatureFlag.setPreferredSize(new java.awt.Dimension(320, 20));\r
+            jTextFieldFeatureFlag.setToolTipText("Postfix expression that must evaluate to TRUE or FALSE");\r
+        }\r
+        return jTextFieldFeatureFlag;\r
     }\r
-    return jComboBoxUsage;\r
-  }\r
-\r
-  /**\r
-   * This method initializes jTextFieldFeatureFlag\r
-   * \r
-   * @return javax.swing.JTextField\r
-   * \r
-   */\r
-  private JTextField getJTextFieldFeatureFlag() {\r
-    if (jTextFieldFeatureFlag == null) {\r
-      jTextFieldFeatureFlag = new JTextField();\r
-      jTextFieldFeatureFlag.setBounds(new java.awt.Rectangle(160, 105, 320, 20));\r
-      jTextFieldFeatureFlag.setPreferredSize(new java.awt.Dimension(320, 20));\r
-      jTextFieldFeatureFlag.setToolTipText("Postfix expression that must evaluate to TRUE or FALSE");\r
+\r
+    /**\r
+     * This method initializes jScrollPane\r
+     * \r
+     * @return javax.swing.JScrollPane\r
+     */\r
+    private JScrollPane getJScrollPane() {\r
+        if (jScrollPane == null) {\r
+            jScrollPane = new JScrollPane();\r
+            jScrollPane.setViewportView(getJContentPane());\r
+        }\r
+        return jScrollPane;\r
     }\r
-    return jTextFieldFeatureFlag;\r
-  }\r
-\r
-  /**\r
-   * This method initializes jScrollPane\r
-   * \r
-   * @return javax.swing.JScrollPane\r
-   */\r
-  private JScrollPane getJScrollPane() {\r
-    if (jScrollPane == null) {\r
-      jScrollPane = new JScrollPane();\r
-      jScrollPane.setViewportView(getJContentPane());\r
+\r
+    /**\r
+     * This method initializes jTextAreaHelpText\r
+     * \r
+     * @return javax.swing.JTextArea\r
+     * \r
+     */\r
+    private JTextArea getJTextAreaHelpText() {\r
+        if (jTextAreaHelpText == null) {\r
+            jTextAreaHelpText = new JTextArea();\r
+            jTextAreaHelpText.setLineWrap(true);\r
+            jTextAreaHelpText.setWrapStyleWord(true);\r
+        }\r
+        return jTextAreaHelpText;\r
     }\r
-    return jScrollPane;\r
-  }\r
-\r
-  /**\r
-   * This method initializes jTextAreaHelpText\r
-   * \r
-   * @return javax.swing.JTextArea\r
-   * \r
-   */\r
-  private JTextArea getJTextAreaHelpText() {\r
-    if (jTextAreaHelpText == null) {\r
-      jTextAreaHelpText = new JTextArea();\r
-      jTextAreaHelpText.setLineWrap(true);\r
-      jTextAreaHelpText.setWrapStyleWord(true);\r
+\r
+    /**\r
+     * \r
+     * This method initializes jScrollPaneHelpText\r
+     * \r
+     * @return javax.swing.JScrollPane jScrollPaneHelpText\r
+     * \r
+     **/\r
+    private JScrollPane getJScrollPaneHelpText() {\r
+        if (jScrollPaneHelpText == null) {\r
+            jScrollPaneHelpText = new JScrollPane();\r
+            jScrollPaneHelpText.setHorizontalScrollBarPolicy(javax.swing.JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);\r
+            jScrollPaneHelpText.setSize(new java.awt.Dimension(320, 40));\r
+            jScrollPaneHelpText.setLocation(new java.awt.Point(160, 60));\r
+            jScrollPaneHelpText.setViewportView(getJTextAreaHelpText());\r
+        }\r
+        return jScrollPaneHelpText;\r
     }\r
-    return jTextAreaHelpText;\r
-  }\r
-\r
-  /**\r
-   * \r
-   * This method initializes jScrollPaneHelpText\r
-   * \r
-   * @return javax.swing.JScrollPane jScrollPaneHelpText\r
-   * \r
-   **/\r
-  private JScrollPane getJScrollPaneHelpText() {\r
-    if (jScrollPaneHelpText == null){\r
-      jScrollPaneHelpText = new JScrollPane();\r
-      jScrollPaneHelpText.setHorizontalScrollBarPolicy(javax.swing.JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);\r
-      jScrollPaneHelpText.setSize(new java.awt.Dimension(320, 40));\r
-      jScrollPaneHelpText.setLocation(new java.awt.Point(160,60));\r
-      jScrollPaneHelpText.setViewportView(getJTextAreaHelpText());\r
+\r
+    /**\r
+     * This method initializes jButtonOk\r
+     * \r
+     * @return javax.swing.JButton\r
+     * \r
+     */\r
+    private JButton getJButtonOk() {\r
+        if (jButtonOk == null) {\r
+            jButtonOk = new JButton();\r
+            jButtonOk.setBounds(new java.awt.Rectangle(290, 157, 90, 20));\r
+            jButtonOk.setText("Ok");\r
+            jButtonOk.addActionListener(this);\r
+        }\r
+        return jButtonOk;\r
     }\r
-    return jScrollPaneHelpText;\r
-  }\r
-  /**\r
-   * This method initializes jButtonOk\r
-   * \r
-   * @return javax.swing.JButton\r
-   * \r
-   */\r
-  private JButton getJButtonOk() {\r
-    if (jButtonOk == null) {\r
-      jButtonOk = new JButton();\r
-      jButtonOk.setBounds(new java.awt.Rectangle(290, 157, 90, 20));\r
-      jButtonOk.setText("Ok");\r
-      jButtonOk.addActionListener(this);\r
+\r
+    /**\r
+     * This method initializes jButtonCancel\r
+     * \r
+     * @return javax.swing.JButton\r
+     * \r
+     */\r
+    private JButton getJButtonCancel() {\r
+        if (jButtonCancel == null) {\r
+            jButtonCancel = new JButton();\r
+            jButtonCancel.setBounds(new java.awt.Rectangle(390, 157, 90, 20));\r
+            jButtonCancel.setText("Cancel");\r
+            jButtonCancel.addActionListener(this);\r
+        }\r
+        return jButtonCancel;\r
     }\r
-    return jButtonOk;\r
-  }\r
-\r
-  /**\r
-   * This method initializes jButtonCancel\r
-   * \r
-   * @return javax.swing.JButton\r
-   * \r
-   */\r
-  private JButton getJButtonCancel() {\r
-    if (jButtonCancel == null) {\r
-      jButtonCancel = new JButton();\r
-      jButtonCancel.setBounds(new java.awt.Rectangle(390, 157, 90, 20));\r
-      jButtonCancel.setText("Cancel");\r
-      jButtonCancel.addActionListener(this);\r
+\r
+    public static void main(String[] args) {\r
+\r
     }\r
-    return jButtonCancel;\r
-  }\r
-\r
-  public static void main(String[] args) {\r
-\r
-  }\r
-\r
-  /**\r
-   * \r
-   * This method initializes this\r
-   * \r
-   */\r
-  private void init() {\r
-    this.setSize(500, 230);\r
-    this.setContentPane(getJScrollPane());\r
-    this.setTitle("Guids");\r
-    initFrame();\r
-    this.setViewMode(false);\r
-    this.centerWindow();\r
-  }\r
-\r
-  /**\r
-   * \r
-   * This method initializes this Fill values to all fields if these values are\r
-   * not empty\r
-   * \r
-   * @param inGuidsId\r
-   * \r
-   */\r
-  private void init(GuidsIdentification inGuidsId) {\r
-    init();\r
-    this.id = inGuidsId;\r
-\r
-    if (this.id != null) {\r
-      this.jComboBoxCName.setSelectedItem(id.getName());\r
-      this.jComboBoxUsage.setSelectedItem(id.getUsage());\r
-      this.jTextAreaHelpText.setText(id.getHelp());\r
-      this.jTextFieldFeatureFlag.setText(id.getFeatureFlag());\r
-      this.jArchCheckBox.setSelectedItems(id.getSupArchList());\r
+\r
+    /**\r
+     * \r
+     * This method initializes this\r
+     * \r
+     */\r
+    private void init() {\r
+        this.setSize(500, 230);\r
+        this.setContentPane(getJScrollPane());\r
+        this.setTitle("Guids");\r
+        initFrame();\r
+        this.setViewMode(false);\r
+        this.centerWindow();\r
     }\r
-  }\r
-\r
-  /**\r
-   * This is the override edit constructor\r
-   * \r
-   * @param inGuidsIdentification\r
-   * @param iFrame\r
-   * \r
-   */\r
-  public GuidsDlg(GuidsIdentification inGuidsIdentification, IFrame iFrame) {\r
-    super(iFrame, true);\r
-    init(inGuidsIdentification);\r
-  }\r
-\r
-  /**\r
-   * Disable all components when the mode is view\r
-   * \r
-   * @param isView\r
-   *          true - The view mode; false - The non-view mode\r
-   * \r
-   */\r
-  public void setViewMode(boolean isView) {\r
-    if (isView) {\r
-      this.jComboBoxUsage.setEnabled(!isView);\r
+\r
+    /**\r
+     * \r
+     * This method initializes this Fill values to all fields if these values are\r
+     * not empty\r
+     * \r
+     * @param inGuidsId\r
+     * \r
+     */\r
+    private void init(GuidsIdentification inGuidsId) {\r
+        init();\r
+        this.id = inGuidsId;\r
+\r
+        if (this.id != null) {\r
+            this.jComboBoxCName.setSelectedItem(id.getName());\r
+            this.jComboBoxUsage.setSelectedItem(id.getUsage());\r
+            this.jTextAreaHelpText.setText(id.getHelp());\r
+            this.jTextFieldFeatureFlag.setText(id.getFeatureFlag());\r
+            this.jArchCheckBox.setSelectedItems(id.getSupArchList());\r
+        }\r
     }\r
-  }\r
-\r
-  /**\r
-   * This method initializes jContentPane\r
-   * \r
-   * @return javax.swing.JPanel jContentPane\r
-   * \r
-   */\r
-  private JPanel getJContentPane() {\r
-    if (jContentPane == null) {\r
-      jStarLabel1 = new StarLabel();\r
-      jStarLabel1.setLocation(new java.awt.Point(2, 10));\r
-      jLabelC_Name = new JLabel();\r
-      jLabelC_Name.setText("Select GUID's C Name");\r
-      jLabelC_Name.setBounds(new java.awt.Rectangle(15, 10, 145, 20));\r
-\r
-      jStarLabel2 = new StarLabel();\r
-      jStarLabel2.setLocation(new java.awt.Point(2, 35));\r
-      jLabelUsage = new JLabel();\r
-      jLabelUsage.setText("Usage");\r
-      jLabelUsage.setBounds(new java.awt.Rectangle(15, 35, 145, 20));\r
-\r
-      jLabelHelpText = new JLabel();\r
-      jLabelHelpText.setBounds(new java.awt.Rectangle(14, 60, 145, 20));\r
-      jLabelHelpText.setText("Help Text");\r
-\r
-      jLabelFeatureFlag = new JLabel();\r
-      jLabelFeatureFlag.setBounds(new java.awt.Rectangle(15, 105, 145, 20));\r
-      jLabelFeatureFlag.setText("Feature Flag Expression");\r
-\r
-      jLabelArch = new JLabel();\r
-      jLabelArch.setBounds(new java.awt.Rectangle(15, 130, 145, 20));\r
-      jLabelArch.setText("Supported Architectures");\r
-      jArchCheckBox = new ArchCheckBox();\r
-      jArchCheckBox.setBounds(new java.awt.Rectangle(160, 130, 320, 20));\r
-      jArchCheckBox.setPreferredSize(new java.awt.Dimension(320, 20));\r
-\r
-      jContentPane = new JPanel();\r
-      jContentPane.setLayout(null);\r
-      jContentPane.setPreferredSize(new java.awt.Dimension(490, 165));\r
-      \r
-      jContentPane.add(jStarLabel1, null);\r
-      jContentPane.add(jLabelC_Name, null);\r
-      jContentPane.add(getJComboBoxCName(), null);\r
-      jContentPane.add(jStarLabel2, null);\r
-      jContentPane.add(jLabelUsage, null);\r
-      jContentPane.add(getJComboBoxUsage(), null);\r
-      jContentPane.add(jLabelHelpText, null);\r
-      jContentPane.add(getJScrollPaneHelpText(), null);\r
-      jContentPane.add(jLabelFeatureFlag, null);\r
-      jContentPane.add(getJTextFieldFeatureFlag(), null);\r
-      jContentPane.add(jLabelArch, null);\r
-      jContentPane.add(jArchCheckBox, null);\r
-      jContentPane.add(getJButtonOk(), null);\r
-      jContentPane.add(getJButtonCancel(), null);\r
+\r
+    /**\r
+     * This is the override edit constructor\r
+     * \r
+     * @param inGuidsIdentification\r
+     * @param iFrame\r
+     * \r
+     */\r
+    public GuidsDlg(GuidsIdentification inGuidsIdentification, IFrame iFrame) {\r
+        super(iFrame, true);\r
+        init(inGuidsIdentification);\r
     }\r
-    return jContentPane;\r
-  }\r
-\r
-  /**\r
-   * This method initializes Usage type\r
-   * \r
-   */\r
-  private void initFrame() {\r
-    Tools.generateComboBoxByVector(jComboBoxCName, wt\r
-        .getAllGuidDeclarationsFromWorkspace());\r
-    Tools.generateComboBoxByVector(jComboBoxUsage, ed.getVGuidUsage());\r
-  }\r
-\r
-  /*\r
-   * (non-Javadoc)\r
-   * \r
-   * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)\r
-   * \r
-   * Override actionPerformed to listen all actions\r
-   * \r
-   */\r
-  public void actionPerformed(ActionEvent arg0) {\r
-    if (arg0.getSource() == jButtonOk) {\r
-      if (checkAdd()) {\r
-        getCurrentGuids();\r
-        this.returnType = DataType.RETURN_TYPE_OK;\r
-        this.setVisible(false);\r
-      }\r
+\r
+    /**\r
+     * Disable all components when the mode is view\r
+     * \r
+     * @param isView\r
+     *          true - The view mode; false - The non-view mode\r
+     * \r
+     */\r
+    public void setViewMode(boolean isView) {\r
+        if (isView) {\r
+            this.jComboBoxUsage.setEnabled(!isView);\r
+        }\r
     }\r
 \r
-    if (arg0.getSource() == jButtonCancel) {\r
-      this.returnType = DataType.RETURN_TYPE_CANCEL;\r
-      this.setVisible(false);\r
+    /**\r
+     * This method initializes jContentPane\r
+     * \r
+     * @return javax.swing.JPanel jContentPane\r
+     * \r
+     */\r
+    private JPanel getJContentPane() {\r
+        if (jContentPane == null) {\r
+            jStarLabel1 = new StarLabel();\r
+            jStarLabel1.setLocation(new java.awt.Point(2, 10));\r
+            jLabelC_Name = new JLabel();\r
+            jLabelC_Name.setText("Select GUID's C Name");\r
+            jLabelC_Name.setBounds(new java.awt.Rectangle(15, 10, 145, 20));\r
+\r
+            jStarLabel2 = new StarLabel();\r
+            jStarLabel2.setLocation(new java.awt.Point(2, 35));\r
+            jLabelUsage = new JLabel();\r
+            jLabelUsage.setText("Usage");\r
+            jLabelUsage.setBounds(new java.awt.Rectangle(15, 35, 145, 20));\r
+\r
+            jLabelHelpText = new JLabel();\r
+            jLabelHelpText.setBounds(new java.awt.Rectangle(14, 60, 145, 20));\r
+            jLabelHelpText.setText("Help Text");\r
+\r
+            jLabelFeatureFlag = new JLabel();\r
+            jLabelFeatureFlag.setBounds(new java.awt.Rectangle(15, 105, 145, 20));\r
+            jLabelFeatureFlag.setText("Feature Flag Expression");\r
+\r
+            jLabelArch = new JLabel();\r
+            jLabelArch.setBounds(new java.awt.Rectangle(15, 130, 145, 20));\r
+            jLabelArch.setText("Supported Architectures");\r
+            jArchCheckBox = new ArchCheckBox();\r
+            jArchCheckBox.setBounds(new java.awt.Rectangle(160, 130, 320, 20));\r
+            jArchCheckBox.setPreferredSize(new java.awt.Dimension(320, 20));\r
+\r
+            jContentPane = new JPanel();\r
+            jContentPane.setLayout(null);\r
+            jContentPane.setPreferredSize(new java.awt.Dimension(490, 165));\r
+\r
+            jContentPane.add(jStarLabel1, null);\r
+            jContentPane.add(jLabelC_Name, null);\r
+            jContentPane.add(getJComboBoxCName(), null);\r
+            jContentPane.add(jStarLabel2, null);\r
+            jContentPane.add(jLabelUsage, null);\r
+            jContentPane.add(getJComboBoxUsage(), null);\r
+            jContentPane.add(jLabelHelpText, null);\r
+            jContentPane.add(getJScrollPaneHelpText(), null);\r
+            jContentPane.add(jLabelFeatureFlag, null);\r
+            jContentPane.add(getJTextFieldFeatureFlag(), null);\r
+            jContentPane.add(jLabelArch, null);\r
+            jContentPane.add(jArchCheckBox, null);\r
+            jContentPane.add(getJButtonOk(), null);\r
+            jContentPane.add(getJButtonCancel(), null);\r
+        }\r
+        return jContentPane;\r
     }\r
-  }\r
-\r
-  /**\r
-   * Data validation for all fields\r
-   * \r
-   * @retval true - All datas are valid\r
-   * @retval false - At least one data is invalid\r
-   * \r
-   */\r
-  public boolean checkAdd() {\r
-    //\r
-    // Check if all fields have correct data types\r
-    //\r
 \r
-    //\r
-    // Check Name\r
-    //\r
-    if (!isEmpty(this.jComboBoxCName.getSelectedItem().toString())) {\r
-      if (!DataValidation.isC_NameType(this.jComboBoxCName.getSelectedItem()\r
-          .toString())) {\r
-        Log.wrn("Update Guids", "Incorrect data type for Guid Name");\r
-        return false;\r
-      }\r
+    /**\r
+     * This method initializes Usage type\r
+     * \r
+     */\r
+    private void initFrame() {\r
+        Tools.generateComboBoxByVector(jComboBoxCName, wt.getAllGuidDeclarationsFromWorkspace());\r
+        Tools.generateComboBoxByVector(jComboBoxUsage, ed.getVGuidUsage());\r
     }\r
 \r
-    //\r
-    // Check FeatureFlag\r
-    //\r
-    if (!isEmpty(this.jTextFieldFeatureFlag.getText())) {\r
-      if (!DataValidation.isFeatureFlag(this.jTextFieldFeatureFlag.getText())) {\r
-        Log.wrn("Update Guids", "Incorrect data type for Feature Flag");\r
-        return false;\r
-      }\r
+    /*\r
+     * (non-Javadoc)\r
+     * \r
+     * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)\r
+     * \r
+     * Override actionPerformed to listen all actions\r
+     * \r
+     */\r
+    public void actionPerformed(ActionEvent arg0) {\r
+        if (arg0.getSource() == jButtonOk) {\r
+            if (checkAdd()) {\r
+                getCurrentGuids();\r
+                this.returnType = DataType.RETURN_TYPE_OK;\r
+                this.setVisible(false);\r
+            }\r
+        }\r
+\r
+        if (arg0.getSource() == jButtonCancel) {\r
+            this.returnType = DataType.RETURN_TYPE_CANCEL;\r
+            this.setVisible(false);\r
+        }\r
     }\r
 \r
-    return true;\r
-  }\r
+    /**\r
+     * Data validation for all fields\r
+     * \r
+     * @retval true - All datas are valid\r
+     * @retval false - At least one data is invalid\r
+     * \r
+     */\r
+    public boolean checkAdd() {\r
+        //\r
+        // Check if all fields have correct data types\r
+        //\r
+\r
+        //\r
+        // Check Name\r
+        //\r
+        if (!isEmpty(this.jComboBoxCName.getSelectedItem().toString())) {\r
+            if (!DataValidation.isC_NameType(this.jComboBoxCName.getSelectedItem().toString())) {\r
+                Log.wrn("Update Guids", "Incorrect data type for Guid Name");\r
+                return false;\r
+            }\r
+        }\r
+\r
+        //\r
+        // Check FeatureFlag\r
+        //\r
+        if (!isEmpty(this.jTextFieldFeatureFlag.getText())) {\r
+            if (!DataValidation.isFeatureFlag(this.jTextFieldFeatureFlag.getText())) {\r
+                Log.wrn("Update Guids", "Incorrect data type for Feature Flag");\r
+                return false;\r
+            }\r
+        }\r
+\r
+        return true;\r
+    }\r
 \r
-private GuidsIdentification getCurrentGuids() {\r
+    private GuidsIdentification getCurrentGuids() {\r
         String arg0 = this.jComboBoxCName.getSelectedItem().toString();\r
         String arg1 = this.jComboBoxUsage.getSelectedItem().toString();\r
 \r
@@ -420,11 +426,13 @@ private GuidsIdentification getCurrentGuids() {
 \r
         id = new GuidsIdentification(arg0, arg1, arg2, arg3, arg4);\r
         return id;\r
-    }  public GuidsIdentification getId() {\r
-    return id;\r
-  }\r
+    }\r
 \r
-  public void setId(GuidsIdentification id) {\r
-    this.id = id;\r
-  }\r
+    public GuidsIdentification getId() {\r
+        return id;\r
+    }\r
+\r
+    public void setId(GuidsIdentification id) {\r
+        this.id = id;\r
+    }\r
 }\r
index 5db8cd5..1997ab4 100644 (file)
@@ -44,409 +44,407 @@ import org.tianocore.frameworkwizard.module.Identifications.HiiPackages.HiiPacka
  */\r
 public class HiiPackagesDlg extends IDialog {\r
 \r
-  // /\r
-  // / Define class Serial Version UID\r
-  // /\r
-  private static final long serialVersionUID = -6851574146786158116L;\r
+    // /\r
+    // / Define class Serial Version UID\r
+    // /\r
+    private static final long serialVersionUID = -6851574146786158116L;\r
 \r
-  //\r
-  // Define class members\r
-  //\r
-  private JPanel jContentPane = null;\r
-\r
-  private JLabel jLabelName = null;\r
+    //\r
+    // Define class members\r
+    //\r
+    private JPanel jContentPane = null;\r
 \r
-  private JTextField jTextFieldName = null;\r
+    private JLabel jLabelName = null;\r
 \r
-  private JLabel jLabelUsage = null;\r
+    private JTextField jTextFieldName = null;\r
 \r
-  private JComboBox jComboBoxUsage = null;\r
+    private JLabel jLabelUsage = null;\r
 \r
-  private StarLabel jStarLabel1 = null;\r
+    private JComboBox jComboBoxUsage = null;\r
 \r
-  private StarLabel jStarLabel2 = null;\r
+    private StarLabel jStarLabel1 = null;\r
 \r
-  private JLabel jLabelFeatureFlag = null;\r
+    private StarLabel jStarLabel2 = null;\r
 \r
-  private JTextField jTextFieldFeatureFlag = null;\r
+    private JLabel jLabelFeatureFlag = null;\r
 \r
-  private JLabel jLabelArch = null;\r
+    private JTextField jTextFieldFeatureFlag = null;\r
 \r
-  private JScrollPane jScrollPane = null;\r
+    private JLabel jLabelArch = null;\r
 \r
-  private JLabel jLabelHelpText = null;\r
+    private JScrollPane jScrollPane = null;\r
 \r
-  private JTextArea jTextAreaHelpText = null;\r
+    private JLabel jLabelHelpText = null;\r
 \r
-  private JScrollPane jScrollPaneHelpText = null;\r
+    private JTextArea jTextAreaHelpText = null;\r
 \r
-  private ArchCheckBox jArchCheckBox = null;\r
+    private JScrollPane jScrollPaneHelpText = null;\r
 \r
-  private JButton jButtonOk = null;\r
+    private ArchCheckBox jArchCheckBox = null;\r
 \r
-  private JButton jButtonCancel = null;\r
+    private JButton jButtonOk = null;\r
 \r
-  //\r
-  // Not used by UI\r
-  //\r
-  private HiiPackagesIdentification id = null;\r
+    private JButton jButtonCancel = null;\r
 \r
-  private EnumerationData ed = new EnumerationData();\r
+    //\r
+    // Not used by UI\r
+    //\r
+    private HiiPackagesIdentification id = null;\r
+\r
+    private EnumerationData ed = new EnumerationData();\r
+\r
+    /**\r
+     * \r
+     * This method initializes jTextFieldName\r
+     * \r
+     * @return javax.swing.JTextField jTextFieldName\r
+     * \r
+     */\r
+    private JTextField getJTextFieldName() {\r
+        if (jTextFieldName == null) {\r
+            jTextFieldName = new JTextField();\r
+            jTextFieldName.setBounds(new java.awt.Rectangle(160, 10, 320, 20));\r
+            jTextFieldName.setPreferredSize(new java.awt.Dimension(320, 20));\r
+            jTextFieldName.setToolTipText("Enter the C Name of the HII Package");\r
+        }\r
+        return jTextFieldName;\r
+    }\r
 \r
-  /**\r
-   * \r
-   * This method initializes jTextFieldName\r
-   * \r
-   * @return javax.swing.JTextField jTextFieldName\r
-   * \r
-   */\r
-  private JTextField getJTextFieldName() {\r
-    if (jTextFieldName == null) {\r
-      jTextFieldName = new JTextField();\r
-      jTextFieldName.setBounds(new java.awt.Rectangle(160, 10, 320, 20));\r
-      jTextFieldName.setPreferredSize(new java.awt.Dimension(320, 20));\r
-      jTextFieldName.setToolTipText("Enter the C Name of the HII Package");\r
+    /**\r
+     * \r
+     * This method initializes jComboBoxUsage\r
+     * \r
+     * @return javax.swing.JComboBox jComboBoxUsage\r
+     * \r
+     */\r
+    private JComboBox getJComboBoxUsage() {\r
+        if (jComboBoxUsage == null) {\r
+            jComboBoxUsage = new JComboBox();\r
+            jComboBoxUsage.setBounds(new java.awt.Rectangle(160, 35, 320, 20));\r
+            jComboBoxUsage.setPreferredSize(new java.awt.Dimension(320, 20));\r
+            jComboBoxUsage\r
+                          .setToolTipText("<html><table>"\r
+                                          + "<tr><td>ALWAYS_PRODUCED</td><td>Hii is always registered</td></tr>"\r
+                                          + "<tr><td>SOMETIMES_PRODUCED</td><td>Some executions paths will require the Hii to be registered</td></tr>"\r
+                                          + "</table></html>");\r
+        }\r
+        return jComboBoxUsage;\r
     }\r
-    return jTextFieldName;\r
-  }\r
-\r
-  /**\r
-   * \r
-   * This method initializes jComboBoxUsage\r
-   * \r
-   * @return javax.swing.JComboBox jComboBoxUsage\r
-   * \r
-   */\r
-  private JComboBox getJComboBoxUsage() {\r
-    if (jComboBoxUsage == null) {\r
-      jComboBoxUsage = new JComboBox();\r
-      jComboBoxUsage.setBounds(new java.awt.Rectangle(160, 35, 320, 20));\r
-      jComboBoxUsage.setPreferredSize(new java.awt.Dimension(320, 20));\r
-      jComboBoxUsage\r
-          .setToolTipText("<html><table><tr><td>ALWAYS_PRODUCED</td><td>Hii is always registered</td></tr><tr><td>SOMETIMES_PRODUCED</td><td>Some executions paths will require the Hii to be registered</td></tr></table></html>");\r
+\r
+    /**\r
+     * \r
+     * This method initializes jTextFieldFeatureFlag\r
+     * \r
+     * @return javax.swing.JTextField\r
+     */\r
+    private JTextField getJTextFieldFeatureFlag() {\r
+        if (jTextFieldFeatureFlag == null) {\r
+            jTextFieldFeatureFlag = new JTextField();\r
+            jTextFieldFeatureFlag.setBounds(new java.awt.Rectangle(160, 105, 320, 20));\r
+            jTextFieldFeatureFlag.setPreferredSize(new java.awt.Dimension(320, 20));\r
+            jTextFieldFeatureFlag.setToolTipText("Postfix expression that must evaluate to TRUE or FALSE");\r
+        }\r
+        return jTextFieldFeatureFlag;\r
     }\r
-    return jComboBoxUsage;\r
-  }\r
-\r
-  /**\r
-   * \r
-   * This method initializes jTextFieldFeatureFlag\r
-   * \r
-   * @return javax.swing.JTextField\r
-   */\r
-  private JTextField getJTextFieldFeatureFlag() {\r
-    if (jTextFieldFeatureFlag == null) {\r
-      jTextFieldFeatureFlag = new JTextField();\r
-      jTextFieldFeatureFlag.setBounds(new java.awt.Rectangle(160, 105, 320, 20));\r
-      jTextFieldFeatureFlag.setPreferredSize(new java.awt.Dimension(320, 20));\r
-      jTextFieldFeatureFlag\r
-          .setToolTipText("Postfix expression that must evaluate to TRUE or FALSE");\r
+\r
+    /**\r
+     * \r
+     * This method initializes jScrollPane\r
+     * \r
+     * @return javax.swing.JScrollPane\r
+     * \r
+     */\r
+    private JScrollPane getJScrollPane() {\r
+        if (jScrollPane == null) {\r
+            jScrollPane = new JScrollPane();\r
+            jScrollPane.setViewportView(getJContentPane());\r
+        }\r
+        return jScrollPane;\r
     }\r
-    return jTextFieldFeatureFlag;\r
-  }\r
-\r
-  /**\r
-   * \r
-   * This method initializes jScrollPane\r
-   * \r
-   * @return javax.swing.JScrollPane\r
-   * \r
-   */\r
-  private JScrollPane getJScrollPane() {\r
-    if (jScrollPane == null) {\r
-      jScrollPane = new JScrollPane();\r
-      jScrollPane.setViewportView(getJContentPane());\r
+\r
+    /**\r
+     * \r
+     * This method initializes jTextAreaHelpText\r
+     * \r
+     * @return javax.swing.JTextArea jTextAreaHelpText\r
+     * \r
+     */\r
+    private JTextArea getJTextAreaHelpText() {\r
+        if (jTextAreaHelpText == null) {\r
+            jTextAreaHelpText = new JTextArea();\r
+            jTextAreaHelpText.setLineWrap(true);\r
+            jTextAreaHelpText.setWrapStyleWord(true);\r
+        }\r
+        return jTextAreaHelpText;\r
     }\r
-    return jScrollPane;\r
-  }\r
-\r
-  /**\r
-   * \r
-   * This method initializes jTextAreaHelpText\r
-   * \r
-   * @return javax.swing.JTextArea jTextAreaHelpText\r
-   * \r
-   */\r
-  private JTextArea getJTextAreaHelpText() {\r
-    if (jTextAreaHelpText == null) {\r
-      jTextAreaHelpText = new JTextArea();\r
-      jTextAreaHelpText.setLineWrap(true);\r
-      jTextAreaHelpText.setWrapStyleWord(true);\r
+\r
+    /**\r
+     * \r
+     * This method initializes jScrollPaneHelpText\r
+     * \r
+     * @return javax.swing.JScrollPane\r
+     * \r
+     */\r
+    private JScrollPane getJScrollPaneHelpText() {\r
+        if (jScrollPaneHelpText == null) {\r
+            jScrollPaneHelpText = new JScrollPane();\r
+            jScrollPaneHelpText.setHorizontalScrollBarPolicy(javax.swing.JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);\r
+            jScrollPaneHelpText.setSize(new java.awt.Dimension(320, 40));\r
+            jScrollPaneHelpText.setPreferredSize(new java.awt.Dimension(320, 40));\r
+            jScrollPaneHelpText.setLocation(new java.awt.Point(160, 60));\r
+            jScrollPaneHelpText.setViewportView(getJTextAreaHelpText());\r
+        }\r
+        return jScrollPaneHelpText;\r
     }\r
-    return jTextAreaHelpText;\r
-  }\r
-\r
-  /**\r
-   * \r
-   * This method initializes jScrollPaneHelpText\r
-   * \r
-   * @return javax.swing.JScrollPane\r
-   * \r
-   */\r
-  private JScrollPane getJScrollPaneHelpText() {\r
-    if (jScrollPaneHelpText == null) {\r
-      jScrollPaneHelpText = new JScrollPane();\r
-      jScrollPaneHelpText\r
-          .setHorizontalScrollBarPolicy(javax.swing.JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);\r
-      jScrollPaneHelpText.setSize(new java.awt.Dimension(320, 40));\r
-      jScrollPaneHelpText.setPreferredSize(new java.awt.Dimension(320, 40));\r
-      jScrollPaneHelpText.setLocation(new java.awt.Point(160, 60));\r
-      jScrollPaneHelpText.setViewportView(getJTextAreaHelpText());\r
+\r
+    /**\r
+     * \r
+     * This method initializes jButtonOk\r
+     * \r
+     * @return javax.swing.JButton\r
+     * \r
+     */\r
+    private JButton getJButtonOk() {\r
+        if (jButtonOk == null) {\r
+            jButtonOk = new JButton();\r
+            jButtonOk.setBounds(new java.awt.Rectangle(290, 157, 90, 20));\r
+            jButtonOk.setText("Ok");\r
+            jButtonOk.addActionListener(this);\r
+        }\r
+        return jButtonOk;\r
     }\r
-    return jScrollPaneHelpText;\r
-  }\r
-\r
-  /**\r
-   * \r
-   * This method initializes jButtonOk\r
-   * \r
-   * @return javax.swing.JButton\r
-   * \r
-   */\r
-  private JButton getJButtonOk() {\r
-    if (jButtonOk == null) {\r
-      jButtonOk = new JButton();\r
-      jButtonOk.setBounds(new java.awt.Rectangle(290, 157, 90, 20));\r
-      jButtonOk.setText("Ok");\r
-      jButtonOk.addActionListener(this);\r
+\r
+    /**\r
+     *\r
+     * This method initializes jButtonCancel\r
+     \r
+     * @return javax.swing.JButton\r
+     \r
+     **/\r
+    private JButton getJButtonCancel() {\r
+        if (jButtonCancel == null) {\r
+            jButtonCancel = new JButton();\r
+            jButtonCancel.setBounds(new java.awt.Rectangle(390, 157, 90, 20));\r
+            jButtonCancel.setText("Cancel");\r
+            jButtonCancel.addActionListener(this);\r
+        }\r
+        return jButtonCancel;\r
     }\r
-    return jButtonOk;\r
-  }\r
-\r
-  /**\r
-   *\r
-   * This method initializes jButtonCancel\r
-   * \r
-   * @return javax.swing.JButton\r
-   * \r
-   **/\r
-  private JButton getJButtonCancel() {\r
-    if (jButtonCancel == null) {\r
-      jButtonCancel = new JButton();\r
-      jButtonCancel.setBounds(new java.awt.Rectangle(390, 157, 90, 20));\r
-      jButtonCancel.setText("Cancel");\r
-      jButtonCancel.addActionListener(this);\r
+\r
+    public static void main(String[] args) {\r
+\r
     }\r
-    return jButtonCancel;\r
-  }\r
-\r
-  public static void main(String[] args) {\r
-\r
-  }\r
-\r
-  /**\r
-   * \r
-   * This method initializes this\r
-   * \r
-   **/\r
-  private void init() {\r
-    this.setSize(500, 230);\r
-    this.setContentPane(getJScrollPane());\r
-    this.setTitle("Hii Packages");\r
-    initFrame();\r
-    this.setViewMode(false);\r
-    this.centerWindow();\r
-  }\r
-\r
-  /**\r
-   * This method initializes this Fill values to all fields if these values are\r
-   * not empty\r
-   * \r
-   * @param inHiiPackagesId\r
-   * \r
-   **/\r
-  private void init(HiiPackagesIdentification inHiiPackagesId) {\r
-    init();\r
-    this.id = inHiiPackagesId;\r
-\r
-    if (this.id != null) {\r
-      this.jTextFieldName.setText(id.getName());\r
-      this.jComboBoxUsage.setSelectedItem(id.getUsage());\r
-      this.jTextAreaHelpText.setText(id.getHelp());\r
-      this.jTextFieldFeatureFlag.setText(id.getFeatureFlag());\r
-      this.jArchCheckBox.setSelectedItems(id.getSupArchList());\r
+\r
+    /**\r
+     * \r
+     * This method initializes this\r
+     * \r
+     **/\r
+    private void init() {\r
+        this.setSize(500, 230);\r
+        this.setContentPane(getJScrollPane());\r
+        this.setTitle("Hii Packages");\r
+        initFrame();\r
+        this.setViewMode(false);\r
+        this.centerWindow();\r
     }\r
-  }\r
-\r
-  /**\r
-   * This is the override edit constructor\r
-   * \r
-   * @param inHiiPackagesIdentification\r
-   * @param iFrame\r
-   * \r
-   **/\r
-  public HiiPackagesDlg(HiiPackagesIdentification inHiiPackagesIdentification,\r
-      IFrame iFrame) {\r
-    super(iFrame, true);\r
-    init(inHiiPackagesIdentification);\r
-  }\r
-\r
-  /**\r
-   * \r
-   * Disable all components when the mode is view\r
-   * \r
-   * @param isView\r
-   *          true - The view mode; false - The non-view mode\r
-   * \r
-   **/\r
-  public void setViewMode(boolean isView) {\r
-    if (isView) {\r
-      this.jTextFieldName.setEnabled(!isView);\r
-      this.jComboBoxUsage.setEnabled(!isView);\r
+\r
+    /**\r
+     * This method initializes this Fill values to all fields if these values are\r
+     * not empty\r
+     * \r
+     * @param inHiiPackagesId\r
+     * \r
+     **/\r
+    private void init(HiiPackagesIdentification inHiiPackagesId) {\r
+        init();\r
+        this.id = inHiiPackagesId;\r
+\r
+        if (this.id != null) {\r
+            this.jTextFieldName.setText(id.getName());\r
+            this.jComboBoxUsage.setSelectedItem(id.getUsage());\r
+            this.jTextAreaHelpText.setText(id.getHelp());\r
+            this.jTextFieldFeatureFlag.setText(id.getFeatureFlag());\r
+            this.jArchCheckBox.setSelectedItems(id.getSupArchList());\r
+        }\r
     }\r
-  }\r
-\r
-  /**\r
-   * \r
-   * This method initializes jContentPane\r
-   * \r
-   * @return javax.swing.JPanel jContentPane\r
-   * \r
-   */\r
-  private JPanel getJContentPane() {\r
-    if (jContentPane == null) {\r
-      jStarLabel1 = new StarLabel();\r
-      jStarLabel1.setLocation(new java.awt.Point(2, 10));\r
-      jLabelName = new JLabel();\r
-      jLabelName.setText("Hii Package C Name");\r
-      jLabelName.setBounds(new java.awt.Rectangle(15, 10, 145, 20));\r
-      jStarLabel2 = new StarLabel();\r
-      jStarLabel2.setLocation(new java.awt.Point(2, 35));\r
-      jLabelUsage = new JLabel();\r
-      jLabelUsage.setText("Usage");\r
-      jLabelUsage.setBounds(new java.awt.Rectangle(15, 35, 145, 20));\r
-      jLabelHelpText = new JLabel();\r
-      jLabelHelpText.setBounds(new java.awt.Rectangle(14, 60, 145, 20));\r
-      jLabelHelpText.setText("Help Text");\r
-      jLabelFeatureFlag = new JLabel();\r
-      jLabelFeatureFlag.setBounds(new java.awt.Rectangle(15, 105, 145, 20));\r
-      jLabelFeatureFlag.setText("Feature Flag Expression");\r
-      jLabelArch = new JLabel();\r
-      jLabelArch.setBounds(new java.awt.Rectangle(15, 130, 145, 20));\r
-      jLabelArch.setText("Supported Architectures");\r
-      jArchCheckBox = new ArchCheckBox();\r
-      jArchCheckBox.setBounds(new java.awt.Rectangle(160, 130, 320, 20));\r
-      jArchCheckBox.setPreferredSize(new java.awt.Dimension(320, 20));\r
-\r
-      jContentPane = new JPanel();\r
-      jContentPane.setLayout(null);\r
-      jContentPane.setPreferredSize(new java.awt.Dimension(485, 185));\r
-\r
-      jContentPane.add(jStarLabel1, null);\r
-      jContentPane.add(jLabelName, null);\r
-      jContentPane.add(getJTextFieldName(), null);\r
-      \r
-      jContentPane.add(jStarLabel2, null);\r
-      jContentPane.add(jLabelUsage, null);\r
-      jContentPane.add(getJComboBoxUsage(), null);\r
-\r
-      jContentPane.add(jLabelHelpText, null);\r
-      jContentPane.add(getJScrollPaneHelpText(), null);\r
-\r
-      jContentPane.add(jLabelFeatureFlag, null);\r
-      jContentPane.add(getJTextFieldFeatureFlag(), null);\r
-      \r
-      jContentPane.add(jLabelArch, null);\r
-      jContentPane.add(jArchCheckBox, null);\r
-\r
-      jContentPane.add(getJButtonOk(), null);\r
-      jContentPane.add(getJButtonCancel(), null);\r
+\r
+    /**\r
+     * This is the override edit constructor\r
+     * \r
+     * @param inHiiPackagesIdentification\r
+     * @param iFrame\r
+     * \r
+     **/\r
+    public HiiPackagesDlg(HiiPackagesIdentification inHiiPackagesIdentification, IFrame iFrame) {\r
+        super(iFrame, true);\r
+        init(inHiiPackagesIdentification);\r
     }\r
-    return jContentPane;\r
-  }\r
-\r
-  /**\r
-   * \r
-   * This method initializes Usage type\r
-   * \r
-   */\r
-  private void initFrame() {\r
-    Tools.generateComboBoxByVector(jComboBoxUsage, ed.getVHiiPackageUsage());\r
-  }\r
-\r
-  /*\r
-   * (non-Javadoc)\r
-   * \r
-   * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)\r
-   * \r
-   * Override actionPerformed to listen all actions\r
-   * \r
-   */\r
-  public void actionPerformed(ActionEvent arg0) {\r
-    if (arg0.getSource() == jButtonOk) {\r
-      if (checkAdd()) {\r
-        getCurrentHiiPackages();\r
-        this.returnType = DataType.RETURN_TYPE_OK;\r
-        this.setVisible(false);\r
-      }\r
+\r
+    /**\r
+     * \r
+     * Disable all components when the mode is view\r
+     * \r
+     * @param isView\r
+     *          true - The view mode; false - The non-view mode\r
+     * \r
+     **/\r
+    public void setViewMode(boolean isView) {\r
+        if (isView) {\r
+            this.jTextFieldName.setEnabled(!isView);\r
+            this.jComboBoxUsage.setEnabled(!isView);\r
+        }\r
     }\r
 \r
-    if (arg0.getSource() == jButtonCancel) {\r
-      this.returnType = DataType.RETURN_TYPE_CANCEL;\r
-      this.setVisible(false);\r
+    /**\r
+     * \r
+     * This method initializes jContentPane\r
+     * \r
+     * @return javax.swing.JPanel jContentPane\r
+     * \r
+     */\r
+    private JPanel getJContentPane() {\r
+        if (jContentPane == null) {\r
+            jStarLabel1 = new StarLabel();\r
+            jStarLabel1.setLocation(new java.awt.Point(2, 10));\r
+            jLabelName = new JLabel();\r
+            jLabelName.setText("Hii Package C Name");\r
+            jLabelName.setBounds(new java.awt.Rectangle(15, 10, 145, 20));\r
+            jStarLabel2 = new StarLabel();\r
+            jStarLabel2.setLocation(new java.awt.Point(2, 35));\r
+            jLabelUsage = new JLabel();\r
+            jLabelUsage.setText("Usage");\r
+            jLabelUsage.setBounds(new java.awt.Rectangle(15, 35, 145, 20));\r
+            jLabelHelpText = new JLabel();\r
+            jLabelHelpText.setBounds(new java.awt.Rectangle(14, 60, 145, 20));\r
+            jLabelHelpText.setText("Help Text");\r
+            jLabelFeatureFlag = new JLabel();\r
+            jLabelFeatureFlag.setBounds(new java.awt.Rectangle(15, 105, 145, 20));\r
+            jLabelFeatureFlag.setText("Feature Flag Expression");\r
+            jLabelArch = new JLabel();\r
+            jLabelArch.setBounds(new java.awt.Rectangle(15, 130, 145, 20));\r
+            jLabelArch.setText("Supported Architectures");\r
+            jArchCheckBox = new ArchCheckBox();\r
+            jArchCheckBox.setBounds(new java.awt.Rectangle(160, 130, 320, 20));\r
+            jArchCheckBox.setPreferredSize(new java.awt.Dimension(320, 20));\r
+\r
+            jContentPane = new JPanel();\r
+            jContentPane.setLayout(null);\r
+            jContentPane.setPreferredSize(new java.awt.Dimension(485, 185));\r
+\r
+            jContentPane.add(jStarLabel1, null);\r
+            jContentPane.add(jLabelName, null);\r
+            jContentPane.add(getJTextFieldName(), null);\r
+\r
+            jContentPane.add(jStarLabel2, null);\r
+            jContentPane.add(jLabelUsage, null);\r
+            jContentPane.add(getJComboBoxUsage(), null);\r
+\r
+            jContentPane.add(jLabelHelpText, null);\r
+            jContentPane.add(getJScrollPaneHelpText(), null);\r
+\r
+            jContentPane.add(jLabelFeatureFlag, null);\r
+            jContentPane.add(getJTextFieldFeatureFlag(), null);\r
+\r
+            jContentPane.add(jLabelArch, null);\r
+            jContentPane.add(jArchCheckBox, null);\r
+\r
+            jContentPane.add(getJButtonOk(), null);\r
+            jContentPane.add(getJButtonCancel(), null);\r
+        }\r
+        return jContentPane;\r
     }\r
-  }\r
-\r
-  /**\r
-   * \r
-   * Data validation for all fields\r
-   * \r
-   * @retval true - All datas are valid\r
-   * @retval false - At least one data is invalid\r
-   * \r
-   */\r
-  public boolean checkAdd() {\r
-    //\r
-    // Check if all fields have correct data types\r
-    //\r
 \r
-    //\r
-    // Check Hii Package Name\r
-    //\r
-    if (isEmpty(this.jTextFieldName.getText())) {\r
-      Log.wrn("Update Hii Packages",\r
-          "Hii Package Name Record must not be empty");\r
-      return false;\r
+    /**\r
+     * \r
+     * This method initializes Usage type\r
+     * \r
+     */\r
+    private void initFrame() {\r
+        Tools.generateComboBoxByVector(jComboBoxUsage, ed.getVHiiPackageUsage());\r
     }\r
 \r
-    if (!isEmpty(this.jTextFieldName.getText())) {\r
-      if (!DataValidation.isC_NameType(this.jTextFieldName.getText())) {\r
-        Log.wrn("Update Hii Packages",\r
-            "Incorrect data type for Hii Package Name");\r
-        return false;\r
-      }\r
+    /*\r
+     * (non-Javadoc)\r
+     * \r
+     * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)\r
+     * \r
+     * Override actionPerformed to listen all actions\r
+     * \r
+     */\r
+    public void actionPerformed(ActionEvent arg0) {\r
+        if (arg0.getSource() == jButtonOk) {\r
+            if (checkAdd()) {\r
+                getCurrentHiiPackages();\r
+                this.returnType = DataType.RETURN_TYPE_OK;\r
+                this.setVisible(false);\r
+            }\r
+        }\r
+\r
+        if (arg0.getSource() == jButtonCancel) {\r
+            this.returnType = DataType.RETURN_TYPE_CANCEL;\r
+            this.setVisible(false);\r
+        }\r
     }\r
 \r
-    //\r
-    // Check FeatureFlag\r
-    //\r
-    if (!isEmpty(this.jTextFieldFeatureFlag.getText())) {\r
-      if (!DataValidation.isFeatureFlag(this.jTextFieldFeatureFlag.getText())) {\r
-        Log.wrn("Update Hii Packages", "Incorrect data type for Feature Flag");\r
-        return false;\r
-      }\r
+    /**\r
+     * \r
+     * Data validation for all fields\r
+     * \r
+     * @retval true - All datas are valid\r
+     * @retval false - At least one data is invalid\r
+     * \r
+     */\r
+    public boolean checkAdd() {\r
+        //\r
+        // Check if all fields have correct data types\r
+        //\r
+\r
+        //\r
+        // Check Hii Package Name\r
+        //\r
+        if (isEmpty(this.jTextFieldName.getText())) {\r
+            Log.wrn("Update Hii Packages", "Hii Package Name Record must not be empty");\r
+            return false;\r
+        }\r
+\r
+        if (!isEmpty(this.jTextFieldName.getText())) {\r
+            if (!DataValidation.isC_NameType(this.jTextFieldName.getText())) {\r
+                Log.wrn("Update Hii Packages", "Incorrect data type for Hii Package Name");\r
+                return false;\r
+            }\r
+        }\r
+\r
+        //\r
+        // Check FeatureFlag\r
+        //\r
+        if (!isEmpty(this.jTextFieldFeatureFlag.getText())) {\r
+            if (!DataValidation.isFeatureFlag(this.jTextFieldFeatureFlag.getText())) {\r
+                Log.wrn("Update Hii Packages", "Incorrect data type for Feature Flag");\r
+                return false;\r
+            }\r
+        }\r
+\r
+        return true;\r
     }\r
 \r
-    return true;\r
-  }\r
+    private HiiPackagesIdentification getCurrentHiiPackages() {\r
+        String arg0 = this.jTextFieldName.getText();\r
+        String arg1 = this.jComboBoxUsage.getSelectedItem().toString();\r
 \r
-  private HiiPackagesIdentification getCurrentHiiPackages() {\r
-    String arg0 = this.jTextFieldName.getText();\r
-    String arg1 = this.jComboBoxUsage.getSelectedItem().toString();\r
+        String arg2 = this.jTextFieldFeatureFlag.getText();\r
+        Vector<String> arg3 = this.jArchCheckBox.getSelectedItemsVector();\r
+        String arg4 = this.jTextAreaHelpText.getText();\r
 \r
-    String arg2 = this.jTextFieldFeatureFlag.getText();\r
-    Vector<String> arg3 = this.jArchCheckBox.getSelectedItemsVector();\r
-    String arg4 = this.jTextAreaHelpText.getText();\r
+        id = new HiiPackagesIdentification(arg0, arg1, arg2, arg3, arg4);\r
+        return id;\r
+    }\r
 \r
-    id = new HiiPackagesIdentification(arg0, arg1, arg2, arg3, arg4);\r
-    return id;\r
-  }\r
-  \r
-  public HiiPackagesIdentification getId() {\r
-    return id;\r
-  }\r
+    public HiiPackagesIdentification getId() {\r
+        return id;\r
+    }\r
 \r
-  public void setId(HiiPackagesIdentification id) {\r
-    this.id = id;\r
-  }\r
+    public void setId(HiiPackagesIdentification id) {\r
+        this.id = id;\r
+    }\r
 }\r
index f6a76ee..a320969 100644 (file)
@@ -43,428 +43,440 @@ import org.tianocore.frameworkwizard.workspace.WorkspaceTools;
  */\r
 public class HobsDlg extends IDialog {\r
 \r
-  // /\r
-  // / Define class Serial Version UID\r
-  // /\r
-  private static final long serialVersionUID = -553473437579358325L;\r
+    // /\r
+    // / Define class Serial Version UID\r
+    // /\r
+    private static final long serialVersionUID = -553473437579358325L;\r
 \r
-  //\r
-  // Define class members\r
-  //\r
-  private JPanel jContentPane = null;\r
+    //\r
+    // Define class members\r
+    //\r
+    private JPanel jContentPane = null;\r
 \r
-  private JLabel jLabelC_Name = null;\r
+    private JLabel jLabelC_Name = null;\r
 \r
-  private JComboBox jComboBoxGuidC_Name = null;\r
+    private JComboBox jComboBoxGuidC_Name = null;\r
 \r
-  private JLabel jLabelUsage = null;\r
+    private JLabel jLabelUsage = null;\r
 \r
-  private JLabel jLabelHobType = null;\r
+    private JLabel jLabelHobType = null;\r
 \r
-  private JComboBox jComboBoxUsage = null;\r
+    private JComboBox jComboBoxUsage = null;\r
 \r
-  private JComboBox jComboBoxHobType = null;\r
+    private JComboBox jComboBoxHobType = null;\r
 \r
-  private StarLabel jStarLabel1 = null;\r
+    private StarLabel jStarLabel1 = null;\r
 \r
-  private StarLabel jStarLabel2 = null;\r
+    private StarLabel jStarLabel2 = null;\r
 \r
-  private StarLabel jStarLabel3 = null;\r
+    private StarLabel jStarLabel3 = null;\r
 \r
-  private JLabel jLabelArch = null;\r
+    private JLabel jLabelArch = null;\r
 \r
-  private JScrollPane jScrollPane = null;\r
+    private JScrollPane jScrollPane = null;\r
 \r
-  private JLabel jLabelFeatureFlag = null;\r
+    private JLabel jLabelFeatureFlag = null;\r
 \r
-  private JTextField jTextFieldFeatureFlag = null;\r
+    private JTextField jTextFieldFeatureFlag = null;\r
 \r
-  private JLabel jLabelHelpText = null;\r
+    private JLabel jLabelHelpText = null;\r
 \r
-  private JTextArea jTextAreaHelpText = null;\r
+    private JTextArea jTextAreaHelpText = null;\r
 \r
-  private JScrollPane jScrollPaneHelpText = null;\r
+    private JScrollPane jScrollPaneHelpText = null;\r
 \r
-  private ArchCheckBox jArchCheckBox = null;\r
+    private ArchCheckBox jArchCheckBox = null;\r
 \r
-  private JButton jButtonOk = null;\r
+    private JButton jButtonOk = null;\r
 \r
-  private JButton jButtonCancel = null;\r
+    private JButton jButtonCancel = null;\r
 \r
-  //\r
-  // Not used by UI\r
-  //\r
-  private HobsIdentification id = null;\r
+    //\r
+    // Not used by UI\r
+    //\r
+    private HobsIdentification id = null;\r
+\r
+    private EnumerationData ed = new EnumerationData();\r
+\r
+    private WorkspaceTools wt = new WorkspaceTools();\r
+\r
+    /**\r
+     * This method initializes jTextField\r
+     * \r
+     * @return javax.swing.JTextField jTextFieldC_Name\r
+     * \r
+     */\r
+    private JComboBox getJComboBoxGuidC_Name() {\r
+        if (jComboBoxGuidC_Name == null) {\r
+            jComboBoxGuidC_Name = new JComboBox();\r
+            jComboBoxGuidC_Name.setBounds(new java.awt.Rectangle(160, 10, 320, 20));\r
+            jComboBoxGuidC_Name.setPreferredSize(new java.awt.Dimension(320, 20));\r
+            jComboBoxGuidC_Name.setToolTipText("Select the GUID C Name of the Hob");\r
+        }\r
+        return jComboBoxGuidC_Name;\r
+    }\r
 \r
-  private EnumerationData ed = new EnumerationData();\r
+    /**\r
+     * This method initializes jComboBoxHobType\r
+     * \r
+     * @return javax.swing.JComboBox jComboBoxHobType\r
+     * \r
+     */\r
+    private JComboBox getJComboBoxHobType() {\r
+        if (jComboBoxHobType == null) {\r
+            jComboBoxHobType = new JComboBox();\r
+            jComboBoxHobType.setBounds(new java.awt.Rectangle(160, 35, 320, 20));\r
+            jComboBoxHobType.setPreferredSize(new java.awt.Dimension(320, 20));\r
+            jComboBoxHobType\r
+                            .setToolTipText("<html><table>"\r
+                                            + "<tr><td>PHIT</td><td>EFI_HOB_TYPE_HANDOFF</td></tr>"\r
+                                            + "<tr><td>MEMORY_ALLOCATION</td><td>EFI_HOB_TYPE_MEMORY_ALLOCATION and $BaseName</td></tr>"\r
+                                            + "<tr><td>RESOURCE_DESCRIPTOR</td><td>EFI_HOB_TYPE_RESOURCE_DESCRIPTOR</td></tr>"\r
+                                            + "<tr><td>GUID_EXTENTION</td><td>EFI_HOB_TYPE_GUID_EXTENSION and BaseName of GUID</td></tr>"\r
+                                            + "<tr><td>FIRMWARE_VOLUME</td><td>EFI_HOB_TYPE_FV</td></tr>"\r
+                                            + "<tr><td>CPU</td><td>EFI_HOB_TYPE_CPU</td></tr>"\r
+                                            + "<tr><td>POOL</td><td>EFI_HOB_TYPE_PEI_MEMORY_POOL</td></tr>"\r
+                                            + "<tr><td>CAPSULE_VOLUME</td><td>EFI_HOB_TYPE_CV</td></tr>"\r
+                                            + "</table></html>");\r
+        }\r
+        return jComboBoxHobType;\r
+    }\r
 \r
-  private WorkspaceTools wt = new WorkspaceTools();\r
+    /**\r
+     * This method initializes jComboBoxUsage\r
+     * \r
+     * @return javax.swing.JComboBox jComboBoxUsage\r
+     * \r
+     */\r
+    private JComboBox getJComboBoxUsage() {\r
+        if (jComboBoxUsage == null) {\r
+            jComboBoxUsage = new JComboBox();\r
+            jComboBoxUsage.setBounds(new java.awt.Rectangle(160, 60, 320, 20));\r
+            jComboBoxUsage.setPreferredSize(new java.awt.Dimension(320, 20));\r
+            jComboBoxUsage\r
+                          .setToolTipText("<html><table>"\r
+                                          + "<tr><td>ALWAYS_CONSUMED</td><td>HOB must be present in the system</td></tr>"\r
+                                          + "<tr><td>SOMETIMES_CONSUMED</td><td>HOB will be used if it's present</td></tr>"\r
+                                          + "<tr><td>ALWAYS_PRODUCED</td><td>HOB is always produced</td></tr>"\r
+                                          + "<tr><td>SOMETIMES_PRODUCED</td><td>HOB will sometimes be produced by the module</td></tr>"\r
+                                          + "</table></html>");\r
+        }\r
+        return jComboBoxUsage;\r
+    }\r
 \r
-  /**\r
-   * This method initializes jTextField\r
-   * \r
-   * @return javax.swing.JTextField jTextFieldC_Name\r
-   * \r
-   */\r
-  private JComboBox getJComboBoxGuidC_Name() {\r
-    if (jComboBoxGuidC_Name == null) {\r
-      jComboBoxGuidC_Name = new JComboBox();\r
-      jComboBoxGuidC_Name.setBounds(new java.awt.Rectangle(160, 10, 320, 20));\r
-      jComboBoxGuidC_Name.setPreferredSize(new java.awt.Dimension(320, 20));\r
-      jComboBoxGuidC_Name.setToolTipText("Select the GUID C Name of the Hob");\r
+    /**\r
+     * This method initializes jScrollPane\r
+     * \r
+     * @return javax.swing.JScrollPane\r
+     */\r
+    private JScrollPane getJScrollPane() {\r
+        if (jScrollPane == null) {\r
+            jScrollPane = new JScrollPane();\r
+            jScrollPane.setViewportView(getJContentPane());\r
+        }\r
+        return jScrollPane;\r
     }\r
-    return jComboBoxGuidC_Name;\r
-  }\r
-\r
-  /**\r
-   * This method initializes jComboBoxHobType\r
-   * \r
-   * @return javax.swing.JComboBox jComboBoxHobType\r
-   * \r
-   */\r
-  private JComboBox getJComboBoxHobType() {\r
-    if (jComboBoxHobType == null) {\r
-      jComboBoxHobType = new JComboBox();\r
-      jComboBoxHobType.setBounds(new java.awt.Rectangle(160, 35, 320, 20));\r
-      jComboBoxHobType.setPreferredSize(new java.awt.Dimension(320, 20));\r
-      jComboBoxHobType.setToolTipText("<html><table><tr><td>PHIT</td><td>EFI_HOB_TYPE_HANDOFF</td></tr><tr><td>MEMORY_ALLOCATION</td><td>EFI_HOB_TYPE_MEMORY_ALLOCATION and $BaseName</td></tr><tr><td>RESOURCE_DESCRIPTOR</td><td>EFI_HOB_TYPE_RESOURCE_DESCRIPTOR</td></tr><tr><td>GUID_EXTENTION</td><td>EFI_HOB_TYPE_GUID_EXTENSION and BaseName of GUID</td></tr><tr><td>FIRMWARE_VOLUME</td><td>EFI_HOB_TYPE_FV</td></tr><tr><td>CPU</td><td>EFI_HOB_TYPE_CPU</td></tr><tr><td>POOL</td><td>EFI_HOB_TYPE_PEI_MEMORY_POOL</td></tr><tr><td>CAPSULE_VOLUME</td><td>EFI_HOB_TYPE_CV</td></tr></table></html>");\r
+\r
+    /**\r
+     * This method initializes jTextFieldFeatureFlag\r
+     * \r
+     * @return javax.swing.JTextField\r
+     */\r
+    private JTextField getJTextFieldFeatureFlag() {\r
+        if (jTextFieldFeatureFlag == null) {\r
+            jTextFieldFeatureFlag = new JTextField();\r
+            jTextFieldFeatureFlag.setBounds(new java.awt.Rectangle(160, 130, 320, 20));\r
+            jTextFieldFeatureFlag.setPreferredSize(new java.awt.Dimension(320, 20));\r
+            jTextFieldFeatureFlag.setToolTipText("Postfix expression that must evaluate to TRUE or FALSE");\r
+        }\r
+        return jTextFieldFeatureFlag;\r
     }\r
-    return jComboBoxHobType;\r
-  }\r
-\r
-  /**\r
-   * This method initializes jComboBoxUsage\r
-   * \r
-   * @return javax.swing.JComboBox jComboBoxUsage\r
-   * \r
-   */\r
-  private JComboBox getJComboBoxUsage() {\r
-    if (jComboBoxUsage == null) {\r
-      jComboBoxUsage = new JComboBox();\r
-      jComboBoxUsage.setBounds(new java.awt.Rectangle(160, 60, 320, 20));\r
-      jComboBoxUsage.setPreferredSize(new java.awt.Dimension(320, 20));\r
-      jComboBoxUsage.setToolTipText("<html><table><tr><td>ALWAYS_CONSUMED</td><td>HOB must be present in the system</td></tr><tr><td>SOMETIMES_CONSUMED</td><td>HOB will be used if it's present</td></tr><tr><td>ALWAYS_PRODUCED</td><td>HOB is always produced</td></tr><tr><td>SOMETIMES_PRODUCED</td><td>HOB will sometimes be produced by the module</td></tr></table></html>");\r
+\r
+    /**\r
+     * This method initializes jTextFieldHelpText\r
+     * \r
+     * @return javax.swing.JTextField\r
+     * \r
+     */\r
+    private JTextArea getJTextAreaHelpText() {\r
+        if (jTextAreaHelpText == null) {\r
+            jTextAreaHelpText = new JTextArea();\r
+            jTextAreaHelpText.setLineWrap(true);\r
+            jTextAreaHelpText.setWrapStyleWord(true);\r
+        }\r
+        return jTextAreaHelpText;\r
     }\r
-    return jComboBoxUsage;\r
-  }\r
-\r
-  /**\r
-   * This method initializes jScrollPane\r
-   * \r
-   * @return javax.swing.JScrollPane\r
-   */\r
-  private JScrollPane getJScrollPane() {\r
-    if (jScrollPane == null) {\r
-      jScrollPane = new JScrollPane();\r
-      jScrollPane.setViewportView(getJContentPane());\r
+\r
+    /**\r
+     * This method initializes jScrollPaneHelpText\r
+     * \r
+     * @return javax.swing.JScrollPane\r
+     */\r
+    private JScrollPane getJScrollPaneHelpText() {\r
+        if (jScrollPaneHelpText == null) {\r
+            jScrollPaneHelpText = new JScrollPane();\r
+            jScrollPaneHelpText.setHorizontalScrollBarPolicy(javax.swing.JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);\r
+            jScrollPaneHelpText.setSize(new java.awt.Dimension(320, 40));\r
+            jScrollPaneHelpText.setPreferredSize(new java.awt.Dimension(320, 40));\r
+            jScrollPaneHelpText.setLocation(new java.awt.Point(160, 85));\r
+            jScrollPaneHelpText.setViewportView(getJTextAreaHelpText());\r
+        }\r
+        return jScrollPaneHelpText;\r
     }\r
-    return jScrollPane;\r
-  }\r
-\r
-  /**\r
-   * This method initializes jTextFieldFeatureFlag\r
-   * \r
-   * @return javax.swing.JTextField\r
-   */\r
-  private JTextField getJTextFieldFeatureFlag() {\r
-    if (jTextFieldFeatureFlag == null) {\r
-      jTextFieldFeatureFlag = new JTextField();\r
-      jTextFieldFeatureFlag\r
-          .setBounds(new java.awt.Rectangle(160, 130, 320, 20));\r
-      jTextFieldFeatureFlag.setPreferredSize(new java.awt.Dimension(320, 20));\r
-      jTextFieldFeatureFlag.setToolTipText("Postfix expression that must evaluate to TRUE or FALSE");\r
+\r
+    /**\r
+     * This method initializes jButtonOk\r
+     * \r
+     * @return javax.swing.JButton\r
+     \r
+     */\r
+    private JButton getJButtonOk() {\r
+        if (jButtonOk == null) {\r
+            jButtonOk = new JButton();\r
+            jButtonOk.setBounds(new java.awt.Rectangle(290, 182, 90, 20));\r
+            jButtonOk.setText("Ok");\r
+            jButtonOk.addActionListener(this);\r
+        }\r
+        return jButtonOk;\r
     }\r
-    return jTextFieldFeatureFlag;\r
-  }\r
-\r
-  /**\r
-   * This method initializes jTextFieldHelpText\r
-   * \r
-   * @return javax.swing.JTextField\r
-   * \r
-   */\r
-  private JTextArea getJTextAreaHelpText() {\r
-    if (jTextAreaHelpText == null) {\r
-      jTextAreaHelpText = new JTextArea();\r
-      jTextAreaHelpText.setLineWrap(true);\r
-      jTextAreaHelpText.setWrapStyleWord(true);\r
+\r
+    /**\r
+     * This method initializes jButtonCancel\r
+     * \r
+     * @return javax.swing.JButton\r
+     * \r
+     */\r
+    private JButton getJButtonCancel() {\r
+        if (jButtonCancel == null) {\r
+            jButtonCancel = new JButton();\r
+            jButtonCancel.setBounds(new java.awt.Rectangle(390, 182, 90, 20));\r
+            jButtonCancel.setText("Cancel");\r
+            jButtonCancel.addActionListener(this);\r
+        }\r
+        return jButtonCancel;\r
     }\r
-    return jTextAreaHelpText;\r
-  }\r
-\r
-  /**\r
-   * This method initializes jScrollPaneHelpText\r
-   * \r
-   * @return javax.swing.JScrollPane\r
-   */\r
-  private JScrollPane getJScrollPaneHelpText() {\r
-    if (jScrollPaneHelpText == null) {\r
-      jScrollPaneHelpText = new JScrollPane();\r
-      jScrollPaneHelpText\r
-          .setHorizontalScrollBarPolicy(javax.swing.JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);\r
-      jScrollPaneHelpText.setSize(new java.awt.Dimension(320, 40));\r
-      jScrollPaneHelpText.setPreferredSize(new java.awt.Dimension(320, 40));\r
-      jScrollPaneHelpText.setLocation(new java.awt.Point(160, 85));\r
-      jScrollPaneHelpText.setViewportView(getJTextAreaHelpText());\r
+\r
+    public static void main(String[] args) {\r
+\r
     }\r
-    return jScrollPaneHelpText;\r
-  }\r
-\r
-  /**\r
-   * This method initializes jButtonOk\r
-   * \r
-   * @return javax.swing.JButton\r
-   * \r
-   */\r
-  private JButton getJButtonOk() {\r
-    if (jButtonOk == null) {\r
-      jButtonOk = new JButton();\r
-      jButtonOk.setBounds(new java.awt.Rectangle(290, 182, 90, 20));\r
-      jButtonOk.setText("Ok");\r
-      jButtonOk.addActionListener(this);\r
+\r
+    /**\r
+     * This method initializes this\r
+     * \r
+     */\r
+    private void init() {\r
+        this.setSize(500, 255);\r
+        this.setContentPane(getJScrollPane());\r
+        this.setTitle("Hobs");\r
+        initFrame();\r
+        this.setViewMode(false);\r
+        this.centerWindow();\r
     }\r
-    return jButtonOk;\r
-  }\r
-\r
-  /**\r
-   * This method initializes jButtonCancel\r
-   * \r
-   * @return javax.swing.JButton\r
-   * \r
-   */\r
-  private JButton getJButtonCancel() {\r
-    if (jButtonCancel == null) {\r
-      jButtonCancel = new JButton();\r
-      jButtonCancel.setBounds(new java.awt.Rectangle(390, 182, 90, 20));\r
-      jButtonCancel.setText("Cancel");\r
-      jButtonCancel.addActionListener(this);\r
+\r
+    /**\r
+     * This method initializes this Fill values to all fields if these values are\r
+     * not empty\r
+     * \r
+     * @param inHobsId\r
+     * \r
+     */\r
+    private void init(HobsIdentification inHobsId) {\r
+        init();\r
+        this.id = inHobsId;\r
+\r
+        if (this.id != null) {\r
+            this.jComboBoxGuidC_Name.setSelectedItem(id.getName());\r
+            this.jComboBoxHobType.setSelectedItem(id.getType());\r
+            this.jComboBoxUsage.setSelectedItem(id.getUsage());\r
+            this.jTextAreaHelpText.setText(id.getHelp());\r
+            this.jTextFieldFeatureFlag.setText(id.getFeatureFlag());\r
+            this.jArchCheckBox.setSelectedItems(id.getSupArchList());\r
+        }\r
     }\r
-    return jButtonCancel;\r
-  }\r
-\r
-  public static void main(String[] args) {\r
-\r
-  }\r
-\r
-  /**\r
-   * This method initializes this\r
-   * \r
-   */\r
-  private void init() {\r
-    this.setSize(500, 255);\r
-    this.setContentPane(getJScrollPane());\r
-    this.setTitle("Hobs");\r
-    initFrame();\r
-    this.setViewMode(false);\r
-    this.centerWindow();\r
-  }\r
-\r
-  /**\r
-   * This method initializes this Fill values to all fields if these values are\r
-   * not empty\r
-   * \r
-   * @param inHobsId\r
-   * \r
-   */\r
-  private void init(HobsIdentification inHobsId) {\r
-    init();\r
-    this.id = inHobsId;\r
-\r
-    if (this.id != null) {\r
-      this.jComboBoxGuidC_Name.setSelectedItem(id.getName());\r
-      this.jComboBoxHobType.setSelectedItem(id.getType());\r
-      this.jComboBoxUsage.setSelectedItem(id.getUsage());\r
-      this.jTextAreaHelpText.setText(id.getHelp());\r
-      this.jTextFieldFeatureFlag.setText(id.getFeatureFlag());\r
-      this.jArchCheckBox.setSelectedItems(id.getSupArchList());\r
+\r
+    /**\r
+     * This is the override edit constructor\r
+     * \r
+     * @param inHobsIdentification\r
+     * @param iFrame\r
+     * \r
+     */\r
+    public HobsDlg(HobsIdentification inHobsIdentification, IFrame iFrame) {\r
+        super(iFrame, true);\r
+        init(inHobsIdentification);\r
     }\r
-  }\r
-\r
-  /**\r
-   * This is the override edit constructor\r
-   * \r
-   * @param inHobsIdentification\r
-   * @param iFrame\r
-   * \r
-   */\r
-  public HobsDlg(HobsIdentification inHobsIdentification, IFrame iFrame) {\r
-    super(iFrame, true);\r
-    init(inHobsIdentification);\r
-  }\r
-\r
-  /**\r
-   * Disable all components when the mode is view\r
-   * \r
-   * @param isView\r
-   *          true - The view mode; false - The non-view mode\r
-   * \r
-   */\r
-  public void setViewMode(boolean isView) {\r
-    if (isView) {\r
-      this.jComboBoxGuidC_Name.setEnabled(!isView);\r
-      this.jComboBoxUsage.setEnabled(!isView);\r
-      this.jComboBoxHobType.setEnabled(!isView);\r
+\r
+    /**\r
+     * Disable all components when the mode is view\r
+     * \r
+     * @param isView\r
+     *          true - The view mode; false - The non-view mode\r
+     * \r
+     */\r
+    public void setViewMode(boolean isView) {\r
+        if (isView) {\r
+            this.jComboBoxGuidC_Name.setEnabled(!isView);\r
+            this.jComboBoxUsage.setEnabled(!isView);\r
+            this.jComboBoxHobType.setEnabled(!isView);\r
+        }\r
     }\r
-  }\r
-\r
-  /**\r
-   * This method initializes jContentPane\r
-   * \r
-   * @return javax.swing.JPanel jContentPane\r
-   * \r
-   */\r
-  public JPanel getJContentPane() {\r
-    if (jContentPane == null) {\r
-      jStarLabel1 = new StarLabel();\r
-      jStarLabel1.setLocation(new java.awt.Point(2, 10));\r
-      jLabelC_Name = new JLabel();\r
-      jLabelC_Name.setText("Hob's Guid C Name");\r
-      jLabelC_Name.setBounds(new java.awt.Rectangle(15, 10, 145, 20));\r
-\r
-      jStarLabel2 = new StarLabel();\r
-      jStarLabel2.setLocation(new java.awt.Point(2, 35));\r
-      jLabelHobType = new JLabel();\r
-      jLabelHobType.setText("Hob Type");\r
-      jLabelHobType.setBounds(new java.awt.Rectangle(15, 35, 145, 20));\r
-\r
-      jStarLabel3 = new StarLabel();\r
-      jStarLabel3.setLocation(new java.awt.Point(2, 60));\r
-      jLabelUsage = new JLabel();\r
-      jLabelUsage.setText("Usage");\r
-      jLabelUsage.setBounds(new java.awt.Rectangle(15, 60, 145, 20));\r
-\r
-      jLabelHelpText = new JLabel();\r
-      jLabelHelpText.setBounds(new java.awt.Rectangle(15, 85, 145, 20));\r
-      jLabelHelpText.setText("Help Text");\r
-\r
-      jLabelFeatureFlag = new JLabel();\r
-      jLabelFeatureFlag.setBounds(new java.awt.Rectangle(15, 130, 145, 20));\r
-      jLabelFeatureFlag.setText("Feature Flag Expression");\r
-\r
-      jLabelArch = new JLabel();\r
-      jLabelArch.setBounds(new java.awt.Rectangle(15, 155, 145, 20));\r
-      jLabelArch.setText("Supported Architectures");\r
-      jArchCheckBox = new ArchCheckBox();\r
-      jArchCheckBox.setBounds(new java.awt.Rectangle(160, 155, 320, 20));\r
-      jArchCheckBox.setPreferredSize(new java.awt.Dimension(320, 20));\r
-\r
-      jContentPane = new JPanel();\r
-      jContentPane.setLayout(null);\r
-      jContentPane.setPreferredSize(new java.awt.Dimension(485, 210));\r
-\r
-      jContentPane.add(jStarLabel1, null);\r
-      jContentPane.add(jLabelC_Name, null);\r
-      jContentPane.add(getJComboBoxGuidC_Name(), null);\r
-      jContentPane.add(jStarLabel2, null);\r
-      jContentPane.add(jLabelHobType, null);\r
-      jContentPane.add(getJComboBoxHobType(), null);\r
-      jContentPane.add(jStarLabel3, null);\r
-      jContentPane.add(jLabelUsage, null);\r
-      jContentPane.add(getJComboBoxUsage(), null);\r
-      jContentPane.add(jLabelHelpText, null);\r
-      jContentPane.add(getJScrollPaneHelpText(), null);\r
-      jContentPane.add(jLabelFeatureFlag, null);\r
-      jContentPane.add(getJTextFieldFeatureFlag(), null);\r
-      jContentPane.add(jLabelArch, null);\r
-      jContentPane.add(jArchCheckBox, null);\r
-      jContentPane.add(getJButtonOk(), null);\r
-      jContentPane.add(getJButtonCancel(), null);\r
+\r
+    /**\r
+     * This method initializes jContentPane\r
+     * \r
+     * @return javax.swing.JPanel jContentPane\r
+     * \r
+     */\r
+    public JPanel getJContentPane() {\r
+        if (jContentPane == null) {\r
+            jStarLabel1 = new StarLabel();\r
+            jStarLabel1.setLocation(new java.awt.Point(2, 10));\r
+            jLabelC_Name = new JLabel();\r
+            jLabelC_Name.setText("Hob's Guid C Name");\r
+            jLabelC_Name.setBounds(new java.awt.Rectangle(15, 10, 145, 20));\r
+\r
+            jStarLabel2 = new StarLabel();\r
+            jStarLabel2.setLocation(new java.awt.Point(2, 35));\r
+            jLabelHobType = new JLabel();\r
+            jLabelHobType.setText("Hob Type");\r
+            jLabelHobType.setBounds(new java.awt.Rectangle(15, 35, 145, 20));\r
+\r
+            jStarLabel3 = new StarLabel();\r
+            jStarLabel3.setLocation(new java.awt.Point(2, 60));\r
+            jLabelUsage = new JLabel();\r
+            jLabelUsage.setText("Usage");\r
+            jLabelUsage.setBounds(new java.awt.Rectangle(15, 60, 145, 20));\r
+\r
+            jLabelHelpText = new JLabel();\r
+            jLabelHelpText.setBounds(new java.awt.Rectangle(15, 85, 145, 20));\r
+            jLabelHelpText.setText("Help Text");\r
+\r
+            jLabelFeatureFlag = new JLabel();\r
+            jLabelFeatureFlag.setBounds(new java.awt.Rectangle(15, 130, 145, 20));\r
+            jLabelFeatureFlag.setText("Feature Flag Expression");\r
+\r
+            jLabelArch = new JLabel();\r
+            jLabelArch.setBounds(new java.awt.Rectangle(15, 155, 145, 20));\r
+            jLabelArch.setText("Supported Architectures");\r
+            jArchCheckBox = new ArchCheckBox();\r
+            jArchCheckBox.setBounds(new java.awt.Rectangle(160, 155, 320, 20));\r
+            jArchCheckBox.setPreferredSize(new java.awt.Dimension(320, 20));\r
+\r
+            jContentPane = new JPanel();\r
+            jContentPane.setLayout(null);\r
+            jContentPane.setPreferredSize(new java.awt.Dimension(485, 210));\r
+\r
+            jContentPane.add(jStarLabel1, null);\r
+            jContentPane.add(jLabelC_Name, null);\r
+            jContentPane.add(getJComboBoxGuidC_Name(), null);\r
+            jContentPane.add(jStarLabel2, null);\r
+            jContentPane.add(jLabelHobType, null);\r
+            jContentPane.add(getJComboBoxHobType(), null);\r
+            jContentPane.add(jStarLabel3, null);\r
+            jContentPane.add(jLabelUsage, null);\r
+            jContentPane.add(getJComboBoxUsage(), null);\r
+            jContentPane.add(jLabelHelpText, null);\r
+            jContentPane.add(getJScrollPaneHelpText(), null);\r
+            jContentPane.add(jLabelFeatureFlag, null);\r
+            jContentPane.add(getJTextFieldFeatureFlag(), null);\r
+            jContentPane.add(jLabelArch, null);\r
+            jContentPane.add(jArchCheckBox, null);\r
+            jContentPane.add(getJButtonOk(), null);\r
+            jContentPane.add(getJButtonCancel(), null);\r
+        }\r
+        return jContentPane;\r
     }\r
-    return jContentPane;\r
-  }\r
-\r
-  /**\r
-   * This method initializes Usage type and Hob type\r
-   * \r
-   */\r
-  private void initFrame() {\r
-    Tools.generateComboBoxByVector(jComboBoxUsage, ed.getVHobUsage());\r
-    Tools.generateComboBoxByVector(jComboBoxHobType, ed.getVHobType());\r
-    Tools.generateComboBoxByVector(jComboBoxGuidC_Name, wt\r
-        .getAllGuidDeclarationsFromWorkspace());\r
-  }\r
-\r
-  /*\r
-   * (non-Javadoc)\r
-   * \r
-   * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)\r
-   * \r
-   * Override actionPerformed to listen all actions\r
-   * \r
-   */\r
-  public void actionPerformed(ActionEvent arg0) {\r
-    if (arg0.getSource() == jButtonOk) {\r
-      if (checkAdd()) {\r
-        getCurrentHobs();\r
-        this.returnType = DataType.RETURN_TYPE_OK;\r
-        this.setVisible(false);\r
-      }\r
+\r
+    /**\r
+     * This method initializes Usage type and Hob type\r
+     * \r
+     */\r
+    private void initFrame() {\r
+        Tools.generateComboBoxByVector(jComboBoxUsage, ed.getVHobUsage());\r
+        Tools.generateComboBoxByVector(jComboBoxHobType, ed.getVHobType());\r
+        Tools.generateComboBoxByVector(jComboBoxGuidC_Name, wt.getAllGuidDeclarationsFromWorkspace());\r
     }\r
 \r
-    if (arg0.getSource() == jButtonCancel) {\r
-      this.returnType = DataType.RETURN_TYPE_CANCEL;\r
-      this.setVisible(false);\r
+    /*\r
+     * (non-Javadoc)\r
+     * \r
+     * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)\r
+     * \r
+     * Override actionPerformed to listen all actions\r
+     * \r
+     */\r
+    public void actionPerformed(ActionEvent arg0) {\r
+        if (arg0.getSource() == jButtonOk) {\r
+            if (checkAdd()) {\r
+                getCurrentHobs();\r
+                this.returnType = DataType.RETURN_TYPE_OK;\r
+                this.setVisible(false);\r
+            }\r
+        }\r
+\r
+        if (arg0.getSource() == jButtonCancel) {\r
+            this.returnType = DataType.RETURN_TYPE_CANCEL;\r
+            this.setVisible(false);\r
+        }\r
     }\r
-  }\r
-\r
-  /**\r
-   * Data validation for all fields\r
-   * \r
-   * @retval true - All datas are valid\r
-   * @retval false - At least one data is invalid\r
-   * \r
-   */\r
-  public boolean checkAdd() {\r
-    //\r
-    // Check if all fields have correct data types\r
-    //\r
 \r
-    //\r
-    // Check Name\r
-    //\r
-    if (isEmpty(this.jComboBoxGuidC_Name.getSelectedItem().toString())) {\r
-      Log.wrn("Update Hobs", "Hob Guid C Name must not be empty");\r
-      return false;\r
+    /**\r
+     * Data validation for all fields\r
+     * \r
+     * @retval true - All datas are valid\r
+     * @retval false - At least one data is invalid\r
+     * \r
+     */\r
+    public boolean checkAdd() {\r
+        //\r
+        // Check if all fields have correct data types\r
+        //\r
+\r
+        //\r
+        // Check Name\r
+        //\r
+        if (isEmpty(this.jComboBoxGuidC_Name.getSelectedItem().toString())) {\r
+            Log.wrn("Update Hobs", "Hob Guid C Name must not be empty");\r
+            return false;\r
+        }\r
+\r
+        if (!isEmpty(this.jComboBoxGuidC_Name.getSelectedItem().toString())) {\r
+            if (!DataValidation.isC_NameType(this.jComboBoxGuidC_Name.getSelectedItem().toString())) {\r
+                Log.wrn("Update Hobs", "Incorrect data type for Hob Name");\r
+                return false;\r
+            }\r
+        }\r
+\r
+        //\r
+        // Check FeatureFlag\r
+        //\r
+        if (!isEmpty(this.jTextFieldFeatureFlag.getText())) {\r
+            if (!DataValidation.isFeatureFlag(this.jTextFieldFeatureFlag.getText())) {\r
+                Log.wrn("Update Hobs", "Incorrect data type for Feature Flag");\r
+                return false;\r
+            }\r
+        }\r
+\r
+        return true;\r
     }\r
 \r
-    if (!isEmpty(this.jComboBoxGuidC_Name.getSelectedItem().toString())) {\r
-      if (!DataValidation.isC_NameType(this.jComboBoxGuidC_Name\r
-          .getSelectedItem().toString())) {\r
-        Log.wrn("Update Hobs", "Incorrect data type for Hob Name");\r
-        return false;\r
-      }\r
+    private HobsIdentification getCurrentHobs() {\r
+        String arg0 = this.jComboBoxGuidC_Name.getSelectedItem().toString();\r
+        String arg1 = this.jComboBoxHobType.getSelectedItem().toString();\r
+        String arg2 = this.jComboBoxUsage.getSelectedItem().toString();\r
+\r
+        String arg3 = this.jTextFieldFeatureFlag.getText();\r
+        Vector<String> arg4 = this.jArchCheckBox.getSelectedItemsVector();\r
+        String arg5 = this.jTextAreaHelpText.getText();\r
+        id = new HobsIdentification(arg0, arg1, arg2, arg3, arg4, arg5);\r
+        return id;\r
     }\r
 \r
-    //\r
-    // Check FeatureFlag\r
-    //\r
-    if (!isEmpty(this.jTextFieldFeatureFlag.getText())) {\r
-      if (!DataValidation.isFeatureFlag(this.jTextFieldFeatureFlag.getText())) {\r
-        Log.wrn("Update Hobs", "Incorrect data type for Feature Flag");\r
-        return false;\r
-      }\r
+    public HobsIdentification getId() {\r
+        return id;\r
     }\r
 \r
-    return true;\r
-  }\r
-\r
-  private HobsIdentification getCurrentHobs() {\r
-    String arg0 = this.jComboBoxGuidC_Name.getSelectedItem().toString();\r
-    String arg1 = this.jComboBoxHobType.getSelectedItem().toString();\r
-    String arg2 = this.jComboBoxUsage.getSelectedItem().toString();\r
-\r
-    String arg3 = this.jTextFieldFeatureFlag.getText();\r
-    Vector<String> arg4 = this.jArchCheckBox.getSelectedItemsVector();\r
-    String arg5 = this.jTextAreaHelpText.getText();\r
-    id = new HobsIdentification(arg0, arg1, arg2, arg3, arg4, arg5);\r
-    return id;\r
-  }\r
-  \r
-  public HobsIdentification getId() {\r
-    return id;\r
-  }\r
-\r
-  public void setId(HobsIdentification id) {\r
-    this.id = id;\r
-  }\r
+    public void setId(HobsIdentification id) {\r
+        this.id = id;\r
+    }\r
 }\r
index e7474a5..c4080ae 100644 (file)
@@ -96,7 +96,7 @@ public class LibraryClassDefsDlg extends IDialog {
     private JTextField jTextFieldHelpText = null;\r
 \r
     private ArchCheckBox jArchCheckBox = null;\r
-    \r
+\r
     private JButton jButtonOk = null;\r
 \r
     private JButton jButtonCancel = null;\r
@@ -212,6 +212,7 @@ public class LibraryClassDefsDlg extends IDialog {
             jTextFieldFeatureFlag = new JTextField();\r
             jTextFieldFeatureFlag.setBounds(new java.awt.Rectangle(160, 85, 320, 20));\r
             jTextFieldFeatureFlag.setPreferredSize(new java.awt.Dimension(320, 20));\r
+            jTextFieldFeatureFlag.setToolTipText("Postfix expression that must evaluate to TRUE or FALSE");\r
         }\r
         return jTextFieldFeatureFlag;\r
     }\r
@@ -372,7 +373,7 @@ public class LibraryClassDefsDlg extends IDialog {
             jLabelArch.setText("Supported Architectures");\r
             jLabelFeatureFlag = new JLabel();\r
             jLabelFeatureFlag.setBounds(new java.awt.Rectangle(15, 85, 140, 20));\r
-            jLabelFeatureFlag.setText("Feature Flag");\r
+            jLabelFeatureFlag.setText("Feature Flag Expression");\r
             jLabelRecommendedInstanceGuid = new JLabel();\r
             jLabelRecommendedInstanceGuid.setBounds(new java.awt.Rectangle(15, 110, 200, 20));\r
             jLabelRecommendedInstanceGuid.setText("Recommended Instance Guid");\r
index 753b0e2..e0a0f34 100644 (file)
@@ -46,519 +46,505 @@ import org.tianocore.frameworkwizard.workspace.WorkspaceTools;
  */\r
 public class PCDsDlg extends IDialog implements ItemListener {\r
 \r
-  // /\r
-  // / Define class Serial Version UID\r
-  // /\r
-  private static final long serialVersionUID = 2227717658188438696L;\r
+    // /\r
+    // / Define class Serial Version UID\r
+    // /\r
+    private static final long serialVersionUID = 2227717658188438696L;\r
 \r
-  //\r
-  // Define class members\r
-  //\r
-  private JPanel jContentPane = null;\r
-\r
-  private JLabel jLabelItemType = null;\r
-\r
-  private JLabel jLabelC_Name = null;\r
+    //\r
+    // Define class members\r
+    //\r
+    private JPanel jContentPane = null;\r
 \r
-  private JComboBox jComboBoxItemType = null;\r
+    private JLabel jLabelItemType = null;\r
 \r
-  private JComboBox jComboBoxCName = null;\r
+    private JLabel jLabelC_Name = null;\r
 \r
-  private JLabel jLabelDefaultValue = null;\r
+    private JComboBox jComboBoxItemType = null;\r
 \r
-  private JTextField jTextFieldDefaultValue = null;\r
+    private JComboBox jComboBoxCName = null;\r
 \r
-  private StarLabel jStarLabel1 = null;\r
+    private JLabel jLabelDefaultValue = null;\r
 \r
-  private StarLabel jStarLabel2 = null;\r
+    private JTextField jTextFieldDefaultValue = null;\r
 \r
-  private StarLabel jStarLabel3 = null;\r
+    private StarLabel jStarLabel1 = null;\r
 \r
-  private JLabel jLabelHelpText = null;\r
+    private StarLabel jStarLabel2 = null;\r
 \r
-  private JTextArea jTextAreaHelpText = null;\r
+    private StarLabel jStarLabel3 = null;\r
 \r
-  private JScrollPane jScrollPane = null;\r
+    private JLabel jLabelHelpText = null;\r
 \r
-  private JLabel jLabelTokenSpaceGuid = null;\r
+    private JTextArea jTextAreaHelpText = null;\r
 \r
-  private JTextField jTextFieldTokenSpaceGuid = null;\r
+    private JScrollPane jScrollPane = null;\r
 \r
-  private JLabel jLabelFeatureFlag = null;\r
+    private JLabel jLabelTokenSpaceGuid = null;\r
 \r
-  private JTextField jTextFieldFeatureFlag = null;\r
+    private JTextField jTextFieldTokenSpaceGuid = null;\r
 \r
-  private JLabel jLabelArch = null;\r
+    private JLabel jLabelFeatureFlag = null;\r
 \r
-  private ArchCheckBox jArchCheckBox = null;\r
+    private JTextField jTextFieldFeatureFlag = null;\r
 \r
-  private JButton jButtonOk = null;\r
+    private JLabel jLabelArch = null;\r
 \r
-  private JButton jButtonCancel = null;\r
+    private ArchCheckBox jArchCheckBox = null;\r
 \r
-  private JScrollPane jScrollPaneHelpText = null;\r
+    private JButton jButtonOk = null;\r
 \r
-  //\r
-  // Not used by UI\r
-  //\r
-  private PcdCodedIdentification id = null;\r
+    private JButton jButtonCancel = null;\r
 \r
-  private WorkspaceTools wt = new WorkspaceTools();\r
+    private JScrollPane jScrollPaneHelpText = null;\r
 \r
-  private PcdVector pcd = wt.getAllPcdDeclarationsFromWorkspace();\r
+    //\r
+    // Not used by UI\r
+    //\r
+    private PcdCodedIdentification id = null;\r
+\r
+    private WorkspaceTools wt = new WorkspaceTools();\r
+\r
+    private PcdVector pcd = wt.getAllPcdDeclarationsFromWorkspace();\r
+\r
+    /**\r
+     * This method initializes jComboBoxItemType\r
+     * \r
+     * @return javax.swing.JComboBox jComboBoxItemType\r
+     * \r
+     */\r
+    private JComboBox getJComboBoxItemType() {\r
+        if (jComboBoxItemType == null) {\r
+            jComboBoxItemType = new JComboBox();\r
+            jComboBoxItemType.setBounds(new java.awt.Rectangle(160, 35, 320, 20));\r
+            jComboBoxItemType.setPreferredSize(new java.awt.Dimension(320, 20));\r
+        }\r
+        return jComboBoxItemType;\r
+    }\r
 \r
-  /**\r
-   * This method initializes jComboBoxItemType\r
-   * \r
-   * @return javax.swing.JComboBox jComboBoxItemType\r
-   * \r
-   */\r
-  private JComboBox getJComboBoxItemType() {\r
-    if (jComboBoxItemType == null) {\r
-      jComboBoxItemType = new JComboBox();\r
-      jComboBoxItemType.setBounds(new java.awt.Rectangle(160, 35, 320, 20));\r
-      jComboBoxItemType.setPreferredSize(new java.awt.Dimension(320, 20));\r
+    /**\r
+     * This method initializes jTextFieldC_Name\r
+     * \r
+     * @return javax.swing.JTextField jTextFieldC_Name\r
+     * \r
+     */\r
+    private JComboBox getJComboBoxCName() {\r
+        if (jComboBoxCName == null) {\r
+            jComboBoxCName = new JComboBox();\r
+            jComboBoxCName.setBounds(new java.awt.Rectangle(160, 10, 320, 20));\r
+            jComboBoxCName.setPreferredSize(new java.awt.Dimension(320, 20));\r
+            jComboBoxCName.addItemListener(this);\r
+        }\r
+        return jComboBoxCName;\r
     }\r
-    return jComboBoxItemType;\r
-  }\r
-\r
-  /**\r
-   * This method initializes jTextFieldC_Name\r
-   * \r
-   * @return javax.swing.JTextField jTextFieldC_Name\r
-   * \r
-   */\r
-  private JComboBox getJComboBoxCName() {\r
-    if (jComboBoxCName == null) {\r
-      jComboBoxCName = new JComboBox();\r
-      jComboBoxCName.setBounds(new java.awt.Rectangle(160, 10, 320, 20));\r
-      jComboBoxCName.setPreferredSize(new java.awt.Dimension(320, 20));\r
-      jComboBoxCName.addItemListener(this);\r
+\r
+    /**\r
+     * This method initializes jTextFieldDefaultValue\r
+     * \r
+     * @return javax.swing.JTextField jTextFieldDefaultValue\r
+     * \r
+     */\r
+    private JTextField getJTextFieldDefaultValue() {\r
+        if (jTextFieldDefaultValue == null) {\r
+            jTextFieldDefaultValue = new JTextField();\r
+            jTextFieldDefaultValue.setBounds(new java.awt.Rectangle(160, 60, 320, 20));\r
+            jTextFieldDefaultValue.setPreferredSize(new java.awt.Dimension(320, 20));\r
+        }\r
+        return jTextFieldDefaultValue;\r
     }\r
-    return jComboBoxCName;\r
-  }\r
-\r
-  /**\r
-   * This method initializes jTextFieldDefaultValue\r
-   * \r
-   * @return javax.swing.JTextField jTextFieldDefaultValue\r
-   * \r
-   */\r
-  private JTextField getJTextFieldDefaultValue() {\r
-    if (jTextFieldDefaultValue == null) {\r
-      jTextFieldDefaultValue = new JTextField();\r
-      jTextFieldDefaultValue\r
-          .setBounds(new java.awt.Rectangle(160, 60, 320, 20));\r
-      jTextFieldDefaultValue.setPreferredSize(new java.awt.Dimension(320, 20));\r
+\r
+    /**\r
+     * This method initializes jTextAreaHelpText\r
+     * \r
+     * @return javax.swing.JTextArea\r
+     */\r
+    private JTextArea getJTextAreaHelpText() {\r
+        if (jTextAreaHelpText == null) {\r
+            jTextAreaHelpText = new JTextArea();\r
+            jTextAreaHelpText.setLineWrap(true);\r
+            jTextAreaHelpText.setWrapStyleWord(true);\r
+        }\r
+        return jTextAreaHelpText;\r
     }\r
-    return jTextFieldDefaultValue;\r
-  }\r
-\r
-  /**\r
-   * This method initializes jTextAreaHelpText\r
-   * \r
-   * @return javax.swing.JTextArea\r
-   */\r
-  private JTextArea getJTextAreaHelpText() {\r
-    if (jTextAreaHelpText == null) {\r
-      jTextAreaHelpText = new JTextArea();\r
-      jTextAreaHelpText.setLineWrap(true);\r
-      jTextAreaHelpText.setWrapStyleWord(true);\r
+\r
+    /**\r
+     * This method initializes jScrollPaneHelpText\r
+     * \r
+     * @return javax.swing.JScrollPane\r
+     * \r
+     */\r
+    private JScrollPane getJScrollPaneHelpText() {\r
+        if (jScrollPaneHelpText == null) {\r
+            jScrollPaneHelpText = new JScrollPane();\r
+            jScrollPaneHelpText.setHorizontalScrollBarPolicy(javax.swing.JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);\r
+            jScrollPaneHelpText.setSize(new java.awt.Dimension(320, 40));\r
+            jScrollPaneHelpText.setPreferredSize(new java.awt.Dimension(320, 40));\r
+            jScrollPaneHelpText.setLocation(new java.awt.Point(160, 85));\r
+            jScrollPaneHelpText.setViewportView(getJTextAreaHelpText());\r
+        }\r
+        return jScrollPaneHelpText;\r
     }\r
-    return jTextAreaHelpText;\r
-  }\r
-\r
-  /**\r
-   * This method initializes jScrollPaneHelpText\r
-   * \r
-   * @return javax.swing.JScrollPane\r
-   * \r
-   */\r
-  private JScrollPane getJScrollPaneHelpText() {\r
-    if (jScrollPaneHelpText == null) {\r
-      jScrollPaneHelpText = new JScrollPane();\r
-      jScrollPaneHelpText\r
-          .setHorizontalScrollBarPolicy(javax.swing.JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);\r
-      jScrollPaneHelpText.setSize(new java.awt.Dimension(320, 40));\r
-      jScrollPaneHelpText.setPreferredSize(new java.awt.Dimension(320, 40));\r
-      jScrollPaneHelpText.setLocation(new java.awt.Point(160, 85));\r
-      jScrollPaneHelpText.setViewportView(getJTextAreaHelpText());\r
+\r
+    /**\r
+     * This method initializes jScrollPane\r
+     * \r
+     * @return javax.swing.JScrollPane\r
+     */\r
+    private JScrollPane getJScrollPane() {\r
+        if (jScrollPane == null) {\r
+            jScrollPane = new JScrollPane();\r
+            jScrollPane.setViewportView(getJContentPane());\r
+        }\r
+        return jScrollPane;\r
     }\r
-    return jScrollPaneHelpText;\r
-  }\r
-\r
-  /**\r
-   * This method initializes jScrollPane\r
-   * \r
-   * @return javax.swing.JScrollPane\r
-   */\r
-  private JScrollPane getJScrollPane() {\r
-    if (jScrollPane == null) {\r
-      jScrollPane = new JScrollPane();\r
-      jScrollPane.setViewportView(getJContentPane());\r
+\r
+    /**\r
+     * This method initializes jTextFieldTokenSpaceGuid\r
+     * \r
+     * @return javax.swing.JTextField\r
+     */\r
+    private JTextField getJTextFieldTokenSpaceGuid() {\r
+        if (jTextFieldTokenSpaceGuid == null) {\r
+            jTextFieldTokenSpaceGuid = new JTextField();\r
+            jTextFieldTokenSpaceGuid.setBounds(new java.awt.Rectangle(160, 60, 320, 20));\r
+            jTextFieldTokenSpaceGuid.setPreferredSize(new java.awt.Dimension(320, 20));\r
+            jTextFieldTokenSpaceGuid.setVisible(false);\r
+        }\r
+        return jTextFieldTokenSpaceGuid;\r
     }\r
-    return jScrollPane;\r
-  }\r
-\r
-  /**\r
-   * This method initializes jTextFieldTokenSpaceGuid\r
-   * \r
-   * @return javax.swing.JTextField\r
-   */\r
-  private JTextField getJTextFieldTokenSpaceGuid() {\r
-    if (jTextFieldTokenSpaceGuid == null) {\r
-      jTextFieldTokenSpaceGuid = new JTextField();\r
-      jTextFieldTokenSpaceGuid.setBounds(new java.awt.Rectangle(160, 60, 320,\r
-          20));\r
-      jTextFieldTokenSpaceGuid\r
-          .setPreferredSize(new java.awt.Dimension(320, 20));\r
-      jTextFieldTokenSpaceGuid.setVisible(false);\r
+\r
+    /**\r
+     * This method initializes jTextFieldFeatureFlag\r
+     * \r
+     * @return javax.swing.JTextField\r
+     */\r
+    private JTextField getJTextFieldFeatureFlag() {\r
+        if (jTextFieldFeatureFlag == null) {\r
+            jTextFieldFeatureFlag = new JTextField();\r
+            jTextFieldFeatureFlag.setBounds(new java.awt.Rectangle(160, 130, 320, 20));\r
+            jTextFieldFeatureFlag.setPreferredSize(new java.awt.Dimension(320, 20));\r
+            jTextFieldFeatureFlag.setToolTipText("Postfix expression that must evaluate to TRUE or FALSE");\r
+        }\r
+        return jTextFieldFeatureFlag;\r
     }\r
-    return jTextFieldTokenSpaceGuid;\r
-  }\r
-\r
-  /**\r
-   * This method initializes jTextFieldFeatureFlag\r
-   * \r
-   * @return javax.swing.JTextField\r
-   */\r
-  private JTextField getJTextFieldFeatureFlag() {\r
-    if (jTextFieldFeatureFlag == null) {\r
-      jTextFieldFeatureFlag = new JTextField();\r
-      jTextFieldFeatureFlag\r
-          .setBounds(new java.awt.Rectangle(160, 130, 320, 20));\r
-      jTextFieldFeatureFlag.setPreferredSize(new java.awt.Dimension(320, 20));\r
-      jTextFieldFeatureFlag.setToolTipText("Postfix expression that must evaluate to TRUE or FALSE");\r
+\r
+    /**\r
+     * This method initializes jButtonOk\r
+     * \r
+     * @return javax.swing.JButton\r
+     \r
+     */\r
+    private JButton getJButtonOk() {\r
+        if (jButtonOk == null) {\r
+            jButtonOk = new JButton();\r
+            jButtonOk.setBounds(new java.awt.Rectangle(290, 182, 90, 20));\r
+            jButtonOk.setText("Ok");\r
+            jButtonOk.addActionListener(this);\r
+        }\r
+        return jButtonOk;\r
     }\r
-    return jTextFieldFeatureFlag;\r
-  }\r
-\r
-  /**\r
-   * This method initializes jButtonOk\r
-   * \r
-   * @return javax.swing.JButton\r
-   * \r
-   */\r
-  private JButton getJButtonOk() {\r
-    if (jButtonOk == null) {\r
-      jButtonOk = new JButton();\r
-      jButtonOk.setBounds(new java.awt.Rectangle(290, 182, 90, 20));\r
-      jButtonOk.setText("Ok");\r
-      jButtonOk.addActionListener(this);\r
+\r
+    /**\r
+     * This method initializes jButtonCancel\r
+     * \r
+     * @return javax.swing.JButton\r
+     \r
+     */\r
+    private JButton getJButtonCancel() {\r
+        if (jButtonCancel == null) {\r
+            jButtonCancel = new JButton();\r
+            jButtonCancel.setBounds(new java.awt.Rectangle(390, 182, 90, 20));\r
+            jButtonCancel.setText("Cancel");\r
+            jButtonCancel.addActionListener(this);\r
+        }\r
+        return jButtonCancel;\r
     }\r
-    return jButtonOk;\r
-  }\r
-\r
-  /**\r
-   * This method initializes jButtonCancel\r
-   * \r
-   * @return javax.swing.JButton\r
-   * \r
-   */\r
-  private JButton getJButtonCancel() {\r
-    if (jButtonCancel == null) {\r
-      jButtonCancel = new JButton();\r
-      jButtonCancel.setBounds(new java.awt.Rectangle(390, 182, 90, 20));\r
-      jButtonCancel.setText("Cancel");\r
-      jButtonCancel.addActionListener(this);\r
+\r
+    public static void main(String[] args) {\r
+\r
     }\r
-    return jButtonCancel;\r
-  }\r
-\r
-  public static void main(String[] args) {\r
-\r
-  }\r
-\r
-  /**\r
-   * This method initializes this\r
-   * \r
-   */\r
-  private void init() {\r
-    this.setSize(500, 255);\r
-    this.setContentPane(getJScrollPane());\r
-    this.setTitle("Pcd Coded");\r
-    initFrame();\r
-    this.setViewMode(false);\r
-    this.centerWindow();\r
-  }\r
-\r
-  /**\r
-   * This method initializes this Fill values to all fields if these values are\r
-   * not empty\r
-   * \r
-   * @param inPcdCodedId\r
-   * \r
-   */\r
-  private void init(PcdCodedIdentification inPcdCodedId) {\r
-    init();\r
-    this.id = inPcdCodedId;\r
-\r
-    if (this.id != null) {\r
-      this.jComboBoxCName.setSelectedItem(id.getName());\r
-      this.jTextFieldTokenSpaceGuid.setText(id.getGuid());\r
-      this.jTextFieldDefaultValue.setText(id.getValue());\r
-      this.jTextAreaHelpText.setText(id.getHelp());\r
-      this.jComboBoxItemType.setSelectedItem(id.getType());\r
-      this.jTextFieldFeatureFlag.setText(id.getFeatureFlag());\r
-      this.jArchCheckBox.setSelectedItems(id.getSupArchList());\r
+\r
+    /**\r
+     * This method initializes this\r
+     * \r
+     */\r
+    private void init() {\r
+        this.setSize(500, 255);\r
+        this.setContentPane(getJScrollPane());\r
+        this.setTitle("Pcd Coded");\r
+        initFrame();\r
+        this.setViewMode(false);\r
+        this.centerWindow();\r
     }\r
-  }\r
-\r
-  /**\r
-   * This is the override edit constructor\r
-   * \r
-   * @param inPcdCodedId\r
-   * @param iFrame\r
-   * \r
-   */\r
-  public PCDsDlg(PcdCodedIdentification inPcdCodedId, IFrame iFrame) {\r
-    super(iFrame, true);\r
-    init(inPcdCodedId);\r
-  }\r
-\r
-  /**\r
-   * Disable all components when the mode is view\r
-   * \r
-   * @param isView\r
-   *          true - The view mode; false - The non-view mode\r
-   * \r
-   */\r
-  public void setViewMode(boolean isView) {\r
-    if (isView) {\r
-      this.jTextFieldDefaultValue.setEnabled(!isView);\r
-      this.jComboBoxItemType.setEnabled(!isView);\r
+\r
+    /**\r
+     * This method initializes this Fill values to all fields if these values are\r
+     * not empty\r
+     * \r
+     * @param inPcdCodedId\r
+     * \r
+     */\r
+    private void init(PcdCodedIdentification inPcdCodedId) {\r
+        init();\r
+        this.id = inPcdCodedId;\r
+\r
+        if (this.id != null) {\r
+            this.jComboBoxCName.setSelectedItem(id.getName());\r
+            this.jTextFieldTokenSpaceGuid.setText(id.getGuid());\r
+            this.jTextFieldDefaultValue.setText(id.getValue());\r
+            this.jTextAreaHelpText.setText(id.getHelp());\r
+            this.jComboBoxItemType.setSelectedItem(id.getType());\r
+            this.jTextFieldFeatureFlag.setText(id.getFeatureFlag());\r
+            this.jArchCheckBox.setSelectedItems(id.getSupArchList());\r
+        }\r
     }\r
-  }\r
-\r
-  /**\r
-   * This method initializes jContentPane\r
-   * \r
-   * @return javax.swing.JPanel jContentPane\r
-   * \r
-   */\r
-  private JPanel getJContentPane() {\r
-    if (jContentPane == null) {\r
-      jStarLabel1 = new StarLabel();\r
-      jStarLabel1.setLocation(new java.awt.Point(2, 10));\r
-      jLabelC_Name = new JLabel();\r
-      jLabelC_Name.setText("PCD C Name");\r
-      jLabelC_Name.setBounds(new java.awt.Rectangle(15, 10, 145, 20));\r
-\r
-      jStarLabel2 = new StarLabel();\r
-      jStarLabel2.setLocation(new java.awt.Point(2, 35));\r
-      jLabelItemType = new JLabel();\r
-      jLabelItemType.setText("PCD Item Type");\r
-      jLabelItemType.setBounds(new java.awt.Rectangle(15, 35, 145, 20));\r
-\r
-      jLabelDefaultValue = new JLabel();\r
-      jLabelDefaultValue.setText("Default Value");\r
-      jLabelDefaultValue.setBounds(new java.awt.Rectangle(15, 60, 145, 20));\r
-\r
-      jStarLabel3 = new StarLabel();\r
-      jStarLabel3.setLocation(new java.awt.Point(2, 85));\r
-      jLabelHelpText = new JLabel();\r
-      jLabelHelpText.setText("Help Text");\r
-      jLabelHelpText.setBounds(new java.awt.Rectangle(15, 85, 145, 20));\r
-\r
-      jLabelFeatureFlag = new JLabel();\r
-      jLabelFeatureFlag.setText("Feature Flag Expression");\r
-      jLabelFeatureFlag.setBounds(new java.awt.Rectangle(15, 130, 140, 20));\r
-\r
-      jLabelTokenSpaceGuid = new JLabel();\r
-      jLabelTokenSpaceGuid.setText("Token Space C Name");\r
-      jLabelTokenSpaceGuid.setVisible(false);\r
-\r
-      jLabelArch = new JLabel();\r
-      jLabelArch.setText("Supported Architectures");\r
-      jLabelArch.setBounds(new java.awt.Rectangle(15, 155, 145, 20));\r
-      jArchCheckBox = new ArchCheckBox();\r
-      jArchCheckBox.setPreferredSize(new java.awt.Dimension(320, 20));\r
-      jArchCheckBox.setBounds(new java.awt.Rectangle(160, 155, 320, 20));\r
-\r
-      // Hidden field\r
-      jLabelTokenSpaceGuid.setBounds(new java.awt.Rectangle(15, 60, 140, 20));\r
-\r
-      jContentPane = new JPanel();\r
-      jContentPane.setLayout(null);\r
-      jContentPane.setPreferredSize(new java.awt.Dimension(485, 210));\r
-\r
-      jContentPane.add(jStarLabel1, null);\r
-      jContentPane.add(jLabelC_Name, null);\r
-      jContentPane.add(getJComboBoxCName(), null);\r
-      jContentPane.add(jStarLabel2, null);\r
-      jContentPane.add(jLabelItemType, null);\r
-      jContentPane.add(getJComboBoxItemType(), null);\r
-      jContentPane.add(jLabelDefaultValue, null);\r
-      jContentPane.add(getJTextFieldDefaultValue(), null);\r
-      jContentPane.add(jStarLabel3, null);\r
-      jContentPane.add(jLabelHelpText, null);\r
-      jContentPane.add(getJScrollPaneHelpText(), null);\r
-      jContentPane.add(jLabelFeatureFlag, null);\r
-      jContentPane.add(getJTextFieldFeatureFlag(), null);\r
-      jContentPane.add(jLabelArch, null);\r
-      jContentPane.add(jArchCheckBox, null);\r
-      // Hidden\r
-      jContentPane.add(getJTextFieldTokenSpaceGuid(), null);\r
-      jContentPane.add(jLabelTokenSpaceGuid, null);\r
-      jContentPane.add(getJButtonOk(), null);\r
-      jContentPane.add(getJButtonCancel(), null);\r
+\r
+    /**\r
+     * This is the override edit constructor\r
+     * \r
+     * @param inPcdCodedId\r
+     * @param iFrame\r
+     * \r
+     */\r
+    public PCDsDlg(PcdCodedIdentification inPcdCodedId, IFrame iFrame) {\r
+        super(iFrame, true);\r
+        init(inPcdCodedId);\r
     }\r
-    return jContentPane;\r
-  }\r
-\r
-  /**\r
-   * This method initializes Usage type, Item type and Datum type\r
-   * \r
-   */\r
-  private void initFrame() {\r
-    for (int index = 0; index < pcd.size(); index++) {\r
-      jComboBoxCName.addItem(pcd.getPcd(index));\r
+\r
+    /**\r
+     * Disable all components when the mode is view\r
+     * \r
+     * @param isView\r
+     *          true - The view mode; false - The non-view mode\r
+     * \r
+     */\r
+    public void setViewMode(boolean isView) {\r
+        if (isView) {\r
+            this.jTextFieldDefaultValue.setEnabled(!isView);\r
+            this.jComboBoxItemType.setEnabled(!isView);\r
+        }\r
     }\r
 \r
-    // Tools.generateComboBoxByVector(jComboBoxItemType, ed.getVPcdItemTypes());\r
-  }\r
-\r
-  \r
-  /*\r
-   * (non-Javadoc)\r
-   * \r
-   * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)\r
-   * \r
-   * Override actionPerformed to listen all actions\r
-   * \r
-   */\r
-  public void actionPerformed(ActionEvent arg0) {\r
-    if (arg0.getSource() == jButtonOk) {\r
-      if (checkAdd()) {\r
-        getCurrentPcdCoded();\r
-        this.returnType = DataType.RETURN_TYPE_OK;\r
-        this.setVisible(false);\r
-      }\r
+    /**\r
+     * This method initializes jContentPane\r
+     * \r
+     * @return javax.swing.JPanel jContentPane\r
+     * \r
+     */\r
+    private JPanel getJContentPane() {\r
+        if (jContentPane == null) {\r
+            jStarLabel1 = new StarLabel();\r
+            jStarLabel1.setLocation(new java.awt.Point(2, 10));\r
+            jLabelC_Name = new JLabel();\r
+            jLabelC_Name.setText("PCD C Name");\r
+            jLabelC_Name.setBounds(new java.awt.Rectangle(15, 10, 145, 20));\r
+\r
+            jStarLabel2 = new StarLabel();\r
+            jStarLabel2.setLocation(new java.awt.Point(2, 35));\r
+            jLabelItemType = new JLabel();\r
+            jLabelItemType.setText("PCD Item Type");\r
+            jLabelItemType.setBounds(new java.awt.Rectangle(15, 35, 145, 20));\r
+\r
+            jLabelDefaultValue = new JLabel();\r
+            jLabelDefaultValue.setText("Default Value");\r
+            jLabelDefaultValue.setBounds(new java.awt.Rectangle(15, 60, 145, 20));\r
+\r
+            jStarLabel3 = new StarLabel();\r
+            jStarLabel3.setLocation(new java.awt.Point(2, 85));\r
+            jLabelHelpText = new JLabel();\r
+            jLabelHelpText.setText("Help Text");\r
+            jLabelHelpText.setBounds(new java.awt.Rectangle(15, 85, 145, 20));\r
+\r
+            jLabelFeatureFlag = new JLabel();\r
+            jLabelFeatureFlag.setText("Feature Flag Expression");\r
+            jLabelFeatureFlag.setBounds(new java.awt.Rectangle(15, 130, 140, 20));\r
+\r
+            jLabelTokenSpaceGuid = new JLabel();\r
+            jLabelTokenSpaceGuid.setText("Token Space C Name");\r
+            jLabelTokenSpaceGuid.setVisible(false);\r
+\r
+            jLabelArch = new JLabel();\r
+            jLabelArch.setText("Supported Architectures");\r
+            jLabelArch.setBounds(new java.awt.Rectangle(15, 155, 145, 20));\r
+            jArchCheckBox = new ArchCheckBox();\r
+            jArchCheckBox.setPreferredSize(new java.awt.Dimension(320, 20));\r
+            jArchCheckBox.setBounds(new java.awt.Rectangle(160, 155, 320, 20));\r
+\r
+            // Hidden field\r
+            jLabelTokenSpaceGuid.setBounds(new java.awt.Rectangle(15, 60, 140, 20));\r
+\r
+            jContentPane = new JPanel();\r
+            jContentPane.setLayout(null);\r
+            jContentPane.setPreferredSize(new java.awt.Dimension(485, 210));\r
+\r
+            jContentPane.add(jStarLabel1, null);\r
+            jContentPane.add(jLabelC_Name, null);\r
+            jContentPane.add(getJComboBoxCName(), null);\r
+            jContentPane.add(jStarLabel2, null);\r
+            jContentPane.add(jLabelItemType, null);\r
+            jContentPane.add(getJComboBoxItemType(), null);\r
+            jContentPane.add(jLabelDefaultValue, null);\r
+            jContentPane.add(getJTextFieldDefaultValue(), null);\r
+            jContentPane.add(jStarLabel3, null);\r
+            jContentPane.add(jLabelHelpText, null);\r
+            jContentPane.add(getJScrollPaneHelpText(), null);\r
+            jContentPane.add(jLabelFeatureFlag, null);\r
+            jContentPane.add(getJTextFieldFeatureFlag(), null);\r
+            jContentPane.add(jLabelArch, null);\r
+            jContentPane.add(jArchCheckBox, null);\r
+            // Hidden\r
+            jContentPane.add(getJTextFieldTokenSpaceGuid(), null);\r
+            jContentPane.add(jLabelTokenSpaceGuid, null);\r
+            jContentPane.add(getJButtonOk(), null);\r
+            jContentPane.add(getJButtonCancel(), null);\r
+        }\r
+        return jContentPane;\r
     }\r
 \r
-    if (arg0.getSource() == jButtonCancel) {\r
-      this.returnType = DataType.RETURN_TYPE_CANCEL;\r
-      this.setVisible(false);\r
+    /**\r
+     * This method initializes Usage type, Item type and Datum type\r
+     * \r
+     */\r
+    private void initFrame() {\r
+        for (int index = 0; index < pcd.size(); index++) {\r
+            jComboBoxCName.addItem(pcd.getPcd(index));\r
+        }\r
+\r
+        // Tools.generateComboBoxByVector(jComboBoxItemType, ed.getVPcdItemTypes());\r
     }\r
-  }\r
-\r
-  /**\r
-   * Data validation for all fields\r
-   * \r
-   * @retval true - All datas are valid\r
-   * @retval false - At least one data is invalid\r
-   * \r
-   */\r
-  public boolean checkAdd() {\r
-    //\r
-    // Check if all fields have correct data types\r
-    //\r
 \r
-    //\r
-    // Check C_Name\r
-    //\r
-    if (!isEmpty(this.jComboBoxCName.getSelectedItem().toString())) {\r
-      if (!DataValidation.isC_NameType(this.jComboBoxCName.getSelectedItem()\r
-          .toString())) {\r
-        Log.wrn("Update PcdCoded", "Incorrect data type for C Name");\r
-        return false;\r
-      }\r
+    /*\r
+     * (non-Javadoc)\r
+     * \r
+     * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)\r
+     * \r
+     * Override actionPerformed to listen all actions\r
+     * \r
+     */\r
+    public void actionPerformed(ActionEvent arg0) {\r
+        if (arg0.getSource() == jButtonOk) {\r
+            if (checkAdd()) {\r
+                getCurrentPcdCoded();\r
+                this.returnType = DataType.RETURN_TYPE_OK;\r
+                this.setVisible(false);\r
+            }\r
+        }\r
+\r
+        if (arg0.getSource() == jButtonCancel) {\r
+            this.returnType = DataType.RETURN_TYPE_CANCEL;\r
+            this.setVisible(false);\r
+        }\r
     }\r
 \r
-    //\r
-    // Check TokenSpaceGuid\r
-    //\r
-    if (!isEmpty(this.jTextFieldTokenSpaceGuid.getText())) {\r
-      if (!DataValidation.isC_NameType(this.jTextFieldTokenSpaceGuid.getText())) {\r
-        Log\r
-            .wrn("Update PcdCoded",\r
-                "Incorrect data type for the selected pcd entry, please check in in spd file");\r
-        return false;\r
-      }\r
+    /**\r
+     * Data validation for all fields\r
+     * \r
+     * @retval true - All datas are valid\r
+     * @retval false - At least one data is invalid\r
+     * \r
+     */\r
+    public boolean checkAdd() {\r
+        //\r
+        // Check if all fields have correct data types\r
+        //\r
+\r
+        //\r
+        // Check C_Name\r
+        //\r
+        if (!isEmpty(this.jComboBoxCName.getSelectedItem().toString())) {\r
+            if (!DataValidation.isC_NameType(this.jComboBoxCName.getSelectedItem().toString())) {\r
+                Log.wrn("Update PcdCoded", "Incorrect data type for C Name");\r
+                return false;\r
+            }\r
+        }\r
+\r
+        //\r
+        // Check TokenSpaceGuid\r
+        //\r
+        if (!isEmpty(this.jTextFieldTokenSpaceGuid.getText())) {\r
+            if (!DataValidation.isC_NameType(this.jTextFieldTokenSpaceGuid.getText())) {\r
+                Log.wrn("Update PcdCoded",\r
+                        "Incorrect data type for the selected pcd entry, please check in in spd file");\r
+                return false;\r
+            }\r
+        }\r
+\r
+        //\r
+        // Check DefaultValue\r
+        //\r
+        if (!isEmpty(this.jTextFieldDefaultValue.getText())) {\r
+            if (!DataValidation.isDefaultValueType(this.jTextFieldDefaultValue.getText())) {\r
+                Log.wrn("Update PcdCoded", "Incorrect data type for Default Value");\r
+                return false;\r
+            }\r
+        }\r
+\r
+        //\r
+        // Check HelpText\r
+        //\r
+        if (isEmpty(this.jTextAreaHelpText.getText())) {\r
+            Log.wrn("Update PcdCoded", "Help Text should not be empty");\r
+            return false;\r
+        }\r
+\r
+        //\r
+        // Check FeatureFlag\r
+        //\r
+        if (!isEmpty(this.jTextFieldFeatureFlag.getText())) {\r
+            if (!DataValidation.isFeatureFlag(this.jTextFieldFeatureFlag.getText())) {\r
+                Log.wrn("Update PcdCoded", "Incorrect data type for Feature Flag");\r
+                return false;\r
+            }\r
+        }\r
+\r
+        return true;\r
     }\r
 \r
-    //\r
-    // Check DefaultValue\r
-    //\r
-    if (!isEmpty(this.jTextFieldDefaultValue.getText())) {\r
-      if (!DataValidation.isDefaultValueType(this.jTextFieldDefaultValue\r
-          .getText())) {\r
-        Log.wrn("Update PcdCoded", "Incorrect data type for Default Value");\r
-        return false;\r
-      }\r
+    private PcdCodedIdentification getCurrentPcdCoded() {\r
+        String arg0 = this.jComboBoxCName.getSelectedItem().toString();\r
+        String arg1 = this.jTextFieldTokenSpaceGuid.getText();\r
+\r
+        String arg2 = this.jTextFieldFeatureFlag.getText();\r
+        Vector<String> arg3 = this.jArchCheckBox.getSelectedItemsVector();\r
+\r
+        String arg4 = this.jTextFieldDefaultValue.getText();\r
+        String arg5 = this.jTextAreaHelpText.getText();\r
+        String arg6 = this.jComboBoxItemType.getSelectedItem().toString();\r
+        id = new PcdCodedIdentification(arg0, arg1, arg2, arg3, arg4, arg5, arg6);\r
+        return id;\r
     }\r
 \r
-    //\r
-    // Check HelpText\r
-    //\r
-    if (isEmpty(this.jTextAreaHelpText.getText())) {\r
-      Log.wrn("Update PcdCoded", "Help Text should not be empty");\r
-      return false;\r
+    public PcdCodedIdentification getId() {\r
+        return id;\r
     }\r
 \r
-    //\r
-    // Check FeatureFlag\r
-    //\r
-    if (!isEmpty(this.jTextFieldFeatureFlag.getText())) {\r
-      if (!DataValidation.isFeatureFlag(this.jTextFieldFeatureFlag.getText())) {\r
-        Log.wrn("Update PcdCoded", "Incorrect data type for Feature Flag");\r
-        return false;\r
-      }\r
+    public void setId(PcdCodedIdentification id) {\r
+        this.id = id;\r
     }\r
 \r
-    return true;\r
-  }\r
-\r
-  private PcdCodedIdentification getCurrentPcdCoded() {\r
-    String arg0 = this.jComboBoxCName.getSelectedItem().toString();\r
-    String arg1 = this.jTextFieldTokenSpaceGuid.getText();\r
-\r
-    String arg2 = this.jTextFieldFeatureFlag.getText();\r
-    Vector<String> arg3 = this.jArchCheckBox.getSelectedItemsVector();\r
-\r
-    String arg4 = this.jTextFieldDefaultValue.getText();\r
-    String arg5 = this.jTextAreaHelpText.getText();\r
-    String arg6 = this.jComboBoxItemType.getSelectedItem().toString();\r
-    id = new PcdCodedIdentification(arg0, arg1, arg2, arg3, arg4, arg5, arg6);\r
-    return id;\r
-  }\r
-  \r
-  public PcdCodedIdentification getId() {\r
-    return id;\r
-  }\r
-\r
-  public void setId(PcdCodedIdentification id) {\r
-    this.id = id;\r
-  }\r
-\r
-  /*\r
-   * (non-Javadoc)\r
-   * \r
-   * @see java.awt.event.ItemListener#itemStateChanged(java.awt.event.ItemEvent)\r
-   * \r
-   * Reflesh the frame when selected item changed\r
-   * \r
-   */\r
-  public void itemStateChanged(ItemEvent arg0) {\r
-    int index = this.jComboBoxCName.getSelectedIndex();\r
-    if (arg0.getSource() == this.jComboBoxCName\r
-        && arg0.getStateChange() == ItemEvent.SELECTED) {\r
-      if (pcd.getPcd(index).getGuidCName() == null\r
-          || isEmpty(pcd.getPcd(index).getGuidCName())\r
-          || pcd.getPcd(index).getType() == null\r
-          || pcd.getPcd(index).getHelp() == null\r
-          || isEmpty(pcd.getPcd(index).getHelp())) {\r
-        Log\r
-            .wrn("select pcd entry when editing msa",\r
-                "The selected is defined incorrectly.\r\nPlease check it in spd file");\r
-      } else {\r
-        this.jTextFieldTokenSpaceGuid.setText(pcd.getPcd(index).getGuidCName());\r
-        Tools.generateComboBoxByVector(this.jComboBoxItemType, pcd\r
-            .getPcd(index).getType());\r
-        this.jTextAreaHelpText.setText(pcd.getPcd(index).getHelp());\r
-        this.jTextAreaHelpText.setSelectionStart(0);\r
-        this.jTextAreaHelpText.setSelectionEnd(0);\r
-      }\r
+    /*\r
+     * (non-Javadoc)\r
+     * \r
+     * @see java.awt.event.ItemListener#itemStateChanged(java.awt.event.ItemEvent)\r
+     * \r
+     * Reflesh the frame when selected item changed\r
+     * \r
+     */\r
+    public void itemStateChanged(ItemEvent arg0) {\r
+        int index = this.jComboBoxCName.getSelectedIndex();\r
+        if (arg0.getSource() == this.jComboBoxCName && arg0.getStateChange() == ItemEvent.SELECTED) {\r
+            if (pcd.getPcd(index).getGuidCName() == null || isEmpty(pcd.getPcd(index).getGuidCName())\r
+                || pcd.getPcd(index).getType() == null || pcd.getPcd(index).getHelp() == null\r
+                || isEmpty(pcd.getPcd(index).getHelp())) {\r
+                Log.wrn("select pcd entry when editing msa",\r
+                        "The selected is defined incorrectly.\r\nPlease check it in spd file");\r
+            } else {\r
+                this.jTextFieldTokenSpaceGuid.setText(pcd.getPcd(index).getGuidCName());\r
+                Tools.generateComboBoxByVector(this.jComboBoxItemType, pcd.getPcd(index).getType());\r
+                this.jTextAreaHelpText.setText(pcd.getPcd(index).getHelp());\r
+                this.jTextAreaHelpText.setSelectionStart(0);\r
+                this.jTextAreaHelpText.setSelectionEnd(0);\r
+            }\r
+        }\r
     }\r
-  }\r
 }\r
index 15acd94..ca1e5c8 100644 (file)
@@ -45,69 +45,67 @@ import org.tianocore.frameworkwizard.workspace.WorkspaceTools;
  * \r
  */\r
 public class PackageDepDlg extends IDialog implements ItemListener {\r
-  // /\r
-  // / Define class Serial Version UID\r
-  // /\r
-  private static final long serialVersionUID = 3465193035145152131L;\r
+    // /\r
+    // / Define class Serial Version UID\r
+    // /\r
+    private static final long serialVersionUID = 3465193035145152131L;\r
 \r
-  //\r
-  // Define class members\r
-  //\r
-  private JPanel jContentPane = null;\r
+    //\r
+    // Define class members\r
+    //\r
+    private JPanel jContentPane = null;\r
 \r
-  private JLabel jLabelPackageName = null;\r
+    private JLabel jLabelPackageName = null;\r
 \r
-  private StarLabel jStarLabel1 = null;\r
+    private StarLabel jStarLabel1 = null;\r
 \r
-  private JComboBox jComboBoxPackageName = null;\r
+    private JComboBox jComboBoxPackageName = null;\r
 \r
-  private JLabel jLabelPackageGuid = null;\r
+    private JLabel jLabelPackageGuid = null;\r
 \r
-  private JTextField jTextFieldPackageGuid = null;\r
+    private JTextField jTextFieldPackageGuid = null;\r
 \r
-  private JButton jButtonGenerateGuid = null;\r
+    private JLabel jLabelPackageVersion = null;\r
 \r
-  private JLabel jLabelPackageVersion = null;\r
+    private JTextField jTextFieldPackageVersion = null;\r
 \r
-  private JTextField jTextFieldPackageVersion = null;\r
+    private JLabel jLabelFeatureFlag = null;\r
 \r
-  private JLabel jLabelFeatureFlag = null;\r
+    private JTextField jTextFieldFeatureFlag = null;\r
 \r
-  private JTextField jTextFieldFeatureFlag = null;\r
+    private JScrollPane jScrollPane = null;\r
 \r
-  private JScrollPane jScrollPane = null;\r
+    private JLabel jLabelArch = null;\r
 \r
-  private JLabel jLabelArch = null;\r
+    private ArchCheckBox jArchCheckBox = null;\r
 \r
-  private ArchCheckBox jArchCheckBox = null;\r
+    private JButton jButtonOk = null;\r
 \r
-  private JButton jButtonOk = null;\r
+    private JButton jButtonCancel = null;\r
 \r
-  private JButton jButtonCancel = null;\r
+    //\r
+    // Not used by UI\r
+    //\r
+    private PackageDependenciesIdentification pdid = null;\r
 \r
-  //\r
-  // Not used by UI\r
-  //\r
-  private PackageDependenciesIdentification pdid = null;\r
+    private WorkspaceTools wt = new WorkspaceTools();\r
 \r
-  private WorkspaceTools wt = new WorkspaceTools();\r
+    private Vector<PackageIdentification> vPackage = wt.getAllPackages();\r
 \r
-  private Vector<PackageIdentification> vPackage = wt.getAllPackages();\r
-\r
-  /**\r
-   * This method initializes jComboBoxPackageName\r
-   * \r
-   * @return javax.swing.JComboBox\r
-   */\r
+    /**\r
+     * This method initializes jComboBoxPackageName\r
+     * \r
+     * @return javax.swing.JComboBox\r
+     */\r
     private JComboBox getJComboBoxPackageName() {\r
-      if (jComboBoxPackageName == null) {\r
-        jComboBoxPackageName = new JComboBox();\r
-        jComboBoxPackageName.setBounds(new java.awt.Rectangle(160, 10, 320, 20));\r
-        jComboBoxPackageName.setPreferredSize(new java.awt.Dimension(320, 20));\r
-        jComboBoxPackageName.setToolTipText("If your Module requires a package list that here.");\r
-        jComboBoxPackageName.addItemListener(this);\r
-      }\r
-      return jComboBoxPackageName;\r
+        if (jComboBoxPackageName == null) {\r
+            jComboBoxPackageName = new JComboBox();\r
+            jComboBoxPackageName.setBounds(new java.awt.Rectangle(160, 10, 320, 20));\r
+            jComboBoxPackageName.setPreferredSize(new java.awt.Dimension(320, 20));\r
+            jComboBoxPackageName.setToolTipText("If your Module requires a package list that here.");\r
+            jComboBoxPackageName.addItemListener(this);\r
+        }\r
+        return jComboBoxPackageName;\r
     }\r
 \r
     /**\r
@@ -126,23 +124,6 @@ public class PackageDepDlg extends IDialog implements ItemListener {
         return jTextFieldPackageGuid;\r
     }\r
 \r
-    /**\r
-     * This method initializes jButtonGenerateGuid\r
-     * \r
-     * @return javax.swing.JButton\r
-     */\r
-    private JButton getJButtonGenerateGuid() {\r
-        if (jButtonGenerateGuid == null) {\r
-            jButtonGenerateGuid = new JButton();\r
-            jButtonGenerateGuid.setBounds(new java.awt.Rectangle(415, 35, 65, 20));\r
-            jButtonGenerateGuid.setPreferredSize(new java.awt.Dimension(65, 20));\r
-            jButtonGenerateGuid.setText("GEN");\r
-            jButtonGenerateGuid.addActionListener(this);\r
-            jButtonGenerateGuid.setVisible(false);\r
-        }\r
-        return jButtonGenerateGuid;\r
-    }\r
-\r
     /**\r
      * This method initializes jTextFieldPackageVersion\r
      * \r
@@ -154,7 +135,11 @@ public class PackageDepDlg extends IDialog implements ItemListener {
             jTextFieldPackageVersion.setBounds(new java.awt.Rectangle(160, 35, 320, 20));\r
             jTextFieldPackageVersion.setPreferredSize(new java.awt.Dimension(320, 20));\r
             jTextFieldPackageVersion\r
-                                    .setToolTipText("If this module depends on a specific version of a package, enter the package version here.  If the module can use the latest version that does not break backward compatibility, leave this field blank");\r
+                                    .setToolTipText("<html>If this module depends on a specific version of a package, <br>" +\r
+                                            "enter the package version here.  <br>" +\r
+                                            "If the module can use the latest version <br>" +\r
+                                            "that does not break backward compatibility, <br>" +\r
+                                            "leave this field blank</html>");\r
         }\r
         return jTextFieldPackageVersion;\r
     }\r
@@ -281,36 +266,36 @@ public class PackageDepDlg extends IDialog implements ItemListener {
      */\r
     private JPanel getJContentPane() {\r
         if (jContentPane == null) {\r
-          jStarLabel1 = new StarLabel();\r
-          jStarLabel1.setLocation(new java.awt.Point(2, 10));\r
-          jLabelPackageName = new JLabel();\r
-          jLabelPackageName.setBounds(new java.awt.Rectangle(15, 10, 145, 20));\r
-          jLabelPackageName.setText("Package Name");\r
-\r
-          jLabelPackageVersion = new JLabel();\r
-          jLabelPackageVersion.setBounds(new java.awt.Rectangle(15, 35, 145, 20));\r
-          jLabelPackageVersion.setText("Package Version");\r
-\r
-          jLabelPackageGuid = new JLabel();\r
-          jLabelPackageGuid.setBounds(new java.awt.Rectangle(15, 35, 145, 20));\r
-          jLabelPackageGuid.setText("Package Guid");\r
-          jLabelPackageGuid.setVisible(false);\r
-\r
-          jLabelFeatureFlag = new JLabel();\r
-          jLabelFeatureFlag.setBounds(new java.awt.Rectangle(15, 60, 145, 20));\r
-          jLabelFeatureFlag.setText("Feature Flag Expression");\r
-\r
-          jLabelArch = new JLabel();\r
-          jLabelArch.setBounds(new java.awt.Rectangle(15, 85, 145, 20));\r
-          jLabelArch.setText("Supported Architectures");\r
-          jArchCheckBox = new ArchCheckBox();\r
-          jArchCheckBox.setBounds(new java.awt.Rectangle(160, 85, 320, 20));\r
-          jArchCheckBox.setPreferredSize(new java.awt.Dimension(320, 20));\r
+            jStarLabel1 = new StarLabel();\r
+            jStarLabel1.setLocation(new java.awt.Point(2, 10));\r
+            jLabelPackageName = new JLabel();\r
+            jLabelPackageName.setBounds(new java.awt.Rectangle(15, 10, 145, 20));\r
+            jLabelPackageName.setText("Package Name");\r
+\r
+            jLabelPackageVersion = new JLabel();\r
+            jLabelPackageVersion.setBounds(new java.awt.Rectangle(15, 35, 145, 20));\r
+            jLabelPackageVersion.setText("Package Version");\r
+\r
+            jLabelPackageGuid = new JLabel();\r
+            jLabelPackageGuid.setBounds(new java.awt.Rectangle(15, 35, 145, 20));\r
+            jLabelPackageGuid.setText("Package Guid");\r
+            jLabelPackageGuid.setVisible(false);\r
+\r
+            jLabelFeatureFlag = new JLabel();\r
+            jLabelFeatureFlag.setBounds(new java.awt.Rectangle(15, 60, 145, 20));\r
+            jLabelFeatureFlag.setText("Feature Flag Expression");\r
+\r
+            jLabelArch = new JLabel();\r
+            jLabelArch.setBounds(new java.awt.Rectangle(15, 85, 145, 20));\r
+            jLabelArch.setText("Supported Architectures");\r
+            jArchCheckBox = new ArchCheckBox();\r
+            jArchCheckBox.setBounds(new java.awt.Rectangle(160, 85, 320, 20));\r
+            jArchCheckBox.setPreferredSize(new java.awt.Dimension(320, 20));\r
 \r
             jContentPane = new JPanel();\r
             jContentPane.setLayout(null);\r
             jContentPane.setPreferredSize(new java.awt.Dimension(485, 145));\r
-            \r
+\r
             jContentPane.add(jStarLabel1, null);\r
             jContentPane.add(jLabelPackageName, null);\r
             jContentPane.add(getJComboBoxPackageName(), null);\r
@@ -378,12 +363,12 @@ public class PackageDepDlg extends IDialog implements ItemListener {
         //\r
         // Check PackageGuid\r
         //\r
-      // if (!isEmpty(this.jTextFieldPackageGuid.getText())) {\r
-// if (!DataValidation.isGuid(this.jTextFieldPackageGuid.getText())) {\r
-// Log.err("Incorrect data type for Package Guid");\r
-// return false;\r
-// }\r
-// }\r
+        // if (!isEmpty(this.jTextFieldPackageGuid.getText())) {\r
+        // if (!DataValidation.isGuid(this.jTextFieldPackageGuid.getText())) {\r
+        // Log.err("Incorrect data type for Package Guid");\r
+        // return false;\r
+        // }\r
+        // }\r
 \r
         //\r
         // Check PackageVersion\r
@@ -407,7 +392,6 @@ public class PackageDepDlg extends IDialog implements ItemListener {
 \r
         return true;\r
     }\r
-    \r
 \r
     private PackageDependenciesIdentification getCurrentPackageDependencies() {\r
         String arg0 = this.jComboBoxPackageName.getSelectedItem().toString();\r
index feb38c8..1e937e0 100644 (file)
@@ -46,394 +46,391 @@ import org.tianocore.frameworkwizard.workspace.WorkspaceTools;
  */\r
 public class PpisDlg extends IDialog implements ItemListener {\r
 \r
-  // /\r
-  // / Define class Serial Version UID\r
-  // /\r
-  private static final long serialVersionUID = -4284901202357037724L;\r
+    // /\r
+    // / Define class Serial Version UID\r
+    // /\r
+    private static final long serialVersionUID = -4284901202357037724L;\r
 \r
-  //\r
-  // Define class members\r
-  //\r
-  private JPanel jContentPane = null;\r
-\r
-  private JLabel jLabelC_Name = null;\r
-\r
-  private JComboBox jComboBoxCName = null;\r
+    //\r
+    // Define class members\r
+    //\r
+    private JPanel jContentPane = null;\r
 \r
-  private JTextField jTextFieldFeatureFlag = null;\r
+    private JLabel jLabelC_Name = null;\r
 \r
-  private JLabel jLabelFeatureFlag = null;\r
+    private JComboBox jComboBoxCName = null;\r
 \r
-  private JLabel jLabelUsage = null;\r
+    private JTextField jTextFieldFeatureFlag = null;\r
 \r
-  private JComboBox jComboBoxUsage = null;\r
+    private JLabel jLabelFeatureFlag = null;\r
 \r
-  private JLabel jLabelPpiType = null;\r
+    private JLabel jLabelUsage = null;\r
 \r
-  private StarLabel jStarLabel1 = null;\r
+    private JComboBox jComboBoxUsage = null;\r
 \r
-  private StarLabel jStarLabel2 = null;\r
+    private JLabel jLabelPpiType = null;\r
 \r
-  private StarLabel jStarLabel3 = null;\r
+    private StarLabel jStarLabel1 = null;\r
 \r
-  private JComboBox jComboBoxPpiType = null;\r
+    private StarLabel jStarLabel2 = null;\r
 \r
-  private JLabel jLabelArch = null;\r
+    private StarLabel jStarLabel3 = null;\r
 \r
-  private JScrollPane jScrollPane = null;\r
+    private JComboBox jComboBoxPpiType = null;\r
 \r
-  private JLabel jLabelHelpText = null;\r
+    private JLabel jLabelArch = null;\r
 \r
-  private JTextArea jTextAreaHelpText = null;\r
+    private JScrollPane jScrollPane = null;\r
 \r
-  private JScrollPane jScrollPaneHelpText = null;\r
+    private JLabel jLabelHelpText = null;\r
 \r
-  private ArchCheckBox jArchCheckBox = null;\r
+    private JTextArea jTextAreaHelpText = null;\r
 \r
-  private JButton jButtonOk = null;\r
+    private JScrollPane jScrollPaneHelpText = null;\r
 \r
-  private JButton jButtonCancel = null;\r
+    private ArchCheckBox jArchCheckBox = null;\r
 \r
-  //\r
-  // Not used by UI\r
-  //\r
-  private PpisIdentification id = null;\r
+    private JButton jButtonOk = null;\r
 \r
-  private WorkspaceTools wt = new WorkspaceTools();\r
+    private JButton jButtonCancel = null;\r
 \r
-  private EnumerationData ed = new EnumerationData();\r
+    //\r
+    // Not used by UI\r
+    //\r
+    private PpisIdentification id = null;\r
+\r
+    private WorkspaceTools wt = new WorkspaceTools();\r
+\r
+    private EnumerationData ed = new EnumerationData();\r
+\r
+    /**\r
+     * This method initializes jComboBoxPpiType\r
+     * \r
+     * @return javax.swing.JComboBox\r
+     */\r
+    private JComboBox getJComboBoxPpiType() {\r
+        if (jComboBoxPpiType == null) {\r
+            jComboBoxPpiType = new JComboBox();\r
+            jComboBoxPpiType.setBounds(new java.awt.Rectangle(160, 10, 320, 20));\r
+            jComboBoxPpiType.setPreferredSize(new java.awt.Dimension(320, 20));\r
+            jComboBoxPpiType.addItemListener(this);\r
+            jComboBoxPpiType\r
+                            .setToolTipText("<html>PPIs are named by GUID.<br>PPI Notify is consumed via a register PPI Notify mechanism");\r
+        }\r
+        return jComboBoxPpiType;\r
+    }\r
 \r
-  /**\r
-   * This method initializes jComboBoxPpiType\r
-   * \r
-   * @return javax.swing.JComboBox\r
-   */\r
-  private JComboBox getJComboBoxPpiType() {\r
-    if (jComboBoxPpiType == null) {\r
-      jComboBoxPpiType = new JComboBox();\r
-      jComboBoxPpiType.setBounds(new java.awt.Rectangle(160, 10, 320, 20));\r
-      jComboBoxPpiType.setPreferredSize(new java.awt.Dimension(320, 20));\r
-      jComboBoxPpiType.addItemListener(this);\r
-      jComboBoxPpiType.setToolTipText("<html>PPIs are named by GUID.<br>PPI Notify is consumed via a register PPI Notify mechanism");\r
+    /**\r
+     * This method initializes jTextFieldC_Name\r
+     * \r
+     * @return javax.swing.JTextField jTextFieldC_Name\r
+     * \r
+     */\r
+    private JComboBox getJComboBoxCName() {\r
+        if (jComboBoxCName == null) {\r
+            jComboBoxCName = new JComboBox();\r
+            jComboBoxCName.setBounds(new java.awt.Rectangle(160, 35, 320, 20));\r
+            jComboBoxCName.setPreferredSize(new java.awt.Dimension(320, 20));\r
+            jComboBoxCName.setToolTipText("Select Guid C Name of PPI");\r
+        }\r
+        return jComboBoxCName;\r
     }\r
-    return jComboBoxPpiType;\r
-  }\r
-\r
-  /**\r
-   * This method initializes jTextFieldC_Name\r
-   * \r
-   * @return javax.swing.JTextField jTextFieldC_Name\r
-   * \r
-   */\r
-  private JComboBox getJComboBoxCName() {\r
-    if (jComboBoxCName == null) {\r
-      jComboBoxCName = new JComboBox();\r
-      jComboBoxCName.setBounds(new java.awt.Rectangle(160, 35, 320, 20));\r
-      jComboBoxCName.setPreferredSize(new java.awt.Dimension(320, 20));\r
-      jComboBoxCName.setToolTipText("Select Guid C Name of PPI");\r
+\r
+    /**\r
+     * This method initializes jComboBoxUsage\r
+     * \r
+     * @return javax.swing.JComboBox jComboBoxUsage\r
+     * \r
+     */\r
+    private JComboBox getJComboBoxUsage() {\r
+        if (jComboBoxUsage == null) {\r
+            jComboBoxUsage = new JComboBox();\r
+            jComboBoxUsage.setBounds(new java.awt.Rectangle(160, 60, 320, 20));\r
+            jComboBoxUsage.setPreferredSize(new java.awt.Dimension(320, 20));\r
+            jComboBoxUsage\r
+                          .setToolTipText("<html><table><tr><td colspan=2 align=center><b>PPI</b></td></tr><tr><td>ALWAYS_CONSUMED</td><td>Module always consumes the PPI</td></tr><tr><td>SOMETIMES_CONSUMED</td><td>Module sometimes consumes the PPI</td></tr><tr><td>ALWAYS_PRODUCED</td><td>Module always produces the PPI</td></tr><tr><td>SOMETIMES_PRODUCED</td><td>Module sometimes produces the PPI</td></tr><tr><td colspan=2 align=center><b>PPI Notify</b></td></tr><tr><td>SOMETIMES_CONSUMED</td><td>Module will consume the PPI if it is produced. Consumption<br>is defined by executing the PPI notify function</td></tr></table></html>");\r
+        }\r
+        return jComboBoxUsage;\r
     }\r
-    return jComboBoxCName;\r
-  }\r
-\r
-  /**\r
-   * This method initializes jComboBoxUsage\r
-   * \r
-   * @return javax.swing.JComboBox jComboBoxUsage\r
-   * \r
-   */\r
-  private JComboBox getJComboBoxUsage() {\r
-    if (jComboBoxUsage == null) {\r
-      jComboBoxUsage = new JComboBox();\r
-      jComboBoxUsage.setBounds(new java.awt.Rectangle(160, 60, 320, 20));\r
-      jComboBoxUsage.setPreferredSize(new java.awt.Dimension(320, 20));\r
-      jComboBoxUsage.setToolTipText("<html><table><tr><td colspan=2 align=center><b>PPI</b></td></tr><tr><td>ALWAYS_CONSUMED</td><td>Module always consumes the PPI</td></tr><tr><td>SOMETIMES_CONSUMED</td><td>Module sometimes consumes the PPI</td></tr><tr><td>ALWAYS_PRODUCED</td><td>Module always produces the PPI</td></tr><tr><td>SOMETIMES_PRODUCED</td><td>Module sometimes produces the PPI</td></tr><tr><td colspan=2 align=center><b>PPI Notify</b></td></tr><tr><td>SOMETIMES_CONSUMED</td><td>Module will consume the PPI if it is produced. Consumption<br>is defined by executing the PPI notify function</td></tr></table></html>");\r
+\r
+    /**\r
+     * This method initializes jTextFieldFeatureFlag\r
+     * \r
+     * @return javax.swing.JTextField jTextFieldFeatureFlag\r
+     \r
+     */\r
+    private JTextField getJTextFieldFeatureFlag() {\r
+        if (jTextFieldFeatureFlag == null) {\r
+            jTextFieldFeatureFlag = new JTextField();\r
+            jTextFieldFeatureFlag.setBounds(new java.awt.Rectangle(160, 130, 320, 20));\r
+            jTextFieldFeatureFlag.setPreferredSize(new java.awt.Dimension(320, 20));\r
+            jTextFieldFeatureFlag.setToolTipText("Postfix expression that must evaluate to TRUE or FALSE");\r
+        }\r
+        return jTextFieldFeatureFlag;\r
     }\r
-    return jComboBoxUsage;\r
-  }\r
-\r
-  /**\r
-   * This method initializes jTextFieldFeatureFlag\r
-   * \r
-   * @return javax.swing.JTextField jTextFieldFeatureFlag\r
-   * \r
-   */\r
-  private JTextField getJTextFieldFeatureFlag() {\r
-    if (jTextFieldFeatureFlag == null) {\r
-      jTextFieldFeatureFlag = new JTextField();\r
-      jTextFieldFeatureFlag\r
-          .setBounds(new java.awt.Rectangle(160, 130, 320, 20));\r
-      jTextFieldFeatureFlag.setPreferredSize(new java.awt.Dimension(320, 20));\r
-      jTextFieldFeatureFlag\r
-          .setToolTipText("Postfix expression that must evaluate to TRUE or FALSE");\r
+\r
+    /**\r
+     * This method initializes jScrollPane\r
+     * \r
+     * @return javax.swing.JScrollPane\r
+     */\r
+    private JScrollPane getJScrollPane() {\r
+        if (jScrollPane == null) {\r
+            jScrollPane = new JScrollPane();\r
+            jScrollPane.setViewportView(getJContentPane());\r
+        }\r
+        return jScrollPane;\r
     }\r
-    return jTextFieldFeatureFlag;\r
-  }\r
-\r
-  /**\r
-   * This method initializes jScrollPane\r
-   * \r
-   * @return javax.swing.JScrollPane\r
-   */\r
-  private JScrollPane getJScrollPane() {\r
-    if (jScrollPane == null) {\r
-      jScrollPane = new JScrollPane();\r
-      jScrollPane.setViewportView(getJContentPane());\r
+\r
+    /**\r
+     * This method initializes jTextAreaHelpText\r
+     * \r
+     * @return javax.swing.JTextArea\r
+     * \r
+     */\r
+    private JTextArea getJTextAreaHelpText() {\r
+        if (jTextAreaHelpText == null) {\r
+            jTextAreaHelpText = new JTextArea();\r
+            jTextAreaHelpText.setLineWrap(true);\r
+            jTextAreaHelpText.setWrapStyleWord(true);\r
+        }\r
+        return jTextAreaHelpText;\r
     }\r
-    return jScrollPane;\r
-  }\r
-\r
-  /**\r
-   * This method initializes jTextAreaHelpText\r
-   * \r
-   * @return javax.swing.JTextArea\r
-   * \r
-   */\r
-  private JTextArea getJTextAreaHelpText() {\r
-    if (jTextAreaHelpText == null) {\r
-      jTextAreaHelpText = new JTextArea();\r
-      jTextAreaHelpText.setLineWrap(true);\r
-      jTextAreaHelpText.setWrapStyleWord(true);\r
+\r
+    /**\r
+     * This method initializes jScrollPaneHelpText\r
+     * \r
+     * @return javax.swing.JScrollPane\r
+     * \r
+     */\r
+    private JScrollPane getJScrollPaneHelpText() {\r
+        if (jScrollPaneHelpText == null) {\r
+            jScrollPaneHelpText = new JScrollPane();\r
+            jScrollPaneHelpText.setHorizontalScrollBarPolicy(javax.swing.JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);\r
+            jScrollPaneHelpText.setSize(new java.awt.Dimension(320, 40));\r
+            jScrollPaneHelpText.setPreferredSize(new java.awt.Dimension(320, 40));\r
+            jScrollPaneHelpText.setLocation(new java.awt.Point(160, 85));\r
+            jScrollPaneHelpText.setViewportView(getJTextAreaHelpText());\r
+        }\r
+        return jScrollPaneHelpText;\r
     }\r
-    return jTextAreaHelpText;\r
-  }\r
-\r
-  /**\r
-   * This method initializes jScrollPaneHelpText\r
-   * \r
-   * @return javax.swing.JScrollPane\r
-   * \r
-   */\r
-  private JScrollPane getJScrollPaneHelpText() {\r
-    if (jScrollPaneHelpText == null) {\r
-      jScrollPaneHelpText = new JScrollPane();\r
-      jScrollPaneHelpText\r
-          .setHorizontalScrollBarPolicy(javax.swing.JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);\r
-      jScrollPaneHelpText.setSize(new java.awt.Dimension(320, 40));\r
-      jScrollPaneHelpText.setPreferredSize(new java.awt.Dimension(320, 40));\r
-      jScrollPaneHelpText.setLocation(new java.awt.Point(160, 85));\r
-      jScrollPaneHelpText.setViewportView(getJTextAreaHelpText());\r
+\r
+    /**\r
+     * This method initializes jButtonOk\r
+     * \r
+     * @return javax.swing.JButton\r
+     * \r
+     */\r
+    private JButton getJButtonOk() {\r
+        if (jButtonOk == null) {\r
+            jButtonOk = new JButton();\r
+            jButtonOk.setBounds(new java.awt.Rectangle(290, 182, 90, 20));\r
+            jButtonOk.setText("Ok");\r
+            jButtonOk.addActionListener(this);\r
+        }\r
+        return jButtonOk;\r
     }\r
-    return jScrollPaneHelpText;\r
-  }\r
-\r
-  /**\r
-   * This method initializes jButtonOk\r
-   * \r
-   * @return javax.swing.JButton\r
-   * \r
-   */\r
-  private JButton getJButtonOk() {\r
-    if (jButtonOk == null) {\r
-      jButtonOk = new JButton();\r
-      jButtonOk.setBounds(new java.awt.Rectangle(290, 182, 90, 20));\r
-      jButtonOk.setText("Ok");\r
-      jButtonOk.addActionListener(this);\r
+\r
+    /**\r
+     * This method initializes jButtonCancel\r
+     * \r
+     * @return javax.swing.JButton\r
+     \r
+     */\r
+    private JButton getJButtonCancel() {\r
+        if (jButtonCancel == null) {\r
+            jButtonCancel = new JButton();\r
+            jButtonCancel.setBounds(new java.awt.Rectangle(390, 182, 90, 20));\r
+            jButtonCancel.setText("Cancel");\r
+            jButtonCancel.addActionListener(this);\r
+        }\r
+        return jButtonCancel;\r
     }\r
-    return jButtonOk;\r
-  }\r
-\r
-  /**\r
-   * This method initializes jButtonCancel\r
-   * \r
-   * @return javax.swing.JButton\r
-   * \r
-   */\r
-  private JButton getJButtonCancel() {\r
-    if (jButtonCancel == null) {\r
-      jButtonCancel = new JButton();\r
-      jButtonCancel.setBounds(new java.awt.Rectangle(390, 182, 90, 20));\r
-      jButtonCancel.setText("Cancel");\r
-      jButtonCancel.addActionListener(this);\r
+\r
+    public static void main(String[] args) {\r
+\r
     }\r
-    return jButtonCancel;\r
-  }\r
-\r
-  public static void main(String[] args) {\r
-\r
-  }\r
-\r
-  /**\r
-   * This method initializes this\r
-   * \r
-   */\r
-  private void init() {\r
-    this.setSize(500, 255);\r
-    this.setContentPane(getJScrollPane());\r
-    this.setTitle("PPI Definitions");\r
-    initFrame();\r
-    this.centerWindow();\r
-  }\r
-\r
-  /**\r
-   * This method initializes this Fill values to all fields if these values are\r
-   * not empty\r
-   * \r
-   * @param inProtocolsId\r
-   * \r
-   */\r
-  private void init(PpisIdentification inPpisId) {\r
-    init();\r
-    this.id = inPpisId;\r
-\r
-    if (this.id != null) {\r
-      this.jComboBoxCName.setSelectedItem(id.getName());\r
-      this.jComboBoxPpiType.setSelectedItem(id.getType());\r
-      this.jComboBoxUsage.setSelectedItem(id.getUsage());\r
-      this.jTextAreaHelpText.setText(id.getHelp());\r
-      this.jTextFieldFeatureFlag.setText(id.getFeatureFlag());\r
-      this.jArchCheckBox.setSelectedItems(id.getSupArchList());\r
+\r
+    /**\r
+     * This method initializes this\r
+     * \r
+     */\r
+    private void init() {\r
+        this.setSize(500, 255);\r
+        this.setContentPane(getJScrollPane());\r
+        this.setTitle("PPI Definitions");\r
+        initFrame();\r
+        this.centerWindow();\r
     }\r
-  }\r
-\r
-  /**\r
-   * This is the override edit constructor\r
-   * \r
-   * @param inProtocolsIdentification\r
-   * @param iFrame\r
-   * \r
-   */\r
-  public PpisDlg(PpisIdentification inPpisIdentification, IFrame iFrame) {\r
-    super(iFrame, true);\r
-    init(inPpisIdentification);\r
-  }\r
-\r
-  /**\r
-   * This method initializes jContentPane\r
-   * \r
-   * @return javax.swing.JPanel jContentPane\r
-   * \r
-   */\r
-  private JPanel getJContentPane() {\r
-    if (jContentPane == null) {\r
-      jStarLabel1 = new StarLabel();\r
-      jStarLabel1.setLocation(new java.awt.Point(2, 10));\r
-      jLabelPpiType = new JLabel();\r
-      jLabelPpiType.setBounds(new java.awt.Rectangle(15, 10, 145, 20));\r
-      jLabelPpiType.setText("Select Ppi Type");\r
-\r
-      jStarLabel2 = new StarLabel();\r
-      jStarLabel2.setLocation(new java.awt.Point(2, 35));\r
-      jLabelC_Name = new JLabel();\r
-      jLabelC_Name.setText("PPI GUID C Name");\r
-      jLabelC_Name.setBounds(new java.awt.Rectangle(15, 35, 145, 20));\r
-\r
-      jStarLabel3 = new StarLabel();\r
-      jStarLabel3.setLocation(new java.awt.Point(2, 60));\r
-      jLabelUsage = new JLabel();\r
-      jLabelUsage.setText("Usage");\r
-      jLabelUsage.setBounds(new java.awt.Rectangle(15, 60, 145, 20));\r
-\r
-      jLabelHelpText = new JLabel();\r
-      jLabelHelpText.setBounds(new java.awt.Rectangle(14, 85, 145, 20));\r
-      jLabelHelpText.setText("Help Text");\r
-\r
-      jLabelFeatureFlag = new JLabel();\r
-      jLabelFeatureFlag.setText("Feature Flag Expression");\r
-      jLabelFeatureFlag.setBounds(new java.awt.Rectangle(15, 130, 145, 20));\r
-\r
-      jLabelArch = new JLabel();\r
-      jLabelArch.setBounds(new java.awt.Rectangle(15, 155, 145, 20));\r
-      jLabelArch.setText("Supported Architectures");\r
-      jArchCheckBox = new ArchCheckBox();\r
-      jArchCheckBox.setBounds(new java.awt.Rectangle(160, 155, 320, 20));\r
-      jArchCheckBox.setPreferredSize(new java.awt.Dimension(320, 20));\r
-\r
-      jContentPane = new JPanel();\r
-      jContentPane.setLayout(null);\r
-      jContentPane.setPreferredSize(new java.awt.Dimension(485, 210));\r
-\r
-      jContentPane.add(jStarLabel1, null);\r
-      jContentPane.add(jLabelPpiType, null);\r
-      jContentPane.add(getJComboBoxPpiType(), null);\r
-      jContentPane.add(jStarLabel2, null);\r
-      jContentPane.add(jLabelC_Name, null);\r
-      jContentPane.add(getJComboBoxCName(), null);\r
-      jContentPane.add(jStarLabel3, null);\r
-      jContentPane.add(jLabelUsage, null);\r
-      jContentPane.add(getJComboBoxUsage(), null);\r
-      jContentPane.add(jLabelHelpText, null);\r
-      jContentPane.add(getJScrollPaneHelpText(), null);\r
-      jContentPane.add(jLabelFeatureFlag, null);\r
-      jContentPane.add(getJTextFieldFeatureFlag(), null);\r
-      jContentPane.add(jLabelArch, null);\r
-      jContentPane.add(jArchCheckBox, null);\r
-      jContentPane.add(getJButtonOk(), null);\r
-      jContentPane.add(getJButtonCancel(), null);\r
+\r
+    /**\r
+     * This method initializes this Fill values to all fields if these values are\r
+     * not empty\r
+     * \r
+     * @param inProtocolsId\r
+     * \r
+     */\r
+    private void init(PpisIdentification inPpisId) {\r
+        init();\r
+        this.id = inPpisId;\r
+\r
+        if (this.id != null) {\r
+            this.jComboBoxCName.setSelectedItem(id.getName());\r
+            this.jComboBoxPpiType.setSelectedItem(id.getType());\r
+            this.jComboBoxUsage.setSelectedItem(id.getUsage());\r
+            this.jTextAreaHelpText.setText(id.getHelp());\r
+            this.jTextFieldFeatureFlag.setText(id.getFeatureFlag());\r
+            this.jArchCheckBox.setSelectedItems(id.getSupArchList());\r
+        }\r
     }\r
-    return jContentPane;\r
-  }\r
-\r
-  /**\r
-   * This method initializes Usage type\r
-   * \r
-   */\r
-  private void initFrame() {\r
-    Tools.generateComboBoxByVector(jComboBoxCName, wt\r
-        .getAllPpiDeclarationsFromWorkspace());\r
-    Tools.generateComboBoxByVector(jComboBoxPpiType, ed.getVPpiType());\r
-    Tools.generateComboBoxByVector(jComboBoxUsage, ed.getVPpiUsage());\r
-  }\r
-\r
-  /*\r
-   * (non-Javadoc)\r
-   * \r
-   * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)\r
-   * \r
-   * Override actionPerformed to listen all actions\r
-   * \r
-   */\r
-  public void actionPerformed(ActionEvent arg0) {\r
-    if (arg0.getSource() == jButtonOk) {\r
-      if (checkAdd()) {\r
-        getCurrentPpis();\r
-        this.returnType = DataType.RETURN_TYPE_OK;\r
-        this.setVisible(false);\r
-      }\r
+\r
+    /**\r
+     * This is the override edit constructor\r
+     * \r
+     * @param inProtocolsIdentification\r
+     * @param iFrame\r
+     * \r
+     */\r
+    public PpisDlg(PpisIdentification inPpisIdentification, IFrame iFrame) {\r
+        super(iFrame, true);\r
+        init(inPpisIdentification);\r
     }\r
 \r
-    if (arg0.getSource() == jButtonCancel) {\r
-      this.returnType = DataType.RETURN_TYPE_CANCEL;\r
-      this.setVisible(false);\r
+    /**\r
+     * This method initializes jContentPane\r
+     * \r
+     * @return javax.swing.JPanel jContentPane\r
+     * \r
+     */\r
+    private JPanel getJContentPane() {\r
+        if (jContentPane == null) {\r
+            jStarLabel1 = new StarLabel();\r
+            jStarLabel1.setLocation(new java.awt.Point(2, 10));\r
+            jLabelPpiType = new JLabel();\r
+            jLabelPpiType.setBounds(new java.awt.Rectangle(15, 10, 145, 20));\r
+            jLabelPpiType.setText("Select Ppi Type");\r
+\r
+            jStarLabel2 = new StarLabel();\r
+            jStarLabel2.setLocation(new java.awt.Point(2, 35));\r
+            jLabelC_Name = new JLabel();\r
+            jLabelC_Name.setText("PPI GUID C Name");\r
+            jLabelC_Name.setBounds(new java.awt.Rectangle(15, 35, 145, 20));\r
+\r
+            jStarLabel3 = new StarLabel();\r
+            jStarLabel3.setLocation(new java.awt.Point(2, 60));\r
+            jLabelUsage = new JLabel();\r
+            jLabelUsage.setText("Usage");\r
+            jLabelUsage.setBounds(new java.awt.Rectangle(15, 60, 145, 20));\r
+\r
+            jLabelHelpText = new JLabel();\r
+            jLabelHelpText.setBounds(new java.awt.Rectangle(14, 85, 145, 20));\r
+            jLabelHelpText.setText("Help Text");\r
+\r
+            jLabelFeatureFlag = new JLabel();\r
+            jLabelFeatureFlag.setText("Feature Flag Expression");\r
+            jLabelFeatureFlag.setBounds(new java.awt.Rectangle(15, 130, 145, 20));\r
+\r
+            jLabelArch = new JLabel();\r
+            jLabelArch.setBounds(new java.awt.Rectangle(15, 155, 145, 20));\r
+            jLabelArch.setText("Supported Architectures");\r
+            jArchCheckBox = new ArchCheckBox();\r
+            jArchCheckBox.setBounds(new java.awt.Rectangle(160, 155, 320, 20));\r
+            jArchCheckBox.setPreferredSize(new java.awt.Dimension(320, 20));\r
+\r
+            jContentPane = new JPanel();\r
+            jContentPane.setLayout(null);\r
+            jContentPane.setPreferredSize(new java.awt.Dimension(485, 210));\r
+\r
+            jContentPane.add(jStarLabel1, null);\r
+            jContentPane.add(jLabelPpiType, null);\r
+            jContentPane.add(getJComboBoxPpiType(), null);\r
+            jContentPane.add(jStarLabel2, null);\r
+            jContentPane.add(jLabelC_Name, null);\r
+            jContentPane.add(getJComboBoxCName(), null);\r
+            jContentPane.add(jStarLabel3, null);\r
+            jContentPane.add(jLabelUsage, null);\r
+            jContentPane.add(getJComboBoxUsage(), null);\r
+            jContentPane.add(jLabelHelpText, null);\r
+            jContentPane.add(getJScrollPaneHelpText(), null);\r
+            jContentPane.add(jLabelFeatureFlag, null);\r
+            jContentPane.add(getJTextFieldFeatureFlag(), null);\r
+            jContentPane.add(jLabelArch, null);\r
+            jContentPane.add(jArchCheckBox, null);\r
+            jContentPane.add(getJButtonOk(), null);\r
+            jContentPane.add(getJButtonCancel(), null);\r
+        }\r
+        return jContentPane;\r
     }\r
-  }\r
-\r
-  /**\r
-   * Data validation for all fields\r
-   * \r
-   * @retval true - All datas are valid\r
-   * @retval false - At least one data is invalid\r
-   * \r
-   */\r
-  public boolean checkAdd() {\r
-    //\r
-    // Check if all fields have correct data types\r
-    //\r
 \r
-    //\r
-    // Check Name\r
-    //\r
-    if (!isEmpty(this.jComboBoxCName.getSelectedItem().toString())) {\r
-      if (!DataValidation.isC_NameType(this.jComboBoxCName.getSelectedItem()\r
-          .toString())) {\r
-        Log.wrn("Update Ppis", "Incorrect data type for Ppi/PpiNotify Name");\r
-        return false;\r
-      }\r
+    /**\r
+     * This method initializes Usage type\r
+     * \r
+     */\r
+    private void initFrame() {\r
+        Tools.generateComboBoxByVector(jComboBoxCName, wt.getAllPpiDeclarationsFromWorkspace());\r
+        Tools.generateComboBoxByVector(jComboBoxPpiType, ed.getVPpiType());\r
+        Tools.generateComboBoxByVector(jComboBoxUsage, ed.getVPpiUsage());\r
     }\r
 \r
-    //\r
-    // Check FeatureFlag\r
-    //\r
-    if (!isEmpty(this.jTextFieldFeatureFlag.getText())) {\r
-      if (!DataValidation.isFeatureFlag(this.jTextFieldFeatureFlag.getText())) {\r
-        Log.wrn("Update Ppis", "Incorrect data type for Feature Flag");\r
-        return false;\r
-      }\r
+    /*\r
+     * (non-Javadoc)\r
+     * \r
+     * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)\r
+     * \r
+     * Override actionPerformed to listen all actions\r
+     * \r
+     */\r
+    public void actionPerformed(ActionEvent arg0) {\r
+        if (arg0.getSource() == jButtonOk) {\r
+            if (checkAdd()) {\r
+                getCurrentPpis();\r
+                this.returnType = DataType.RETURN_TYPE_OK;\r
+                this.setVisible(false);\r
+            }\r
+        }\r
+\r
+        if (arg0.getSource() == jButtonCancel) {\r
+            this.returnType = DataType.RETURN_TYPE_CANCEL;\r
+            this.setVisible(false);\r
+        }\r
     }\r
 \r
-    return true;\r
-  }\r
+    /**\r
+     * Data validation for all fields\r
+     * \r
+     * @retval true - All datas are valid\r
+     * @retval false - At least one data is invalid\r
+     * \r
+     */\r
+    public boolean checkAdd() {\r
+        //\r
+        // Check if all fields have correct data types\r
+        //\r
+\r
+        //\r
+        // Check Name\r
+        //\r
+        if (!isEmpty(this.jComboBoxCName.getSelectedItem().toString())) {\r
+            if (!DataValidation.isC_NameType(this.jComboBoxCName.getSelectedItem().toString())) {\r
+                Log.wrn("Update Ppis", "Incorrect data type for Ppi/PpiNotify Name");\r
+                return false;\r
+            }\r
+        }\r
+\r
+        //\r
+        // Check FeatureFlag\r
+        //\r
+        if (!isEmpty(this.jTextFieldFeatureFlag.getText())) {\r
+            if (!DataValidation.isFeatureFlag(this.jTextFieldFeatureFlag.getText())) {\r
+                Log.wrn("Update Ppis", "Incorrect data type for Feature Flag");\r
+                return false;\r
+            }\r
+        }\r
+\r
+        return true;\r
+    }\r
 \r
-private PpisIdentification getCurrentPpis() {\r
+    private PpisIdentification getCurrentPpis() {\r
         String arg0 = this.jComboBoxCName.getSelectedItem().toString();\r
         String arg1 = this.jComboBoxPpiType.getSelectedItem().toString();\r
         String arg2 = this.jComboBoxUsage.getSelectedItem().toString();\r
@@ -444,32 +441,30 @@ private PpisIdentification getCurrentPpis() {
 \r
         id = new PpisIdentification(arg0, arg1, arg2, arg3, arg4, arg5);\r
         return id;\r
-    }  /*\r
-         * (non-Javadoc)\r
-         * \r
-         * @see java.awt.event.ItemListener#itemStateChanged(java.awt.event.ItemEvent)\r
-         * \r
-         * Reflesh the frame when selected item changed\r
-         * \r
-         */\r
-  public void itemStateChanged(ItemEvent arg0) {\r
-    if (arg0.getSource() == this.jComboBoxPpiType\r
-        && arg0.getStateChange() == ItemEvent.SELECTED) {\r
-      if (this.jComboBoxPpiType.getSelectedItem().toString().equals(\r
-          ed.getVPpiType().get(0))) {\r
-        Tools.generateComboBoxByVector(this.jComboBoxUsage, ed.getVPpiUsage());\r
-      } else {\r
-        Tools.generateComboBoxByVector(this.jComboBoxUsage, ed\r
-            .getVPpiNotifyUsage());\r
-      }\r
+    } /*\r
+     * (non-Javadoc)\r
+     * \r
+     * @see java.awt.event.ItemListener#itemStateChanged(java.awt.event.ItemEvent)\r
+     * \r
+     * Reflesh the frame when selected item changed\r
+     * \r
+     */\r
+\r
+    public void itemStateChanged(ItemEvent arg0) {\r
+        if (arg0.getSource() == this.jComboBoxPpiType && arg0.getStateChange() == ItemEvent.SELECTED) {\r
+            if (this.jComboBoxPpiType.getSelectedItem().toString().equals(ed.getVPpiType().get(0))) {\r
+                Tools.generateComboBoxByVector(this.jComboBoxUsage, ed.getVPpiUsage());\r
+            } else {\r
+                Tools.generateComboBoxByVector(this.jComboBoxUsage, ed.getVPpiNotifyUsage());\r
+            }\r
+        }\r
     }\r
-  }\r
 \r
-  public PpisIdentification getId() {\r
-    return id;\r
-  }\r
+    public PpisIdentification getId() {\r
+        return id;\r
+    }\r
 \r
-  public void setId(PpisIdentification id) {\r
-    this.id = id;\r
-  }\r
+    public void setId(PpisIdentification id) {\r
+        this.id = id;\r
+    }\r
 }\r
index 8b303de..8949551 100644 (file)
@@ -48,461 +48,449 @@ import org.tianocore.frameworkwizard.workspace.WorkspaceTools;
  */\r
 public class ProtocolsDlg extends IDialog implements ItemListener {\r
 \r
-  // /\r
-  // / Define class Serial Version UID\r
-  // /\r
-  private static final long serialVersionUID = -9084913640747858848L;\r
+    // /\r
+    // / Define class Serial Version UID\r
+    // /\r
+    private static final long serialVersionUID = -9084913640747858848L;\r
 \r
-  //\r
-  // Define class members\r
-  //\r
-  private JPanel jContentPane = null;\r
+    //\r
+    // Define class members\r
+    //\r
+    private JPanel jContentPane = null;\r
 \r
-  private JLabel jLabelC_Name = null;\r
+    private JLabel jLabelC_Name = null;\r
 \r
-  private JLabel jLabelFeatureFlag = null;\r
+    private JLabel jLabelFeatureFlag = null;\r
 \r
-  private JTextField jTextFieldFeatureFlag = null;\r
+    private JTextField jTextFieldFeatureFlag = null;\r
 \r
-  private JLabel jLabelUsage = null;\r
+    private JLabel jLabelUsage = null;\r
 \r
-  private JComboBox jComboBoxUsage = null;\r
+    private JComboBox jComboBoxUsage = null;\r
 \r
-  private StarLabel jStarLabel1 = null;\r
+    private StarLabel jStarLabel1 = null;\r
 \r
-  private StarLabel jStarLabel2 = null;\r
+    private StarLabel jStarLabel2 = null;\r
 \r
-  private StarLabel jStarLabel3 = null;\r
+    private StarLabel jStarLabel3 = null;\r
 \r
-  private JLabel jLabelProtocolType = null;\r
+    private JLabel jLabelProtocolType = null;\r
 \r
-  private JLabel jLabelArch = null;\r
+    private JLabel jLabelArch = null;\r
 \r
-  private JScrollPane jScrollPane = null;\r
+    private JScrollPane jScrollPane = null;\r
 \r
-  private JComboBox jComboBoxProtocolType = null;\r
+    private JComboBox jComboBoxProtocolType = null;\r
 \r
-  private JComboBox jComboBoxCName = null;\r
+    private JComboBox jComboBoxCName = null;\r
 \r
-  private JLabel jLabelHelpText = null;\r
+    private JLabel jLabelHelpText = null;\r
 \r
-  private JTextArea jTextAreaHelpText = null;\r
+    private JTextArea jTextAreaHelpText = null;\r
 \r
-  private JScrollPane jScrollPaneHelpText = null;\r
+    private JScrollPane jScrollPaneHelpText = null;\r
 \r
-  private ArchCheckBox jArchCheckBox = null;\r
+    private ArchCheckBox jArchCheckBox = null;\r
 \r
-  private JButton jButtonOk = null;\r
+    private JButton jButtonOk = null;\r
 \r
-  private JButton jButtonCancel = null;\r
+    private JButton jButtonCancel = null;\r
 \r
-  //\r
-  // Not used by UI\r
-  //\r
-  private ProtocolsIdentification id = null;\r
+    //\r
+    // Not used by UI\r
+    //\r
+    private ProtocolsIdentification id = null;\r
+\r
+    private WorkspaceTools wt = new WorkspaceTools();\r
+\r
+    private EnumerationData ed = new EnumerationData();\r
+\r
+    /**\r
+     * This method initializes jTextFieldFeatureFlag\r
+     * \r
+     * @return javax.swing.JTextField jTextFieldFeatureFlag\r
+     * \r
+     */\r
+    private JTextField getJTextFieldFeatureFlag() {\r
+        if (jTextFieldFeatureFlag == null) {\r
+            jTextFieldFeatureFlag = new JTextField();\r
+            jTextFieldFeatureFlag.setBounds(new java.awt.Rectangle(160, 130, 320, 20));\r
+            jTextFieldFeatureFlag.setPreferredSize(new java.awt.Dimension(320, 20));\r
+            jTextFieldFeatureFlag.setToolTipText("Postfix expression that must evaluate to TRUE or FALSE");\r
+        }\r
+        return jTextFieldFeatureFlag;\r
+    }\r
 \r
-  private WorkspaceTools wt = new WorkspaceTools();\r
+    /**\r
+     * This method initializes jComboBoxUsage\r
+     * \r
+     * @return javax.swing.JComboBox jComboBoxUsage\r
+     * \r
+     */\r
+    private JComboBox getJComboBoxProtocolUsage() {\r
+        if (jComboBoxUsage == null) {\r
+            jComboBoxUsage = new JComboBox();\r
+            jComboBoxUsage.setBounds(new java.awt.Rectangle(160, 60, 320, 20));\r
+            jComboBoxUsage.setPreferredSize(new java.awt.Dimension(320, 20));\r
+            jComboBoxUsage\r
+                          .setToolTipText("<html><table><tr><td colspan=2 align=center><b>Protocol</b></td></tr>"\r
+                                          + "<tr><td>ALWAYS_CONSUMED</td><td>Module always consumes the protocol</td></tr>"\r
+                                          + "<tr><td>SOMETIMES_CONSUMES</td><td>Module sometimes consumes the protocol</td></tr>"\r
+                                          + "<tr><td>ALWAYS_PRODUCED</td><td>Module always produces the protocol</td></tr>"\r
+                                          + "<tr><td>SOMETIMES_PRODUCED</td><td>Module sometimes produces the protocol</td></tr>"\r
+                                          + "<tr><td>TO_START</td><td>The protocol is consumed by a Driver Binding protocol <b>Start</b><br>function.  The