1. Fix EDKT461 [Framework Wizard] Can't change ModuleBuildOptions for MSA file
authorhche10x <hche10x@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 13 Nov 2006 08:11:53 +0000 (08:11 +0000)
committerhche10x <hche10x@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 13 Nov 2006 08:11:53 +0000 (08:11 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1938 6f19259b-4bc3-4df7-8a09-765794883524

Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/FrameworkWizardUI.java
Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/EnumerationData.java
Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/BootModes/BootModesIdentification.java
Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/BootModes/BootModesVector.java
Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/BuildOptions/BuildOptionsIdentification.java [new file with mode: 0644]
Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/BuildOptions/BuildOptionsVector.java [new file with mode: 0644]
Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleBuildOptions.java [new file with mode: 0644]
Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/BuildOptionsDlg.java [new file with mode: 0644]

index 5eef420..d11e7ce 100644 (file)
@@ -73,6 +73,7 @@ import org.tianocore.frameworkwizard.far.installui.InstallStepOne;
 import org.tianocore.frameworkwizard.far.updateui.UpdateStepOne;\r
 import org.tianocore.frameworkwizard.module.Identifications.ModuleIdentification;\r
 import org.tianocore.frameworkwizard.module.ui.ModuleBootModes;\r
+import org.tianocore.frameworkwizard.module.ui.ModuleBuildOptions;\r
 import org.tianocore.frameworkwizard.module.ui.ModuleDataHubs;\r
 import org.tianocore.frameworkwizard.module.ui.ModuleEvents;\r
 import org.tianocore.frameworkwizard.module.ui.ModuleExterns;\r
@@ -2535,6 +2536,7 @@ public class FrameworkWizardUI extends IFrame implements KeyListener, MouseListe
         iTree.addNode(new IDefaultMutableTreeNode("External Defintions", IDefaultMutableTreeNode.MSA_EXTERNS, true, id,\r
                                                   belongNode));\r
         iTree.addNode(new IDefaultMutableTreeNode("Pcd Coded", IDefaultMutableTreeNode.MSA_PCDS, true, id, belongNode));\r
+        iTree.addNode(new IDefaultMutableTreeNode("Build Options", IDefaultMutableTreeNode.MSA_BUILDOPTIONS, true, id, belongNode));\r
     }\r
 \r
     private void insertPackageTreeNode(Identification id) {\r
@@ -2882,6 +2884,10 @@ public class FrameworkWizardUI extends IFrame implements KeyListener, MouseListe
             ModulePCDs frmPcd = new ModulePCDs(msa);\r
             getJDesktopPaneModule().add(frmPcd, 1);\r
             break;\r
+        case IDefaultMutableTreeNode.MSA_BUILDOPTIONS:\r
+            ModuleBuildOptions frmMbo = new ModuleBuildOptions(msa);\r
+            getJDesktopPaneModule().add(frmMbo, 1);\r
+            break;\r
         }\r
         this.jTabbedPaneEditor.setSelectedIndex(0);\r
         resizeDesktopPanel();\r
index 8016695..5b6c4f6 100644 (file)
@@ -21,183 +21,205 @@ public class EnumerationData {
     // Static data for externs definitions\r
     //\r
     public final static String EXTERNS_PCD_IS_DRIVER = "Pcd Is Driver";\r
-    \r
+\r
     public final static String EXTERNS_SPECIFICATION = "Specification";\r
-    \r
+\r
     public final static String EXTERNS_IMAGE = "Image";\r
+\r
     public final static String EXTERNS_MODULE_ENTRY_POINT = "ModuleEntryPoint";\r
+\r
     public final static String EXTERNS_MODULE_UNLOAD_IMAGE = "ModuleUnloadImage";\r
-    \r
+\r
     public final static String EXTERNS_LIBRARY = "Library";\r
+\r
     public final static String EXTERNS_CONSTRUCTOR = "Constructor";\r
+\r
     public final static String EXTERNS_DESTRUCTOR = "Destructor";\r
-    \r
+\r
     public final static String EXTERNS_DRIVER = "Driver";\r
+\r
     public final static String EXTERNS_DRIVER_BINDING = "DriverBinding";\r
+\r
     public final static String EXTERNS_COMPONENT_NAME = "ComponentName";\r
+\r
     public final static String EXTERNS_DRIVER_CONFIG = "DriverConfig";\r
+\r
     public final static String EXTERNS_DRIVER_DIAG = "DriverDiag";\r
-    \r
+\r
     public final static String EXTERNS_CALL_BACK = "Call Back";\r
+\r
     public final static String EXTERNS_VIRTUAL_ADDRESS_MAP_CALL_BACK = "VirtualAddressMap";\r
+\r
     public final static String EXTERNS_EXIT_BOOT_SERVICES_CALL_BACK = "ExitBootServices";\r
-    \r
+\r
     //\r
     // Static data for guid type\r
     //\r
     public final static String GUID_TYPE_DATA_HUB_RECORD = "DATA_HUB_RECORD";\r
-    \r
+\r
     public final static String GUID_TYPE_EFI_EVENT = "EFI_EVENT";\r
-    \r
+\r
     public final static String GUID_TYPE_EFI_SYSTEM_CONFIGURATION_TABLE = "EFI_SYSTEM_CONFIGURATION_TABLE";\r
-    \r
+\r
     public final static String GUID_TYPE_EFI_VARIABLE = "EFI_VARIABLE";\r
-    \r
+\r
     public final static String GUID_TYPE_GUID = "GUID";\r
-    \r
+\r
     public final static String GUID_TYPE_HII_PACKAGE_LIST = "HII_PACKAGE_LIST";\r
-    \r
+\r
     public final static String GUID_TYPE_HOB = "HOB";\r
-    \r
+\r
     public final static String GUID_TYPE_TOKEN_SPACE_GUID = "TOKEN_SPACE_GUID";\r
     \r
+    //\r
+    // Static data for build targets\r
+    //\r
+    public final static String BUILD_TARGET_DEBUG = "DEBUG";\r
+    \r
+    public final static String BUILD_TARGET_RELEASE = "RELEASE";\r
+\r
     //\r
     // Common data\r
     //\r
     public Vector<String> vSupportedArchitectures = new Vector<String>();\r
-    \r
+\r
     public Vector<String> vEnabled = new Vector<String>();\r
-    \r
+\r
     public Vector<String> vBoolean = new Vector<String>();\r
-    \r
+\r
     //\r
     // Used by Msa Header\r
     //\r
     public Vector<String> vModuleType = new Vector<String>();\r
-    \r
+\r
     public Vector<String> vCompontentType = new Vector<String>();\r
-    \r
+\r
     //\r
     // Used by Library Class Definitions\r
     //\r
     public Vector<String> vLibraryUsage = new Vector<String>();\r
-    \r
+\r
     public Vector<String> vFrameworkModuleTypes = new Vector<String>();\r
-    \r
+\r
     public Vector<String> vLibClassDef = new Vector<String>();\r
-    \r
+\r
     public Vector<String> vLibClassDefBase = new Vector<String>();\r
-    \r
+\r
     public Vector<String> vLibClassDefPei = new Vector<String>();\r
-    \r
+\r
     public Vector<String> vLibClassDefPeim = new Vector<String>();\r
-    \r
+\r
     public Vector<String> vLibClassDefDxeCore = new Vector<String>();\r
-    \r
+\r
     public Vector<String> vLibClassDefDxeDriver = new Vector<String>();\r
-    \r
+\r
     public Vector<String> vLibClassDefDxeSmmDriver = new Vector<String>();\r
-    \r
+\r
     public Vector<String> vLibClassDefUefiDriver = new Vector<String>();\r
-    \r
+\r
     //\r
     // Used by Source Files\r
     //\r
     public Vector<String> vSourceFilesToolChainFamily = new Vector<String>();\r
-    \r
+\r
     public Vector<String> vSourceFilesFileType = new Vector<String>();\r
-    \r
+\r
     public Vector<String> vToolCode = new Vector<String>();\r
-    \r
+\r
     //\r
     // Used by Package Dependencies\r
     //\r
     public Vector<String> vPackageUsage = new Vector<String>();\r
-    \r
+\r
     //\r
     // Used by Protocols\r
     //\r
     public Vector<String> vProtocolUsage = new Vector<String>();\r
-    \r
+\r
     public Vector<String> vProtocolNotifyUsage = new Vector<String>();\r
-    \r
+\r
     public Vector<String> vProtocolType = new Vector<String>();\r
-    \r
+\r
     //\r
     // Used by Events\r
     //\r
     public Vector<String> vEventType = new Vector<String>();\r
-    \r
+\r
     public Vector<String> vEventUsage = new Vector<String>();\r
-    \r
+\r
     public Vector<String> vEventGroup = new Vector<String>();\r
-    \r
+\r
     //\r
     // Used by Hobs\r
     //\r
     public Vector<String> vHobType = new Vector<String>();\r
-    \r
+\r
     public Vector<String> vHobUsage = new Vector<String>();\r
-    \r
+\r
     //\r
     // Used by Ppis\r
     //\r
     public Vector<String> vPpiType = new Vector<String>();\r
-    \r
+\r
     public Vector<String> vPpiUsage = new Vector<String>();\r
-    \r
+\r
     public Vector<String> vPpiNotifyUsage = new Vector<String>();\r
-    \r
+\r
     //\r
     // Used by Variable\r
     //\r
     public Vector<String> vVariableUsage = new Vector<String>();\r
-    \r
+\r
     //\r
     // Used by Boot Mode\r
     //\r
     public Vector<String> vBootModeNames = new Vector<String>();\r
-    \r
+\r
     public Vector<String> vBootModeUsage = new Vector<String>();\r
-   \r
+\r
     //\r
     // Used by System Tables\r
     //\r
     public Vector<String> vSystemTableUsage = new Vector<String>();\r
-    \r
+\r
     //\r
     // Used by Data Hubs\r
     //\r
     public Vector<String> vDataHubUsage = new Vector<String>();\r
-    \r
+\r
     //\r
     // Used by Hii Packages\r
     //\r
     public Vector<String> vHiiPackageUsage = new Vector<String>();\r
-    \r
+\r
     //\r
     // Used by Guid\r
     //\r
     public Vector<String> vGuidUsage = new Vector<String>();\r
-    \r
+\r
     //\r
     // Used by Externs\r
     //\r
     public Vector<String> vExternTypes = new Vector<String>();\r
-    \r
+\r
     public Vector<String> vPcdDriverTypes = new Vector<String>();\r
-    \r
+\r
     //\r
     // Used by Pcd\r
     //\r
     public Vector<String> vPcdItemTypes = new Vector<String>();\r
-    \r
+\r
     public Vector<String> vPcdUsage = new Vector<String>();\r
+    \r
+    //\r
+    // Used by Build Options\r
+    //\r
+    public Vector<String> vBuildTargets = new Vector<String>();\r
 \r
     public EnumerationData() {\r
         init();\r
     }\r
-    \r
+\r
     private void init() {\r
         //\r
         // Init common data first\r
@@ -205,12 +227,12 @@ public class EnumerationData {
         initSupportedArchitectures();\r
         initEnabled();\r
         initBoolean();\r
-        \r
+\r
         //\r
         // Used by Msa header\r
         //\r
         initModuleType();\r
-        \r
+\r
         //\r
         // Used by Library Class Definitions\r
         //\r
@@ -231,95 +253,100 @@ public class EnumerationData {
         initSourceFilesToolChainFamily();\r
         initSourceFilesFileType();\r
         initToolCode();\r
-        \r
+\r
         //\r
         // Used by Package Dependencies\r
         //\r
         initPackageUsage();\r
-        \r
+\r
         //\r
         // Used by Protocols\r
         //\r
         initProtocolType();\r
         initProtocolUsage();\r
         initProtocolNotifyUsage();\r
-        \r
+\r
         //\r
         // Used by Events\r
         //\r
         initEventType();\r
         initEventUsage();\r
         initEventGroup();\r
-        \r
+\r
         //\r
         // Used by Hobs\r
         //\r
         initHobType();\r
         initHobUsage();\r
-        \r
+\r
         //\r
         // Used by Ppis\r
         //\r
         initPpiType();\r
         initPpiUsage();\r
         initPpiNotifyUsage();\r
-        \r
+\r
         //\r
         // Used by Variable\r
         //\r
         initVariableUsage();\r
-        \r
+\r
         //\r
         // Used by Boot Mode\r
         //\r
         initBootModeNames();\r
         initBootModeUsage();\r
-        \r
+\r
         //\r
         // Used by System Tables\r
         //\r
         initSystemTableUsage();\r
-        \r
+\r
         //\r
         // Used by Data Hubs\r
         //\r
         initDataHubUsage();\r
-        \r
+\r
         //\r
         // Used by Hii Packages\r
         //\r
         initHiiPackages();\r
-        \r
+\r
         //\r
         // Used by Guid\r
         //\r
         initGuidUsage();\r
-        \r
+\r
         //\r
         // Used by Externs\r
         //\r
         initExternTypes();\r
         initPcdDriverTypes();\r
-        \r
+\r
         //\r
         // Used by Pcd\r
         //\r
         initPcdItemTypes();\r
         initPcdUsage();\r
+        \r
+        //\r
+        // Used by Build Option\r
+        //\r
+        initBuildTargets();\r
     }\r
-    \r
+\r
     private void initEnabled() {\r
         vEnabled.removeAllElements();\r
         vEnabled.addElement("Disabled");\r
         vEnabled.addElement("Enabled");\r
     }\r
-    \r
+\r
     private void initBoolean() {\r
         vBoolean.removeAllElements();\r
         vBoolean.addElement(DataType.FALSE);\r
         vBoolean.addElement(DataType.TRUE);\r
     }\r
-    \r
+\r
     private void initModuleType() {\r
         vModuleType.removeAllElements();\r
         vModuleType.addElement("BASE");\r
@@ -337,25 +364,25 @@ public class EnumerationData {
         vModuleType.addElement("USER_DEFINED");\r
         Sort.sortVectorString(vModuleType, DataType.SORT_TYPE_ASCENDING);\r
     }\r
-    \r
-//    private void initComponentType() {\r
-//        vCompontentType.removeAllElements();\r
-//        vCompontentType.addElement("APRIORI");\r
-//        vCompontentType.addElement("LIBRARY");\r
-//        vCompontentType.addElement("FV_IMAGE_FILE");\r
-//        vCompontentType.addElement("BS_DRIVER");\r
-//        vCompontentType.addElement("RT_DRIVER");\r
-//        vCompontentType.addElement("SAL_RT_DRIVER");\r
-//        vCompontentType.addElement("PE32_PEIM");\r
-//        vCompontentType.addElement("PIC_PEIM");\r
-//        vCompontentType.addElement("COMBINED_PEIM_DRIVER");\r
-//        vCompontentType.addElement("PEI_CORE");\r
-//        vCompontentType.addElement("DXE_CORE");\r
-//        vCompontentType.addElement("APPLICATION");\r
-//        vCompontentType.addElement("BS_DRIVER_EFI");\r
-//        vCompontentType.addElement("SHELLAPP");\r
-//    }\r
-    \r
+\r
+    //    private void initComponentType() {\r
+    //        vCompontentType.removeAllElements();\r
+    //        vCompontentType.addElement("APRIORI");\r
+    //        vCompontentType.addElement("LIBRARY");\r
+    //        vCompontentType.addElement("FV_IMAGE_FILE");\r
+    //        vCompontentType.addElement("BS_DRIVER");\r
+    //        vCompontentType.addElement("RT_DRIVER");\r
+    //        vCompontentType.addElement("SAL_RT_DRIVER");\r
+    //        vCompontentType.addElement("PE32_PEIM");\r
+    //        vCompontentType.addElement("PIC_PEIM");\r
+    //        vCompontentType.addElement("COMBINED_PEIM_DRIVER");\r
+    //        vCompontentType.addElement("PEI_CORE");\r
+    //        vCompontentType.addElement("DXE_CORE");\r
+    //        vCompontentType.addElement("APPLICATION");\r
+    //        vCompontentType.addElement("BS_DRIVER_EFI");\r
+    //        vCompontentType.addElement("SHELLAPP");\r
+    //    }\r
+\r
     private void initSupportedArchitectures() {\r
         vSupportedArchitectures.removeAllElements();\r
         vSupportedArchitectures.addElement("EBC");\r
@@ -365,7 +392,7 @@ public class EnumerationData {
         vSupportedArchitectures.addElement("ARM");\r
         vSupportedArchitectures.addElement("PPC");\r
     }\r
-    \r
+\r
     private void initLibraryUsage() {\r
         vLibraryUsage.removeAllElements();\r
         vLibraryUsage.addElement("ALWAYS_CONSUMED");\r
@@ -374,7 +401,7 @@ public class EnumerationData {
         vLibraryUsage.addElement("SOMETIMES_PRODUCED");\r
         vLibraryUsage.addElement("PRIVATE");\r
     }\r
-    \r
+\r
     private void initFrameworkModuleTypes() {\r
         vFrameworkModuleTypes.removeAllElements();\r
         vFrameworkModuleTypes.addElement("BASE");\r
@@ -416,7 +443,7 @@ public class EnumerationData {
             vLibClassDef.addElement(vLibClassDefUefiDriver.elementAt(index));\r
         }\r
     }\r
-    \r
+\r
     private void initLibClassDefBase() {\r
         vLibClassDefBase.removeAllElements();\r
         vLibClassDefBase.addElement("BaseLib");\r
@@ -435,12 +462,12 @@ public class EnumerationData {
         vLibClassDefBase.addElement("SmbusLib");\r
         vLibClassDefBase.addElement("TimerLib");\r
     }\r
-    \r
+\r
     private void initLibClassDefPei() {\r
         vLibClassDefPei.removeAllElements();\r
         vLibClassDefPei.addElement("PeiCoreEntryPoint");\r
     }\r
-    \r
+\r
     private void initLibClassDefPeim() {\r
         vLibClassDefPeim.removeAllElements();\r
         vLibClassDefPeim.addElement("BaseMemoryLib");\r
@@ -456,13 +483,13 @@ public class EnumerationData {
         vLibClassDefPeim.addElement("ResourcePublicationLib");\r
         vLibClassDefPeim.addElement("SmbusLib");\r
     }\r
-    \r
+\r
     private void initLibClassDefDxeCore() {\r
         vLibClassDefDxeCore.removeAllElements();\r
         vLibClassDefDxeCore.addElement("DxeCoreEntryPoint");\r
         vLibClassDefDxeCore.addElement("HobLib");\r
     }\r
-    \r
+\r
     private void initLibClassDefDxeDriver() {\r
         vLibClassDefDxeDriver.removeAllElements();\r
         vLibClassDefDxeDriver.addElement("DxeServicesTableLib");\r
@@ -477,12 +504,12 @@ public class EnumerationData {
         vLibClassDefDxeDriver.addElement("UefiDecompressLib");\r
         vLibClassDefDxeDriver.addElement("UefiRuntimeServicesTableLib");\r
     }\r
-    \r
+\r
     private void initLibClassDefDxeSmmDriver() {\r
         vLibClassDefDxeSmmDriver.removeAllElements();\r
         vLibClassDefDxeSmmDriver.addElement("DxeSmmDriverEntryPoint");\r
     }\r
-    \r
+\r
     private void initLibClassDefUefiDriver() {\r
         vLibClassDefUefiDriver.removeAllElements();\r
         vLibClassDefUefiDriver.addElement("BaseMemoryLib");\r
@@ -492,14 +519,14 @@ public class EnumerationData {
         vLibClassDefUefiDriver.addElement("UefiDriverModelLib");\r
         vLibClassDefUefiDriver.addElement("UefiLib");\r
     }\r
-    \r
+\r
     private void initSourceFilesToolChainFamily() {\r
         vSourceFilesToolChainFamily.removeAllElements();\r
         vSourceFilesToolChainFamily.addElement("MSFT");\r
         vSourceFilesToolChainFamily.addElement("INTC");\r
         vSourceFilesToolChainFamily.addElement("GCC");\r
     }\r
-    \r
+\r
     private void initSourceFilesFileType() {\r
         vSourceFilesFileType.removeAllElements();\r
         vSourceFilesFileType.addElement("CCODE");\r
@@ -516,23 +543,23 @@ public class EnumerationData {
         vSourceFilesFileType.addElement("FFS");\r
         vSourceFilesFileType.addElement("EFI");\r
     }\r
-    \r
+\r
     private void initToolCode() {\r
         vToolCode.removeAllElements();\r
         vToolCode.addElement(DataType.EMPTY_SELECT_ITEM);\r
-//        vToolCode.addElement("Build_CCode");\r
-//        vToolCode.addElement("Build_AUTOGEN");\r
-//        vToolCode.addElement("Build_DPX");\r
-//        vToolCode.addElement("Build_ASM");\r
-//        vToolCode.addElement("Build_Assembly");\r
-//        vToolCode.addElement("Build_Gcc_Assembly");\r
-//        vToolCode.addElement("Build_IPF_Assembly_Code");\r
-//        vToolCode.addElement("Build_IPF_PP_Code");\r
-//        vToolCode.addElement("Build_Library");\r
-//        vToolCode.addElement("Build_UNI");\r
-//        vToolCode.addElement("Build_Unicode_Database");\r
-//        vToolCode.addElement("Build_VFR");\r
-//        vToolCode.addElement("Build_DUMMY");\r
+        //        vToolCode.addElement("Build_CCode");\r
+        //        vToolCode.addElement("Build_AUTOGEN");\r
+        //        vToolCode.addElement("Build_DPX");\r
+        //        vToolCode.addElement("Build_ASM");\r
+        //        vToolCode.addElement("Build_Assembly");\r
+        //        vToolCode.addElement("Build_Gcc_Assembly");\r
+        //        vToolCode.addElement("Build_IPF_Assembly_Code");\r
+        //        vToolCode.addElement("Build_IPF_PP_Code");\r
+        //        vToolCode.addElement("Build_Library");\r
+        //        vToolCode.addElement("Build_UNI");\r
+        //        vToolCode.addElement("Build_Unicode_Database");\r
+        //        vToolCode.addElement("Build_VFR");\r
+        //        vToolCode.addElement("Build_DUMMY");\r
         vToolCode.addElement("CC");\r
         vToolCode.addElement("DLINK");\r
         vToolCode.addElement("SLINK");\r
@@ -541,13 +568,13 @@ public class EnumerationData {
         vToolCode.addElement("ASMLINK");\r
         vToolCode.addElement("ASL");\r
     }\r
-    \r
+\r
     private void initPackageUsage() {\r
         vPackageUsage.removeAllElements();\r
         vPackageUsage.addElement("ALWAYS_CONSUMED");\r
         vPackageUsage.addElement("ALWAYS_PRODUCED");\r
     }\r
-    \r
+\r
     private void initProtocolUsage() {\r
         vProtocolUsage.removeAllElements();\r
         vProtocolUsage.addElement("ALWAYS_CONSUMED");\r
@@ -558,19 +585,19 @@ public class EnumerationData {
         vProtocolUsage.addElement("BY_START");\r
         vProtocolUsage.addElement("PRIVATE");\r
     }\r
-    \r
+\r
     private void initProtocolType() {\r
         vProtocolType.removeAllElements();\r
         vProtocolType.addElement("Protocol");\r
         vProtocolType.addElement("Protocol Notify");\r
     }\r
-    \r
+\r
     private void initEventType() {\r
         vEventType.removeAllElements();\r
         vEventType.addElement("CreateEvents");\r
         vEventType.addElement("SignalEvents");\r
     }\r
-    \r
+\r
     private void initEventUsage() {\r
         vEventUsage.removeAllElements();\r
         vEventUsage.addElement("ALWAYS_CONSUMED");\r
@@ -579,14 +606,14 @@ public class EnumerationData {
         vEventUsage.addElement("SOMETIMES_PRODUCED");\r
         vEventUsage.addElement("PRIVATE");\r
     }\r
-    \r
+\r
     private void initEventGroup() {\r
         vEventGroup.removeAllElements();\r
         vEventGroup.addElement("EVENT_GROUP_GUID");\r
         vEventGroup.addElement("EVENT_TYPE_PERIODIC_TIMER");\r
         vEventGroup.addElement("EVENT_TYPE_RELATIVE_TIMER");\r
     }\r
-    \r
+\r
     private void initHobType() {\r
         vHobType.removeAllElements();\r
         vHobType.addElement("PHIT");\r
@@ -598,7 +625,7 @@ public class EnumerationData {
         vHobType.addElement("POOL");\r
         vHobType.addElement("CAPSULE_VOLUME");\r
     }\r
-    \r
+\r
     private void initHobUsage() {\r
         vHobUsage.removeAllElements();\r
         vHobUsage.addElement("ALWAYS_CONSUMED");\r
@@ -607,13 +634,13 @@ public class EnumerationData {
         vHobUsage.addElement("SOMETIMES_PRODUCED");\r
         vHobUsage.addElement("PRIVATE");\r
     }\r
-    \r
+\r
     private void initPpiType() {\r
         vPpiType.removeAllElements();\r
         vPpiType.addElement("Ppi");\r
         vPpiType.addElement("Ppi Notify");\r
     }\r
-    \r
+\r
     private void initPpiUsage() {\r
         vPpiUsage.removeAllElements();\r
         vPpiUsage.addElement("ALWAYS_CONSUMED");\r
@@ -622,16 +649,16 @@ public class EnumerationData {
         vPpiUsage.addElement("SOMETIMES_PRODUCED");\r
         vPpiUsage.addElement("PRIVATE");\r
     }\r
-    \r
+\r
     private void initPpiNotifyUsage() {\r
         vPpiNotifyUsage.removeAllElements();\r
         vPpiNotifyUsage.addElement("SOMETIMES_CONSUMED");\r
     }\r
-    \r
+\r
     private void initProtocolNotifyUsage() {\r
         vProtocolNotifyUsage.addElement("SOMETIMES_CONSUMED");\r
     }\r
-    \r
+\r
     private void initVariableUsage() {\r
         vVariableUsage.removeAllElements();\r
         vVariableUsage.addElement("ALWAYS_CONSUMED");\r
@@ -640,7 +667,7 @@ public class EnumerationData {
         vVariableUsage.addElement("SOMETIMES_PRODUCED");\r
         vVariableUsage.addElement("PRIVATE");\r
     }\r
-    \r
+\r
     private void initBootModeNames() {\r
         vBootModeNames.removeAllElements();\r
         vBootModeNames.addElement("FULL");\r
@@ -664,7 +691,7 @@ public class EnumerationData {
         vBootModeNames.addElement("RECOVERY_S5_RESUME");\r
         vBootModeNames.addElement("RECOVERY_FLASH_UPDATE");\r
     }\r
-    \r
+\r
     private void initBootModeUsage() {\r
         vBootModeUsage.removeAllElements();\r
         vBootModeUsage.addElement("ALWAYS_CONSUMED");\r
@@ -672,7 +699,7 @@ public class EnumerationData {
         vBootModeUsage.addElement("ALWAYS_PRODUCED");\r
         vBootModeUsage.addElement("SOMETIMES_PRODUCED");\r
     }\r
-    \r
+\r
     private void initSystemTableUsage() {\r
         vSystemTableUsage.removeAllElements();\r
         vSystemTableUsage.addElement("ALWAYS_CONSUMED");\r
@@ -681,7 +708,7 @@ public class EnumerationData {
         vSystemTableUsage.addElement("SOMETIMES_PRODUCED");\r
         vSystemTableUsage.addElement("PRIVATE");\r
     }\r
-    \r
+\r
     private void initDataHubUsage() {\r
         vDataHubUsage.removeAllElements();\r
         vDataHubUsage.addElement("ALWAYS_CONSUMED");\r
@@ -690,14 +717,14 @@ public class EnumerationData {
         vDataHubUsage.addElement("SOMETIMES_PRODUCED");\r
         vDataHubUsage.addElement("PRIVATE");\r
     }\r
-    \r
+\r
     private void initHiiPackages() {\r
         vHiiPackageUsage.removeAllElements();\r
         vHiiPackageUsage.addElement("ALWAYS_PRODUCED");\r
         vHiiPackageUsage.addElement("SOMETIMES_PRODUCED");\r
         vHiiPackageUsage.addElement("PRIVATE");\r
     }\r
-    \r
+\r
     private void initGuidUsage() {\r
         vGuidUsage.removeAllElements();\r
         vGuidUsage.addElement("ALWAYS_CONSUMED");\r
@@ -706,23 +733,23 @@ public class EnumerationData {
         vGuidUsage.addElement("SOMETIMES_PRODUCED");\r
         vGuidUsage.addElement("PRIVATE");\r
     }\r
-    \r
+\r
     private void initExternTypes() {\r
         vExternTypes.removeAllElements();\r
-        \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
-    \r
+\r
     private void initPcdDriverTypes() {\r
-        vPcdDriverTypes.removeAllElements();        \r
+        vPcdDriverTypes.removeAllElements();\r
         vPcdDriverTypes.addElement("PEI_PCD_DRIVER");\r
         vPcdDriverTypes.addElement("DXE_PCD_DRIVER");\r
     }\r
-    \r
+\r
     private void initPcdItemTypes() {\r
         vPcdItemTypes.removeAllElements();\r
         vPcdItemTypes.addElement(DataType.PCD_ITEM_TYPE_FEATURE_FLAG);\r
@@ -731,7 +758,7 @@ public class EnumerationData {
         vPcdItemTypes.addElement(DataType.PCD_ITEM_TYPE_DYNAMIC);\r
         vPcdItemTypes.addElement(DataType.PCD_ITEM_TYPE_DYNAMIC_EX);\r
     }\r
-    \r
+\r
     private void initPcdUsage() {\r
         vPcdUsage.removeAllElements();\r
         vPcdUsage.addElement("ALWAYS_CONSUMED");\r
@@ -740,6 +767,12 @@ public class EnumerationData {
         vPcdUsage.addElement("SOMETIMES_PRODUCED");\r
     }\r
     \r
+    private void initBuildTargets() {\r
+        vBuildTargets.removeAllElements();\r
+        vBuildTargets.addElement(EnumerationData.BUILD_TARGET_DEBUG);\r
+        vBuildTargets.addElement(EnumerationData.BUILD_TARGET_RELEASE);\r
+    }\r
+\r
     public Vector<String> getvCompontentType() {\r
         return vCompontentType;\r
     }\r
@@ -1079,4 +1112,12 @@ public class EnumerationData {
     public void setVPcdUsage(Vector<String> pcdUsage) {\r
         vPcdUsage = pcdUsage;\r
     }\r
+\r
+    public Vector<String> getVBuildTargets() {\r
+        return vBuildTargets;\r
+    }\r
+\r
+    public void setVBuildTargets(Vector<String> buildTargets) {\r
+        vBuildTargets = buildTargets;\r
+    }\r
 }\r
index 8292806..4c08403 100644 (file)
@@ -1,6 +1,6 @@
 /** @file\r
  \r
- The file is used to define Package Dependencies Vector\r
+ The file is used to define Boot Modes Vector\r
  \r
  Copyright (c) 2006, Intel Corporation\r
  All rights reserved. This program and the accompanying materials\r
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/BuildOptions/BuildOptionsIdentification.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/BuildOptions/BuildOptionsIdentification.java
new file mode 100644 (file)
index 0000000..7074d3c
--- /dev/null
@@ -0,0 +1,93 @@
+/** @file\r
+\r
+ The file is used to define Build Options Identification\r
+\r
+ Copyright (c) 2006, Intel Corporation\r
+ All rights reserved. This program and the accompanying materials\r
+ are licensed and made available under the terms and conditions of the BSD License\r
+ which accompanies this distribution.  The full text of the license may be found at\r
+ http://opensource.org/licenses/bsd-license.php\r
+\r
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+ **/\r
+\r
+package org.tianocore.frameworkwizard.module.Identifications.BuildOptions;\r
+\r
+import java.util.Vector;\r
+\r
+public class BuildOptionsIdentification {\r
+\r
+    //\r
+    // Define class members\r
+    //\r
+    private String option = null;\r
+\r
+    private Vector<String> buildTargets = null;\r
+    \r
+    private String toolChainFamily = null;\r
+\r
+    private String tagName = null;\r
+    \r
+    private String toolCode = null;\r
+    \r
+    private Vector<String> supArchList = null;\r
+\r
+    public BuildOptionsIdentification(String arg0, Vector<String> arg1, String arg2, String arg3, String arg4, Vector<String> arg5) {\r
+        this.option = (arg0 == null ? "" : arg0);\r
+        this.buildTargets = arg1;\r
+        this.toolChainFamily = (arg2 == null ? "" : arg2);\r
+        this.tagName = (arg3 == null ? "" : arg3);\r
+        this.toolCode = (arg4 == null ? "" : arg4);\r
+        this.supArchList = arg5;\r
+    }\r
+\r
+    public String getOption() {\r
+        return option;\r
+    }\r
+\r
+    public void setOption(String option) {\r
+        this.option = option;\r
+    }\r
+\r
+    public Vector<String> getSupArchList() {\r
+        return supArchList;\r
+    }\r
+\r
+    public void setSupArchList(Vector<String> supArchList) {\r
+        this.supArchList = supArchList;\r
+    }\r
+\r
+    public String getTagName() {\r
+        return tagName;\r
+    }\r
+\r
+    public void setTagName(String tagName) {\r
+        this.tagName = tagName;\r
+    }\r
+\r
+    public String getToolChainFamily() {\r
+        return toolChainFamily;\r
+    }\r
+\r
+    public void setToolChainFamily(String toolChainFamily) {\r
+        this.toolChainFamily = toolChainFamily;\r
+    }\r
+\r
+    public String getToolCode() {\r
+        return toolCode;\r
+    }\r
+\r
+    public void setToolCode(String toolCode) {\r
+        this.toolCode = toolCode;\r
+    }\r
+\r
+    public Vector<String> getBuildTargets() {\r
+        return buildTargets;\r
+    }\r
+\r
+    public void setBuildTargets(Vector<String> buildTargets) {\r
+        this.buildTargets = buildTargets;\r
+    }\r
+}\r
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/BuildOptions/BuildOptionsVector.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/BuildOptions/BuildOptionsVector.java
new file mode 100644 (file)
index 0000000..dcd1bff
--- /dev/null
@@ -0,0 +1,95 @@
+/** @file\r
\r
+ The file is used to define Build Options Vector\r
\r
+ Copyright (c) 2006, Intel Corporation\r
+ All rights reserved. This program and the accompanying materials\r
+ are licensed and made available under the terms and conditions of the BSD License\r
+ which accompanies this distribution.  The full text of the license may be found at\r
+ http://opensource.org/licenses/bsd-license.php\r
\r
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
+ **/\r
+package org.tianocore.frameworkwizard.module.Identifications.BuildOptions;\r
+\r
+import java.util.Vector;\r
+\r
+public class BuildOptionsVector {\r
+\r
+    private Vector<BuildOptionsIdentification> vBuildOptions = new Vector<BuildOptionsIdentification>();\r
+\r
+    public int findBuildOptions(BuildOptionsIdentification sfi) {\r
+        for (int index = 0; index < vBuildOptions.size(); index++) {\r
+            if (vBuildOptions.elementAt(index).equals(sfi)) {\r
+                return index;\r
+            }\r
+        }\r
+        return -1;\r
+    }\r
+\r
+    public int findBuildOptions(String name) {\r
+        for (int index = 0; index < vBuildOptions.size(); index++) {\r
+            if (vBuildOptions.elementAt(index).getOption().equals(name)) {\r
+                return index;\r
+            }\r
+        }\r
+        return -1;\r
+    }\r
+\r
+    public BuildOptionsIdentification getBuildOptions(int index) {\r
+        if (index > -1) {\r
+            return vBuildOptions.elementAt(index);\r
+        } else {\r
+            return null;\r
+        }\r
+    }\r
+\r
+    public void addBuildOptions(BuildOptionsIdentification arg0) {\r
+        vBuildOptions.addElement(arg0);\r
+    }\r
+\r
+    public void setBuildOptions(BuildOptionsIdentification arg0, int arg1) {\r
+        vBuildOptions.setElementAt(arg0, arg1);\r
+    }\r
+\r
+    public void removeBuildOptions(BuildOptionsIdentification arg0) {\r
+        int index = findBuildOptions(arg0);\r
+        if (index > -1) {\r
+            vBuildOptions.removeElementAt(index);\r
+        }\r
+    }\r
+\r
+    public void removeBuildOptions(int index) {\r
+        if (index > -1 && index < this.size()) {\r
+            vBuildOptions.removeElementAt(index);\r
+        }\r
+    }\r
+\r
+    public Vector<BuildOptionsIdentification> getvBuildOptions() {\r
+        return vBuildOptions;\r
+    }\r
+\r
+    public void setvBuildOptions(Vector<BuildOptionsIdentification> BuildOptions) {\r
+        vBuildOptions = BuildOptions;\r
+    }\r
+\r
+    public Vector<String> getBuildOptionsName() {\r
+        Vector<String> v = new Vector<String>();\r
+        for (int index = 0; index < this.vBuildOptions.size(); index++) {\r
+            v.addElement(vBuildOptions.get(index).getOption());\r
+        }\r
+        return v;\r
+    }\r
+\r
+    public int size() {\r
+        return this.vBuildOptions.size();\r
+    }\r
+    \r
+    public Vector<String> toStringVector(int index) {\r
+        Vector<String> v = new Vector<String>();\r
+        v.addElement(getBuildOptions(index).getOption());\r
+        return v;\r
+    }\r
+}\r
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleBuildOptions.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleBuildOptions.java
new file mode 100644 (file)
index 0000000..076f820
--- /dev/null
@@ -0,0 +1,485 @@
+/** @file\r
\r
+ The file is used to create, update BuildOptions of MSA/MBD file\r
\r
+ Copyright (c) 2006, Intel Corporation\r
+ All rights reserved. This program and the accompanying materials\r
+ are licensed and made available under the terms and conditions of the BSD License\r
+ which accompanies this distribution.  The full text of the license may be found at\r
+ http://opensource.org/licenses/bsd-license.php\r
\r
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
+ **/\r
+\r
+package org.tianocore.frameworkwizard.module.ui;\r
+\r
+import java.awt.Dimension;\r
+import java.awt.event.ActionEvent;\r
+import java.awt.event.ComponentEvent;\r
+import java.awt.event.MouseEvent;\r
+import java.util.List;\r
+import java.util.Vector;\r
+\r
+import javax.swing.JButton;\r
+import javax.swing.JPanel;\r
+import javax.swing.JScrollPane;\r
+import javax.swing.JTable;\r
+import javax.swing.ListSelectionModel;\r
+import javax.swing.event.ListSelectionEvent;\r
+\r
+import org.tianocore.ModuleBuildOptionsDocument;\r
+import org.tianocore.UserExtensionsDocument;\r
+import org.tianocore.ModuleSurfaceAreaDocument.ModuleSurfaceArea;\r
+import org.tianocore.OptionDocument.Option;\r
+import org.tianocore.frameworkwizard.common.DataType;\r
+import org.tianocore.frameworkwizard.common.IDefaultTableModel;\r
+import org.tianocore.frameworkwizard.common.Log;\r
+import org.tianocore.frameworkwizard.common.Tools;\r
+import org.tianocore.frameworkwizard.common.Identifications.OpeningModuleType;\r
+import org.tianocore.frameworkwizard.common.ui.IFrame;\r
+import org.tianocore.frameworkwizard.common.ui.IInternalFrame;\r
+import org.tianocore.frameworkwizard.module.Identifications.BuildOptions.BuildOptionsIdentification;\r
+import org.tianocore.frameworkwizard.module.Identifications.BuildOptions.BuildOptionsVector;\r
+import org.tianocore.frameworkwizard.module.ui.dialog.BuildOptionsDlg;\r
+\r
+/**\r
+ The class is used to create, update BuildOptions of MSA/MBD file\r
+ It extends IInternalFrame\r
\r
+\r
+\r
+ **/\r
+public class ModuleBuildOptions extends IInternalFrame {\r
+\r
+    ///\r
+    /// Define class Serial Version UID\r
+    ///\r
+    private static final long serialVersionUID = -3888558623432442561L;\r
+\r
+    //\r
+    //Define class members\r
+    //\r
+    private JPanel jContentPane = null;\r
+\r
+    private JButton jButtonAdd = null;\r
+\r
+    private JButton jButtonRemove = null;\r
+\r
+    private JButton jButtonUpdate = null;\r
+\r
+    private JScrollPane jScrollPane = null;\r
+\r
+    private JScrollPane jScrollPaneTable = null;\r
+\r
+    private JTable jTable = null;\r
+\r
+    //\r
+    // Not used by UI\r
+    //\r
+    private OpeningModuleType omt = null;\r
+\r
+    private ModuleSurfaceArea msa = null;\r
+\r
+    private ModuleBuildOptionsDocument.ModuleBuildOptions mbo = null;\r
+\r
+    private List<UserExtensionsDocument.UserExtensions> ue = null;\r
+\r
+    private BuildOptionsIdentification id = null;\r
+\r
+    private BuildOptionsVector vid = new BuildOptionsVector();\r
+\r
+    private IDefaultTableModel model = null;\r
+\r
+    private int selectedRow = -1;\r
+\r
+    /**\r
+     This method initializes jButtonAdd \r
+     \r
+     @return javax.swing.JButton jButtonAdd\r
+     \r
+     **/\r
+    private JButton getJButtonAdd() {\r
+        if (jButtonAdd == null) {\r
+            jButtonAdd = new JButton();\r
+            jButtonAdd.setBounds(new java.awt.Rectangle(210, 195, 90, 20));\r
+            jButtonAdd.setText("Add");\r
+            jButtonAdd.addActionListener(this);\r
+            jButtonAdd.setPreferredSize(new java.awt.Dimension(90, 20));\r
+        }\r
+        return jButtonAdd;\r
+    }\r
+\r
+    /**\r
+     This method initializes jButtonRemove \r
+     \r
+     @return javax.swing.JButton jButtonRemove\r
+     \r
+     **/\r
+    private JButton getJButtonRemove() {\r
+        if (jButtonRemove == null) {\r
+            jButtonRemove = new JButton();\r
+            jButtonRemove.setBounds(new java.awt.Rectangle(390, 195, 90, 20));\r
+            jButtonRemove.setText("Remove");\r
+            jButtonRemove.addActionListener(this);\r
+            jButtonRemove.setPreferredSize(new java.awt.Dimension(90, 20));\r
+        }\r
+        return jButtonRemove;\r
+    }\r
+\r
+    /**\r
+     This method initializes jButtonUpdate \r
+     \r
+     @return javax.swing.JButton jButtonUpdate\r
+     \r
+     **/\r
+    private JButton getJButtonUpdate() {\r
+        if (jButtonUpdate == null) {\r
+            jButtonUpdate = new JButton();\r
+            jButtonUpdate.setBounds(new java.awt.Rectangle(315, 195, 90, 20));\r
+            jButtonUpdate.setPreferredSize(new java.awt.Dimension(90, 20));\r
+            jButtonUpdate.setText("Edit");\r
+            jButtonUpdate.addActionListener(this);\r
+        }\r
+        return jButtonUpdate;\r
+    }\r
+\r
+    /**\r
+     This method initializes jScrollPane  \r
+     \r
+     @return javax.swing.JScrollPane  \r
+     */\r
+    private JScrollPane getJScrollPane() {\r
+        if (jScrollPane == null) {\r
+            jScrollPane = new JScrollPane();\r
+            jScrollPane.setViewportView(getJContentPane());\r
+        }\r
+        return jScrollPane;\r
+    }\r
+\r
+    /**\r
+     This method initializes jScrollPaneTable    \r
+     \r
+     @return javax.swing.JScrollPane \r
+     **/\r
+    private JScrollPane getJScrollPaneTable() {\r
+        if (jScrollPaneTable == null) {\r
+            jScrollPaneTable = new JScrollPane();\r
+            jScrollPaneTable.setBounds(new java.awt.Rectangle(15, 10, 470, 420));\r
+            jScrollPaneTable.setPreferredSize(new Dimension(470, 420));\r
+            jScrollPaneTable.setViewportView(getJTable());\r
+        }\r
+        return jScrollPaneTable;\r
+    }\r
+\r
+    /**\r
+     This method initializes jTable  \r
+     \r
+     @return javax.swing.JTable  \r
+     **/\r
+    private JTable getJTable() {\r
+        if (jTable == null) {\r
+            jTable = new JTable();\r
+            model = new IDefaultTableModel();\r
+            jTable = new JTable(model);\r
+            jTable.setRowHeight(20);\r
+\r
+            model.addColumn("Option String Value");\r
+\r
+            jTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\r
+            jTable.getSelectionModel().addListSelectionListener(this);\r
+            jTable.getModel().addTableModelListener(this);\r
+            jTable.addMouseListener(this);\r
+        }\r
+        return jTable;\r
+    }\r
+\r
+    public static void main(String[] args) {\r
+    }\r
+\r
+    /**\r
+     This method initializes this\r
+     \r
+     **/\r
+    private void init() {\r
+        this.setSize(500, 515);\r
+        this.setContentPane(getJScrollPane());\r
+        this.setTitle("Boot Modes");\r
+    }\r
+\r
+    /**\r
+     This method initializes this\r
+     Fill values to all fields if these values are not empty\r
+     \r
+     @param inBuildOptions\r
+\r
+     **/\r
+    private void init(ModuleBuildOptionsDocument.ModuleBuildOptions inModuleBuildOptions) {\r
+        init();\r
+        this.mbo = inModuleBuildOptions;\r
+\r
+        if (this.mbo != null) {\r
+            //\r
+            // Save User Extensitions\r
+            //\r
+            if (this.mbo.getUserExtensionsList() != null) {\r
+                this.ue = this.mbo.getUserExtensionsList();\r
+            }\r
+\r
+            if (this.mbo.getOptions() != null) {\r
+                if (this.mbo.getOptions().getOptionList() != null) {\r
+                    for (int index = 0; index < this.mbo.getOptions().getOptionList().size(); index++) {\r
+                        Option o = this.mbo.getOptions().getOptionList().get(index);\r
+                        if (o != null) {\r
+                            String arg0 = o.getStringValue();\r
+                            Vector<String> arg1 = Tools.convertListToVector(o.getBuildTargets());\r
+                            String arg2 = o.getToolChainFamily();\r
+                            String arg3 = o.getTagName();\r
+                            String arg4 = o.getToolCode();\r
+                            Vector<String> arg5 = Tools.convertListToVector(o.getSupArchList());\r
+\r
+                            id = new BuildOptionsIdentification(arg0, arg1, arg2, arg3, arg4, arg5);\r
+                            vid.addBuildOptions(id);\r
+                        }\r
+                    }\r
+                }\r
+            }\r
+        }\r
+        showTable();\r
+    }\r
+\r
+    /**\r
+     This is the default constructor\r
+     \r
+     **/\r
+    public ModuleBuildOptions() {\r
+        super();\r
+        init();\r
+        this.setVisible(true);\r
+    }\r
+\r
+    /**\r
+     This is the override edit constructor\r
+     \r
+     @param inBuildOptions The input BuildOptionsDocument.BuildOptions\r
+     \r
+     **/\r
+    public ModuleBuildOptions(OpeningModuleType inOmt) {\r
+        super();\r
+        this.omt = inOmt;\r
+        this.msa = omt.getXmlMsa();\r
+        init(msa.getModuleBuildOptions());\r
+        this.setVisible(true);\r
+    }\r
+\r
+    /**\r
+     This method initializes jContentPane\r
+     \r
+     @return javax.swing.JPanel jContentPane\r
+     \r
+     **/\r
+    private JPanel getJContentPane() {\r
+        if (jContentPane == null) {\r
+            jContentPane = new JPanel();\r
+            jContentPane.setLayout(null);\r
+            jContentPane.setPreferredSize(new java.awt.Dimension(490, 490));\r
+\r
+            jContentPane.add(getJButtonAdd(), null);\r
+            jContentPane.add(getJButtonRemove(), null);\r
+            jContentPane.add(getJButtonUpdate(), null);\r
+            jContentPane.add(getJScrollPaneTable(), null);\r
+        }\r
+        return jContentPane;\r
+    }\r
+\r
+    private void showEdit(int index) {\r
+        BuildOptionsDlg dlg = new BuildOptionsDlg(vid.getBuildOptions(index), new IFrame(), omt.getId());\r
+        int result = dlg.showDialog();\r
+        if (result == DataType.RETURN_TYPE_OK) {\r
+            if (index == -1) {\r
+                this.vid.addBuildOptions(dlg.getId());\r
+            } else {\r
+                this.vid.setBuildOptions(dlg.getId(), index);\r
+            }\r
+            this.showTable();\r
+            this.save();\r
+            dlg.dispose();\r
+        }\r
+        if (result == DataType.RETURN_TYPE_CANCEL) {\r
+            dlg.dispose();\r
+        }\r
+    }\r
+\r
+    /**\r
+     Clear all table rows\r
+     \r
+     **/\r
+    private void clearAll() {\r
+        if (model != null) {\r
+            for (int index = model.getRowCount() - 1; index >= 0; index--) {\r
+                model.removeRow(index);\r
+            }\r
+        }\r
+    }\r
+\r
+    /**\r
+     Read content of vector and put then into table\r
+     \r
+     **/\r
+    private void showTable() {\r
+        clearAll();\r
+\r
+        if (vid.size() > 0) {\r
+            for (int index = 0; index < vid.size(); index++) {\r
+                model.addRow(vid.toStringVector(index));\r
+            }\r
+        }\r
+        this.jTable.repaint();\r
+        this.jTable.updateUI();\r
+    }\r
+\r
+    /* (non-Javadoc)\r
+     * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)\r
+     *\r
+     * Override actionPerformed to listen all actions\r
+     * \r
+     */\r
+    public void actionPerformed(ActionEvent arg0) {\r
+        if (arg0.getSource() == jButtonAdd) {\r
+            showEdit(-1);\r
+        }\r
+        if (arg0.getSource() == jButtonUpdate) {\r
+            if (this.selectedRow < 0) {\r
+                Log.wrn("Update Boot Modes", "Please select one record first.");\r
+                return;\r
+            }\r
+            showEdit(selectedRow);\r
+        }\r
+\r
+        if (arg0.getSource() == jButtonRemove) {\r
+            if (jTable.isEditing()) {\r
+                jTable.getCellEditor().stopCellEditing();\r
+            }\r
+            if (selectedRow > -1) {\r
+                this.model.removeRow(selectedRow);\r
+                this.vid.removeBuildOptions(selectedRow);\r
+                selectedRow = -1;\r
+                this.save();\r
+            }\r
+        }\r
+    }\r
+\r
+    /**\r
+     Save all components of Mbd Header\r
+     if exists BuildOptions, set the value directly\r
+     if not exists BuildOptions, new an instance first\r
+     \r
+     **/\r
+    public void save() {\r
+        try {\r
+            int count = this.vid.size();\r
+\r
+            this.mbo = ModuleBuildOptionsDocument.ModuleBuildOptions.Factory.newInstance();\r
+            this.mbo.addNewOptions();\r
+            //\r
+            // Restore User Extensions Data\r
+            //\r
+            if (this.ue != null) {\r
+                for (int index = 0; index < this.ue.size(); index++) {\r
+                    this.mbo.addNewUserExtensions();\r
+                    this.mbo.setUserExtensionsArray(index, ue.get(index));\r
+                }\r
+            }\r
+\r
+            if (count > 0) {\r
+                for (int index = 0; index < count; index++) {\r
+                    Option o = Option.Factory.newInstance();\r
+                    if (!isEmpty(vid.getBuildOptions(index).getOption())) {\r
+                        o.setStringValue(vid.getBuildOptions(index).getOption());\r
+                    }\r
+                    if (vid.getBuildOptions(index).getBuildTargets() != null\r
+                        && vid.getBuildOptions(index).getBuildTargets().size() > 0) {\r
+                        o.setBuildTargets(vid.getBuildOptions(index).getBuildTargets());\r
+                    }\r
+                    if (!isEmpty(vid.getBuildOptions(index).getToolChainFamily())) {\r
+                        o.setToolChainFamily(vid.getBuildOptions(index).getToolChainFamily());\r
+                    }\r
+                    if (!isEmpty(vid.getBuildOptions(index).getTagName())) {\r
+                        o.setTagName(vid.getBuildOptions(index).getTagName());\r
+                    }\r
+                    if (!isEmpty(vid.getBuildOptions(index).getToolCode())) {\r
+                        o.setToolCode(vid.getBuildOptions(index).getToolCode());\r
+                    }\r
+                    if (vid.getBuildOptions(index).getSupArchList() != null\r
+                        && vid.getBuildOptions(index).getSupArchList().size() > 0) {\r
+                        o.setSupArchList(vid.getBuildOptions(index).getSupArchList());\r
+                    }\r
+\r
+                    this.mbo.getOptions().addNewOption();\r
+                    this.mbo.getOptions().setOptionArray(this.mbo.getOptions().getOptionList().size() - 1, o);\r
+                }\r
+            }\r
+\r
+            this.msa.setModuleBuildOptions(this.mbo);\r
+            this.omt.setSaved(false);\r
+        } catch (Exception e) {\r
+            Log.wrn("Update Module Build Options", e.getMessage());\r
+            Log.err("Update Module Build Options", e.getMessage());\r
+        }\r
+    }\r
+\r
+    /* (non-Javadoc)\r
+     * @see javax.swing.event.ListSelectionListener#valueChanged(javax.swing.event.ListSelectionEvent)\r
+     *\r
+     */\r
+    public void valueChanged(ListSelectionEvent arg0) {\r
+        if (arg0.getValueIsAdjusting()) {\r
+            return;\r
+        }\r
+        ListSelectionModel lsm = (ListSelectionModel) arg0.getSource();\r
+        if (lsm.isSelectionEmpty()) {\r
+            return;\r
+        } else {\r
+            selectedRow = lsm.getMinSelectionIndex();\r
+        }\r
+    }\r
+\r
+    /* (non-Javadoc)\r
+     * @see java.awt.event.MouseListener#mouseClicked(java.awt.event.MouseEvent)\r
+     *\r
+     */\r
+    public void mouseClicked(MouseEvent arg0) {\r
+        if (arg0.getClickCount() == 2) {\r
+            if (this.selectedRow < 0) {\r
+                return;\r
+            } else {\r
+                showEdit(selectedRow);\r
+            }\r
+        }\r
+    }\r
+\r
+    /* (non-Javadoc)\r
+     * @see java.awt.event.ComponentListener#componentResized(java.awt.event.ComponentEvent)\r
+     * \r
+     * Override componentResized to resize all components when frame's size is changed\r
+     */\r
+    public void componentResized(ComponentEvent arg0) {\r
+        int intCurrentWidth = this.getJContentPane().getWidth();\r
+        int intCurrentHeight = this.getJContentPane().getHeight();\r
+        int intPreferredWidth = this.getJContentPane().getPreferredSize().width;\r
+        int intPreferredHeight = this.getJContentPane().getPreferredSize().height;\r
+\r
+        Tools.resizeComponent(this.jScrollPaneTable, intCurrentWidth, intCurrentHeight, intPreferredWidth,\r
+                              intPreferredHeight);\r
+        Tools.relocateComponent(this.jButtonAdd, intCurrentWidth, intCurrentHeight, intPreferredWidth,\r
+                                intPreferredHeight, DataType.SPACE_TO_RIGHT_FOR_ADD_BUTTON,\r
+                                DataType.SPACE_TO_BOTTOM_FOR_ADD_BUTTON);\r
+        Tools.relocateComponent(this.jButtonRemove, intCurrentWidth, intCurrentHeight, intPreferredWidth,\r
+                                intPreferredHeight, DataType.SPACE_TO_RIGHT_FOR_REMOVE_BUTTON,\r
+                                DataType.SPACE_TO_BOTTOM_FOR_REMOVE_BUTTON);\r
+        Tools.relocateComponent(this.jButtonUpdate, intCurrentWidth, intCurrentHeight, intPreferredWidth,\r
+                                intPreferredHeight, DataType.SPACE_TO_RIGHT_FOR_UPDATE_BUTTON,\r
+                                DataType.SPACE_TO_BOTTOM_FOR_UPDATE_BUTTON);\r
+    }\r
+}\r
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/BuildOptionsDlg.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/BuildOptionsDlg.java
new file mode 100644 (file)
index 0000000..a4bad7e
--- /dev/null
@@ -0,0 +1,495 @@
+/** @file\r
\r
+ The file is used to create, update SourceFiles section of the MSA file\r
\r
+ Copyright (c) 2006, Intel Corporation\r
+ All rights reserved. This program and the accompanying materials\r
+ are licensed and made available under the terms and conditions of the BSD License\r
+ which accompanies this distribution.  The full text of the license may be found at\r
+ http://opensource.org/licenses/bsd-license.php\r
\r
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
+ **/\r
+package org.tianocore.frameworkwizard.module.ui.dialog;\r
+\r
+import java.awt.event.ActionEvent;\r
+import java.util.Vector;\r
+\r
+import javax.swing.JButton;\r
+import javax.swing.JLabel;\r
+import javax.swing.JPanel;\r
+import javax.swing.JScrollPane;\r
+import javax.swing.JTextField;\r
+\r
+import org.tianocore.frameworkwizard.common.DataType;\r
+import org.tianocore.frameworkwizard.common.DataValidation;\r
+import org.tianocore.frameworkwizard.common.EnumerationData;\r
+import org.tianocore.frameworkwizard.common.Log;\r
+import org.tianocore.frameworkwizard.common.Tools;\r
+import org.tianocore.frameworkwizard.common.ui.ArchCheckBox;\r
+import org.tianocore.frameworkwizard.common.ui.IComboBox;\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.common.ui.iCheckBoxList.ICheckBoxList;\r
+import org.tianocore.frameworkwizard.module.Identifications.ModuleIdentification;\r
+import org.tianocore.frameworkwizard.module.Identifications.BuildOptions.BuildOptionsIdentification;\r
+import org.tianocore.frameworkwizard.workspace.WorkspaceTools;\r
+\r
+/**\r
+ * The class is used to create, update SourceFiles section of the MSA file\r
+ *\r
+ * It extends IDialog\r
+ * \r
+ **/\r
+public class BuildOptionsDlg extends IDialog {\r
+\r
+    ///\r
+    /// Define class Serial Version UID\r
+    ///\r
+    private static final long serialVersionUID = -6765742852142775378L;\r
+\r
+    //\r
+    // Define class members\r
+    //\r
+    private JPanel jContentPane = null;\r
+\r
+    private JLabel jLabelFileName = null;\r
+\r
+    private JTextField jTextFieldFileOption = null;\r
+\r
+    private JLabel jLabelToolChainFamily = null;\r
+\r
+    private StarLabel jStarLabel1 = null;\r
+\r
+    private JLabel jLabelArch = null;\r
+\r
+    private JScrollPane jScrollPane = null;\r
+\r
+    private JLabel jLabelTagName = null;\r
+\r
+    private JTextField jTextFieldTagName = null;\r
+\r
+    private JLabel jLabelToolCode = null;\r
+\r
+    private JTextField jTextFieldToolCode = null;\r
+\r
+    private IComboBox iComboBoxToolCode = null;\r
+\r
+    private JTextField jTextFieldToolChainFamily = null;\r
+\r
+    private ArchCheckBox jArchCheckBox = null;\r
+\r
+    private JButton jButtonOk = null;\r
+\r
+    private JButton jButtonCancel = null;\r
+\r
+    private JScrollPane jScrollPaneBuildTargets = null;\r
+\r
+    private ICheckBoxList iCheckBoxListBuildTargets = null;\r
+\r
+    //\r
+    // Not used by UI\r
+    //\r
+    private BuildOptionsIdentification id = null;\r
+\r
+    private EnumerationData ed = new EnumerationData();\r
+\r
+    private WorkspaceTools wt = new WorkspaceTools();\r
+\r
+    private JLabel jLabelBuildTargets = null;\r
+\r
+    /**\r
+     This method initializes jTextFieldFileOption \r
+     \r
+     @return javax.swing.JTextField jTextFieldFileOption\r
+     \r
+     **/\r
+    private JTextField getJTextFieldSourceFilesDirectory() {\r
+        if (jTextFieldFileOption == null) {\r
+            jTextFieldFileOption = new JTextField();\r
+            jTextFieldFileOption.setBounds(new java.awt.Rectangle(168, 12, 340, 20));\r
+            jTextFieldFileOption.setPreferredSize(new java.awt.Dimension(340, 20));\r
+            jTextFieldFileOption.setToolTipText("Path is relative to the MSA file and must include the file name");\r
+        }\r
+        return jTextFieldFileOption;\r
+    }\r
+\r
+    /**\r
+     This method initializes jScrollPane  \r
+     \r
+     @return javax.swing.JScrollPane  \r
+     */\r
+    private JScrollPane getJScrollPane() {\r
+        if (jScrollPane == null) {\r
+            jScrollPane = new JScrollPane();\r
+            jScrollPane.setViewportView(getJContentPane());\r
+        }\r
+        return jScrollPane;\r
+    }\r
+\r
+    /**\r
+     * This method initializes jTextFieldTagName    \r
+     *  \r
+     * @return javax.swing.JTextField   \r
+     */\r
+    private JTextField getJTextFieldTagName() {\r
+        if (jTextFieldTagName == null) {\r
+            jTextFieldTagName = new JTextField();\r
+            jTextFieldTagName.setBounds(new java.awt.Rectangle(168, 37, 340, 20));\r
+            jTextFieldTagName.setPreferredSize(new java.awt.Dimension(340, 20));\r
+            jTextFieldTagName.setToolTipText("You may specify a specific tool chain tag name, such as BILL1");\r
+        }\r
+        return jTextFieldTagName;\r
+    }\r
+\r
+    private IComboBox getIComboBoxToolCode() {\r
+        if (iComboBoxToolCode == null) {\r
+            iComboBoxToolCode = new IComboBox();\r
+            iComboBoxToolCode.setBounds(new java.awt.Rectangle(168, 62, 340, 20));\r
+            iComboBoxToolCode.setPreferredSize(new java.awt.Dimension(340, 20));\r
+            iComboBoxToolCode.setToolTipText("<html>You may select a specific tool command from drop down list,<br>"\r
+                                             + "or you can DOUBLE-CLICK this field to enter your customized<br>"\r
+                                             + "tool command.<br>"\r
+                                             + "Press ENTER to save your input or press ESCAPE to quit</html>");\r
+        }\r
+        return iComboBoxToolCode;\r
+    }\r
+\r
+    /**\r
+     * This method initializes jTextFieldToolCode   \r
+     *  \r
+     * @return javax.swing.JTextField   \r
+     */\r
+    private JTextField getJTextFieldToolCode() {\r
+        if (jTextFieldToolCode == null) {\r
+            jTextFieldToolCode = new JTextField();\r
+            jTextFieldToolCode.setBounds(new java.awt.Rectangle(168, 62, 340, 20));\r
+            jTextFieldToolCode.setPreferredSize(new java.awt.Dimension(340, 20));\r
+            jTextFieldToolCode.setToolTipText("You may specify a specific tool command, such as ASM");\r
+            jTextFieldToolCode.setVisible(false);\r
+        }\r
+        return jTextFieldToolCode;\r
+    }\r
+\r
+    /**\r
+     * This method initializes jTextFieldToolChainFamily    \r
+     *  \r
+     * @return javax.swing.JTextField   \r
+     */\r
+    private JTextField getJTextFieldToolChainFamily() {\r
+        if (jTextFieldToolChainFamily == null) {\r
+            jTextFieldToolChainFamily = new JTextField();\r
+            jTextFieldToolChainFamily.setBounds(new java.awt.Rectangle(168, 87, 340, 20));\r
+            jTextFieldToolChainFamily.setPreferredSize(new java.awt.Dimension(340, 20));\r
+            jTextFieldToolChainFamily.setToolTipText("You may specify a specific tool chain family, such as GCC");\r
+        }\r
+        return jTextFieldToolChainFamily;\r
+    }\r
+\r
+    /**\r
+     This method initializes jButtonOk    \r
+     \r
+     @return javax.swing.JButton  \r
+     \r
+     **/\r
+    private JButton getJButtonOk() {\r
+        if (jButtonOk == null) {\r
+            jButtonOk = new JButton();\r
+            jButtonOk.setBounds(new java.awt.Rectangle(317, 202, 90, 20));\r
+            jButtonOk.setText("Ok");\r
+            jButtonOk.addActionListener(this);\r
+        }\r
+        return jButtonOk;\r
+    }\r
+\r
+    /**\r
+     This method initializes jButtonCancel    \r
+     \r
+     @return javax.swing.JButton  \r
+     \r
+     **/\r
+    private JButton getJButtonCancel() {\r
+        if (jButtonCancel == null) {\r
+            jButtonCancel = new JButton();\r
+            jButtonCancel.setBounds(new java.awt.Rectangle(412, 202, 90, 20));\r
+            jButtonCancel.setText("Cancel");\r
+            jButtonCancel.addActionListener(this);\r
+        }\r
+        return jButtonCancel;\r
+    }\r
+\r
+    /**\r
+     This method initializes iCheckBoxListArch   \r
+     \r
+     @return ICheckBoxList   \r
+     **/\r
+    private ICheckBoxList getICheckBoxListSupModuleList() {\r
+        if (iCheckBoxListBuildTargets == null) {\r
+            iCheckBoxListBuildTargets = new ICheckBoxList();\r
+        }\r
+        return iCheckBoxListBuildTargets;\r
+    }\r
+\r
+    /**\r
+     This method initializes jScrollPaneBuildTargets    \r
+     \r
+     @return javax.swing.JScrollPane  \r
+     \r
+     **/\r
+    private JScrollPane getJScrollPaneBuildTargets() {\r
+        if (jScrollPaneBuildTargets == null) {\r
+            jScrollPaneBuildTargets = new JScrollPane();\r
+            jScrollPaneBuildTargets.setBounds(new java.awt.Rectangle(168, 137, 340, 40));\r
+            jScrollPaneBuildTargets.setPreferredSize(new java.awt.Dimension(340, 40));\r
+            jScrollPaneBuildTargets.setViewportView(getICheckBoxListSupModuleList());\r
+        }\r
+        return jScrollPaneBuildTargets;\r
+    }\r
+\r
+    public static void main(String[] args) {\r
+\r
+    }\r
+\r
+    /**\r
+     This is the default constructor\r
+     \r
+     **/\r
+    public BuildOptionsDlg(BuildOptionsIdentification inBuildOptionsIdentification, IFrame iFrame,\r
+                           ModuleIdentification mid) {\r
+        super(iFrame, true);\r
+        init(inBuildOptionsIdentification, mid);\r
+    }\r
+\r
+    /**\r
+     This method initializes this\r
+     \r
+     **/\r
+    private void init() {\r
+        this.setSize(525, 270);\r
+        this.setContentPane(getJScrollPane());\r
+        this.setTitle("Source Files");\r
+        this.setViewMode(false);\r
+        this.centerWindow();\r
+        Tools.generateComboBoxByVector(iComboBoxToolCode, ed.getVToolCode());\r
+        this.iCheckBoxListBuildTargets.setAllItems(ed.getVBuildTargets());\r
+    }\r
+\r
+    /**         \r
+     This method initializes this\r
+     Fill values to all fields if these values are not empty\r
+     \r
+     \r
+     @param inSourceFiles The input data of SourceFilesDocument.SourceFiles\r
+     \r
+     **/\r
+    private void init(BuildOptionsIdentification inBuildOptionsIdentification, ModuleIdentification mid) {\r
+        init();\r
+\r
+        //\r
+        // Init arch with module's arch\r
+        //\r
+        this.jArchCheckBox.setEnabledItems(wt.getModuleArch(mid));\r
+\r
+        if (inBuildOptionsIdentification != null) {\r
+            this.jTextFieldFileOption.setText(inBuildOptionsIdentification.getOption());\r
+            this.jTextFieldTagName.setText(inBuildOptionsIdentification.getTagName());\r
+\r
+            //\r
+            // Generate Tool Code selection list\r
+            //\r
+            Vector<String> v = ed.getVToolCode();\r
+            boolean isFind = false;\r
+            String strToolCode = inBuildOptionsIdentification.getToolCode();\r
+\r
+            //\r
+            // If the input value is not in the default list, add it to the list\r
+            //\r
+            if (strToolCode != null) {\r
+                for (int index = 0; index < v.size(); index++) {\r
+                    if (v.elementAt(index).equals(strToolCode)) {\r
+                        isFind = true;\r
+                        break;\r
+                    }\r
+                }\r
+                if (!isFind && !isEmpty(strToolCode)) {\r
+                    v.addElement(strToolCode);\r
+                }\r
+            }\r
+\r
+            Tools.generateComboBoxByVector(iComboBoxToolCode, v);\r
+            this.iComboBoxToolCode.setSelectedItem(strToolCode);\r
+\r
+            this.jTextFieldToolChainFamily.setText(inBuildOptionsIdentification.getToolChainFamily());\r
+\r
+            this.jArchCheckBox.setSelectedItems(inBuildOptionsIdentification.getSupArchList());\r
+\r
+            this.iCheckBoxListBuildTargets.setAllItemsUnchecked();\r
+            this.iCheckBoxListBuildTargets.initCheckedItem(true, inBuildOptionsIdentification.getBuildTargets());\r
+        }\r
+    }\r
+\r
+    /**\r
+     Disable all components when the mode is view\r
+     \r
+     @param isView true - The view mode; false - The non-view mode\r
+     \r
+     **/\r
+    public void setViewMode(boolean isView) {\r
+        if (isView) {\r
+            this.jTextFieldFileOption.setEnabled(!isView);\r
+        }\r
+    }\r
+\r
+    /**\r
+     This method initializes jContentPane\r
+     \r
+     @return javax.swing.JPanel jContentPane\r
+     \r
+     **/\r
+    private JPanel getJContentPane() {\r
+        if (jContentPane == null) {\r
+            jLabelBuildTargets = new JLabel();\r
+            jLabelBuildTargets.setBounds(new java.awt.Rectangle(12, 137, 155, 20));\r
+            jLabelBuildTargets.setText("Build Targets");\r
+            jArchCheckBox = new ArchCheckBox();\r
+            jArchCheckBox.setBounds(new java.awt.Rectangle(168, 112, 340, 20));\r
+            jArchCheckBox.setPreferredSize(new java.awt.Dimension(340, 20));\r
+            jLabelToolCode = new JLabel();\r
+            jLabelToolCode.setBounds(new java.awt.Rectangle(12, 62, 155, 20));\r
+            jLabelToolCode.setText("Tool Code");\r
+            jLabelTagName = new JLabel();\r
+            jLabelTagName.setBounds(new java.awt.Rectangle(12, 37, 155, 20));\r
+            jLabelTagName.setText("Tag Name");\r
+            jLabelArch = new JLabel();\r
+            jLabelArch.setBounds(new java.awt.Rectangle(12, 112, 155, 20));\r
+            jLabelArch.setText("Supported Architectures");\r
+            jLabelToolChainFamily = new JLabel();\r
+            jLabelToolChainFamily.setBounds(new java.awt.Rectangle(12, 87, 155, 20));\r
+            jLabelToolChainFamily.setText("Tool Chain Family");\r
+            jLabelFileName = new JLabel();\r
+            jLabelFileName.setText("Option String");\r
+            jLabelFileName.setBounds(new java.awt.Rectangle(12, 12, 155, 20));\r
+\r
+            jContentPane = new JPanel();\r
+            jContentPane.setLayout(null);\r
+            jContentPane.setPreferredSize(new java.awt.Dimension(505, 222));\r
+\r
+            jContentPane.add(jLabelFileName, null);\r
+            jContentPane.add(getJTextFieldSourceFilesDirectory(), null);\r
+            jContentPane.add(jLabelToolChainFamily, null);\r
+            jStarLabel1 = new StarLabel();\r
+            jStarLabel1.setLocation(new java.awt.Point(0, 10));\r
+\r
+            jContentPane.add(jStarLabel1, null);\r
+            jContentPane.add(jLabelArch, null);\r
+            jContentPane.add(jLabelTagName, null);\r
+            jContentPane.add(getJTextFieldTagName(), null);\r
+            jContentPane.add(jLabelToolCode, null);\r
+            jContentPane.add(getJTextFieldToolCode(), null);\r
+            jContentPane.add(getIComboBoxToolCode(), null);\r
+            jContentPane.add(getJTextFieldToolChainFamily(), null);\r
+            jContentPane.add(jArchCheckBox, null);\r
+            jContentPane.add(getJButtonOk(), null);\r
+            jContentPane.add(getJButtonCancel(), null);\r
+            jContentPane.add(jLabelBuildTargets, null);\r
+            jContentPane.add(getJScrollPaneBuildTargets(), null);\r
+        }\r
+        return jContentPane;\r
+    }\r
+\r
+    /* (non-Javadoc)\r
+     * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)\r
+     *\r
+     * Override actionPerformed to listen all actions\r
+     *  \r
+     */\r
+    public void actionPerformed(ActionEvent arg0) {\r
+        if (arg0.getSource() == jButtonOk) {\r
+            if (checkAdd()) {\r
+                getCurrentId();\r
+                this.returnType = DataType.RETURN_TYPE_OK;\r
+                this.setVisible(false);\r
+            }\r
+        }\r
+\r
+        if (arg0.getSource() == jButtonCancel) {\r
+            this.returnType = DataType.RETURN_TYPE_CANCEL;\r
+            this.setVisible(false);\r
+        }\r
+    }\r
+\r
+    private BuildOptionsIdentification getCurrentId() {\r
+        String arg0 = this.jTextFieldFileOption.getText();\r
+        Vector<String> arg1 = this.iCheckBoxListBuildTargets.getAllCheckedItemsString();\r
+        String arg2 = this.jTextFieldToolChainFamily.getText();\r
+        String arg3 = this.jTextFieldTagName.getText();\r
+        String arg4 = this.iComboBoxToolCode.getSelectedItem().toString();\r
+        if (arg4.equals(DataType.EMPTY_SELECT_ITEM)) {\r
+            arg4 = "";\r
+        }\r
+        Vector<String> arg5 = this.jArchCheckBox.getSelectedItemsVector();\r
+        \r
+        id = new BuildOptionsIdentification(arg0, arg1, arg2, arg3, arg4, arg5);\r
+        return id;\r
+    }\r
+\r
+    /**\r
+     Data validation for all fields\r
+     \r
+     @retval true - All datas are valid\r
+     @retval false - At least one data is invalid\r
+     \r
+     **/\r
+    public boolean checkAdd() {\r
+        //\r
+        // Check Option\r
+        //\r
+        if (isEmpty(this.jTextFieldFileOption.getText())) {\r
+            Log.wrn("Update Build Options", "Option String must be entered!");\r
+            return false;\r
+        }\r
+\r
+        //\r
+        // Check TagName \r
+        //\r
+        if (!isEmpty(this.jTextFieldTagName.getText())) {\r
+            if (!DataValidation.isTagName(this.jTextFieldTagName.getText())) {\r
+                Log.wrn("Update Build Options", "Incorrect data type for Tag Name");\r
+                return false;\r
+            }\r
+        }\r
+\r
+        //\r
+        // Check ToolCode \r
+        //\r
+        if (!isEmpty(this.jTextFieldToolCode.getText())) {\r
+            if (!DataValidation.isToolCode(this.jTextFieldToolCode.getText())) {\r
+                Log.wrn("Update Build Options", "Incorrect data type for Tool Code");\r
+                return false;\r
+            }\r
+        }\r
+\r
+        //\r
+        // Check ToolChainFamily \r
+        //\r
+        if (!isEmpty(this.jTextFieldToolChainFamily.getText())) {\r
+            if (!DataValidation.isToolChainFamily(this.jTextFieldToolChainFamily.getText())) {\r
+                Log.wrn("Update Build Options", "Incorrect data type for Tool Chain Family");\r
+                return false;\r
+            }\r
+        }\r
+\r
+        return true;\r
+    }\r
+\r
+    public BuildOptionsIdentification getId() {\r
+        return id;\r
+    }\r
+\r
+    public void setId(BuildOptionsIdentification id) {\r
+        this.id = id;\r
+    }\r
+}\r