Fixed Absolute position of fields, Added ToolTipText and made HelpText a Scrolling...
authorlhauch <lhauch@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 28 Jul 2006 02:02:09 +0000 (02:02 +0000)
committerlhauch <lhauch@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 28 Jul 2006 02:02:09 +0000 (02:02 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1131 6f19259b-4bc3-4df7-8a09-765794883524

Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/HobsDlg.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/PCDsDlg.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/PpisDlg.java

index fb9381c..f6a76ee 100644 (file)
@@ -23,6 +23,7 @@ import javax.swing.JLabel;
 import javax.swing.JPanel;\r
 import javax.swing.JScrollPane;\r
 import javax.swing.JTextField;\r
+import javax.swing.JTextArea;\r
 \r
 import org.tianocore.frameworkwizard.common.DataType;\r
 import org.tianocore.frameworkwizard.common.DataValidation;\r
@@ -37,392 +38,433 @@ import org.tianocore.frameworkwizard.module.Identifications.Hobs.HobsIdentificat
 import org.tianocore.frameworkwizard.workspace.WorkspaceTools;\r
 \r
 /**\r
- The class is used to create, update Hob of MSA/MBD file\r
- It extends IInternalFrame\r
\r
- **/\r
+ * The class is used to create, update Hob of the MSA file It extends JDialog\r
+ * \r
+ */\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 jLabel = 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 JLabel jLabelArch = null;\r
+  private StarLabel jStarLabel2 = null;\r
 \r
-    private JScrollPane jScrollPane = null;\r
+  private StarLabel jStarLabel3 = null;\r
 \r
-    private JLabel jLabelFeatureFlag = null;\r
+  private JLabel jLabelArch = null;\r
 \r
-    private JTextField jTextFieldFeatureFlag = null;\r
+  private JScrollPane jScrollPane = null;\r
 \r
-    private JLabel jLabelHelpText = null;\r
+  private JLabel jLabelFeatureFlag = null;\r
 \r
-    private JTextField jTextFieldHelpText = null;\r
+  private JTextField jTextFieldFeatureFlag = null;\r
 \r
-    private ArchCheckBox jArchCheckBox = null;\r
+  private JLabel jLabelHelpText = null;\r
 \r
-    private JButton jButtonOk = null;\r
+  private JTextArea jTextAreaHelpText = null;\r
 \r
-    private JButton jButtonCancel = null;\r
+  private JScrollPane jScrollPaneHelpText = null;\r
 \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
+  private ArchCheckBox jArchCheckBox = null;\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
-        }\r
-        return jComboBoxUsage;\r
-    }\r
+  private JButton jButtonOk = null;\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
-        }\r
-        return jComboBoxHobType;\r
-    }\r
+  private JButton jButtonCancel = null;\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
+  //\r
+  // Not used by UI\r
+  //\r
+  private HobsIdentification id = null;\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, 110, 320, 20));\r
-            jTextFieldFeatureFlag.setPreferredSize(new java.awt.Dimension(320, 20));\r
-        }\r
-        return jTextFieldFeatureFlag;\r
-    }\r
+  private EnumerationData ed = new EnumerationData();\r
 \r
-    /**\r
-     This method initializes jTextFieldHelpText  \r
-     \r
-     @return javax.swing.JTextField  \r
-     \r
-     **/\r
-    private JTextField getJTextFieldHelpText() {\r
-        if (jTextFieldHelpText == null) {\r
-            jTextFieldHelpText = new JTextField();\r
-            jTextFieldHelpText.setBounds(new java.awt.Rectangle(160, 85, 320, 20));\r
-            jTextFieldHelpText.setPreferredSize(new java.awt.Dimension(320, 20));\r
-        }\r
-        return jTextFieldHelpText;\r
-    }\r
+  private WorkspaceTools wt = new WorkspaceTools();\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, 165, 90, 20));\r
-            jButtonOk.setText("Ok");\r
-            jButtonOk.addActionListener(this);\r
-        }\r
-        return jButtonOk;\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
-\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, 165, 90, 20));\r
-            jButtonCancel.setText("Cancel");\r
-            jButtonCancel.addActionListener(this);\r
-        }\r
-        return jButtonCancel;\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
-    public static void main(String[] args) {\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
-    /**\r
-     This method initializes this\r
-     \r
-     **/\r
-    private void init() {\r
-        this.setSize(510, 240);\r
-        this.setContentPane(getJScrollPane());\r
-        this.setTitle("Hobs");\r
-        initFrame();\r
-        this.setViewMode(false);\r
-        this.centerWindow();\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
-    /**\r
-     This method initializes this\r
-     Fill values to all fields if these values are 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.jTextFieldHelpText.setText(id.getHelp());\r
-            this.jTextFieldFeatureFlag.setText(id.getFeatureFlag());\r
-            this.jArchCheckBox.setSelectedItems(id.getSupArchList());\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
-    /**\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
+    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
-    /**\r
-     Disable all components when the mode is view\r
-     \r
-     @param isView 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
+    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
-\r
-    /**\r
-     This method initializes jContentPane\r
-     \r
-     @return javax.swing.JPanel jContentPane\r
-     \r
-     **/\r
-    public JPanel getJContentPane() {\r
-        if (jContentPane == null) {\r
-            jArchCheckBox = new ArchCheckBox();\r
-            jArchCheckBox.setBounds(new java.awt.Rectangle(160, 135, 320, 20));\r
-            jArchCheckBox.setPreferredSize(new java.awt.Dimension(320, 20));\r
-            jLabelFeatureFlag = new JLabel();\r
-            jLabelFeatureFlag.setBounds(new java.awt.Rectangle(15, 110, 140, 20));\r
-            jLabelFeatureFlag.setText("Feature Flag");\r
-            jLabelArch = new JLabel();\r
-            jLabelArch.setBounds(new java.awt.Rectangle(15, 135, 140, 20));\r
-            jLabelArch.setText("Arch");\r
-            jLabelHobType = new JLabel();\r
-            jLabelHobType.setText("Hob Type");\r
-            jLabelHobType.setBounds(new java.awt.Rectangle(15, 35, 140, 20));\r
-            jLabelUsage = new JLabel();\r
-            jLabelUsage.setText("Usage");\r
-            jLabelUsage.setBounds(new java.awt.Rectangle(15, 60, 140, 20));\r
-            jLabel = new JLabel();\r
-            jLabel.setText("Guid C Name");\r
-            jLabel.setBounds(new java.awt.Rectangle(15, 10, 140, 20));\r
-            jLabelHelpText = new JLabel();\r
-            jLabelHelpText.setBounds(new java.awt.Rectangle(14, 85, 140, 20));\r
-            jLabelHelpText.setText("Help Text");\r
-\r
-            jContentPane = new JPanel();\r
-            jContentPane.setLayout(null);\r
-            jContentPane.setPreferredSize(new java.awt.Dimension(490, 190));\r
-\r
-            jContentPane.add(jLabel, null);\r
-            jContentPane.add(getJComboBoxGuidC_Name(), null);\r
-            jContentPane.add(jLabelUsage, null);\r
-            jContentPane.add(jLabelHobType, null);\r
-            jContentPane.add(getJComboBoxUsage(), null);\r
-            jContentPane.add(getJComboBoxHobType(), null);\r
-            jStarLabel1 = new StarLabel();\r
-            jStarLabel1.setLocation(new java.awt.Point(0, 10));\r
-            jContentPane.add(jStarLabel1, null);\r
-\r
-            jContentPane.add(jLabelArch, null);\r
-\r
-            jContentPane.add(jLabelFeatureFlag, null);\r
-            jContentPane.add(getJTextFieldFeatureFlag(), null);\r
-            jContentPane.add(jLabelHelpText, null);\r
-            jContentPane.add(getJTextFieldHelpText(), null);\r
-            jContentPane.add(jArchCheckBox, null);\r
-            jContentPane.add(getJButtonOk(), null);\r
-            jContentPane.add(getJButtonCancel(), null);\r
-        }\r
-        return jContentPane;\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
-    /**\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
+    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
-    /* (non-Javadoc)\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
+    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
-    /**\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 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 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
+  /**\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
+\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
+\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
-    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
+    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
-        String arg3 = this.jTextFieldFeatureFlag.getText();\r
-        Vector<String> arg4 = this.jArchCheckBox.getSelectedItemsVector();\r
-        String arg5 = this.jTextFieldHelpText.getText();\r
-        id = new HobsIdentification(arg0, arg1, arg2, arg3, arg4, arg5);\r
-        return id;\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
-    public HobsIdentification getId() {\r
-        return id;\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
     }\r
 \r
-    public void setId(HobsIdentification id) {\r
-        this.id = id;\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
+  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
 }\r
index ecd4ee3..753b0e2 100644 (file)
@@ -40,495 +40,525 @@ import org.tianocore.frameworkwizard.module.Identifications.PcdCoded.PcdVector;
 import org.tianocore.frameworkwizard.workspace.WorkspaceTools;\r
 \r
 /**\r
- The class is used to create, update PCD of MSA/MBD file\r
It extends IInternalFrame\r
\r
- **/\r
+ * The class is used to create, update PCD of MSA/MBD file It extends\r
* IInternalFrame\r
+ * \r
+ */\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
+  // Define class members\r
+  //\r
+  private JPanel jContentPane = null;\r
 \r
-    private JLabel jLabelItemType = null;\r
+  private JLabel jLabelItemType = null;\r
 \r
-    private JLabel jLabelC_Name = null;\r
+  private JLabel jLabelC_Name = null;\r
 \r
-    private JComboBox jComboBoxItemType = null;\r
+  private JComboBox jComboBoxItemType = null;\r
 \r
-    private JComboBox jComboBoxCName = null;\r
+  private JComboBox jComboBoxCName = null;\r
 \r
-    private JLabel jLabelDefaultValue = null;\r
+  private JLabel jLabelDefaultValue = null;\r
 \r
-    private JTextField jTextFieldDefaultValue = null;\r
+  private JTextField jTextFieldDefaultValue = 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 jLabelHelpText = null;\r
+  private JLabel jLabelHelpText = null;\r
 \r
-    private JTextArea jTextAreaHelpText = null;\r
+  private JTextArea jTextAreaHelpText = null;\r
 \r
-    private JScrollPane jScrollPane = null;\r
+  private JScrollPane jScrollPane = null;\r
 \r
-    private JLabel jLabelTokenSpaceGuid = null;\r
+  private JLabel jLabelTokenSpaceGuid = null;\r
 \r
-    private JTextField jTextFieldTokenSpaceGuid = null;\r
+  private JTextField jTextFieldTokenSpaceGuid = 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 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
-    private JScrollPane jScrollPaneHelpText = null;\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
+  private JScrollPane jScrollPaneHelpText = null;\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
-            //jComboBoxCName.addActionListener(this);\r
-        }\r
-        return jComboBoxCName;\r
-    }\r
+  //\r
+  // Not used by UI\r
+  //\r
+  private PcdCodedIdentification id = null;\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
+  private WorkspaceTools wt = new WorkspaceTools();\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
-//            jTextAreaHelpText.setBounds(new java.awt.Rectangle(160, 85, 320, 20));\r
-//            jTextAreaHelpText.setPreferredSize(new java.awt.Dimension(320, 20));\r
-        }\r
-        return jTextAreaHelpText;\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
+  private PcdVector pcd = wt.getAllPcdDeclarationsFromWorkspace();\r
 \r
-      }\r
-      return jScrollPaneHelpText;\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
-\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
+    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
-    /**\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
+    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
-    /**\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
-            //jLabelFeatureFlag.setBounds(new  java.awt.Rectangle(15, 130, 140, 20));\r
-        }\r
-        return jTextFieldFeatureFlag;\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
-    /**\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, 185, 90, 20));\r
-            jButtonOk.setText("Ok");\r
-            jButtonOk.addActionListener(this);\r
-        }\r
-        return jButtonOk;\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
-    /**\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, 185, 90, 20));\r
-            jButtonCancel.setText("Cancel");\r
-            jButtonCancel.addActionListener(this);\r
-        }\r
-        return jButtonCancel;\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
-    public static void main(String[] args) {\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
-    /**\r
-     This method initializes this\r
-     \r
-     **/\r
-    private void init() {\r
-        this.setSize(508, 260);\r
-        this.setContentPane(getJScrollPane());\r
-        this.setTitle("Pcd Coded");\r
-        initFrame();\r
-        this.setViewMode(false);\r
-        this.centerWindow();\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
-    /**\r
-     This method initializes this\r
-     Fill values to all fields if these values are 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
+    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
-    /**\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
+    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
-    /**\r
-     Disable all components when the mode is view\r
-     \r
-     @param isView 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
+    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
-    /**\r
-     This method initializes jContentPane\r
-     \r
-     @return javax.swing.JPanel jContentPane\r
-     \r
-     **/\r
-    private JPanel getJContentPane() {\r
-        if (jContentPane == null) {\r
-            jArchCheckBox = new ArchCheckBox();\r
-            jArchCheckBox.setPreferredSize(new java.awt.Dimension(320, 20));\r
-            jLabelArch = new JLabel();\r
-            jLabelArch.setText("Sup Arch List");\r
-            jLabelFeatureFlag = new JLabel();\r
-            jLabelFeatureFlag.setText("Feature Flag");\r
-            jLabelTokenSpaceGuid = new JLabel();\r
-            jLabelTokenSpaceGuid.setText("Token Space C Name");\r
-            jLabelTokenSpaceGuid.setVisible(false);\r
-            jLabelHelpText = new JLabel();\r
-            jLabelHelpText.setText("Help Text");\r
-            jLabelC_Name = new JLabel();\r
-            jLabelC_Name.setText("C Name");\r
-            jLabelDefaultValue = new JLabel();\r
-            jLabelDefaultValue.setText("Default Value");\r
-            jLabelItemType = new JLabel();\r
-            jLabelItemType.setText("Item Type");\r
-\r
-            jLabelC_Name.setBounds(new       java.awt.Rectangle(15, 10, 140, 20));\r
-            jLabelItemType.setBounds(new     java.awt.Rectangle(15, 35, 140, 20));\r
-            jLabelDefaultValue.setBounds(new java.awt.Rectangle(15, 60, 140, 20));\r
-            jLabelHelpText.setBounds(new     java.awt.Rectangle(15, 85, 140, 20));\r
-            jLabelFeatureFlag.setBounds(new  java.awt.Rectangle(15, 130, 140, 20));\r
-            jLabelArch.setBounds(new java.awt.Rectangle(15, 155, 140, 20));\r
-\r
-            jArchCheckBox.setBounds(new      java.awt.Rectangle(160, 155, 320, 20));\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(490, 190));\r
-\r
-            jContentPane.add(jLabelItemType, null);\r
-            jContentPane.add(jLabelC_Name, null);\r
-            jContentPane.add(getJComboBoxCName(), null);\r
-            jContentPane.add(jLabelDefaultValue, null);\r
-            jContentPane.add(getJTextFieldDefaultValue(), null);\r
-            jContentPane.add(getJScrollPaneHelpText(), null);\r
-            jContentPane.add(getJComboBoxItemType(), null);\r
-            jStarLabel1 = new StarLabel();\r
-            jStarLabel1.setLocation(new java.awt.Point(0, 10));\r
-            jStarLabel2 = new StarLabel();\r
-            jStarLabel2.setLocation(new java.awt.Point(0, 35));\r
-            jStarLabel3 = new StarLabel();\r
-            jStarLabel3.setLocation(new java.awt.Point(0, 85));\r
-            jContentPane.add(jStarLabel1, null);\r
-            jContentPane.add(jStarLabel2, null);\r
-            jContentPane.add(jStarLabel3, null);\r
-            jContentPane.add(jLabelHelpText, null);\r
-//            jContentPane.add(getJTextFieldHelpText(), null);\r
-\r
-            jContentPane.add(jLabelTokenSpaceGuid, null);\r
-            jContentPane.add(getJTextFieldTokenSpaceGuid(), 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
+   * 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
-    /**\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
+   * 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
+  /**\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
-    /* (non-Javadoc)\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
+    // 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
 \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", "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
+    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
-    private PcdCodedIdentification getCurrentPcdCoded() {\r
-        String arg0 = this.jComboBoxCName.getSelectedItem().toString();\r
-        String arg1 = this.jTextFieldTokenSpaceGuid.getText();\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
 \r
-        String arg2 = this.jTextFieldFeatureFlag.getText();\r
-        Vector<String> arg3 = this.jArchCheckBox.getSelectedItemsVector();\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
 \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
+    // 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
     }\r
 \r
-    public PcdCodedIdentification getId() {\r
-        return id;\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
-    public void setId(PcdCodedIdentification id) {\r
-        this.id = id;\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
-    /* (non-Javadoc)\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 || isEmpty(pcd.getPcd(index).getHelp())) {\r
-                Log.wrn("select pcd entry when editing msa", "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
+    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
+  }\r
 }\r
index 4ad12ee..c4e4151 100644 (file)
@@ -25,6 +25,7 @@ import javax.swing.JLabel;
 import javax.swing.JPanel;\r
 import javax.swing.JScrollPane;\r
 import javax.swing.JTextField;\r
+import javax.swing.JTextArea;\r
 \r
 import org.tianocore.frameworkwizard.common.DataType;\r
 import org.tianocore.frameworkwizard.common.DataValidation;\r
@@ -39,394 +40,436 @@ import org.tianocore.frameworkwizard.module.Identifications.Ppis.PpisIdentificat
 import org.tianocore.frameworkwizard.workspace.WorkspaceTools;\r
 \r
 /**\r
- The class is used to create, update Ppi of MSA/MBD file\r
It extends IInternalFrame\r
\r
- **/\r
+ * The class is used to create, update Ppi of MSA/MBD file It extends\r
* IInternalFrame\r
+ * \r
+ */\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
+  // 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 jComboBoxCName = null;\r
+  private JComboBox jComboBoxCName = null;\r
 \r
-    private JTextField jTextFieldFeatureFlag = null;\r
+  private JTextField jTextFieldFeatureFlag = null;\r
 \r
-    private JLabel jLabelFeatureFlag = null;\r
+  private JLabel jLabelFeatureFlag = 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 JLabel jLabelPpiType = null;\r
+  private JLabel jLabelPpiType = 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 JComboBox jComboBoxPpiType = null;\r
+  private StarLabel jStarLabel3 = null;\r
 \r
-    private JLabel jLabelArch = null;\r
+  private JComboBox jComboBoxPpiType = 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 JTextField jTextFieldHelpText = 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
-\r
-    private WorkspaceTools wt = new WorkspaceTools();\r
-\r
-    private EnumerationData ed = new EnumerationData();\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
-        }\r
-        return jComboBoxCName;\r
-    }\r
+  private JButton jButtonOk = null;\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, 110, 320, 20));\r
-            jTextFieldFeatureFlag.setPreferredSize(new java.awt.Dimension(320, 20));\r
-        }\r
-        return jTextFieldFeatureFlag;\r
-    }\r
+  private JButton jButtonCancel = null;\r
 \r
-    /**\r
-     This method initializes jComboBox\r
-     \r
-     @return javax.swing.JComboBox jComboBoxUsage\r
-     \r
-     **/\r
-    private JComboBox getJComboBox() {\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
-        }\r
-        return jComboBoxUsage;\r
-    }\r
+  //\r
+  // Not used by UI\r
+  //\r
+  private PpisIdentification id = null;\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
-        }\r
-        return jComboBoxPpiType;\r
-    }\r
+  private WorkspaceTools wt = new WorkspaceTools();\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
+  private EnumerationData ed = new EnumerationData();\r
 \r
-    /**\r
-     This method initializes jTextFieldHelpText  \r
-     \r
-     @return javax.swing.JTextField  \r
-     \r
-     **/\r
-    private JTextField getJTextFieldHelpText() {\r
-        if (jTextFieldHelpText == null) {\r
-            jTextFieldHelpText = new JTextField();\r
-            jTextFieldHelpText.setBounds(new java.awt.Rectangle(160, 85, 320, 20));\r
-            jTextFieldHelpText.setPreferredSize(new java.awt.Dimension(320, 20));\r
-        }\r
-        return jTextFieldHelpText;\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
-\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, 165, 90, 20));\r
-            jButtonOk.setText("Ok");\r
-            jButtonOk.addActionListener(this);\r
-        }\r
-        return jButtonOk;\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
-    /**\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, 165, 90, 20));\r
-            jButtonCancel.setText("Cancel");\r
-            jButtonCancel.addActionListener(this);\r
-        }\r
-        return jButtonCancel;\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
-    public static void main(String[] args) {\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
-    /**\r
-     This method initializes this\r
-     \r
-     **/\r
-    private void init() {\r
-        this.setSize(510, 240);\r
-        this.setContentPane(getJScrollPane());\r
-        this.setTitle("Ppis");\r
-        initFrame();\r
-        this.centerWindow();\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
-    /**\r
-     This method initializes this\r
-     Fill values to all fields if these values are 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.jTextFieldHelpText.setText(id.getHelp());\r
-            this.jTextFieldFeatureFlag.setText(id.getFeatureFlag());\r
-            this.jArchCheckBox.setSelectedItems(id.getSupArchList());\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 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
+    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
-    /**\r
-     This method initializes jContentPane\r
-     \r
-     @return javax.swing.JPanel jContentPane\r
-     \r
-     **/\r
-    private JPanel getJContentPane() {\r
-        if (jContentPane == null) {\r
-            jArchCheckBox = new ArchCheckBox();\r
-            jArchCheckBox.setBounds(new java.awt.Rectangle(160, 135, 320, 20));\r
-            jArchCheckBox.setPreferredSize(new java.awt.Dimension(320, 20));\r
-            jLabelArch = new JLabel();\r
-            jLabelArch.setBounds(new java.awt.Rectangle(15, 135, 140, 20));\r
-            jLabelArch.setText("Arch");\r
-            jLabelPpiType = new JLabel();\r
-            jLabelPpiType.setBounds(new java.awt.Rectangle(15, 10, 140, 20));\r
-            jLabelPpiType.setText("Ppi Type");\r
-            jLabelUsage = new JLabel();\r
-            jLabelUsage.setText("Usage");\r
-            jLabelUsage.setBounds(new java.awt.Rectangle(15, 60, 140, 20));\r
-            jLabelFeatureFlag = new JLabel();\r
-            jLabelFeatureFlag.setText("Feature Flag");\r
-            jLabelFeatureFlag.setBounds(new java.awt.Rectangle(15, 110, 140, 20));\r
-            jLabelC_Name = new JLabel();\r
-            jLabelC_Name.setText("C Name Type");\r
-            jLabelC_Name.setBounds(new java.awt.Rectangle(15, 35, 140, 20));\r
-            jLabelHelpText = new JLabel();\r
-            jLabelHelpText.setBounds(new java.awt.Rectangle(14, 85, 140, 20));\r
-            jLabelHelpText.setText("Help Text");\r
-\r
-            jContentPane = new JPanel();\r
-            jContentPane.setLayout(null);\r
-            jContentPane.setPreferredSize(new java.awt.Dimension(490, 190));\r
-\r
-            jContentPane.add(jLabelC_Name, null);\r
-            jContentPane.add(getJComboBoxCName(), null);\r
-            jContentPane.add(getJTextFieldFeatureFlag(), null);\r
-            jContentPane.add(jLabelFeatureFlag, null);\r
-            jContentPane.add(jLabelUsage, null);\r
-            jContentPane.add(getJComboBox(), null);\r
-            jContentPane.add(getJComboBoxPpiType(), null);\r
-            jContentPane.add(jLabelArch, null);\r
-            jContentPane.add(jLabelPpiType, null);\r
-            jStarLabel1 = new StarLabel();\r
-            jStarLabel1.setBounds(new java.awt.Rectangle(0, 10, 10, 20));\r
-            jStarLabel2 = new StarLabel();\r
-            jStarLabel2.setBounds(new java.awt.Rectangle(0, 35, 10, 20));\r
-\r
-            jContentPane.add(jStarLabel1, null);\r
-            jContentPane.add(jStarLabel2, null);\r
-\r
-            jContentPane.add(jLabelHelpText, null);\r
-            jContentPane.add(getJTextFieldHelpText(), null);\r
-            jContentPane.add(jArchCheckBox, null);\r
-            jContentPane.add(getJButtonOk(), null);\r
-            jContentPane.add(getJButtonCancel(), null);\r
-        }\r
-        return jContentPane;\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
+    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
+    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
+\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("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");\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("Arch");\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
+   * 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
-    /**\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
+    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
-    /* (non-Javadoc)\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
+    // 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
 \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
+    // 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
-    private PpisIdentification getCurrentPpis() {\r
+    return true;\r
+  }\r
+\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
 \r
         String arg3 = this.jTextFieldFeatureFlag.getText();\r
         Vector<String> arg4 = this.jArchCheckBox.getSelectedItemsVector();\r
-        String arg5 = this.jTextFieldHelpText.getText();\r
+        String arg5 = this.jTextAreaHelpText.getText();\r
 \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
+  }\r
 \r
-    /* (non-Javadoc)\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 && 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
-    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