From a094728fa731f5b846163b4a57ca53dbe20e520c Mon Sep 17 00:00:00 2001 From: jlin16 Date: Tue, 29 Aug 2006 09:18:39 +0000 Subject: [PATCH] rearrange target of procedures of library instance selection. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1402 6f19259b-4bc3-4df7-8a09-765794883524 --- .../platform/ui/FpdFileContents.java | 17 +++------- .../platform/ui/FpdModuleSA.java | 32 +++++++++++-------- 2 files changed, 24 insertions(+), 25 deletions(-) diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFileContents.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFileContents.java index 07980d7ddb..0897ac030b 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFileContents.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFileContents.java @@ -631,25 +631,18 @@ public class FpdFileContents { if (moduleSA.getPcdBuildDefinition() != null) { XmlCursor cursor = moduleSA.getPcdBuildDefinition().newCursor(); if (cursor.toFirstChild()) { - PcdBuildDefinitionDocument.PcdBuildDefinition.PcdData pcdData = (PcdBuildDefinitionDocument.PcdBuildDefinition.PcdData) cursor - .getObject(); - if (msaPcd.getCName().equals(pcdData.getCName()) - && msaPcd.getTokenSpaceGuidCName().equals(pcdData.getTokenSpaceGuidCName())) { - - maintainDynPcdMap(pcdData.getCName() + " " + pcdData.getTokenSpaceGuidCName(), moduleKey); - cursor.removeXml(); - break; - } - while (cursor.toNextSibling()) { - pcdData = (PcdBuildDefinitionDocument.PcdBuildDefinition.PcdData) cursor.getObject(); + do { + PcdBuildDefinitionDocument.PcdBuildDefinition.PcdData pcdData = (PcdBuildDefinitionDocument.PcdBuildDefinition.PcdData) cursor + .getObject(); if (msaPcd.getCName().equals(pcdData.getCName()) && msaPcd.getTokenSpaceGuidCName().equals(pcdData.getTokenSpaceGuidCName())) { + maintainDynPcdMap(pcdData.getCName() + " " + pcdData.getTokenSpaceGuidCName(), moduleKey); cursor.removeXml(); break; } - } + } while (cursor.toNextSibling()); } cursor.dispose(); } diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdModuleSA.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdModuleSA.java index ef185b16f9..b6c92d6c3e 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdModuleSA.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdModuleSA.java @@ -192,10 +192,9 @@ public class FpdModuleSA extends JDialog implements ActionListener { resolveLibraryInstances(saa[i][1] + " " + saa[i][2] + " " + saa[i][3] + " " + saa[i][4]); selectedInstancesTableModel.addRow(saa[i]); } - - } } + showClassToResolved(); } public void initFvInfo (String key) { @@ -286,7 +285,7 @@ public class FpdModuleSA extends JDialog implements ActionListener { } - showClassToResolved(); +// showClassToResolved(); } catch(Exception e) { e.printStackTrace(); @@ -418,6 +417,21 @@ public class FpdModuleSA extends JDialog implements ActionListener { } libInstanceTableModel.setRowCount(0); } + + private void addLibInstance (ModuleIdentification libMi) { + + ffc.genLibraryInstance(libMi, moduleKey); + // + // Add pcd information of selected instance to current moduleSA + // + try{ + ffc.addFrameworkModulesPcdBuildDefs(libMi, null, ffc.getModuleSA(moduleKey)); + } + catch (Exception exception) { + JOptionPane.showMessageDialog(frame, "Adding Instance" + libMi.getName() + ": "+ exception.getMessage()); + } + + } /** * This method initializes this * @@ -994,17 +1008,9 @@ public class FpdModuleSA extends JDialog implements ActionListener { libInstanceTableModel.getValueAt(row, 3) + " " + libInstanceTableModel.getValueAt(row, 4); ModuleIdentification libMi = WorkspaceProfile.getModuleId(instanceValue); - ffc.genLibraryInstance(libMi, moduleKey); - // - // Add pcd information of selected instance to current moduleSA - // - try{ - ffc.addFrameworkModulesPcdBuildDefs(libMi, null, ffc.getModuleSA(moduleKey)); - } - catch (Exception exception) { - JOptionPane.showMessageDialog(frame, "Adding Instance" + s[0] + ": "+ exception.getMessage()); - } + addLibInstance (libMi); resolveLibraryInstances(instanceValue); + showClassToResolved(); } }); } -- 2.39.2