import org.tianocore.frameworkwizard.common.ui.StarLabel;\r
import org.tianocore.frameworkwizard.module.Identifications.ModuleIdentification;\r
import org.tianocore.frameworkwizard.module.Identifications.Events.EventsIdentification;\r
+import org.tianocore.frameworkwizard.packaging.PackageIdentification;\r
import org.tianocore.frameworkwizard.workspace.WorkspaceTools;\r
\r
/**\r
private void init(EventsIdentification inEventsId, ModuleIdentification mid) {\r
init();\r
this.id = inEventsId;\r
- \r
+\r
//\r
// Init arch with module's arch\r
//\r
this.jArchCheckBox.setEnabledItems(wt.getModuleArch(mid));\r
- \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 event");\r
+ }\r
+ //\r
+ // Init guids drop down list\r
+ //\r
+ Tools\r
+ .generateComboBoxByVector(jComboBoxGuidC_Name,\r
+ wt.getAllGuidDeclarationsFromPackages(vpid, EnumerationData.GUID_TYPE_EFI_EVENT));\r
+\r
if (this.id != null) {\r
this.jComboBoxGuidC_Name.setSelectedItem(id.getName());\r
this.jComboBoxEventsType.setSelectedItem(id.getType());\r
Tools.generateComboBoxByVector(jComboBoxEventsType, ed.getVEventType());\r
Tools.generateComboBoxByVector(jComboBoxEventGroup, ed.getVEventGroup());\r
Tools.generateComboBoxByVector(jComboBoxUsage, ed.getVEventUsage());\r
- Tools.generateComboBoxByVector(jComboBoxGuidC_Name, wt.getAllGuidDeclarationsFromWorkspace());\r
}\r
\r
/*\r
//\r
// Check if all fields have correct data types\r
//\r
+ \r
+ //\r
+ // Check Name\r
+ //\r
+ if (this.jComboBoxGuidC_Name.getSelectedItem() == null) {\r
+ Log.wrn("Update Guids", "Please select one Event Name");\r
+ return false;\r
+ }\r
\r
//\r
// Check Name\r