From 5af6b67fdb381cd8e5193d9c66bba9108ea088ee Mon Sep 17 00:00:00 2001 From: jlin16 Date: Thu, 27 Jul 2006 10:36:54 +0000 Subject: [PATCH] 1. keep from generating empty FrameworkModules. 2. remove unused import in EventsDlg.java git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1120 6f19259b-4bc3-4df7-8a09-765794883524 --- .../frameworkwizard/module/ui/dialog/EventsDlg.java | 2 -- .../frameworkwizard/platform/ui/FpdFileContents.java | 12 ++++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/EventsDlg.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/EventsDlg.java index fc77c6bcb7..3c008504d1 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/EventsDlg.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/EventsDlg.java @@ -15,8 +15,6 @@ package org.tianocore.frameworkwizard.module.ui.dialog; import java.awt.event.ActionEvent; -import java.awt.event.ItemEvent; -import java.awt.event.ItemListener; import java.util.Vector; import javax.swing.JButton; 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 617f74e0bd..f730fa2a6e 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 @@ -182,7 +182,7 @@ public class FpdFileContents { } public int getFrameworkModulesCount() { - if (getfpdFrameworkModules().getModuleSAList() == null){ + if (getfpdFrameworkModules().getModuleSAList() == null || getfpdFrameworkModules().getModuleSAList().size() == 0){ removeElement(getfpdFrameworkModules()); fpdFrameworkModules = null; return 0; @@ -223,7 +223,7 @@ public class FpdFileContents { public ModuleSADocument.ModuleSA getModuleSA(String key) { String[] s = key.split(" "); - if (getfpdFrameworkModules().getModuleSAList() == null) { + if (getfpdFrameworkModules().getModuleSAList() == null || getfpdFrameworkModules().getModuleSAList().size() == 0) { removeElement(getfpdFrameworkModules()); fpdFrameworkModules = null; return null; @@ -1034,7 +1034,7 @@ public class FpdFileContents { } public int getDynamicPcdBuildDataCount() { - if (getfpdDynPcdBuildDefs().getPcdBuildDataList() == null) { + if (getfpdDynPcdBuildDefs().getPcdBuildDataList() == null || getfpdDynPcdBuildDefs().getPcdBuildDataList().size() == 0) { removeElement(getfpdDynPcdBuildDefs()); fpdDynPcdBuildDefs = null; return 0; @@ -1043,7 +1043,7 @@ public class FpdFileContents { } public void getDynamicPcdBuildData(String[][] saa) { - if (getfpdDynPcdBuildDefs().getPcdBuildDataList() == null) { + if (getfpdDynPcdBuildDefs().getPcdBuildDataList() == null || getfpdDynPcdBuildDefs().getPcdBuildDataList().size() == 0) { removeElement(getfpdDynPcdBuildDefs()); fpdDynPcdBuildDefs = null; return ; @@ -1962,6 +1962,10 @@ public class FpdFileContents { public void getPlatformDefsSkuInfos(String[][] saa){ if (getfpdPlatformDefs().getSkuInfo() == null || getfpdPlatformDefs().getSkuInfo().getUiSkuNameList() == null) { + if (getfpdDynPcdBuildDefs().getPcdBuildDataList() == null) { + removeElement(getfpdDynPcdBuildDefs()); + fpdDynPcdBuildDefs = null; + } return ; }