summaryrefslogtreecommitdiff
path: root/Tools/Source
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
parent0e8d8bc75d4b513716d22e3e6d57a9a811f48091 (diff)
downloadedk2-d48c170d67c01dc2d6029697511aa2f9a2e55e90.zip
edk2-d48c170d67c01dc2d6029697511aa2f9a2e55e90.tar.gz
edk2-d48c170d67c01dc2d6029697511aa2f9a2e55e90.tar.bz2
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')
-rw-r--r--Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/EnumerationData.java21
-rw-r--r--Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/EventsDlg.java30
-rw-r--r--Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/GuidsDlg.java7
-rw-r--r--Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/HobsDlg.java28
-rw-r--r--Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/SystemTablesDlg.java34
-rw-r--r--Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/VariablesDlg.java33
-rw-r--r--Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/workspace/WorkspaceTools.java32
7 files changed, 159 insertions, 26 deletions
diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/EnumerationData.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/EnumerationData.java
index 3ee49a4..0bb3f5e 100644
--- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/EnumerationData.java
+++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/EnumerationData.java
@@ -18,7 +18,7 @@ import java.util.Vector;
public class EnumerationData {
//
- // Static data
+ // Static data for externs definitions
//
public final static String EXTERNS_PCD_IS_DRIVER = "Pcd Is Driver";
@@ -43,6 +43,25 @@ public class EnumerationData {
public final static String EXTERNS_EXIT_BOOT_SERVICES_CALL_BACK = "ExitBootServices";
//
+ // Static data for guid type
+ //
+ public final static String GUID_TYPE_DATA_HUB_RECORD = "DATA_HUB_RECORD";
+
+ public final static String GUID_TYPE_EFI_EVENT = "EFI_EVENT";
+
+ public final static String GUID_TYPE_EFI_SYSTEM_CONFIGURATION_TABLE = "EFI_SYSTEM_CONFIGURATION_TABLE";
+
+ public final static String GUID_TYPE_EFI_VARIABLE = "EFI_VARIABLE";
+
+ public final static String GUID_TYPE_GUID = "GUID";
+
+ public final static String GUID_TYPE_HII_PACKAGE_LIST = "HII_PACKAGE_LIST";
+
+ public final static String GUID_TYPE_HOB = "HOB";
+
+ public final static String GUID_TYPE_TOKEN_SPACE_GUID = "TOKEN_SPACE_GUID";
+
+ //
// Common data
//
public Vector<String> vSupportedArchitectures = new Vector<String>();
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 6c43582..521528a 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<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 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
diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/GuidsDlg.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/GuidsDlg.java
index e0475a5..d3063be 100644
--- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/GuidsDlg.java
+++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/GuidsDlg.java
@@ -260,12 +260,12 @@ public class GuidsDlg extends IDialog {
private void init(GuidsIdentification inGuidsId, ModuleIdentification mid) {
init();
this.id = inGuidsId;
-
+
//
// Init arch with module's arch
//
this.jArchCheckBox.setEnabledItems(wt.getModuleArch(mid));
-
+
//
// Get defined guids from dependent packages
//
@@ -275,7 +275,8 @@ public class GuidsDlg extends IDialog {
}
Tools.generateComboBoxByVector(this.jComboBoxCName,
- wt.getAllGuidDeclarationsFromPackages(wt.getPackageDependenciesOfModule(mid)));
+ wt.getAllGuidDeclarationsFromPackages(wt.getPackageDependenciesOfModule(mid),
+ EnumerationData.GUID_TYPE_GUID));
if (this.id != null) {
this.jComboBoxCName.setSelectedItem(id.getName());
diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/HobsDlg.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/HobsDlg.java
index eaba4c6..3b76c3c 100644
--- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/HobsDlg.java
+++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/HobsDlg.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.Hobs.HobsIdentification;
+import org.tianocore.frameworkwizard.packaging.PackageIdentification;
import org.tianocore.frameworkwizard.workspace.WorkspaceTools;
/**
@@ -293,6 +294,23 @@ public class HobsDlg extends IDialog {
//
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 hob");
+ }
+ //
+ // Init guids drop down list
+ //
+ Tools
+ .generateComboBoxByVector(jComboBoxGuidC_Name,
+ wt.getAllGuidDeclarationsFromPackages(vpid, EnumerationData.GUID_TYPE_HOB));
+
+
if (this.id != null) {
this.jComboBoxGuidC_Name.setSelectedItem(id.getName());
this.jComboBoxHobType.setSelectedItem(id.getType());
@@ -404,7 +422,6 @@ public class HobsDlg extends IDialog {
private void initFrame() {
Tools.generateComboBoxByVector(jComboBoxUsage, ed.getVHobUsage());
Tools.generateComboBoxByVector(jComboBoxHobType, ed.getVHobType());
- Tools.generateComboBoxByVector(jComboBoxGuidC_Name, wt.getAllGuidDeclarationsFromWorkspace());
}
/*
@@ -441,7 +458,14 @@ public class HobsDlg 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 Hob Name");
+ return false;
+ }
//
// Check Name
//
diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/SystemTablesDlg.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/SystemTablesDlg.java
index 924010b..9b5cc6e 100644
--- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/SystemTablesDlg.java
+++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/SystemTablesDlg.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.SystemTables.SystemTablesIdentification;
+import org.tianocore.frameworkwizard.packaging.PackageIdentification;
import org.tianocore.frameworkwizard.workspace.WorkspaceTools;
/**
@@ -256,12 +257,29 @@ public class SystemTablesDlg extends IDialog {
private void init(SystemTablesIdentification inSystemTablesId, ModuleIdentification mid) {
init();
this.id = inSystemTablesId;
-
+
//
// 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 system table");
+ }
+ //
+ // Init guids drop down list
+ //
+ Tools
+ .generateComboBoxByVector(jComboBoxGuidC_Name,
+ wt.getAllGuidDeclarationsFromPackages(vpid, EnumerationData.GUID_TYPE_EFI_SYSTEM_CONFIGURATION_TABLE));
+
+
if (this.id != null) {
this.jComboBoxGuidC_Name.setSelectedItem(id.getName());
this.jComboBoxUsage.setSelectedItem(id.getUsage());
@@ -278,7 +296,8 @@ public class SystemTablesDlg extends IDialog {
* @param iFrame
*
*/
- public SystemTablesDlg(SystemTablesIdentification inSystemTablesIdentification, IFrame iFrame, ModuleIdentification mid) {
+ public SystemTablesDlg(SystemTablesIdentification inSystemTablesIdentification, IFrame iFrame,
+ ModuleIdentification mid) {
super(iFrame, true);
init(inSystemTablesIdentification, mid);
}
@@ -358,7 +377,6 @@ public class SystemTablesDlg extends IDialog {
*/
private void initFrame() {
Tools.generateComboBoxByVector(jComboBoxUsage, ed.getVSystemTableUsage());
- Tools.generateComboBoxByVector(jComboBoxGuidC_Name, wt.getAllGuidDeclarationsFromWorkspace());
}
/*
@@ -395,6 +413,14 @@ public class SystemTablesDlg 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 System Table Name");
+ return false;
+ }
//
// Check FeatureFlag
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 34f7ba0..65c8d61 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
diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/workspace/WorkspaceTools.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/workspace/WorkspaceTools.java
index f0586b1..4e40d59 100644
--- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/workspace/WorkspaceTools.java
+++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/workspace/WorkspaceTools.java
@@ -416,12 +416,24 @@ public class WorkspaceTools {
@return Vector
**/
- public Vector<String> getAllGuidDeclarationsFromPackage(PackageSurfaceArea spd) {
+ public Vector<String> getAllGuidDeclarationsFromPackage(PackageSurfaceArea spd, String type) {
Vector<String> vector = new Vector<String>();
+ boolean isFound = false;
if (spd.getGuidDeclarations() != null) {
if (spd.getGuidDeclarations().getEntryList().size() > 0) {
for (int index = 0; index < spd.getGuidDeclarations().getEntryList().size(); index++) {
- vector.addElement(spd.getGuidDeclarations().getEntryList().get(index).getCName());
+ Vector<String> vArch = Tools.convertListToVector(spd.getGuidDeclarations().getEntryList()
+ .get(index).getGuidTypeList());
+ for (int indexOfArch = 0; indexOfArch < vArch.size(); indexOfArch++) {
+ if (vArch.get(indexOfArch).equals(type)) {
+ isFound = true;
+ break;
+ }
+ }
+ if ((isFound) || (vArch == null) || (vArch.size() < 1)) {
+ vector.addElement(spd.getGuidDeclarations().getEntryList().get(index).getCName());
+ isFound = false;
+ }
}
}
}
@@ -539,12 +551,14 @@ public class WorkspaceTools {
return vector;
}
- public Vector<String> getAllGuidDeclarationsFromWorkspace() {
+ public Vector<String> getAllGuidDeclarationsFromWorkspace(String type) {
Vector<String> vector = new Vector<String>();
for (int index = 0; index < GlobalData.vPackageList.size(); index++) {
- Vector<String> v = getAllGuidDeclarationsFromPackage(GlobalData.openingPackageList
+ Vector<String> v = getAllGuidDeclarationsFromPackage(
+ GlobalData.openingPackageList
.getPackageSurfaceAreaFromId(GlobalData.vPackageList
- .get(index)));
+ .get(index)),
+ type);
if (v != null && v.size() > 0) {
vector.addAll(v);
}
@@ -554,12 +568,14 @@ public class WorkspaceTools {
return vector;
}
- public Vector<String> getAllGuidDeclarationsFromPackages(Vector<PackageIdentification> vpid) {
+ public Vector<String> getAllGuidDeclarationsFromPackages(Vector<PackageIdentification> vpid, String type) {
Vector<String> vector = new Vector<String>();
for (int index = 0; index < vpid.size(); index++) {
- Vector<String> v = getAllGuidDeclarationsFromPackage(GlobalData.openingPackageList
+ Vector<String> v = getAllGuidDeclarationsFromPackage(
+ GlobalData.openingPackageList
.getPackageSurfaceAreaFromId(vpid
- .get(index)));
+ .get(index)),
+ type);
if (v != null && v.size() > 0) {
vector.addAll(v);
}