summaryrefslogtreecommitdiff
path: root/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/VariablesDlg.java
diff options
context:
space:
mode:
authorhche10x <hche10x@6f19259b-4bc3-4df7-8a09-765794883524>2006-09-26 02:49:50 +0000
committerhche10x <hche10x@6f19259b-4bc3-4df7-8a09-765794883524>2006-09-26 02:49:50 +0000
commitd48c170d67c01dc2d6029697511aa2f9a2e55e90 (patch)
tree26e9a9b2bdd4e24f6a5ee6e4e9f7916bb3164ebd /Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/VariablesDlg.java
parent0e8d8bc75d4b513716d22e3e6d57a9a811f48091 (diff)
downloadedk2-platforms-d48c170d67c01dc2d6029697511aa2f9a2e55e90.tar.xz
1. Fix EDKT281 there are too many values in the list of Hob's Guid C Name. only the correlative values could be reserved in the list
2. Fix EDKT282 there are too many selected values in the list of Variable Guid C Name of MSA 3. Fix EDKT283 there are too many selected values in the list of SystemTable Guid C Name of MSA Add rules for get guid when editing event/guid/hob/variable/systemtable a. Get all guids from current module's dependency packages b. For each guid, only when it hasn't defined any type or has specific type for current editing item(event/guid/hob/variable/systemtable), it can be added into drop down list. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1622 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/VariablesDlg.java')
-rw-r--r--Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/VariablesDlg.java33
1 files changed, 28 insertions, 5 deletions
diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/VariablesDlg.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/VariablesDlg.java
index 34f7ba0d4e..65c8d61087 100644
--- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/VariablesDlg.java
+++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/VariablesDlg.java
@@ -37,6 +37,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.Variables.VariablesIdentification;
+import org.tianocore.frameworkwizard.packaging.PackageIdentification;
import org.tianocore.frameworkwizard.workspace.WorkspaceTools;
/**
@@ -116,8 +117,7 @@ public class VariablesDlg extends IDialog {
jTextFieldVariableName.setSize(new java.awt.Dimension(320, 20));
jTextFieldVariableName.setPreferredSize(new java.awt.Dimension(320, 20));
jTextFieldVariableName.setLocation(new java.awt.Point(168, 12));
- jTextFieldVariableName
- .setToolTipText("Enter a string; the tool will convert to Unicode hex");
+ jTextFieldVariableName.setToolTipText("Enter a string; the tool will convert to Unicode hex");
}
return jTextFieldVariableName;
}
@@ -277,12 +277,28 @@ public class VariablesDlg extends IDialog {
private void init(VariablesIdentification inVariablesId, ModuleIdentification mid) {
init();
this.id = inVariablesId;
-
+
//
// Init arch with module's arch
//
this.jArchCheckBox.setEnabledItems(wt.getModuleArch(mid));
+ //
+ // Get defined guids from dependent packages
+ //
+ Vector<PackageIdentification> 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 variable");
+ }
+ //
+ // Init guids drop down list
+ //
+ Tools
+ .generateComboBoxByVector(jComboBoxGuidC_Name,
+ wt.getAllGuidDeclarationsFromPackages(vpid, EnumerationData.GUID_TYPE_EFI_VARIABLE));
+
if (this.id != null) {
this.jTextFieldVariableName.setText(id.getName());
this.jComboBoxGuidC_Name.setSelectedItem(id.getGuid());
@@ -415,7 +431,6 @@ public class VariablesDlg extends IDialog {
*/
private void initFrame() {
Tools.generateComboBoxByVector(jComboBoxUsage, ed.getVPpiUsage());
- Tools.generateComboBoxByVector(jComboBoxGuidC_Name, wt.getAllGuidDeclarationsFromWorkspace());
}
/**
@@ -429,7 +444,7 @@ public class VariablesDlg extends IDialog {
//
// Check if all fields have correct data types
//
-
+
//
// Check VariableName
//
@@ -437,6 +452,14 @@ public class VariablesDlg extends IDialog {
Log.wrn("Update Variables", "Variable Name must be entered!");
return false;
}
+
+ //
+ // Check Guid Value
+ //
+ if (this.jComboBoxGuidC_Name.getSelectedItem() == null) {
+ Log.wrn("Update Guids", "Please select one Varibale Guid value");
+ return false;
+ }
//
// Check FeatureFlag