From: hche10x Date: Wed, 18 Oct 2006 07:01:35 +0000 (+0000) Subject: 1. Fix EDKT399: "RePackagable" attribute should be supported by clone operation X-Git-Tag: edk2-stable201903~24085 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=01022d98b31e5e6906d80dfe2b7795e1e1758082 1. Fix EDKT399: "RePackagable" attribute should be supported by clone operation git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1789 6f19259b-4bc3-4df7-8a09-765794883524 --- diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/Clone.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/Clone.java index 6c9e25a31a..4643bb1e71 100644 --- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/Clone.java +++ b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/Clone.java @@ -380,6 +380,27 @@ public class Clone extends IDialog { .setToolTipText("Input the package's relative path and file name, for example:
MdePkg\\MdePkg.spd"); this.jTextFieldFilePath.setSize(320, this.jTextFieldFilePath.getSize().height); this.jLabelDestinationFile.setText("New Package Path and Filename"); + + // + // Check if the package can be cloned + // + PackageSurfaceArea spd = GlobalData.openingPackageList + .getPackageSurfaceAreaFromId(GlobalData.openingPackageList + .getIdByPath(this.oldId + .getPath())); + if (spd != null) { + if (spd.getPackageDefinitions() != null) { + if (!spd.getPackageDefinitions().getRePackage()) { + Log.wrn("Clone Package", "This package can't repackaged and cloned"); + this.jTextFieldBaseName.setEnabled(false); + this.jTextFieldFilePath.setEnabled(false); + this.jTextFieldGuid.setEnabled(false); + this.jTextFieldVersion.setEnabled(false); + this.jButtonGenerateGuid.setEnabled(false); + this.jButtonOk.setEnabled(false); + } + } + } } // // For PLATFORM_SURFACE_AREA