mirror of https://github.com/acidanthera/audk.git
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
This commit is contained in:
parent
5f0b744eae
commit
4fd52612c2
|
@ -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);
|
||||
//
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue