1. Fix EDKT273 "Externs are not being grouped together in MSA Files"
authorhche10x <hche10x@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 21 Sep 2006 01:07:28 +0000 (01:07 +0000)
committerhche10x <hche10x@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 21 Sep 2006 01:07:28 +0000 (01:07 +0000)
2. Fix EDKT274 "Wrong display in Extern when selecting "Specification"

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

Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/DataType.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/EnumerationData.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Tools.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/IDialog.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/IFrame.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/IInternalFrame.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/Externs/ExternsIdentification.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/Externs/ExternsVector.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleExterns.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/MsaHeader.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/ExternsDlg.java

index dcf3561..6f95ca4 100644 (file)
@@ -61,6 +61,10 @@ public class DataType {
     public static final String DOS_LINE_SEPARATOR = "\r\n";\r
 \r
     public static final String UNIX_LINE_SEPARATOR = "\n";\r
+    \r
+    public static final String LINE_SEPARATOR = UNIX_LINE_SEPARATOR;\r
+    \r
+    public static final String HTML_LINE_SEPARATOR = "<br>";\r
 \r
     public static final String EMPTY_SELECT_ITEM = "----";\r
 \r
index 99f4038..680bd65 100644 (file)
@@ -24,19 +24,23 @@ public class EnumerationData {
     \r
     public final static String EXTERNS_SPECIFICATION = "Specification";\r
     \r
+    public final static String EXTERNS_IMAGE = "Image";\r
     public final static String EXTERNS_MODULE_ENTRY_POINT = "ModuleEntryPoint";\r
     public final static String EXTERNS_MODULE_UNLOAD_IMAGE = "ModuleUnloadImage";\r
     \r
+    public final static String EXTERNS_LIBRARY = "Library";\r
     public final static String EXTERNS_CONSTRUCTOR = "Constructor";\r
     public final static String EXTERNS_DESTRUCTOR = "Destructor";\r
     \r
+    public final static String EXTERNS_DRIVER = "Driver";\r
     public final static String EXTERNS_DRIVER_BINDING = "DriverBinding";\r
     public final static String EXTERNS_COMPONENT_NAME = "ComponentName";\r
     public final static String EXTERNS_DRIVER_CONFIG = "DriverConfig";\r
     public final static String EXTERNS_DRIVER_DIAG = "DriverDiag";\r
     \r
-    public final static String EXTERNS_SET_VIRTUAL_ADDRESS_MAP_CALL_BACK = "SetVirtualAddressMapCallBack";\r
-    public final static String EXTERNS_EXIT_BOOT_SERVICES_CALL_BACK = "ExitBootServicesCallBack";\r
+    public final static String EXTERNS_CALL_BACK = "Call Back";\r
+    public final static String EXTERNS_VIRTUAL_ADDRESS_MAP_CALL_BACK = "VirtualAddressMap";\r
+    public final static String EXTERNS_EXIT_BOOT_SERVICES_CALL_BACK = "ExitBootServices";\r
     \r
     //\r
     // Common data\r
@@ -669,28 +673,33 @@ public class EnumerationData {
     private void initExternTypes() {\r
         vExternTypes.removeAllElements();\r
         \r
-        vExternTypes.addElement(EnumerationData.EXTERNS_PCD_IS_DRIVER);\r
-\r
         vExternTypes.addElement(EnumerationData.EXTERNS_SPECIFICATION);\r
+        vExternTypes.addElement(EnumerationData.EXTERNS_IMAGE);\r
+        vExternTypes.addElement(EnumerationData.EXTERNS_DRIVER);\r
+        vExternTypes.addElement(EnumerationData.EXTERNS_LIBRARY);\r
+        vExternTypes.addElement(EnumerationData.EXTERNS_CALL_BACK);\r
         \r
-        vExternTypes.addElement(EnumerationData.EXTERNS_MODULE_ENTRY_POINT);\r
-        vExternTypes.addElement(EnumerationData.EXTERNS_MODULE_UNLOAD_IMAGE);\r
-        \r
-        vExternTypes.addElement(EnumerationData.EXTERNS_CONSTRUCTOR);\r
-        vExternTypes.addElement(EnumerationData.EXTERNS_DESTRUCTOR);\r
-        \r
-        vExternTypes.addElement(EnumerationData.EXTERNS_DRIVER_BINDING);\r
-        vExternTypes.addElement(EnumerationData.EXTERNS_COMPONENT_NAME);\r
-        vExternTypes.addElement(EnumerationData.EXTERNS_DRIVER_CONFIG);\r
-        vExternTypes.addElement(EnumerationData.EXTERNS_DRIVER_DIAG);\r
+//        vExternTypes.addElement(EnumerationData.EXTERNS_PCD_IS_DRIVER);\r
+//\r
+//        vExternTypes.addElement(EnumerationData.EXTERNS_SPECIFICATION);\r
+//        \r
+//        vExternTypes.addElement(EnumerationData.EXTERNS_MODULE_ENTRY_POINT);\r
+//        vExternTypes.addElement(EnumerationData.EXTERNS_MODULE_UNLOAD_IMAGE);\r
+//        \r
+//        vExternTypes.addElement(EnumerationData.EXTERNS_CONSTRUCTOR);\r
+//        vExternTypes.addElement(EnumerationData.EXTERNS_DESTRUCTOR);\r
         \r
-        vExternTypes.addElement(EnumerationData.EXTERNS_SET_VIRTUAL_ADDRESS_MAP_CALL_BACK);\r
-        vExternTypes.addElement(EnumerationData.EXTERNS_EXIT_BOOT_SERVICES_CALL_BACK);\r
+//        vExternTypes.addElement(EnumerationData.EXTERNS_DRIVER_BINDING);\r
+//        vExternTypes.addElement(EnumerationData.EXTERNS_COMPONENT_NAME);\r
+//        vExternTypes.addElement(EnumerationData.EXTERNS_DRIVER_CONFIG);\r
+//        vExternTypes.addElement(EnumerationData.EXTERNS_DRIVER_DIAG);\r
+//        \r
+//        vExternTypes.addElement(EnumerationData.EXTERNS_SET_VIRTUAL_ADDRESS_MAP_CALL_BACK);\r
+//        vExternTypes.addElement(EnumerationData.EXTERNS_EXIT_BOOT_SERVICES_CALL_BACK);\r
     }\r
     \r
     private void initPcdDriverTypes() {\r
-        vPcdDriverTypes.removeAllElements();\r
-        vPcdDriverTypes.addElement(DataType.EMPTY_SELECT_ITEM);\r
+        vPcdDriverTypes.removeAllElements();        \r
         vPcdDriverTypes.addElement("PEI_PCD_DRIVER");\r
         vPcdDriverTypes.addElement("DXE_PCD_DRIVER");\r
     }\r
index 4b32baa..e6647d2 100644 (file)
@@ -632,4 +632,21 @@ public class Tools {
         count = wholeString.split(searchString).length;\r
         return count;\r
     }\r
+    \r
+    /**\r
+     * Check the input data is empty or not\r
+     * \r
+     * @param strValue\r
+     *            The input data which need be checked\r
+     * \r
+     * @retval true - The input data is empty\r
+     * @retval fals - The input data is not empty\r
+     * \r
+     */\r
+    public static boolean isEmpty(String strValue) {\r
+        if (strValue.length() > 0) {\r
+            return false;\r
+        }\r
+        return true;\r
+    }\r
 }\r
index 3272d20..1fc7c4c 100644 (file)
@@ -23,6 +23,7 @@ import java.awt.event.ActionListener;
 import javax.swing.JDialog;\r
 \r
 import org.tianocore.frameworkwizard.common.DataType;\r
+import org.tianocore.frameworkwizard.common.Tools;\r
 \r
 /**\r
  The class is used to override Dialog to provides customized interfaces\r
@@ -148,10 +149,7 @@ public class IDialog extends JDialog implements ActionListener {
      \r
      **/\r
     public boolean isEmpty(String strValue) {\r
-        if (strValue.length() > 0) {\r
-            return false;\r
-        }\r
-        return true;\r
+        return Tools.isEmpty(strValue);\r
     }\r
     \r
     /**\r
index 1988419..51f85d6 100644 (file)
@@ -27,6 +27,8 @@ import java.awt.event.WindowListener;
 import javax.swing.JFrame;\r
 import javax.swing.JOptionPane;\r
 \r
+import org.tianocore.frameworkwizard.common.Tools;\r
+\r
 /**\r
  The class is used to override Frame to provides customized interfaces \r
  It extends JFrame implements ActionListener and WindowListener\r
@@ -228,10 +230,7 @@ public class IFrame extends JFrame implements ActionListener, WindowListener, Co
     \r
     **/\r
    public boolean isEmpty(String strValue) {\r
-       if (strValue.length() > 0) {\r
-           return false;\r
-       }\r
-       return true;\r
+       return Tools.isEmpty(strValue);\r
    }\r
    \r
    /**\r
index df58142..f0d0186 100644 (file)
@@ -35,6 +35,8 @@ import javax.swing.event.ListSelectionListener;
 import javax.swing.event.TableModelEvent;\r
 import javax.swing.event.TableModelListener;\r
 \r
+import org.tianocore.frameworkwizard.common.Tools;\r
+\r
 /**\r
  * The class is used to override JInternalFrame to provides customized\r
  * interfaces It extends JInternalFrame implements ActionListener\r
@@ -124,10 +126,7 @@ public class IInternalFrame extends JInternalFrame implements ActionListener, Co
      * \r
      */\r
     public boolean isEmpty(String strValue) {\r
-        if (strValue.length() > 0) {\r
-            return false;\r
-        }\r
-        return true;\r
+        return Tools.isEmpty(strValue);\r
     }\r
 \r
     public void actionPerformed(ActionEvent arg0) {\r
index 59b85d7..31979ce 100644 (file)
@@ -17,40 +17,57 @@ package org.tianocore.frameworkwizard.module.Identifications.Externs;
 \r
 import java.util.Vector;\r
 \r
+import org.tianocore.frameworkwizard.common.EnumerationData;\r
+\r
 public class ExternsIdentification {\r
 \r
     //\r
     // Define class members\r
     //\r
-    private String name = null;\r
+    private String name0 = null;\r
+\r
+    private String name1 = null;\r
+\r
+    private String name2 = null;\r
+\r
+    private String name3 = null;\r
 \r
     private String type = null;\r
-    \r
+\r
     private Vector<String> supArchList = null;\r
 \r
     private String featureFlag = null;\r
 \r
-    public ExternsIdentification(String arg0, String arg1, String arg2, Vector<String> arg3) {\r
-        this.name = (arg0 == null ? "" : arg0);\r
+    public ExternsIdentification(String arg0, String arg1) {\r
+        this.name0 = (arg0 == null ? "" : arg0);\r
         this.type = (arg1 == null ? "" : arg1);\r
-        this.featureFlag = (arg2 == null ? "" : arg2);\r
-        this.supArchList = arg3;\r
     }\r
 \r
-    public String getFeatureFlag() {\r
-        return featureFlag;\r
+    public ExternsIdentification(String arg0, String arg1, String arg2, String arg3, Vector<String> arg4) {\r
+        this.name0 = (arg0 == null ? "" : arg0);\r
+        this.name1 = (arg1 == null ? "" : arg1);\r
+        this.type = (arg2 == null ? "" : arg2);\r
+        this.featureFlag = (arg3 == null ? "" : arg3);\r
+        this.supArchList = arg4;\r
     }\r
 \r
-    public void setFeatureFlag(String featureFlag) {\r
-        this.featureFlag = featureFlag;\r
+    public ExternsIdentification(String arg0, String arg1, String arg2, String arg3, String arg4, String arg5,\r
+                                 Vector<String> arg6) {\r
+        this.name0 = (arg0 == null ? "" : arg0);\r
+        this.name1 = (arg1 == null ? "" : arg1);\r
+        this.name2 = (arg2 == null ? "" : arg2);\r
+        this.name3 = (arg3 == null ? "" : arg3);\r
+        this.type = (arg4 == null ? "" : arg4);\r
+        this.featureFlag = (arg5 == null ? "" : arg5);\r
+        this.supArchList = arg6;\r
     }\r
 \r
-    public String getName() {\r
-        return name;\r
+    public String getFeatureFlag() {\r
+        return featureFlag;\r
     }\r
 \r
-    public void setName(String name) {\r
-        this.name = name;\r
+    public void setFeatureFlag(String featureFlag) {\r
+        this.featureFlag = featureFlag;\r
     }\r
 \r
     public Vector<String> getSupArchList() {\r
@@ -60,11 +77,36 @@ public class ExternsIdentification {
     public void setSupArchList(Vector<String> supArchList) {\r
         this.supArchList = supArchList;\r
     }\r
-    \r
+\r
     public boolean equals(ExternsIdentification pi) {\r
-        if (this.name.equals(pi.name)) {\r
-            return true;\r
+        if (this.type.equals(pi.type)) {\r
+            if (this.type.equals(EnumerationData.EXTERNS_SPECIFICATION)) {\r
+                if (this.name0.equals(pi.name0)) {\r
+                    return true;\r
+                }\r
+            }\r
+            if (this.type.equals(EnumerationData.EXTERNS_IMAGE)) {\r
+                if (this.name0.equals(pi.name0) && this.name1.equals(pi.name1)) {\r
+                    return true;\r
+                }\r
+            }\r
+            if (this.type.equals(EnumerationData.EXTERNS_LIBRARY)) {\r
+                if (this.name0.equals(pi.name0) && this.name1.equals(pi.name1)) {\r
+                    return true;\r
+                }\r
+            }\r
+            if (this.type.equals(EnumerationData.EXTERNS_CALL_BACK)) {\r
+                if (this.name0.equals(pi.name0) && this.name1.equals(pi.name1)) {\r
+                    return true;\r
+                }\r
+            }\r
+            if (this.type.equals(EnumerationData.EXTERNS_DRIVER)) {\r
+                if (this.name0.equals(pi.name0) && this.name1.equals(pi.name1) && this.name2.equals(pi.name2) && this.name3.equals(pi.name3)) {\r
+                    return true;\r
+                }\r
+            }\r
         }\r
+\r
         return false;\r
     }\r
 \r
@@ -75,4 +117,36 @@ public class ExternsIdentification {
     public void setType(String type) {\r
         this.type = type;\r
     }\r
+\r
+    public String getName0() {\r
+        return name0;\r
+    }\r
+\r
+    public void setName0(String name0) {\r
+        this.name0 = name0;\r
+    }\r
+\r
+    public String getName1() {\r
+        return name1;\r
+    }\r
+\r
+    public void setName1(String name1) {\r
+        this.name1 = name1;\r
+    }\r
+\r
+    public String getName2() {\r
+        return name2;\r
+    }\r
+\r
+    public void setName2(String name2) {\r
+        this.name2 = name2;\r
+    }\r
+\r
+    public String getName3() {\r
+        return name3;\r
+    }\r
+\r
+    public void setName3(String name3) {\r
+        this.name3 = name3;\r
+    }\r
 }\r
index 93b2507..dbc2035 100644 (file)
@@ -16,6 +16,7 @@ package org.tianocore.frameworkwizard.module.Identifications.Externs;
 \r
 import java.util.Vector;\r
 \r
+import org.tianocore.frameworkwizard.common.DataType;\r
 import org.tianocore.frameworkwizard.common.EnumerationData;\r
 \r
 public class ExternsVector {\r
@@ -31,15 +32,6 @@ public class ExternsVector {
         return -1;\r
     }\r
 \r
-    public int findExterns(String name) {\r
-        for (int index = 0; index < vExterns.size(); index++) {\r
-            if (vExterns.elementAt(index).getName().equals(name)) {\r
-                return index;\r
-            }\r
-        }\r
-        return -1;\r
-    }\r
-\r
     public ExternsIdentification getExterns(int index) {\r
         if (index > -1) {\r
             return vExterns.elementAt(index);\r
@@ -49,21 +41,7 @@ public class ExternsVector {
     }\r
 \r
     public void addExterns(ExternsIdentification arg0) {\r
-        boolean isExistPcd = false;\r
-        if (arg0.getType().equals(EnumerationData.EXTERNS_PCD_IS_DRIVER)) {\r
-            for (int index = 0; index < size(); index++) {\r
-                if (getExterns(index).getType().equals(EnumerationData.EXTERNS_PCD_IS_DRIVER)) {\r
-                    setExterns(arg0, index);\r
-                    isExistPcd = true;\r
-                    break;\r
-                }\r
-            }\r
-            if (!isExistPcd) {\r
-                vExterns.addElement(arg0);    \r
-            }\r
-        } else {\r
-            vExterns.addElement(arg0);\r
-        }\r
+        vExterns.addElement(arg0);\r
     }\r
 \r
     public void setExterns(ExternsIdentification arg0, int arg1) {\r
@@ -91,22 +69,106 @@ public class ExternsVector {
         vExterns = Externs;\r
     }\r
 \r
-    public Vector<String> getExternsName() {\r
-        Vector<String> v = new Vector<String>();\r
-        for (int index = 0; index < this.vExterns.size(); index++) {\r
-            v.addElement(vExterns.get(index).getName());\r
-        }\r
-        return v;\r
-    }\r
-\r
     public int size() {\r
         return this.vExterns.size();\r
     }\r
 \r
     public Vector<String> toStringVector(int index) {\r
         Vector<String> v = new Vector<String>();\r
-        v.addElement(getExterns(index).getName());\r
-        v.addElement(getExterns(index).getType());\r
+\r
+        //\r
+        // For Specification\r
+        //\r
+        if (this.getExterns(index).getType().equals(EnumerationData.EXTERNS_SPECIFICATION)) {\r
+            v.addElement(getExterns(index).getType());\r
+            v.addElement(getExterns(index).getType() + " Name");\r
+            v.addElement(getExterns(index).getName0());\r
+            return v;\r
+        }\r
+\r
+        //\r
+        // For Image\r
+        //\r
+        if (this.getExterns(index).getType().equals(EnumerationData.EXTERNS_IMAGE)) {\r
+            v.addElement(getExterns(index).getType());\r
+            String name = "";\r
+            String value = "";\r
+\r
+            name = EnumerationData.EXTERNS_MODULE_ENTRY_POINT;\r
+            value = this.getExterns(index).getName0();\r
+            name = name + DataType.HTML_LINE_SEPARATOR + EnumerationData.EXTERNS_MODULE_UNLOAD_IMAGE;\r
+            value = value + DataType.HTML_LINE_SEPARATOR + this.getExterns(index).getName1()\r
+                    + DataType.HTML_LINE_SEPARATOR;\r
+\r
+            v.addElement("<html>" + name + "<html>");\r
+            v.addElement("<html>" + value + "<html>");\r
+            return v;\r
+        }\r
+\r
+        //\r
+        // For Library\r
+        //\r
+        if (this.getExterns(index).getType().equals(EnumerationData.EXTERNS_LIBRARY)) {\r
+            v.addElement(getExterns(index).getType());\r
+            String name = "";\r
+            String value = "";\r
+\r
+            name = EnumerationData.EXTERNS_CONSTRUCTOR;\r
+            value = this.getExterns(index).getName0();\r
+            name = name + DataType.HTML_LINE_SEPARATOR + EnumerationData.EXTERNS_DESTRUCTOR;\r
+            value = value + DataType.HTML_LINE_SEPARATOR + this.getExterns(index).getName1()\r
+                    + DataType.HTML_LINE_SEPARATOR;\r
+\r
+            v.addElement("<html>" + name + "<html>");\r
+            v.addElement("<html>" + value + "<html>");\r
+            return v;\r
+        }\r
+\r
+        //\r
+        // For Driver\r
+        //\r
+        if (this.getExterns(index).getType().equals(EnumerationData.EXTERNS_DRIVER)) {\r
+            v.addElement(getExterns(index).getType());\r
+            String name = "";\r
+            String value = "";\r
+\r
+            name = EnumerationData.EXTERNS_DRIVER_BINDING;\r
+            value = this.getExterns(index).getName0();\r
+            name = name + DataType.HTML_LINE_SEPARATOR + EnumerationData.EXTERNS_COMPONENT_NAME;\r
+            value = value + DataType.HTML_LINE_SEPARATOR + this.getExterns(index).getName1();\r
+            name = name + DataType.HTML_LINE_SEPARATOR + EnumerationData.EXTERNS_DRIVER_CONFIG;\r
+            value = value + DataType.HTML_LINE_SEPARATOR + this.getExterns(index).getName2();\r
+            name = name + DataType.HTML_LINE_SEPARATOR + EnumerationData.EXTERNS_DRIVER_DIAG;\r
+            value = value + DataType.HTML_LINE_SEPARATOR + this.getExterns(index).getName3()\r
+                    + DataType.HTML_LINE_SEPARATOR;\r
+\r
+            v.addElement("<html>" + name + "<html>");\r
+            v.addElement("<html>" + value + "<html>");\r
+            return v;\r
+        }\r
+\r
+        //\r
+        // For Call Back\r
+        //\r
+        if (this.getExterns(index).getType().equals(EnumerationData.EXTERNS_CALL_BACK)) {\r
+            v.addElement(getExterns(index).getType());\r
+            String name = "";\r
+            String value = "";\r
+\r
+            name = EnumerationData.EXTERNS_VIRTUAL_ADDRESS_MAP_CALL_BACK;\r
+            value = this.getExterns(index).getName0();\r
+            name = name + DataType.HTML_LINE_SEPARATOR + EnumerationData.EXTERNS_EXIT_BOOT_SERVICES_CALL_BACK;\r
+            value = value + DataType.HTML_LINE_SEPARATOR + this.getExterns(index).getName1()\r
+                    + DataType.HTML_LINE_SEPARATOR;\r
+\r
+            v.addElement("<html>" + name + "<html>");\r
+            v.addElement("<html>" + value + "<html>");\r
+            return v;\r
+        }\r
+\r
+        //\r
+        // Return a empty v\r
+        //\r
         return v;\r
     }\r
 }\r
index d885028..cc8a81a 100644 (file)
@@ -29,7 +29,6 @@ import javax.swing.ListSelectionModel;
 import javax.swing.event.ListSelectionEvent;\r
 \r
 import org.tianocore.ExternsDocument;\r
-import org.tianocore.PcdDriverTypes;\r
 import org.tianocore.ExternsDocument.Externs;\r
 import org.tianocore.ExternsDocument.Externs.Extern;\r
 import org.tianocore.ModuleSurfaceAreaDocument.ModuleSurfaceArea;\r
@@ -184,8 +183,9 @@ public class ModuleExterns extends IInternalFrame implements ItemListener {
             jTable = new JTable(model);\r
             jTable.setRowHeight(20);\r
 \r
-            model.addColumn("Name");\r
             model.addColumn("Type");\r
+            model.addColumn("Name");\r
+            model.addColumn("Value");\r
 \r
             jTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\r
             jTable.getSelectionModel().addListSelectionListener(this);\r
@@ -195,10 +195,6 @@ public class ModuleExterns extends IInternalFrame implements ItemListener {
         return jTable;\r
     }\r
 \r
-    public static void main(String[] args) {\r
-\r
-    }\r
-\r
     /**\r
      This method initializes this\r
      \r
@@ -221,17 +217,6 @@ public class ModuleExterns extends IInternalFrame implements ItemListener {
         this.externs = inExterns;\r
 \r
         if (this.externs != null) {\r
-            //\r
-            // Get PcdIsDriver\r
-            //\r
-            if (this.externs.getPcdIsDriver() != null) {\r
-                String arg0 = this.externs.getPcdIsDriver().toString();\r
-                String arg1 = EnumerationData.EXTERNS_PCD_IS_DRIVER;\r
-\r
-                id = new ExternsIdentification(arg0, arg1, null, null);\r
-                vid.addExterns(id);\r
-            }\r
-\r
             //\r
             // Get specification\r
             //\r
@@ -240,7 +225,7 @@ public class ModuleExterns extends IInternalFrame implements ItemListener {
                     String arg0 = externs.getSpecificationList().get(index);\r
                     String arg1 = EnumerationData.EXTERNS_SPECIFICATION;\r
 \r
-                    id = new ExternsIdentification(arg0, arg1, null, null);\r
+                    id = new ExternsIdentification(arg0, arg1);\r
                     vid.addExterns(id);\r
                 }\r
             }\r
@@ -250,57 +235,63 @@ public class ModuleExterns extends IInternalFrame implements ItemListener {
             //\r
             if (this.externs.getExternList().size() > 0) {\r
                 for (int index = 0; index < this.externs.getExternList().size(); index++) {\r
-                    String arg0 = null;\r
-                    String arg1 = null;\r
-                    if (this.externs.getExternList().get(index).getModuleEntryPoint() != null) {\r
-                        arg0 = this.externs.getExternList().get(index).getModuleEntryPoint();\r
-                        arg1 = EnumerationData.EXTERNS_MODULE_ENTRY_POINT;\r
-                    }\r
-                    if (this.externs.getExternList().get(index).getModuleUnloadImage() != null) {\r
-                        arg0 = this.externs.getExternList().get(index).getModuleUnloadImage();\r
-                        arg1 = EnumerationData.EXTERNS_MODULE_UNLOAD_IMAGE;\r
-                    }\r
+                    //\r
+                    // Get common data\r
+                    //\r
+                    String featureFlag = externs.getExternList().get(index).getFeatureFlag();\r
+                    Vector<String> arch = Tools\r
+                                               .convertListToVector(externs.getExternList().get(index).getSupArchList());\r
 \r
-                    if (this.externs.getExternList().get(index).getConstructor() != null) {\r
-                        arg0 = this.externs.getExternList().get(index).getConstructor();\r
-                        arg1 = EnumerationData.EXTERNS_CONSTRUCTOR;\r
+                    //\r
+                    // Get Image data\r
+                    //\r
+                    if (this.externs.getExternList().get(index).getModuleEntryPoint() != null\r
+                        || this.externs.getExternList().get(index).getModuleUnloadImage() != null) {\r
+                        String moduleEntryPoint = this.externs.getExternList().get(index).getModuleEntryPoint();\r
+                        String moduleUnloadImage = this.externs.getExternList().get(index).getModuleUnloadImage();\r
+                        String type = EnumerationData.EXTERNS_IMAGE;\r
+                        id = new ExternsIdentification(moduleEntryPoint, moduleUnloadImage, type, featureFlag, arch);\r
                     }\r
-                    if (this.externs.getExternList().get(index).getDestructor() != null) {\r
-                        arg0 = this.externs.getExternList().get(index).getDestructor();\r
-                        arg1 = EnumerationData.EXTERNS_DESTRUCTOR;\r
+\r
+                    //\r
+                    // Get Library Data\r
+                    //\r
+                    if (this.externs.getExternList().get(index).getConstructor() != null\r
+                        || this.externs.getExternList().get(index).getDestructor() != null) {\r
+                        String constructor = this.externs.getExternList().get(index).getConstructor();\r
+                        String destructor = this.externs.getExternList().get(index).getDestructor();\r
+                        String type = EnumerationData.EXTERNS_LIBRARY;\r
+                        id = new ExternsIdentification(constructor, destructor, type, featureFlag, arch);\r
                     }\r
 \r
+                    //\r
+                    // Get Driver Data\r
+                    //\r
                     if (this.externs.getExternList().get(index).getDriverBinding() != null) {\r
-                        arg0 = this.externs.getExternList().get(index).getDriverBinding();\r
-                        arg1 = EnumerationData.EXTERNS_DRIVER_BINDING;\r
-                    }\r
-                    if (this.externs.getExternList().get(index).getComponentName() != null) {\r
-                        arg0 = this.externs.getExternList().get(index).getComponentName();\r
-                        arg1 = EnumerationData.EXTERNS_COMPONENT_NAME;\r
-                    }\r
-                    if (this.externs.getExternList().get(index).getDriverConfig() != null) {\r
-                        arg0 = this.externs.getExternList().get(index).getDriverConfig();\r
-                        arg1 = EnumerationData.EXTERNS_DRIVER_CONFIG;\r
-                    }\r
-                    if (this.externs.getExternList().get(index).getDriverDiag() != null) {\r
-                        arg0 = this.externs.getExternList().get(index).getDriverDiag();\r
-                        arg1 = EnumerationData.EXTERNS_DRIVER_DIAG;\r
+                        String driverBinding = this.externs.getExternList().get(index).getDriverBinding();\r
+                        String componentName = this.externs.getExternList().get(index).getComponentName();\r
+                        String driverConfig = this.externs.getExternList().get(index).getDriverConfig();\r
+                        String driverDiag = this.externs.getExternList().get(index).getDriverDiag();\r
+                        String type = EnumerationData.EXTERNS_DRIVER;\r
+                        id = new ExternsIdentification(driverBinding, componentName, driverConfig, driverDiag, type,\r
+                                                       featureFlag, arch);\r
                     }\r
 \r
-                    if (this.externs.getExternList().get(index).getSetVirtualAddressMapCallBack() != null) {\r
-                        arg0 = this.externs.getExternList().get(index).getSetVirtualAddressMapCallBack();\r
-                        arg1 = EnumerationData.EXTERNS_SET_VIRTUAL_ADDRESS_MAP_CALL_BACK;\r
-                    }\r
-                    if (this.externs.getExternList().get(index).getExitBootServicesCallBack() != null) {\r
-                        arg0 = this.externs.getExternList().get(index).getExitBootServicesCallBack();\r
-                        arg1 = EnumerationData.EXTERNS_EXIT_BOOT_SERVICES_CALL_BACK;\r
+                    //\r
+                    // Get Call Back Data\r
+                    //\r
+                    if (this.externs.getExternList().get(index).getSetVirtualAddressMapCallBack() != null\r
+                        || this.externs.getExternList().get(index).getExitBootServicesCallBack() != null) {\r
+                        String virtualAddressMap = this.externs.getExternList().get(index)\r
+                                                               .getSetVirtualAddressMapCallBack();\r
+                        String exitBootServices = this.externs.getExternList().get(index).getExitBootServicesCallBack();\r
+                        String type = EnumerationData.EXTERNS_CALL_BACK;\r
+                        id = new ExternsIdentification(virtualAddressMap, exitBootServices, type, featureFlag, arch);\r
                     }\r
 \r
-                    String arg2 = externs.getExternList().get(index).getFeatureFlag();\r
-                    Vector<String> arg3 = Tools\r
-                                               .convertListToVector(externs.getExternList().get(index).getSupArchList());\r
-\r
-                    id = new ExternsIdentification(arg0, arg1, arg2, arg3);\r
+                    //\r
+                    // Add id to vector\r
+                    //\r
                     vid.addExterns(id);\r
                 }\r
             }\r
@@ -391,7 +382,45 @@ public class ModuleExterns extends IInternalFrame implements ItemListener {
 \r
         if (vid.size() > 0) {\r
             for (int index = 0; index < vid.size(); index++) {\r
+                int line = 1;\r
+\r
+                //\r
+                // For Specification\r
+                //\r
+                if (vid.getExterns(index).getType().equals(EnumerationData.EXTERNS_SPECIFICATION)) {\r
+                    line = 1;\r
+                }\r
+\r
+                //\r
+                // For Image\r
+                //\r
+                if (vid.getExterns(index).getType().equals(EnumerationData.EXTERNS_IMAGE)) {\r
+                    line = 2;\r
+                }\r
+\r
+                //\r
+                // For Library\r
+                //\r
+                if (vid.getExterns(index).getType().equals(EnumerationData.EXTERNS_LIBRARY)) {\r
+                    line = 2;\r
+                }\r
+\r
+                //\r
+                // For Driver\r
+                //\r
+                if (vid.getExterns(index).getType().equals(EnumerationData.EXTERNS_DRIVER)) {\r
+                    line = 4;\r
+                }\r
+\r
+                //\r
+                // For Call Back\r
+                //\r
+                if (vid.getExterns(index).getType().equals(EnumerationData.EXTERNS_CALL_BACK)) {\r
+                    line = 2;\r
+                }\r
+\r
                 model.addRow(vid.toStringVector(index));\r
+                jTable.setRowHeight(index, line * 18);\r
             }\r
         }\r
         this.jTable.repaint();\r
@@ -439,107 +468,116 @@ public class ModuleExterns extends IInternalFrame implements ItemListener {
         try {\r
             int count = this.vid.size();\r
 \r
-            this.externs = Externs.Factory.newInstance();\r
-            //            //\r
-            //            // Save PcdIsDriver first\r
-            //            //\r
-            //            if (!this.jComboBoxPcdIsDriver.getSelectedItem().toString().equals(DataType.EMPTY_SELECT_ITEM)) {\r
-            //                externs.setPcdIsDriver(PcdDriverTypes.Enum.forString(this.jComboBoxPcdIsDriver.getSelectedItem()\r
-            //                                                                                              .toString()));\r
-            //            }\r
+            //\r
+            // Save pcd and flash map information first\r
+            //\r
+            Externs ex = Externs.Factory.newInstance();\r
+            if (this.externs.getPcdIsDriver() != null) {\r
+                ex.setPcdIsDriver(this.externs.getPcdIsDriver());\r
+            }\r
+            if (this.externs.getTianoR8FlashMapH()) {\r
+                ex.setTianoR8FlashMapH(this.externs.getTianoR8FlashMapH());\r
+            }\r
+            this.externs = ex;\r
 \r
+            //\r
+            // Save externs\r
+            //\r
             if (count > 0) {\r
                 for (int index = 0; index < count; index++) {\r
-                    //\r
-                    // Save Pcd Is Driver\r
-                    //\r
-                    if (vid.getExterns(index).getType().equals(EnumerationData.EXTERNS_PCD_IS_DRIVER)) {\r
-                        externs.setPcdIsDriver(PcdDriverTypes.Enum.forString(vid.getExterns(index).getName()));\r
-                        continue;\r
-                    }\r
-\r
                     //\r
                     // Save specfication\r
                     //\r
                     if (vid.getExterns(index).getType().equals(EnumerationData.EXTERNS_SPECIFICATION)) {\r
-                        if (!isEmpty(vid.getExterns(index).getName())) {\r
+                        if (!isEmpty(vid.getExterns(index).getName0())) {\r
                             this.externs.addNewSpecification();\r
                             this.externs.setSpecificationArray(externs.getSpecificationList().size() - 1,\r
-                                                               vid.getExterns(index).getName());\r
+                                                               vid.getExterns(index).getName0());\r
+                            continue;\r
                         }\r
-                    } else {\r
-                        //\r
-                        // Save extern\r
-                        //\r
-                        Extern e = Extern.Factory.newInstance();\r
-\r
-                        if (vid.getExterns(index).getType().equals(EnumerationData.EXTERNS_MODULE_ENTRY_POINT)) {\r
-                            if (!isEmpty(vid.getExterns(index).getName())) {\r
-                                e.setModuleEntryPoint(vid.getExterns(index).getName());\r
+                    }\r
+\r
+                    Extern e = Extern.Factory.newInstance();\r
+                    //\r
+                    // Save image\r
+                    //\r
+                    if (vid.getExterns(index).getType().equals(EnumerationData.EXTERNS_IMAGE)) {\r
+                        if (!isEmpty(vid.getExterns(index).getName0()) || !isEmpty(vid.getExterns(index).getName1())) {\r
+                            e = Extern.Factory.newInstance();\r
+                            if (!isEmpty(vid.getExterns(index).getName0())) {\r
+                                e.setModuleEntryPoint(vid.getExterns(index).getName0());\r
                             }\r
-                        }\r
-                        if (vid.getExterns(index).getType().equals(EnumerationData.EXTERNS_MODULE_UNLOAD_IMAGE)) {\r
-                            if (!isEmpty(vid.getExterns(index).getName())) {\r
-                                e.setModuleUnloadImage(vid.getExterns(index).getName());\r
+                            if (!isEmpty(vid.getExterns(index).getName1())) {\r
+                                e.setModuleUnloadImage(vid.getExterns(index).getName1());\r
                             }\r
                         }\r
+                    }\r
 \r
-                        if (vid.getExterns(index).getType().equals(EnumerationData.EXTERNS_CONSTRUCTOR)) {\r
-                            if (!isEmpty(vid.getExterns(index).getName())) {\r
-                                e.setConstructor(vid.getExterns(index).getName());\r
+                    //\r
+                    // Save library\r
+                    //\r
+                    if (vid.getExterns(index).getType().equals(EnumerationData.EXTERNS_LIBRARY)) {\r
+                        if (!isEmpty(vid.getExterns(index).getName0()) || !isEmpty(vid.getExterns(index).getName1())) {\r
+                            e = Extern.Factory.newInstance();\r
+                            if (!isEmpty(vid.getExterns(index).getName0())) {\r
+                                e.setConstructor(vid.getExterns(index).getName0());\r
                             }\r
-                        }\r
-                        if (vid.getExterns(index).getType().equals(EnumerationData.EXTERNS_DESTRUCTOR)) {\r
-                            if (!isEmpty(vid.getExterns(index).getName())) {\r
-                                e.setDestructor(vid.getExterns(index).getName());\r
+                            if (!isEmpty(vid.getExterns(index).getName1())) {\r
+                                e.setDestructor(vid.getExterns(index).getName1());\r
                             }\r
                         }\r
+                    }\r
 \r
-                        if (vid.getExterns(index).getType().equals(EnumerationData.EXTERNS_DRIVER_BINDING)) {\r
-                            if (!isEmpty(vid.getExterns(index).getName())) {\r
-                                e.setDriverBinding(vid.getExterns(index).getName());\r
+                    //\r
+                    // Save call back\r
+                    //\r
+                    if (vid.getExterns(index).getType().equals(EnumerationData.EXTERNS_CALL_BACK)) {\r
+                        if (!isEmpty(vid.getExterns(index).getName0()) || !isEmpty(vid.getExterns(index).getName1())) {\r
+                            e = Extern.Factory.newInstance();\r
+                            if (!isEmpty(vid.getExterns(index).getName0())) {\r
+                                e.setSetVirtualAddressMapCallBack(vid.getExterns(index).getName0());\r
                             }\r
-                        }\r
-                        if (vid.getExterns(index).getType().equals(EnumerationData.EXTERNS_COMPONENT_NAME)) {\r
-                            if (!isEmpty(vid.getExterns(index).getName())) {\r
-                                e.setComponentName(vid.getExterns(index).getName());\r
+                            if (!isEmpty(vid.getExterns(index).getName1())) {\r
+                                e.setExitBootServicesCallBack(vid.getExterns(index).getName1());\r
                             }\r
                         }\r
-                        if (vid.getExterns(index).getType().equals(EnumerationData.EXTERNS_DRIVER_CONFIG)) {\r
-                            if (!isEmpty(vid.getExterns(index).getName())) {\r
-                                e.setDriverConfig(vid.getExterns(index).getName());\r
+                    }\r
+\r
+                    //\r
+                    // Save driver\r
+                    //\r
+                    if (vid.getExterns(index).getType().equals(EnumerationData.EXTERNS_DRIVER)) {\r
+                        if (!isEmpty(vid.getExterns(index).getName0()) || !isEmpty(vid.getExterns(index).getName1())\r
+                            || !isEmpty(vid.getExterns(index).getName2()) || !isEmpty(vid.getExterns(index).getName3())) {\r
+                            e = Extern.Factory.newInstance();\r
+                            if (!isEmpty(vid.getExterns(index).getName0())) {\r
+                                e.setDriverBinding(vid.getExterns(index).getName0());\r
                             }\r
-                        }\r
-                        if (vid.getExterns(index).getType().equals(EnumerationData.EXTERNS_DRIVER_DIAG)) {\r
-                            if (!isEmpty(vid.getExterns(index).getName())) {\r
-                                e.setDriverDiag(vid.getExterns(index).getName());\r
+                            if (!isEmpty(vid.getExterns(index).getName1())) {\r
+                                e.setComponentName(vid.getExterns(index).getName1());\r
                             }\r
-                        }\r
-\r
-                        if (vid.getExterns(index).getType()\r
-                               .equals(EnumerationData.EXTERNS_SET_VIRTUAL_ADDRESS_MAP_CALL_BACK)) {\r
-                            if (!isEmpty(vid.getExterns(index).getName())) {\r
-                                e.setSetVirtualAddressMapCallBack(vid.getExterns(index).getName());\r
+                            if (!isEmpty(vid.getExterns(index).getName2())) {\r
+                                e.setDriverConfig(vid.getExterns(index).getName2());\r
                             }\r
-                        }\r
-                        if (vid.getExterns(index).getType()\r
-                               .equals(EnumerationData.EXTERNS_EXIT_BOOT_SERVICES_CALL_BACK)) {\r
-                            if (!isEmpty(vid.getExterns(index).getName())) {\r
-                                e.setExitBootServicesCallBack(vid.getExterns(index).getName());\r
+                            if (!isEmpty(vid.getExterns(index).getName3())) {\r
+                                e.setDriverDiag(vid.getExterns(index).getName3());\r
                             }\r
                         }\r
+                    }\r
 \r
-                        if (!isEmpty(vid.getExterns(index).getFeatureFlag())) {\r
-                            e.setFeatureFlag(vid.getExterns(index).getFeatureFlag());\r
-                        }\r
-                        if (vid.getExterns(index).getSupArchList() != null\r
-                            && vid.getExterns(index).getSupArchList().size() > 0) {\r
-                            e.setSupArchList(vid.getExterns(index).getSupArchList());\r
-                        }\r
-\r
-                        this.externs.addNewExtern();\r
-                        this.externs.setExternArray(this.externs.getExternList().size() - 1, e);\r
+                    //\r
+                    // Save common data\r
+                    //\r
+                    if (!isEmpty(vid.getExterns(index).getFeatureFlag())) {\r
+                        e.setFeatureFlag(vid.getExterns(index).getFeatureFlag());\r
                     }\r
+                    if (vid.getExterns(index).getSupArchList() != null\r
+                        && vid.getExterns(index).getSupArchList().size() > 0) {\r
+                        e.setSupArchList(vid.getExterns(index).getSupArchList());\r
+                    }\r
+\r
+                    this.externs.addNewExtern();\r
+                    this.externs.setExternArray(this.externs.getExternList().size() - 1, e);\r
                 }\r
             }\r
 \r
index 9cf0d38..70e2166 100644 (file)
@@ -29,10 +29,12 @@ import javax.swing.JScrollPane;
 import javax.swing.JTextArea;\r
 import javax.swing.JTextField;\r
 \r
+import org.tianocore.ExternsDocument;\r
 import org.tianocore.ModuleDefinitionsDocument;\r
 import org.tianocore.ModuleSurfaceAreaDocument;\r
 import org.tianocore.ModuleTypeDef;\r
 import org.tianocore.MsaHeaderDocument;\r
+import org.tianocore.PcdDriverTypes;\r
 import org.tianocore.LicenseDocument.License;\r
 import org.tianocore.frameworkwizard.common.DataType;\r
 import org.tianocore.frameworkwizard.common.DataValidation;\r
@@ -58,9 +60,9 @@ public class MsaHeader extends IInternalFrame {
     private static final long serialVersionUID = -8152099582923006900L;\r
 \r
     private int dialogWidth = 500;\r
-    \r
+\r
     private int dialogHeight = 630;\r
-    \r
+\r
     //\r
     //Define class members\r
     //\r
@@ -152,8 +154,6 @@ public class MsaHeader extends IInternalFrame {
 \r
     private StarLabel jStarLabel14 = null;\r
 \r
-//    private StarLabel jStarLabel15 = null;\r
-\r
     private JCheckBox jCheckBoxIa32 = null;\r
 \r
     private JCheckBox jCheckBoxX64 = null;\r
@@ -165,7 +165,13 @@ public class MsaHeader extends IInternalFrame {
     private JCheckBox jCheckBoxArm = null;\r
 \r
     private JCheckBox jCheckBoxPpc = null;\r
-    \r
+\r
+    private JComboBox jComboBoxPcdIsDriver = null;\r
+\r
+    private JCheckBox jCheckBoxPcd = null;\r
+\r
+    private JCheckBox jCheckBoxFlashMap = null;\r
+\r
     //\r
     // Not used for UI\r
     //\r
@@ -175,6 +181,8 @@ public class MsaHeader extends IInternalFrame {
 \r
     private ModuleSurfaceAreaDocument.ModuleSurfaceArea msa = null;\r
 \r
+    private ExternsDocument.Externs ex = null;\r
+\r
     private OpeningModuleType omt = null;\r
 \r
     private EnumerationData ed = new EnumerationData();\r
@@ -394,12 +402,11 @@ public class MsaHeader extends IInternalFrame {
     private JTextField getJTextFieldSpecification() {\r
         if (jTextFieldSpecification == null) {\r
             jTextFieldSpecification = new JTextField();\r
-            \r
+\r
             jTextFieldSpecification.setPreferredSize(new java.awt.Dimension(320, 20));\r
             jTextFieldSpecification.setText("FRAMEWORK_BUILD_PACKAGING_SPECIFICATION   0x00000052");\r
             jTextFieldSpecification.setBorder(null);\r
-            \r
-            \r
+\r
             jTextFieldSpecification.setSize(new java.awt.Dimension(320, 20));\r
             jTextFieldSpecification.setLocation(new java.awt.Point(2, dialogHeight - 30));\r
             jTextFieldSpecification.setEditable(false);\r
@@ -622,6 +629,23 @@ public class MsaHeader extends IInternalFrame {
         return jTextFieldOutputFileBasename;\r
     }\r
 \r
+    /**\r
+     * This method initializes jComboBoxPcdIsDriver \r
+     *  \r
+     * @return javax.swing.JComboBox    \r
+     */\r
+    private JComboBox getJComboBoxPcdIsDriver() {\r
+        if (jComboBoxPcdIsDriver == null) {\r
+            jComboBoxPcdIsDriver = new JComboBox();\r
+            jComboBoxPcdIsDriver.setPreferredSize(new java.awt.Dimension(320, 20));\r
+            jComboBoxPcdIsDriver.setBounds(new java.awt.Rectangle(160, 530, 320, 20));\r
+            jComboBoxPcdIsDriver.addItemListener(this);\r
+            jComboBoxPcdIsDriver.setEnabled(false);\r
+            Tools.generateComboBoxByVector(jComboBoxPcdIsDriver, ed.getVPcdDriverTypes());\r
+        }\r
+        return jComboBoxPcdIsDriver;\r
+    }\r
+\r
     /**\r
      This is the default constructor\r
      \r
@@ -654,8 +678,14 @@ public class MsaHeader extends IInternalFrame {
             md.setSupportedArchitectures(ed.getVSupportedArchitectures());\r
             msa.setModuleDefinitions(md);\r
         }\r
+\r
+        //\r
+        // Init items of Header, Definitions and Externs\r
+        //\r
         init(msa.getMsaHeader());\r
         init(msa.getModuleDefinitions());\r
+        init(msa.getExterns());\r
+\r
         this.setVisible(true);\r
         this.setViewMode(false);\r
     }\r
@@ -767,6 +797,25 @@ public class MsaHeader extends IInternalFrame {
         }\r
     }\r
 \r
+    /**\r
+     This method initializes this\r
+     Fill values to all fields if these values are not empty\r
+     \r
+     @param inEx  The input data of ExternsDocument.Externs\r
+     \r
+     **/\r
+    private void init(ExternsDocument.Externs inEx) {\r
+        if (inEx != null) {\r
+            this.ex = inEx;\r
+            if (ex.getPcdIsDriver() != null) {\r
+                this.jCheckBoxPcd.setSelected(true);\r
+                this.jComboBoxPcdIsDriver.setEnabled(true);\r
+                this.jComboBoxPcdIsDriver.setSelectedItem(ex.getPcdIsDriver());\r
+            }\r
+            this.jCheckBoxFlashMap.setSelected(ex.getTianoR8FlashMapH());\r
+        }\r
+    }\r
+\r
     /**\r
      This method initializes jContentPane\r
      \r
@@ -827,7 +876,7 @@ public class MsaHeader extends IInternalFrame {
             jContentPane = new JPanel();\r
             jContentPane.setLayout(null);\r
             jContentPane.setPreferredSize(new java.awt.Dimension(dialogWidth - 10, dialogHeight - 10));\r
-            \r
+\r
             jContentPane.addFocusListener(this);\r
 \r
             jContentPane.add(jLabelBaseName, null);\r
@@ -840,7 +889,7 @@ public class MsaHeader extends IInternalFrame {
             jContentPane.add(jLabelLicense, null);\r
             jContentPane.add(jLabelCopyright, null);\r
             jContentPane.add(jLabelDescription, null);\r
-//            jContentPane.add(jLabelSpecification, null);\r
+            //            jContentPane.add(jLabelSpecification, null);\r
             jContentPane.add(getJTextFieldSpecification(), null);\r
             jContentPane.add(getJButtonOk(), null);\r
             jContentPane.add(getJButtonCancel(), null);\r
@@ -880,8 +929,8 @@ public class MsaHeader extends IInternalFrame {
             jStarLabel13.setLocation(new java.awt.Point(0, 480));\r
             jStarLabel14 = new StarLabel();\r
             jStarLabel14.setLocation(new java.awt.Point(0, 505));\r
-//            jStarLabel15 = new StarLabel();\r
-//            jStarLabel15.setLocation(new java.awt.Point(0, 530));\r
+            //            jStarLabel15 = new StarLabel();\r
+            //            jStarLabel15.setLocation(new java.awt.Point(0, 530));\r
 \r
             jContentPane.add(jStarLabel1, null);\r
             jContentPane.add(jStarLabel2, null);\r
@@ -894,7 +943,7 @@ public class MsaHeader extends IInternalFrame {
             jContentPane.add(jStarLabel12, null);\r
             jContentPane.add(jStarLabel13, null);\r
             jContentPane.add(jStarLabel14, null);\r
-//            jContentPane.add(jStarLabel15, null);\r
+            //            jContentPane.add(jStarLabel15, null);\r
             jContentPane.add(getJScrollPaneCopyright(), null);\r
 \r
             jContentPane.add(getJCheckBoxIa32(), null);\r
@@ -903,6 +952,10 @@ public class MsaHeader extends IInternalFrame {
             jContentPane.add(getJCheckBoxEbc(), null);\r
             jContentPane.add(getJCheckBoxArm(), null);\r
             jContentPane.add(getJCheckBoxPpc(), null);\r
+\r
+            jContentPane.add(getJCheckBoxPcd(), null);\r
+            jContentPane.add(getJComboBoxPcdIsDriver(), null);\r
+            jContentPane.add(getJCheckBoxFlashMap(), null);\r
         }\r
         return jContentPane;\r
     }\r
@@ -923,14 +976,20 @@ public class MsaHeader extends IInternalFrame {
             this.setEdited(true);\r
             this.dispose();\r
         }\r
+\r
         if (arg0.getSource() == jButtonCancel) {\r
             this.setEdited(false);\r
         }\r
+\r
         if (arg0.getSource() == jButtonGenerateGuid) {\r
             jTextFieldGuid.setText(Tools.generateUuidString());\r
             jTextFieldGuid.requestFocus();\r
             jButtonGenerateGuid.requestFocus();\r
         }\r
+\r
+        if (arg0.getSource() == this.jCheckBoxPcd) {\r
+            this.jComboBoxPcdIsDriver.setEnabled(this.jCheckBoxPcd.isSelected());\r
+        }\r
     }\r
 \r
     /**\r
@@ -997,7 +1056,8 @@ public class MsaHeader extends IInternalFrame {
             return false;\r
         }\r
         if (!DataValidation.isAbstract(this.jTextFieldAbstract.getText())) {\r
-            Log.wrn("Update Msa Header", "Incorrect data type for Abstract, is should be a sentence describing the module.");\r
+            Log.wrn("Update Msa Header",\r
+                    "Incorrect data type for Abstract, is should be a sentence describing the module.");\r
             //this.jTextFieldAbstract.requestFocus();\r
             return false;\r
         }\r
@@ -1119,9 +1179,10 @@ public class MsaHeader extends IInternalFrame {
         Tools.resizeComponentWidth(this.jComboBoxModuleType, intCurrentWidth, intPreferredWidth);\r
         Tools.resizeComponentWidth(this.jComboBoxBinaryModule, intCurrentWidth, intPreferredWidth);\r
         Tools.resizeComponentWidth(this.jTextFieldOutputFileBasename, intCurrentWidth, intPreferredWidth);\r
+        Tools.resizeComponentWidth(this.jComboBoxPcdIsDriver, intCurrentWidth, intPreferredWidth);\r
 \r
         Tools.relocateComponentX(this.jButtonGenerateGuid, intCurrentWidth, intPreferredWidth,\r
-                           DataType.SPACE_TO_RIGHT_FOR_GENERATE_BUTTON);\r
+                                 DataType.SPACE_TO_RIGHT_FOR_GENERATE_BUTTON);\r
     }\r
 \r
     public void focusLost(FocusEvent arg0) {\r
@@ -1347,6 +1408,92 @@ public class MsaHeader extends IInternalFrame {
             }\r
         }\r
 \r
+        //\r
+        // Check Pcd is Driver\r
+        //\r
+        if (arg0.getSource() == this.jCheckBoxPcd) {\r
+            if ((this.ex == null) && this.jCheckBoxPcd.isSelected()) {\r
+                this.ex = ExternsDocument.Externs.Factory.newInstance();\r
+                this.ex.setPcdIsDriver(PcdDriverTypes.Enum.forString(this.jComboBoxPcdIsDriver.getSelectedItem()\r
+                                                                                              .toString()));\r
+                this.msa.setExterns(this.ex);\r
+            }\r
+\r
+            if ((this.ex != null) && (this.ex.getPcdIsDriver() == null) && this.jCheckBoxPcd.isSelected()) {\r
+                this.ex.setPcdIsDriver(PcdDriverTypes.Enum.forString(this.jComboBoxPcdIsDriver.getSelectedItem()\r
+                                                                                              .toString()));\r
+                this.msa.setExterns(this.ex);\r
+            }\r
+\r
+            if ((this.ex != null) && (this.ex.getPcdIsDriver() != null)) {\r
+                if (this.jCheckBoxPcd.isSelected()\r
+                    && !this.jComboBoxPcdIsDriver.getSelectedItem().toString().equals(\r
+                                                                                      this.ex.getPcdIsDriver()\r
+                                                                                             .toString())) {\r
+                    this.ex.setPcdIsDriver(PcdDriverTypes.Enum.forString(this.jComboBoxPcdIsDriver.getSelectedItem()\r
+                                                                                                  .toString()));\r
+                    this.msa.setExterns(this.ex);\r
+                }\r
+                if (!this.jCheckBoxPcd.isSelected()) {\r
+                    ExternsDocument.Externs newEx = ExternsDocument.Externs.Factory.newInstance();\r
+                    if (this.ex.getExternList() != null) {\r
+                        for (int index = 0; index < this.ex.getExternList().size(); index++) {\r
+                            newEx.addNewExtern();\r
+                            newEx.setExternArray(index, this.ex.getExternArray(index));\r
+                        }\r
+                    }\r
+                    if (this.ex.getSpecificationList() != null) {\r
+                        for (int index = 0; index < this.ex.getSpecificationList().size(); index++) {\r
+                            newEx.addNewSpecification();\r
+                            newEx.setSpecificationArray(index, this.ex.getSpecificationArray(index));\r
+                        }\r
+                    }\r
+                    if (this.ex.getTianoR8FlashMapH()) {\r
+                        newEx.setTianoR8FlashMapH(this.ex.getTianoR8FlashMapH());\r
+                    }\r
+                    this.ex = newEx;\r
+                    this.msa.setExterns(this.ex);\r
+                }\r
+            }\r
+        }\r
+\r
+        //\r
+        // Check Flash Map\r
+        //\r
+        if (arg0.getSource() == this.jCheckBoxFlashMap) {\r
+            if ((this.ex == null) && this.jCheckBoxFlashMap.isSelected()) {\r
+                this.ex = ExternsDocument.Externs.Factory.newInstance();\r
+                this.ex.setTianoR8FlashMapH(this.jCheckBoxFlashMap.isSelected());\r
+                this.msa.setExterns(this.ex);\r
+            }\r
+\r
+            if ((this.ex != null) && this.jCheckBoxFlashMap.isSelected()) {\r
+                this.ex.setTianoR8FlashMapH(this.jCheckBoxFlashMap.isSelected());\r
+                this.msa.setExterns(this.ex);\r
+            }\r
+\r
+            if ((this.ex != null) && !this.jCheckBoxFlashMap.isSelected()) {\r
+                ExternsDocument.Externs newEx = ExternsDocument.Externs.Factory.newInstance();\r
+                if (this.ex.getExternList() != null) {\r
+                    for (int index = 0; index < this.ex.getExternList().size(); index++) {\r
+                        newEx.addNewExtern();\r
+                        newEx.setExternArray(index, this.ex.getExternArray(index));\r
+                    }\r
+                }\r
+                if (this.ex.getSpecificationList() != null) {\r
+                    for (int index = 0; index < this.ex.getSpecificationList().size(); index++) {\r
+                        newEx.addNewSpecification();\r
+                        newEx.setSpecificationArray(index, this.ex.getSpecificationArray(index));\r
+                    }\r
+                }\r
+                if (this.ex.getPcdIsDriver() != null) {\r
+                    newEx.setPcdIsDriver(this.ex.getPcdIsDriver());\r
+                }\r
+                this.ex = newEx;\r
+                this.msa.setExterns(this.ex);\r
+            }\r
+        }\r
+\r
         this.save();\r
     }\r
 \r
@@ -1436,4 +1583,35 @@ public class MsaHeader extends IInternalFrame {
             }\r
         }\r
     }\r
+\r
+    /**\r
+     * This method initializes jCheckBoxPcd    \r
+     *         \r
+     * @return javax.swing.JCheckBox   \r
+     */\r
+    private JCheckBox getJCheckBoxPcd() {\r
+        if (jCheckBoxPcd == null) {\r
+            jCheckBoxPcd = new JCheckBox();\r
+            jCheckBoxPcd.setBounds(new java.awt.Rectangle(0, 530, 140, 20));\r
+            jCheckBoxPcd.setText("Is this a PCD Driver?");\r
+            jCheckBoxPcd.addFocusListener(this);\r
+            jCheckBoxPcd.addActionListener(this);\r
+        }\r
+        return jCheckBoxPcd;\r
+    }\r
+\r
+    /**\r
+     * This method initializes jCheckBoxFlashMap       \r
+     *         \r
+     * @return javax.swing.JCheckBox   \r
+     */\r
+    private JCheckBox getJCheckBoxFlashMap() {\r
+        if (jCheckBoxFlashMap == null) {\r
+            jCheckBoxFlashMap = new JCheckBox();\r
+            jCheckBoxFlashMap.setBounds(new java.awt.Rectangle(0, 555, 480, 20));\r
+            jCheckBoxFlashMap.setText("Are you using a legacy FlashMap header file?");\r
+            jCheckBoxFlashMap.addFocusListener(this);\r
+        }\r
+        return jCheckBoxFlashMap;\r
+    }\r
 }\r
index b53cbf7..6ff84ff 100644 (file)
@@ -34,6 +34,7 @@ import org.tianocore.frameworkwizard.common.Tools;
 import org.tianocore.frameworkwizard.common.ui.ArchCheckBox;\r
 import org.tianocore.frameworkwizard.common.ui.IDialog;\r
 import org.tianocore.frameworkwizard.common.ui.IFrame;\r
+import org.tianocore.frameworkwizard.common.ui.StarLabel;\r
 import org.tianocore.frameworkwizard.module.Identifications.Externs.ExternsIdentification;\r
 \r
 /**\r
@@ -60,11 +61,9 @@ public class ExternsDlg extends IDialog implements ItemListener {
 \r
     private JScrollPane jScrollPane = null;\r
 \r
-    private JComboBox jComboBoxPcdIsDriver = null;\r
+    private JLabel jLabelSpecification = null;\r
 \r
-    private JLabel jLabelC_Name = null;\r
-\r
-    private JTextField jTextFieldC_Name = null;\r
+    private JTextField jTextFieldSpecification = null;\r
 \r
     private JLabel jLabelFeatureFlag = null;\r
 \r
@@ -78,6 +77,58 @@ public class ExternsDlg extends IDialog implements ItemListener {
 \r
     private JButton jButtonCancel = null;\r
 \r
+    private StarLabel jStarLabel1 = null;\r
+\r
+    private JPanel jPanelSpecification = null;\r
+\r
+    private JPanel jPanelImage = null;\r
+\r
+    private JPanel jPanelDriver = null;\r
+\r
+    private JPanel jPanelLibrary = null;\r
+\r
+    private JPanel jPanelCallBack = null;\r
+\r
+    private JLabel jLabelModuleEntryPoint = null;\r
+\r
+    private JTextField jTextFieldModuleEntryPoint = null;\r
+\r
+    private JLabel jLabelModuleUnloadImage = null;\r
+\r
+    private JTextField jTextFieldModuleUnloadImage = null;\r
+\r
+    private JLabel jLabelDriverBinding = null;\r
+\r
+    private JTextField jTextFieldDriverBinding = null;\r
+\r
+    private JLabel jLabelComponentName = null;\r
+\r
+    private JTextField jTextFieldComponentName = null;\r
+\r
+    private JLabel jLabelDriverConfig = null;\r
+\r
+    private JTextField jTextFieldDriverConfig = null;\r
+\r
+    private JLabel jLabelDriverDiagnostic = null;\r
+\r
+    private JTextField jTextFieldDriverDiagnostic = null;\r
+\r
+    private JLabel jLabelConstructor = null;\r
+\r
+    private JTextField jTextFieldConstructor = null;\r
+\r
+    private JLabel jLabelDestructor = null;\r
+\r
+    private JTextField jTextFieldDestructor = null;\r
+\r
+    private JLabel jLabelVirtualAddressMap = null;\r
+\r
+    private JTextField jTextFieldVirtualAddressMap = null;\r
+\r
+    private JLabel jLabelExitBootServices = null;\r
+\r
+    private JTextField jTextFieldExitBootServices = null;\r
+\r
     //\r
     // Not used by UI\r
     //\r
@@ -114,35 +165,19 @@ public class ExternsDlg extends IDialog implements ItemListener {
         return jScrollPane;\r
     }\r
 \r
-    /**\r
-     * This method initializes jComboBoxPcdIsDriver    \r
-     *         \r
-     * @return javax.swing.JComboBox   \r
-     */\r
-    private JComboBox getJComboBoxPcdIsDriver() {\r
-        if (jComboBoxPcdIsDriver == null) {\r
-            jComboBoxPcdIsDriver = new JComboBox();\r
-            jComboBoxPcdIsDriver.setLocation(new java.awt.Point(168, 37));\r
-            jComboBoxPcdIsDriver.setPreferredSize(new java.awt.Dimension(320, 20));\r
-            jComboBoxPcdIsDriver.setSize(new java.awt.Dimension(320, 20));\r
-            jComboBoxPcdIsDriver.addItemListener(this);\r
-        }\r
-        return jComboBoxPcdIsDriver;\r
-    }\r
-\r
     /**\r
      This method initializes jTextFieldC_Name  \r
      \r
      @return javax.swing.JTextField    \r
      \r
      **/\r
-    private JTextField getJTextFieldC_Name() {\r
-        if (jTextFieldC_Name == null) {\r
-            jTextFieldC_Name = new JTextField();\r
-            jTextFieldC_Name.setBounds(new java.awt.Rectangle(168, 37, 320, 20));\r
-            jTextFieldC_Name.setPreferredSize(new java.awt.Dimension(320, 20));\r
+    private JTextField getJTextFieldSpecification() {\r
+        if (jTextFieldSpecification == null) {\r
+            jTextFieldSpecification = new JTextField();\r
+            jTextFieldSpecification.setPreferredSize(new java.awt.Dimension(320, 20));\r
+            jTextFieldSpecification.setBounds(new java.awt.Rectangle(168, 0, 320, 20));\r
         }\r
-        return jTextFieldC_Name;\r
+        return jTextFieldSpecification;\r
     }\r
 \r
     /**\r
@@ -170,7 +205,7 @@ public class ExternsDlg extends IDialog implements ItemListener {
     private JButton getJButtonOk() {\r
         if (jButtonOk == null) {\r
             jButtonOk = new JButton();\r
-            jButtonOk.setBounds(new java.awt.Rectangle(300, 122, 90, 20));\r
+            jButtonOk.setBounds(new java.awt.Rectangle(300, 187, 90, 20));\r
             jButtonOk.setText("Ok");\r
             jButtonOk.addActionListener(this);\r
         }\r
@@ -186,13 +221,273 @@ public class ExternsDlg extends IDialog implements ItemListener {
     private JButton getJButtonCancel() {\r
         if (jButtonCancel == null) {\r
             jButtonCancel = new JButton();\r
-            jButtonCancel.setBounds(new java.awt.Rectangle(400, 122, 90, 20));\r
+            jButtonCancel.setBounds(new java.awt.Rectangle(400, 187, 90, 20));\r
             jButtonCancel.setText("Cancel");\r
             jButtonCancel.addActionListener(this);\r
         }\r
         return jButtonCancel;\r
     }\r
 \r
+    /**\r
+     * This method initializes jPanelSpecification     \r
+     *         \r
+     * @return javax.swing.JPanel      \r
+     */\r
+    private JPanel getJPanelSpecification() {\r
+        if (jPanelSpecification == null) {\r
+            jPanelSpecification = new JPanel();\r
+            jPanelSpecification.setBounds(new java.awt.Rectangle(0, 37, 505, 20));\r
+            jPanelSpecification.setLayout(null);\r
+\r
+            jLabelSpecification = new JLabel();\r
+            jLabelSpecification.setBounds(new java.awt.Rectangle(12, 0, 140, 20));\r
+            jLabelSpecification.setText("Specification Name");\r
+\r
+            jPanelSpecification.add(jLabelSpecification, null);\r
+            jPanelSpecification.add(getJTextFieldSpecification(), null);\r
+        }\r
+        return jPanelSpecification;\r
+    }\r
+\r
+    /**\r
+     * This method initializes jPanelImage     \r
+     *         \r
+     * @return javax.swing.JPanel      \r
+     */\r
+    private JPanel getJPanelImage() {\r
+        if (jPanelImage == null) {\r
+            jLabelModuleUnloadImage = new JLabel();\r
+            jLabelModuleUnloadImage.setBounds(new java.awt.Rectangle(12, 25, 140, 20));\r
+            jLabelModuleUnloadImage.setText("Module Unload Image");\r
+            jLabelModuleEntryPoint = new JLabel();\r
+            jLabelModuleEntryPoint.setBounds(new java.awt.Rectangle(12, 0, 140, 20));\r
+            jLabelModuleEntryPoint.setText("Module Entry Point");\r
+            jPanelImage = new JPanel();\r
+            jPanelImage.setBounds(new java.awt.Rectangle(0, 37, 505, 45));\r
+            jPanelImage.setLayout(null);\r
+            jPanelImage.add(jLabelModuleEntryPoint, null);\r
+            jPanelImage.add(getJTextFieldModuleEntryPoint(), null);\r
+            jPanelImage.add(jLabelModuleUnloadImage, null);\r
+            jPanelImage.add(getJTextFieldModuleUnloadImage(), null);\r
+        }\r
+        return jPanelImage;\r
+    }\r
+\r
+    /**\r
+     * This method initializes jPanelDriver    \r
+     *         \r
+     * @return javax.swing.JPanel      \r
+     */\r
+    private JPanel getJPanelDriver() {\r
+        if (jPanelDriver == null) {\r
+            jStarLabel1 = new StarLabel();\r
+            jStarLabel1.setLocation(new java.awt.Point(0, 0));\r
+            jLabelDriverDiagnostic = new JLabel();\r
+            jLabelDriverDiagnostic.setBounds(new java.awt.Rectangle(12, 75, 140, 20));\r
+            jLabelDriverDiagnostic.setText("Driver Diagnostic");\r
+            jLabelDriverConfig = new JLabel();\r
+            jLabelDriverConfig.setBounds(new java.awt.Rectangle(12, 50, 140, 20));\r
+            jLabelDriverConfig.setText("Driver Config");\r
+            jLabelComponentName = new JLabel();\r
+            jLabelComponentName.setBounds(new java.awt.Rectangle(12, 25, 140, 20));\r
+            jLabelComponentName.setText("Component Name");\r
+            jLabelDriverBinding = new JLabel();\r
+            jLabelDriverBinding.setBounds(new java.awt.Rectangle(12, 0, 140, 20));\r
+            jLabelDriverBinding.setText("Driver Binding");\r
+            jPanelDriver = new JPanel();\r
+            jPanelDriver.setBounds(new java.awt.Rectangle(0, 37, 505, 95));\r
+            jPanelDriver.setLayout(null);\r
+            jPanelDriver.add(jStarLabel1, null);\r
+            jPanelDriver.add(jLabelDriverBinding, null);\r
+            jPanelDriver.add(getJTextFieldDriverBinding(), null);\r
+            jPanelDriver.add(jLabelComponentName, null);\r
+            jPanelDriver.add(getJTextFieldComponentName(), null);\r
+            jPanelDriver.add(jLabelDriverConfig, null);\r
+            jPanelDriver.add(getJTextFieldDriverConfig(), null);\r
+            jPanelDriver.add(jLabelDriverDiagnostic, null);\r
+            jPanelDriver.add(getJTextFieldDriverDiagnostic(), null);\r
+        }\r
+        return jPanelDriver;\r
+    }\r
+\r
+    /**\r
+     * This method initializes jPanelLibrary   \r
+     *         \r
+     * @return javax.swing.JPanel      \r
+     */\r
+    private JPanel getJPanelLibrary() {\r
+        if (jPanelLibrary == null) {\r
+            jLabelDestructor = new JLabel();\r
+            jLabelDestructor.setBounds(new java.awt.Rectangle(12, 25, 140, 20));\r
+            jLabelDestructor.setText("Destructor");\r
+            jLabelConstructor = new JLabel();\r
+            jLabelConstructor.setBounds(new java.awt.Rectangle(12, 0, 140, 20));\r
+            jLabelConstructor.setText("Constructor");\r
+            jPanelLibrary = new JPanel();\r
+            jPanelLibrary.setBounds(new java.awt.Rectangle(0, 37, 505, 45));\r
+            jPanelLibrary.setLayout(null);\r
+            jPanelLibrary.add(jLabelConstructor, null);\r
+            jPanelLibrary.add(getJTextFieldConstructor(), null);\r
+            jPanelLibrary.add(jLabelDestructor, null);\r
+            jPanelLibrary.add(getJTextFieldDestructor(), null);\r
+        }\r
+        return jPanelLibrary;\r
+    }\r
+\r
+    /**\r
+     * This method initializes jPanelCallBack  \r
+     *         \r
+     * @return javax.swing.JPanel      \r
+     */\r
+    private JPanel getJPanelCallBack() {\r
+        if (jPanelCallBack == null) {\r
+            jLabelExitBootServices = new JLabel();\r
+            jLabelExitBootServices.setBounds(new java.awt.Rectangle(12, 25, 140, 20));\r
+            jLabelExitBootServices.setText("Exit Boot Services");\r
+            jLabelVirtualAddressMap = new JLabel();\r
+            jLabelVirtualAddressMap.setBounds(new java.awt.Rectangle(12, 0, 140, 20));\r
+            jLabelVirtualAddressMap.setText("Virtual Address Map");\r
+            jPanelCallBack = new JPanel();\r
+            jPanelCallBack.setBounds(new java.awt.Rectangle(0, 37, 505, 45));\r
+            jPanelCallBack.setLayout(null);\r
+            jPanelCallBack.add(jLabelVirtualAddressMap, null);\r
+            jPanelCallBack.add(getJTextFieldVirtualAddressMap(), null);\r
+            jPanelCallBack.add(jLabelExitBootServices, null);\r
+            jPanelCallBack.add(getJTextFieldExitBootServices(), null);\r
+        }\r
+        return jPanelCallBack;\r
+    }\r
+\r
+    /**\r
+     * This method initializes jTextFieldModuleEntryPoint      \r
+     *         \r
+     * @return javax.swing.JTextField  \r
+     */\r
+    private JTextField getJTextFieldModuleEntryPoint() {\r
+        if (jTextFieldModuleEntryPoint == null) {\r
+            jTextFieldModuleEntryPoint = new JTextField();\r
+            jTextFieldModuleEntryPoint.setBounds(new java.awt.Rectangle(168, 0, 320, 20));\r
+        }\r
+        return jTextFieldModuleEntryPoint;\r
+    }\r
+\r
+    /**\r
+     * This method initializes jTextFieldModuleUnloadImage     \r
+     *         \r
+     * @return javax.swing.JTextField  \r
+     */\r
+    private JTextField getJTextFieldModuleUnloadImage() {\r
+        if (jTextFieldModuleUnloadImage == null) {\r
+            jTextFieldModuleUnloadImage = new JTextField();\r
+            jTextFieldModuleUnloadImage.setBounds(new java.awt.Rectangle(168, 25, 320, 20));\r
+        }\r
+        return jTextFieldModuleUnloadImage;\r
+    }\r
+\r
+    /**\r
+     * This method initializes jTextFieldDriverBinding \r
+     *         \r
+     * @return javax.swing.JTextField  \r
+     */\r
+    private JTextField getJTextFieldDriverBinding() {\r
+        if (jTextFieldDriverBinding == null) {\r
+            jTextFieldDriverBinding = new JTextField();\r
+            jTextFieldDriverBinding.setBounds(new java.awt.Rectangle(168, 0, 320, 20));\r
+        }\r
+        return jTextFieldDriverBinding;\r
+    }\r
+\r
+    /**\r
+     * This method initializes jTextFieldComponentName \r
+     *         \r
+     * @return javax.swing.JTextField  \r
+     */\r
+    private JTextField getJTextFieldComponentName() {\r
+        if (jTextFieldComponentName == null) {\r
+            jTextFieldComponentName = new JTextField();\r
+            jTextFieldComponentName.setBounds(new java.awt.Rectangle(168, 25, 320, 20));\r
+        }\r
+        return jTextFieldComponentName;\r
+    }\r
+\r
+    /**\r
+     * This method initializes jTextFieldDriverConfig  \r
+     *         \r
+     * @return javax.swing.JTextField  \r
+     */\r
+    private JTextField getJTextFieldDriverConfig() {\r
+        if (jTextFieldDriverConfig == null) {\r
+            jTextFieldDriverConfig = new JTextField();\r
+            jTextFieldDriverConfig.setBounds(new java.awt.Rectangle(168, 50, 320, 20));\r
+        }\r
+        return jTextFieldDriverConfig;\r
+    }\r
+\r
+    /**\r
+     * This method initializes jTextFieldDriverDiagnostic      \r
+     *         \r
+     * @return javax.swing.JTextField  \r
+     */\r
+    private JTextField getJTextFieldDriverDiagnostic() {\r
+        if (jTextFieldDriverDiagnostic == null) {\r
+            jTextFieldDriverDiagnostic = new JTextField();\r
+            jTextFieldDriverDiagnostic.setBounds(new java.awt.Rectangle(168, 75, 320, 20));\r
+        }\r
+        return jTextFieldDriverDiagnostic;\r
+    }\r
+\r
+    /**\r
+     * This method initializes jTextFieldConstructor   \r
+     *         \r
+     * @return javax.swing.JTextField  \r
+     */\r
+    private JTextField getJTextFieldConstructor() {\r
+        if (jTextFieldConstructor == null) {\r
+            jTextFieldConstructor = new JTextField();\r
+            jTextFieldConstructor.setBounds(new java.awt.Rectangle(168, 0, 320, 20));\r
+        }\r
+        return jTextFieldConstructor;\r
+    }\r
+\r
+    /**\r
+     * This method initializes jTextFieldDestructor    \r
+     *         \r
+     * @return javax.swing.JTextField  \r
+     */\r
+    private JTextField getJTextFieldDestructor() {\r
+        if (jTextFieldDestructor == null) {\r
+            jTextFieldDestructor = new JTextField();\r
+            jTextFieldDestructor.setBounds(new java.awt.Rectangle(168, 25, 320, 20));\r
+        }\r
+        return jTextFieldDestructor;\r
+    }\r
+\r
+    /**\r
+     * This method initializes jTextFieldVirtualAddressMap     \r
+     *         \r
+     * @return javax.swing.JTextField  \r
+     */\r
+    private JTextField getJTextFieldVirtualAddressMap() {\r
+        if (jTextFieldVirtualAddressMap == null) {\r
+            jTextFieldVirtualAddressMap = new JTextField();\r
+            jTextFieldVirtualAddressMap.setBounds(new java.awt.Rectangle(168, 0, 320, 20));\r
+        }\r
+        return jTextFieldVirtualAddressMap;\r
+    }\r
+\r
+    /**\r
+     * This method initializes jTextFieldExitBootServices      \r
+     *         \r
+     * @return javax.swing.JTextField  \r
+     */\r
+    private JTextField getJTextFieldExitBootServices() {\r
+        if (jTextFieldExitBootServices == null) {\r
+            jTextFieldExitBootServices = new JTextField();\r
+            jTextFieldExitBootServices.setBounds(new java.awt.Rectangle(168, 25, 320, 20));\r
+        }\r
+        return jTextFieldExitBootServices;\r
+    }\r
+\r
     public static void main(String[] args) {\r
 \r
     }\r
@@ -202,7 +497,7 @@ public class ExternsDlg extends IDialog implements ItemListener {
      \r
      **/\r
     private void init() {\r
-        this.setSize(515, 200);\r
+        this.setSize(515, 250);\r
         this.setContentPane(getJScrollPane());\r
         this.setTitle("Externs");\r
         initFrame();\r
@@ -221,14 +516,56 @@ public class ExternsDlg extends IDialog implements ItemListener {
         this.id = inExternsId;\r
 \r
         if (this.id != null) {\r
-            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
-            }\r
-            this.jComboBoxType.setSelectedItem(id.getType());\r
+            String type = id.getType();\r
+            //\r
+            // Filter the type to lock down the type\r
+            //\r
+            this.jComboBoxType.removeAllItems();\r
+            this.jComboBoxType.addItem(type);\r
+\r
             this.jTextFieldFeatureFlag.setText(id.getFeatureFlag());\r
             this.jArchCheckBox.setSelectedItems(id.getSupArchList());\r
+\r
+            //\r
+            // Init specification\r
+            //\r
+            if (type.equals(EnumerationData.EXTERNS_SPECIFICATION)) {\r
+                this.jTextFieldSpecification.setText(id.getName0());\r
+            }\r
+\r
+            //\r
+            // Init image\r
+            //\r
+            if (type.equals(EnumerationData.EXTERNS_IMAGE)) {\r
+                this.jTextFieldModuleEntryPoint.setText(id.getName0());\r
+                this.jTextFieldModuleUnloadImage.setText(id.getName1());\r
+            }\r
+\r
+            //\r
+            // Init library\r
+            //\r
+            if (type.equals(EnumerationData.EXTERNS_LIBRARY)) {\r
+                this.jTextFieldConstructor.setText(id.getName0());\r
+                this.jTextFieldDestructor.setText(id.getName1());\r
+            }\r
+\r
+            //\r
+            // Init driver\r
+            //\r
+            if (type.equals(EnumerationData.EXTERNS_DRIVER)) {\r
+                this.jTextFieldDriverBinding.setText(id.getName0());\r
+                this.jTextFieldComponentName.setText(id.getName1());\r
+                this.jTextFieldDriverConfig.setText(id.getName2());\r
+                this.jTextFieldDriverDiagnostic.setText(id.getName3());\r
+            }\r
+\r
+            //\r
+            // Init library\r
+            //\r
+            if (type.equals(EnumerationData.EXTERNS_CALL_BACK)) {\r
+                this.jTextFieldVirtualAddressMap.setText(id.getName0());\r
+                this.jTextFieldExitBootServices.setText(id.getName1());\r
+            }\r
         }\r
     }\r
 \r
@@ -255,23 +592,21 @@ public class ExternsDlg extends IDialog implements ItemListener {
             jArchCheckBox = new ArchCheckBox();\r
             jArchCheckBox.setBounds(new java.awt.Rectangle(168, 62, 320, 20));\r
             jArchCheckBox.setPreferredSize(new java.awt.Dimension(320, 20));\r
-            jLabelC_Name = new JLabel();\r
-            jLabelC_Name.setBounds(new java.awt.Rectangle(12, 37, 140, 20));\r
-            jLabelC_Name.setText("Enter Value");\r
+\r
             jLabelName = new JLabel();\r
             jLabelName.setText("Choose Extern Type");\r
-            jLabelName.setBounds(new java.awt.Rectangle(12, 12, 168, 20));\r
+            jLabelName.setBounds(new java.awt.Rectangle(12, 12, 155, 20));\r
             jLabelArch = new JLabel();\r
-            jLabelArch.setBounds(new java.awt.Rectangle(12, 62, 168, 20));\r
+            jLabelArch.setBounds(new java.awt.Rectangle(12, 62, 155, 20));\r
             jLabelArch.setText("Supported Architectures");\r
             jLabelFeatureFlag = new JLabel();\r
-            jLabelFeatureFlag.setBounds(new java.awt.Rectangle(12, 87, 168, 20));\r
+            jLabelFeatureFlag.setBounds(new java.awt.Rectangle(12, 87, 155, 20));\r
             jLabelFeatureFlag.setText("Feature Flag Expression");\r
             jLabelFeatureFlag.setEnabled(false);\r
 \r
             jContentPane = new JPanel();\r
             jContentPane.setLayout(null);\r
-            jContentPane.setPreferredSize(new java.awt.Dimension(505, 155));\r
+            jContentPane.setPreferredSize(new java.awt.Dimension(505, 200));\r
 \r
             jContentPane.add(jLabelName, null);\r
             jContentPane.add(getJComboBoxType(), null);\r
@@ -279,12 +614,15 @@ public class ExternsDlg extends IDialog implements ItemListener {
             jContentPane.add(jLabelArch, null);\r
             jContentPane.add(getJTextFieldFeatureFlag(), null);\r
 \r
-            jContentPane.add(getJComboBoxPcdIsDriver(), null);\r
-            jContentPane.add(jLabelC_Name, null);\r
-            jContentPane.add(getJTextFieldC_Name(), null);\r
             jContentPane.add(jArchCheckBox, null);\r
             jContentPane.add(getJButtonOk(), null);\r
             jContentPane.add(getJButtonCancel(), null);\r
+\r
+            jContentPane.add(getJPanelSpecification(), null);\r
+            jContentPane.add(getJPanelImage(), null);\r
+            jContentPane.add(getJPanelDriver(), null);\r
+            jContentPane.add(getJPanelLibrary(), null);\r
+            jContentPane.add(getJPanelCallBack(), null);\r
         }\r
         return jContentPane;\r
     }\r
@@ -295,7 +633,11 @@ public class ExternsDlg extends IDialog implements ItemListener {
      **/\r
     private void initFrame() {\r
         Tools.generateComboBoxByVector(this.jComboBoxType, ed.getVExternTypes());\r
-        Tools.generateComboBoxByVector(this.jComboBoxPcdIsDriver, ed.getVPcdDriverTypes());\r
+        this.jPanelSpecification.setVisible(true);\r
+        this.jPanelImage.setVisible(false);\r
+        this.jPanelLibrary.setVisible(false);\r
+        this.jPanelDriver.setVisible(false);\r
+        this.jPanelCallBack.setVisible(false);\r
     }\r
 \r
     /* (non-Javadoc)\r
@@ -307,7 +649,7 @@ public class ExternsDlg extends IDialog implements ItemListener {
     public void actionPerformed(ActionEvent arg0) {\r
         if (arg0.getSource() == jButtonOk) {\r
             if (checkAdd()) {\r
-                getCurrentExterns();\r
+                this.getCurrentExterns();\r
                 this.returnType = DataType.RETURN_TYPE_OK;\r
                 this.setVisible(false);\r
             }\r
@@ -332,43 +674,132 @@ public class ExternsDlg extends IDialog implements ItemListener {
         //\r
 \r
         //\r
-        // When and only When type is not "Pcd Is Driver"\r
+        // Check specification\r
         //\r
-        if (!this.jComboBoxType.getSelectedItem().toString().equals(EnumerationData.EXTERNS_PCD_IS_DRIVER)) {\r
+        if (this.jComboBoxType.getSelectedItem().toString().equals(EnumerationData.EXTERNS_SPECIFICATION)) {\r
+            if (isEmpty(this.jTextFieldSpecification.getText())) {\r
+                Log.wrn("Update Externs", "Please type specification's name");\r
+                return false;\r
+            }\r
+            if (!DataValidation.isSentence(this.jTextFieldSpecification.getText())) {\r
+                Log.wrn("Update Externs", "Incorrect data type for Specification");\r
+                return false;\r
+            }\r
+\r
             //\r
-            // Check CName \r
+            // No need to check feature flag, return true directly here.\r
             //\r
-            if (isEmpty(this.jTextFieldC_Name.getText())) {\r
-                Log.wrn("Update Externs", "Value couldn't be empty");\r
+            return true;\r
+        }\r
+\r
+        //\r
+        // Check image\r
+        //\r
+        if (this.jComboBoxType.getSelectedItem().toString().equals(EnumerationData.EXTERNS_IMAGE)) {\r
+            if (isEmpty(this.jTextFieldModuleEntryPoint.getText())\r
+                && isEmpty(this.jTextFieldModuleUnloadImage.getText())) {\r
+                Log.wrn("Update Externs", "At least one of ModuleEntryPoint or ModuleUnloadImage should have a value");\r
                 return false;\r
             }\r
+            if (!isEmpty(this.jTextFieldModuleEntryPoint.getText())) {\r
+                if (!DataValidation.isC_NameType(this.jTextFieldModuleEntryPoint.getText())) {\r
+                    Log.wrn("Update Externs", "Incorrect data type for Module Entry Point");\r
+                    return false;\r
+                }\r
+            }\r
+            if (!isEmpty(this.jTextFieldModuleUnloadImage.getText())) {\r
+                if (!DataValidation.isC_NameType(this.jTextFieldModuleUnloadImage.getText())) {\r
+                    Log.wrn("Update Externs", "Incorrect data type for Module Unload Image");\r
+                    return false;\r
+                }\r
+            }\r
+        }\r
 \r
-            if (!isEmpty(this.jTextFieldC_Name.getText())) {\r
-                if (this.jComboBoxType.getSelectedItem().toString().equals(EnumerationData.EXTERNS_SPECIFICATION)) {\r
-                    if (!DataValidation.isSentence(this.jTextFieldC_Name.getText())) {\r
-                        Log.wrn("Update Externs", "Incorrect data type for Specification");\r
-                        return false;\r
-                    }\r
-                } else {\r
-                    if (!DataValidation.isC_NameType(this.jTextFieldC_Name.getText())) {\r
-                        Log.wrn("Update Externs", "Incorrect data type for C Name");\r
-                        return false;\r
-                    }\r
+        //\r
+        // Check library\r
+        //\r
+        if (this.jComboBoxType.getSelectedItem().toString().equals(EnumerationData.EXTERNS_LIBRARY)) {\r
+            if (isEmpty(this.jTextFieldConstructor.getText()) && isEmpty(this.jTextFieldDestructor.getText())) {\r
+                Log.wrn("Update Externs", "At least one of Constructor or Destructor should have a value");\r
+                return false;\r
+            }\r
+            if (!isEmpty(this.jTextFieldConstructor.getText())) {\r
+                if (!DataValidation.isC_NameType(this.jTextFieldConstructor.getText())) {\r
+                    Log.wrn("Update Externs", "Incorrect data type for Constructor");\r
+                    return false;\r
                 }\r
             }\r
+            if (!isEmpty(this.jTextFieldDestructor.getText())) {\r
+                if (!DataValidation.isC_NameType(this.jTextFieldDestructor.getText())) {\r
+                    Log.wrn("Update Externs", "Incorrect data type for Destructor");\r
+                    return false;\r
+                }\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 Externs", "Incorrect data type for Feature Flag");\r
+        //\r
+        // Check driver\r
+        //\r
+        if (this.jComboBoxType.getSelectedItem().toString().equals(EnumerationData.EXTERNS_DRIVER)) {\r
+            if (isEmpty(this.jTextFieldDriverBinding.getText())) {\r
+                Log.wrn("Update Externs", "DriverBinding must have a value");\r
+                return false;\r
+            }\r
+            if (!isEmpty(this.jTextFieldDriverBinding.getText())) {\r
+                if (!DataValidation.isC_NameType(this.jTextFieldDriverBinding.getText())) {\r
+                    Log.wrn("Update Externs", "Incorrect data type for DriverBinding");\r
+                    return false;\r
+                }\r
+            }\r
+            if (!isEmpty(this.jTextFieldComponentName.getText())) {\r
+                if (!DataValidation.isC_NameType(this.jTextFieldComponentName.getText())) {\r
+                    Log.wrn("Update Externs", "Incorrect data type for ComponentName");\r
+                    return false;\r
+                }\r
+            }\r
+            if (!isEmpty(this.jTextFieldDriverConfig.getText())) {\r
+                if (!DataValidation.isC_NameType(this.jTextFieldDriverConfig.getText())) {\r
+                    Log.wrn("Update Externs", "Incorrect data type for DriverConfig");\r
+                    return false;\r
+                }\r
+            }\r
+            if (!isEmpty(this.jTextFieldDriverDiagnostic.getText())) {\r
+                if (!DataValidation.isC_NameType(this.jTextFieldDriverDiagnostic.getText())) {\r
+                    Log.wrn("Update Externs", "Incorrect data type for DriverDiagnostic");\r
                     return false;\r
                 }\r
             }\r
-        } else {\r
-            if (this.jComboBoxPcdIsDriver.getSelectedItem().toString().equals(DataType.EMPTY_SELECT_ITEM)) {\r
-                Log.wrn("Update Externs", "You must select one PCD DRIVER type");\r
+        }\r
+\r
+        //\r
+        // Check call back\r
+        //\r
+        if (this.jComboBoxType.getSelectedItem().toString().equals(EnumerationData.EXTERNS_CALL_BACK)) {\r
+            if (isEmpty(this.jTextFieldVirtualAddressMap.getText())\r
+                && isEmpty(this.jTextFieldExitBootServices.getText())) {\r
+                Log.wrn("Update Externs", "At least one of VirtualAddressMap or ExitBootServices should have a value");\r
+                return false;\r
+            }\r
+            if (!isEmpty(this.jTextFieldVirtualAddressMap.getText())) {\r
+                if (!DataValidation.isC_NameType(this.jTextFieldVirtualAddressMap.getText())) {\r
+                    Log.wrn("Update Externs", "Incorrect data type for Virtual Address Map");\r
+                    return false;\r
+                }\r
+            }\r
+            if (!isEmpty(this.jTextFieldExitBootServices.getText())) {\r
+                if (!DataValidation.isC_NameType(this.jTextFieldExitBootServices.getText())) {\r
+                    Log.wrn("Update Externs", "Incorrect data type for Exit Boot Services");\r
+                    return false;\r
+                }\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 Externs", "Incorrect data type for Feature Flag");\r
                 return false;\r
             }\r
         }\r
@@ -378,17 +809,45 @@ public class ExternsDlg extends IDialog implements ItemListener {
 \r
     private ExternsIdentification getCurrentExterns() {\r
         String arg0 = "";\r
-        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
+        String arg1 = "";\r
+        String arg2 = "";\r
+        String arg3 = "";\r
+\r
+        String type = this.jComboBoxType.getSelectedItem().toString();\r
+        String featureFlag = this.jTextFieldFeatureFlag.getText();\r
+        Vector<String> arch = this.jArchCheckBox.getSelectedItemsVector();\r
+\r
+        if (type.equals(EnumerationData.EXTERNS_SPECIFICATION)) {\r
+            arg0 = this.jTextFieldSpecification.getText();\r
+            id = new ExternsIdentification(arg0, type);\r
         }\r
-        String arg1 = this.jComboBoxType.getSelectedItem().toString();\r
 \r
-        String arg2 = this.jTextFieldFeatureFlag.getText();\r
-        Vector<String> arg3 = this.jArchCheckBox.getSelectedItemsVector();\r
+        if (type.equals(EnumerationData.EXTERNS_IMAGE)) {\r
+            arg0 = this.jTextFieldModuleEntryPoint.getText();\r
+            arg1 = this.jTextFieldModuleUnloadImage.getText();\r
+            id = new ExternsIdentification(arg0, arg1, type, featureFlag, arch);\r
+        }\r
+\r
+        if (type.equals(EnumerationData.EXTERNS_LIBRARY)) {\r
+            arg0 = this.jTextFieldConstructor.getText();\r
+            arg1 = this.jTextFieldDestructor.getText();\r
+            id = new ExternsIdentification(arg0, arg1, type, featureFlag, arch);\r
+        }\r
+\r
+        if (type.equals(EnumerationData.EXTERNS_DRIVER)) {\r
+            arg0 = this.jTextFieldDriverBinding.getText();\r
+            arg1 = this.jTextFieldComponentName.getText();\r
+            arg2 = this.jTextFieldDriverConfig.getText();\r
+            arg3 = this.jTextFieldDriverDiagnostic.getText();\r
+            id = new ExternsIdentification(arg0, arg1, arg2, arg3, type, featureFlag, arch);\r
+        }\r
+\r
+        if (type.equals(EnumerationData.EXTERNS_CALL_BACK)) {\r
+            arg0 = this.jTextFieldVirtualAddressMap.getText();\r
+            arg1 = this.jTextFieldExitBootServices.getText();\r
+            id = new ExternsIdentification(arg0, arg1, type, featureFlag, arch);\r
+        }\r
 \r
-        id = new ExternsIdentification(arg0, arg1, arg2, arg3);\r
         return id;\r
     }\r
 \r
@@ -400,19 +859,66 @@ public class ExternsDlg extends IDialog implements ItemListener {
      */\r
     public void itemStateChanged(ItemEvent arg0) {\r
         if (arg0.getSource() == jComboBoxType && arg0.getStateChange() == ItemEvent.SELECTED) {\r
-            if (jComboBoxType.getSelectedItem().toString().equals(EnumerationData.EXTERNS_PCD_IS_DRIVER)) {\r
-                this.jComboBoxPcdIsDriver.setVisible(true);\r
-                this.jTextFieldC_Name.setVisible(false);\r
-                this.jLabelArch.setEnabled(false);\r
-                this.jArchCheckBox.setAllItemsEnabled(false);\r
-            } else if (jComboBoxType.getSelectedItem().toString().equals(EnumerationData.EXTERNS_SPECIFICATION)) {\r
+            if (jComboBoxType.getSelectedItem().toString().equals(EnumerationData.EXTERNS_SPECIFICATION)) {\r
+                this.jPanelSpecification.setVisible(true);\r
+                this.jPanelImage.setVisible(false);\r
+                this.jPanelLibrary.setVisible(false);\r
+                this.jPanelDriver.setVisible(false);\r
+                this.jPanelCallBack.setVisible(false);\r
                 this.jLabelArch.setEnabled(false);\r
                 this.jArchCheckBox.setAllItemsEnabled(false);\r
-            } else {\r
-                this.jComboBoxPcdIsDriver.setVisible(false);\r
-                this.jTextFieldC_Name.setVisible(true);\r
+                this.jLabelArch.setLocation(12, 62);\r
+                this.jArchCheckBox.setLocation(168, 62);\r
+                this.jLabelFeatureFlag.setLocation(12, 87);\r
+                this.jTextFieldFeatureFlag.setLocation(168, 87);\r
+            } else if (jComboBoxType.getSelectedItem().toString().equals(EnumerationData.EXTERNS_IMAGE)) {\r
+                this.jPanelSpecification.setVisible(false);\r
+                this.jPanelImage.setVisible(true);\r
+                this.jPanelLibrary.setVisible(false);\r
+                this.jPanelDriver.setVisible(false);\r
+                this.jPanelCallBack.setVisible(false);\r
+                this.jLabelArch.setEnabled(true);\r
+                this.jArchCheckBox.setAllItemsEnabled(true);\r
+                this.jLabelArch.setLocation(12, 87);\r
+                this.jArchCheckBox.setLocation(168, 87);\r
+                this.jLabelFeatureFlag.setLocation(12, 112);\r
+                this.jTextFieldFeatureFlag.setLocation(168, 112);\r
+            } else if (jComboBoxType.getSelectedItem().toString().equals(EnumerationData.EXTERNS_LIBRARY)) {\r
+                this.jPanelSpecification.setVisible(false);\r
+                this.jPanelImage.setVisible(false);\r
+                this.jPanelLibrary.setVisible(true);\r
+                this.jPanelDriver.setVisible(false);\r
+                this.jPanelCallBack.setVisible(false);\r
+                this.jLabelArch.setEnabled(true);\r
+                this.jArchCheckBox.setAllItemsEnabled(true);\r
+                this.jLabelArch.setLocation(12, 87);\r
+                this.jArchCheckBox.setLocation(168, 87);\r
+                this.jLabelFeatureFlag.setLocation(12, 112);\r
+                this.jTextFieldFeatureFlag.setLocation(168, 112);\r
+            } else if (jComboBoxType.getSelectedItem().toString().equals(EnumerationData.EXTERNS_DRIVER)) {\r
+                this.jPanelSpecification.setVisible(false);\r
+                this.jPanelImage.setVisible(false);\r
+                this.jPanelLibrary.setVisible(false);\r
+                this.jPanelDriver.setVisible(true);\r
+                this.jPanelCallBack.setVisible(false);\r
+                this.jLabelArch.setEnabled(true);\r
+                this.jArchCheckBox.setAllItemsEnabled(true);\r
+                this.jLabelArch.setLocation(12, 137);\r
+                this.jArchCheckBox.setLocation(168, 137);\r
+                this.jLabelFeatureFlag.setLocation(12, 162);\r
+                this.jTextFieldFeatureFlag.setLocation(168, 162);\r
+            } else if (jComboBoxType.getSelectedItem().toString().equals(EnumerationData.EXTERNS_CALL_BACK)) {\r
+                this.jPanelSpecification.setVisible(false);\r
+                this.jPanelImage.setVisible(false);\r
+                this.jPanelLibrary.setVisible(false);\r
+                this.jPanelDriver.setVisible(false);\r
+                this.jPanelCallBack.setVisible(true);\r
                 this.jLabelArch.setEnabled(true);\r
                 this.jArchCheckBox.setAllItemsEnabled(true);\r
+                this.jLabelArch.setLocation(12, 87);\r
+                this.jArchCheckBox.setLocation(168, 87);\r
+                this.jLabelFeatureFlag.setLocation(12, 112);\r
+                this.jTextFieldFeatureFlag.setLocation(168, 112);\r
             }\r
         }\r
     }\r