X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=Tools%2FSource%2FFrameworkWizard%2Fsrc%2Forg%2Ftianocore%2Fframeworkwizard%2Fmodule%2Fui%2Fdialog%2FEventsDlg.java;fp=Tools%2FSource%2FFrameworkWizard%2Fsrc%2Forg%2Ftianocore%2Fframeworkwizard%2Fmodule%2Fui%2Fdialog%2FEventsDlg.java;h=521528aa0d0d0c7d7ecb05dd3e4a414ca7a0c505;hp=6c435827e8f5ab7c52060d1d8fdeb569d14f8110;hb=d48c170d67c01dc2d6029697511aa2f9a2e55e90;hpb=0e8d8bc75d4b513716d22e3e6d57a9a811f48091 diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/EventsDlg.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/EventsDlg.java index 6c435827e8..521528aa0d 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/EventsDlg.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/EventsDlg.java @@ -36,6 +36,7 @@ import org.tianocore.frameworkwizard.common.ui.IFrame; import org.tianocore.frameworkwizard.common.ui.StarLabel; import org.tianocore.frameworkwizard.module.Identifications.ModuleIdentification; import org.tianocore.frameworkwizard.module.Identifications.Events.EventsIdentification; +import org.tianocore.frameworkwizard.packaging.PackageIdentification; import org.tianocore.frameworkwizard.workspace.WorkspaceTools; /** @@ -307,12 +308,28 @@ public class EventsDlg extends IDialog { private void init(EventsIdentification inEventsId, ModuleIdentification mid) { init(); this.id = inEventsId; - + // // Init arch with module's arch // this.jArchCheckBox.setEnabledItems(wt.getModuleArch(mid)); - + + // + // Get defined guids from dependent packages + // + Vector vpid = wt.getPackageDependenciesOfModule(mid); + if (vpid.size() <= 0) { + Log + .wrn("Init Guid", + "This module hasn't defined any package dependency, so there is no guid value can be added for event"); + } + // + // Init guids drop down list + // + Tools + .generateComboBoxByVector(jComboBoxGuidC_Name, + wt.getAllGuidDeclarationsFromPackages(vpid, EnumerationData.GUID_TYPE_EFI_EVENT)); + if (this.id != null) { this.jComboBoxGuidC_Name.setSelectedItem(id.getName()); this.jComboBoxEventsType.setSelectedItem(id.getType()); @@ -436,7 +453,6 @@ public class EventsDlg extends IDialog { Tools.generateComboBoxByVector(jComboBoxEventsType, ed.getVEventType()); Tools.generateComboBoxByVector(jComboBoxEventGroup, ed.getVEventGroup()); Tools.generateComboBoxByVector(jComboBoxUsage, ed.getVEventUsage()); - Tools.generateComboBoxByVector(jComboBoxGuidC_Name, wt.getAllGuidDeclarationsFromWorkspace()); } /* @@ -473,6 +489,14 @@ public class EventsDlg extends IDialog { // // Check if all fields have correct data types // + + // + // Check Name + // + if (this.jComboBoxGuidC_Name.getSelectedItem() == null) { + Log.wrn("Update Guids", "Please select one Event Name"); + return false; + } // // Check Name