]> git.proxmox.com Git - mirror_edk2.git/commitdiff
1. Fix EDKT399: "RePackagable" attribute should be supported by clone operation
authorhche10x <hche10x@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 18 Oct 2006 07:01:35 +0000 (07:01 +0000)
committerhche10x <hche10x@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 18 Oct 2006 07:01:35 +0000 (07:01 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1789 6f19259b-4bc3-4df7-8a09-765794883524

Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/Clone.java

index 6c9e25a31a61f6ef7f9b2871b0434507baf21330..4643bb1e711d9e502b13437bbb47b2194453ec4f 100644 (file)
@@ -380,6 +380,27 @@ public class Clone extends IDialog {
                                    .setToolTipText("<html>Input the package's relative path and file name, for example:<br>MdePkg\\MdePkg.spd</html>");\r
             this.jTextFieldFilePath.setSize(320, this.jTextFieldFilePath.getSize().height);\r
             this.jLabelDestinationFile.setText("New Package Path and Filename");\r
+\r
+            //\r
+            // Check if the package can be cloned\r
+            //\r
+            PackageSurfaceArea spd = GlobalData.openingPackageList\r
+                                                                  .getPackageSurfaceAreaFromId(GlobalData.openingPackageList\r
+                                                                                                                            .getIdByPath(this.oldId\r
+                                                                                                                                                   .getPath()));\r
+            if (spd != null) {\r
+                if (spd.getPackageDefinitions() != null) {\r
+                    if (!spd.getPackageDefinitions().getRePackage()) {\r
+                        Log.wrn("Clone Package", "This package can't repackaged and cloned");\r
+                        this.jTextFieldBaseName.setEnabled(false);\r
+                        this.jTextFieldFilePath.setEnabled(false);\r
+                        this.jTextFieldGuid.setEnabled(false);\r
+                        this.jTextFieldVersion.setEnabled(false);\r
+                        this.jButtonGenerateGuid.setEnabled(false);\r
+                        this.jButtonOk.setEnabled(false);\r
+                    }\r
+                }\r
+            }\r
         }\r
         //\r
         // For PLATFORM_SURFACE_AREA\r