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) + "";
|
String path = modelAllModules.getValueAt(selectedRow, pathColForAllModTable) + "";
|
||||||
ModuleIdentification mi = miList.get(selectedRow);
|
ModuleIdentification mi = miList.get(selectedRow);
|
||||||
Vector<String> vArchs = null;
|
Vector<String> vArchs = null;
|
||||||
try {
|
|
||||||
vArchs = WorkspaceProfile.getModuleSupArchs(mi);
|
vArchs = WorkspaceProfile.getModuleSupArchs(mi);
|
||||||
}
|
|
||||||
catch (Exception exp) {
|
|
||||||
JOptionPane.showMessageDialog(frame, exp.getMessage());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (vArchs == null) {
|
if (vArchs == null) {
|
||||||
JOptionPane.showMessageDialog(frame, "No Supported Architectures specified in MSA file.");
|
JOptionPane.showMessageDialog(frame, "No Supported Architectures specified in MSA file.");
|
||||||
return;
|
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 archsAdded = "";
|
||||||
String mg = mi.getGuid();
|
String mg = mi.getGuid();
|
||||||
String mv = mi.getVersion();
|
String mv = mi.getVersion();
|
||||||
|
@ -434,7 +438,7 @@ public class FpdFrameworkModules extends IInternalFrame {
|
||||||
//
|
//
|
||||||
// check whether archs conform to SupArch of platform.
|
// check whether archs conform to SupArch of platform.
|
||||||
//
|
//
|
||||||
Vector<Object> platformSupArch = new Vector<Object>();
|
platformSupArch.removeAllElements();
|
||||||
ffc.getPlatformDefsSupportedArchs(platformSupArch);
|
ffc.getPlatformDefsSupportedArchs(platformSupArch);
|
||||||
vArchs.retainAll(platformSupArch);
|
vArchs.retainAll(platformSupArch);
|
||||||
//
|
//
|
||||||
|
|
|
@ -474,6 +474,7 @@ public class FpdPlatformDefs extends IInternalFrame {
|
||||||
getSupportedArchitectures(v);
|
getSupportedArchitectures(v);
|
||||||
if (v.size() == 0) {
|
if (v.size() == 0) {
|
||||||
JOptionPane.showMessageDialog(frame, "Platform must support at least ONE Architecture.");
|
JOptionPane.showMessageDialog(frame, "Platform must support at least ONE Architecture.");
|
||||||
|
jCheckBoxIa32.setSelected(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ffc.setPlatformDefsSupportedArchs(v);
|
ffc.setPlatformDefsSupportedArchs(v);
|
||||||
|
@ -499,6 +500,7 @@ public class FpdPlatformDefs extends IInternalFrame {
|
||||||
getSupportedArchitectures(v);
|
getSupportedArchitectures(v);
|
||||||
if (v.size() == 0) {
|
if (v.size() == 0) {
|
||||||
JOptionPane.showMessageDialog(frame, "Platform must support at least ONE Architecture.");
|
JOptionPane.showMessageDialog(frame, "Platform must support at least ONE Architecture.");
|
||||||
|
jCheckBoxX64.setSelected(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ffc.setPlatformDefsSupportedArchs(v);
|
ffc.setPlatformDefsSupportedArchs(v);
|
||||||
|
@ -524,6 +526,7 @@ public class FpdPlatformDefs extends IInternalFrame {
|
||||||
getSupportedArchitectures(v);
|
getSupportedArchitectures(v);
|
||||||
if (v.size() == 0) {
|
if (v.size() == 0) {
|
||||||
JOptionPane.showMessageDialog(frame, "Platform must support at least ONE Architecture.");
|
JOptionPane.showMessageDialog(frame, "Platform must support at least ONE Architecture.");
|
||||||
|
jCheckBoxIpf.setSelected(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ffc.setPlatformDefsSupportedArchs(v);
|
ffc.setPlatformDefsSupportedArchs(v);
|
||||||
|
@ -551,6 +554,7 @@ public class FpdPlatformDefs extends IInternalFrame {
|
||||||
getSupportedArchitectures(v);
|
getSupportedArchitectures(v);
|
||||||
if (v.size() == 0) {
|
if (v.size() == 0) {
|
||||||
JOptionPane.showMessageDialog(frame, "Platform must support at least ONE Architecture.");
|
JOptionPane.showMessageDialog(frame, "Platform must support at least ONE Architecture.");
|
||||||
|
jCheckBoxEbc.setSelected(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ffc.setPlatformDefsSupportedArchs(v);
|
ffc.setPlatformDefsSupportedArchs(v);
|
||||||
|
@ -578,6 +582,7 @@ public class FpdPlatformDefs extends IInternalFrame {
|
||||||
getSupportedArchitectures(v);
|
getSupportedArchitectures(v);
|
||||||
if (v.size() == 0) {
|
if (v.size() == 0) {
|
||||||
JOptionPane.showMessageDialog(frame, "Platform must support at least ONE Architecture.");
|
JOptionPane.showMessageDialog(frame, "Platform must support at least ONE Architecture.");
|
||||||
|
jCheckBoxArm.setSelected(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ffc.setPlatformDefsSupportedArchs(v);
|
ffc.setPlatformDefsSupportedArchs(v);
|
||||||
|
@ -605,6 +610,7 @@ public class FpdPlatformDefs extends IInternalFrame {
|
||||||
getSupportedArchitectures(v);
|
getSupportedArchitectures(v);
|
||||||
if (v.size() == 0) {
|
if (v.size() == 0) {
|
||||||
JOptionPane.showMessageDialog(frame, "Platform must support at least ONE Architecture.");
|
JOptionPane.showMessageDialog(frame, "Platform must support at least ONE Architecture.");
|
||||||
|
jCheckBoxPpc.setSelected(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ffc.setPlatformDefsSupportedArchs(v);
|
ffc.setPlatformDefsSupportedArchs(v);
|
||||||
|
|
|
@ -105,7 +105,7 @@ public class WorkspaceProfile {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Vector<String> getModuleSupArchs(ModuleIdentification mi) throws Exception {
|
public static Vector<String> getModuleSupArchs(ModuleIdentification mi){
|
||||||
Vector<String> vArchs = null;
|
Vector<String> vArchs = null;
|
||||||
ModuleSurfaceAreaDocument.ModuleSurfaceArea msa = (ModuleSurfaceAreaDocument.ModuleSurfaceArea)getModuleXmlObject(mi);
|
ModuleSurfaceAreaDocument.ModuleSurfaceArea msa = (ModuleSurfaceAreaDocument.ModuleSurfaceArea)getModuleXmlObject(mi);
|
||||||
if (msa.getModuleDefinitions() == null || msa.getModuleDefinitions().getSupportedArchitectures() == null) {
|
if (msa.getModuleDefinitions() == null || msa.getModuleDefinitions().getSupportedArchitectures() == null) {
|
||||||
|
|
Loading…
Reference in New Issue