diff options
author | wuyizhong <wuyizhong@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-11-08 08:22:05 +0000 |
---|---|---|
committer | wuyizhong <wuyizhong@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-11-08 08:22:05 +0000 |
commit | 5f0b744eaefe84e9c7ee776a091d973c7f35d5bd (patch) | |
tree | 8bacdfedecd26635bad62940b88214139b42d08c /Tools/Java | |
parent | a6b6ec4d58cf6b8b01c68ac4d1eb4acf88a1401c (diff) | |
download | edk2-platforms-5f0b744eaefe84e9c7ee776a091d973c7f35d5bd.tar.xz |
To fix bug T400. If user select a Repackage=false package during creating a FAR, give warning and a choose to continue or not.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1917 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Tools/Java')
-rw-r--r-- | Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/far/createui/CreateStepTwo.java | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/far/createui/CreateStepTwo.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/far/createui/CreateStepTwo.java index feecb7167e..c0a64be53b 100644 --- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/far/createui/CreateStepTwo.java +++ b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/far/createui/CreateStepTwo.java @@ -22,6 +22,7 @@ import java.util.Vector; import javax.swing.JButton;
import javax.swing.JLabel;
+import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
@@ -101,7 +102,7 @@ public class CreateStepTwo extends IDialog implements MouseListener { jComboBoxPackage = new ICheckBoxList();
WorkspaceTools wt = new WorkspaceTools();
Vector<String> v = new Vector<String>();
- packageVector = wt.getAllRepackagablePackages();
+ packageVector = wt.getAllPackages();
Iterator<PackageIdentification> iter = packageVector.iterator();
while (iter.hasNext()) {
PackageIdentification item = iter.next();
@@ -255,6 +256,32 @@ public class CreateStepTwo extends IDialog implements MouseListener { Log.wrn("Create far", "Choose at least one package and/or platform.");
return;
}
+
+ //
+ // If some packages a Repackage=false, give a warning message
+ //
+ List<PackageIdentification> selectedPackages = getSelectedPackages();
+ WorkspaceTools wt = new WorkspaceTools();
+ List<PackageIdentification> allRepackablePackages = wt.getAllRepackagablePackages();
+
+ List<PackageIdentification> unRepackablePackages = new Vector<PackageIdentification>();
+ String msg = "Following selected packages: \n";
+ Iterator<PackageIdentification> iter = selectedPackages.iterator();
+ while (iter.hasNext()) {
+ PackageIdentification item = iter.next();
+ if (!allRepackablePackages.contains(item)) {
+ unRepackablePackages.add(item);
+ msg += item.getName() + "\n";
+ }
+ }
+ msg += "is un-Repackagable. Do you want to continue? ";
+
+ if (unRepackablePackages.size() > 0) {
+ if(JOptionPane.showConfirmDialog(null, msg, "Warning", JOptionPane.YES_NO_OPTION) == JOptionPane.NO_OPTION) {
+ return ;
+ }
+ }
+
if (stepThree == null) {
stepThree = new CreateStepThree(this, true, this);
}
|