From 01022d98b31e5e6906d80dfe2b7795e1e1758082 Mon Sep 17 00:00:00 2001 From: hche10x Date: Wed, 18 Oct 2006 07:01:35 +0000 Subject: [PATCH] 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 --- .../org/tianocore/frameworkwizard/Clone.java | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) 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