diff options
author | jlin16 <jlin16@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-11-08 08:31:56 +0000 |
---|---|---|
committer | jlin16 <jlin16@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-11-08 08:31:56 +0000 |
commit | 4fd52612c2eaf63bd6c8dc1713806317bf983049 (patch) | |
tree | 0f1c5378b706408f85a189de8731c4518760a2d4 /Tools | |
parent | 5f0b744eaefe84e9c7ee776a091d973c7f35d5bd (diff) | |
download | edk2-4fd52612c2eaf63bd6c8dc1713806317bf983049.zip edk2-4fd52612c2eaf63bd6c8dc1713806317bf983049.tar.gz edk2-4fd52612c2eaf63bd6c8dc1713806317bf983049.tar.bz2 |
Fix the invalid warning message when user add a module that does not support platform architectures to this platform.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1918 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Tools')
3 files changed, 18 insertions, 8 deletions
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFrameworkModules.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFrameworkModules.java index d8b1934..00243c2 100644 --- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFrameworkModules.java +++ b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFrameworkModules.java @@ -389,18 +389,22 @@ public class FpdFrameworkModules extends IInternalFrame { String path = modelAllModules.getValueAt(selectedRow, pathColForAllModTable) + "";
ModuleIdentification mi = miList.get(selectedRow);
Vector<String> vArchs = null;
- try {
- vArchs = WorkspaceProfile.getModuleSupArchs(mi);
- }
- catch (Exception exp) {
- JOptionPane.showMessageDialog(frame, exp.getMessage());
- }
+
+ vArchs = WorkspaceProfile.getModuleSupArchs(mi);
if (vArchs == null) {
JOptionPane.showMessageDialog(frame, "No Supported Architectures specified in MSA file.");
return;
}
+ Vector<Object> platformSupArch = new Vector<Object>();
+ ffc.getPlatformDefsSupportedArchs(platformSupArch);
+ platformSupArch.retainAll(vArchs);
+ if (platformSupArch.size() == 0) {
+ JOptionPane.showMessageDialog(frame, "This Module does not support this platform architectures.");
+ return;
+ }
+
String archsAdded = "";
String mg = mi.getGuid();
String mv = mi.getVersion();
@@ -434,7 +438,7 @@ public class FpdFrameworkModules extends IInternalFrame { //
// check whether archs conform to SupArch of platform.
//
- Vector<Object> platformSupArch = new Vector<Object>();
+ platformSupArch.removeAllElements();
ffc.getPlatformDefsSupportedArchs(platformSupArch);
vArchs.retainAll(platformSupArch);
//
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdPlatformDefs.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdPlatformDefs.java index f7d8b01..5f1e76d 100644 --- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdPlatformDefs.java +++ b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdPlatformDefs.java @@ -474,6 +474,7 @@ public class FpdPlatformDefs extends IInternalFrame { getSupportedArchitectures(v);
if (v.size() == 0) {
JOptionPane.showMessageDialog(frame, "Platform must support at least ONE Architecture.");
+ jCheckBoxIa32.setSelected(true);
return;
}
ffc.setPlatformDefsSupportedArchs(v);
@@ -499,6 +500,7 @@ public class FpdPlatformDefs extends IInternalFrame { getSupportedArchitectures(v);
if (v.size() == 0) {
JOptionPane.showMessageDialog(frame, "Platform must support at least ONE Architecture.");
+ jCheckBoxX64.setSelected(true);
return;
}
ffc.setPlatformDefsSupportedArchs(v);
@@ -524,6 +526,7 @@ public class FpdPlatformDefs extends IInternalFrame { getSupportedArchitectures(v);
if (v.size() == 0) {
JOptionPane.showMessageDialog(frame, "Platform must support at least ONE Architecture.");
+ jCheckBoxIpf.setSelected(true);
return;
}
ffc.setPlatformDefsSupportedArchs(v);
@@ -551,6 +554,7 @@ public class FpdPlatformDefs extends IInternalFrame { getSupportedArchitectures(v);
if (v.size() == 0) {
JOptionPane.showMessageDialog(frame, "Platform must support at least ONE Architecture.");
+ jCheckBoxEbc.setSelected(true);
return;
}
ffc.setPlatformDefsSupportedArchs(v);
@@ -578,6 +582,7 @@ public class FpdPlatformDefs extends IInternalFrame { getSupportedArchitectures(v);
if (v.size() == 0) {
JOptionPane.showMessageDialog(frame, "Platform must support at least ONE Architecture.");
+ jCheckBoxArm.setSelected(true);
return;
}
ffc.setPlatformDefsSupportedArchs(v);
@@ -605,6 +610,7 @@ public class FpdPlatformDefs extends IInternalFrame { getSupportedArchitectures(v);
if (v.size() == 0) {
JOptionPane.showMessageDialog(frame, "Platform must support at least ONE Architecture.");
+ jCheckBoxPpc.setSelected(true);
return;
}
ffc.setPlatformDefsSupportedArchs(v);
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/global/WorkspaceProfile.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/global/WorkspaceProfile.java index 0f79653..b06a97b 100644 --- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/global/WorkspaceProfile.java +++ b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/global/WorkspaceProfile.java @@ -105,7 +105,7 @@ public class WorkspaceProfile { return null;
}
- public static Vector<String> getModuleSupArchs(ModuleIdentification mi) throws Exception {
+ public static Vector<String> getModuleSupArchs(ModuleIdentification mi){
Vector<String> vArchs = null;
ModuleSurfaceAreaDocument.ModuleSurfaceArea msa = (ModuleSurfaceAreaDocument.ModuleSurfaceArea)getModuleXmlObject(mi);
if (msa.getModuleDefinitions() == null || msa.getModuleDefinitions().getSupportedArchitectures() == null) {
|