import org.tianocore.frameworkwizard.common.ui.StarLabel;\r
import org.tianocore.frameworkwizard.module.Identifications.ModuleIdentification;\r
import org.tianocore.frameworkwizard.module.Identifications.Hobs.HobsIdentification;\r
+import org.tianocore.frameworkwizard.packaging.PackageIdentification;\r
import org.tianocore.frameworkwizard.workspace.WorkspaceTools;\r
\r
/**\r
//\r
this.jArchCheckBox.setEnabledItems(wt.getModuleArch(mid));\r
\r
+ //\r
+ // Get defined guids from dependent packages\r
+ //\r
+ Vector<PackageIdentification> vpid = wt.getPackageDependenciesOfModule(mid);\r
+ if (vpid.size() <= 0) {\r
+ Log\r
+ .wrn("Init Guid",\r
+ "This module hasn't defined any package dependency, so there is no guid value can be added for hob");\r
+ }\r
+ //\r
+ // Init guids drop down list\r
+ //\r
+ Tools\r
+ .generateComboBoxByVector(jComboBoxGuidC_Name,\r
+ wt.getAllGuidDeclarationsFromPackages(vpid, EnumerationData.GUID_TYPE_HOB));\r
+\r
+\r
if (this.id != null) {\r
this.jComboBoxGuidC_Name.setSelectedItem(id.getName());\r
this.jComboBoxHobType.setSelectedItem(id.getType());\r
private void initFrame() {\r
Tools.generateComboBoxByVector(jComboBoxUsage, ed.getVHobUsage());\r
Tools.generateComboBoxByVector(jComboBoxHobType, ed.getVHobType());\r
- Tools.generateComboBoxByVector(jComboBoxGuidC_Name, wt.getAllGuidDeclarationsFromWorkspace());\r
}\r
\r
/*\r
//\r
// Check if all fields have correct data types\r
//\r
-\r
+ \r
+ //\r
+ // Check Name\r
+ //\r
+ if (this.jComboBoxGuidC_Name.getSelectedItem() == null) {\r
+ Log.wrn("Update Guids", "Please select one Hob Name");\r
+ return false;\r
+ }\r
//\r
// Check Name\r
//\r