]> git.proxmox.com Git - mirror_edk2.git/commitdiff
1. Fix EDKT434: After Workspace is changed, Wizard should close all (desktop area...
authorhche10x <hche10x@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 24 Oct 2006 01:29:36 +0000 (01:29 +0000)
committerhche10x <hche10x@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 24 Oct 2006 01:29:36 +0000 (01:29 +0000)
2. Fix EDKT340: Search needs to provided a way to display Selected PCD information.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1834 6f19259b-4bc3-4df7-8a09-765794883524

Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/FrameworkWizardUI.java
Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/find/Find.java
Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/find/FindResult.java
Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/find/FindResultDetailInfo.java
Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/find/PcdFindResultId.java [new file with mode: 0644]
Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/PcdCoded/PcdCodedIdentification.java

index 0b0493aeed41a63eefc765d9e726582364d70558..3c31bac1f5ae25b3fab71431a6b602b07767ca41 100644 (file)
@@ -3374,6 +3374,7 @@ public class FrameworkWizardUI extends IFrame implements KeyListener, MouseListe
             // Refrash the tree\r
             //\r
             this.refresh();\r
+            this.makeEmptyTree();\r
         }\r
         sw.dispose();\r
     }\r
index c0019c8049b1757925d84b6ddb957b8b6b33db30..c735b5e6b4da4dc85d9039dc7e5ae7d57c885816 100644 (file)
@@ -20,6 +20,7 @@ import org.tianocore.LibraryClassDeclarationsDocument.LibraryClassDeclarations.L
 import org.tianocore.LibraryClassDefinitionsDocument.LibraryClassDefinitions;\r
 import org.tianocore.ModuleSurfaceAreaDocument.ModuleSurfaceArea;\r
 import org.tianocore.PackageSurfaceAreaDocument.PackageSurfaceArea;\r
+import org.tianocore.PcdDeclarationsDocument.PcdDeclarations.PcdEntry;\r
 import org.tianocore.frameworkwizard.common.DataType;\r
 import org.tianocore.frameworkwizard.common.GlobalData;\r
 import org.tianocore.frameworkwizard.common.Sort;\r
@@ -631,8 +632,14 @@ public class Find {
                                 if (spd.getPcdDeclarations() != null) {\r
                                     for (int indexOfPcds = 0; indexOfPcds < spd.getPcdDeclarations().getPcdEntryList()\r
                                                                                .size(); indexOfPcds++) {\r
-                                        if (spd.getPcdDeclarations().getPcdEntryList().get(indexOfPcds).getCName()\r
-                                               .equals(arg0)) {\r
+                                        PcdEntry pcdEntry = spd.getPcdDeclarations().getPcdEntryList().get(indexOfPcds);\r
+                                        if (pcdEntry.getCName().equals(arg0)) {\r
+                                            pid.setTokenSpaceGuidCName(pcdEntry.getTokenSpaceGuidCName());\r
+                                            pid.setToken(pcdEntry.getToken().toString());\r
+                                            pid.setDatumType(pcdEntry.getDatumType().toString());\r
+                                            pid.setValue(pcdEntry.getDefaultValue());\r
+                                            pid.setUsage(Tools.convertListToString(pcdEntry.getValidUsage()));\r
+                                            pid.setHelp(pcdEntry.getHelpText());\r
                                             pid.setDeclaredBy(packageId);\r
                                             break;\r
                                         }\r
@@ -659,9 +666,23 @@ public class Find {
      @return\r
      \r
      **/\r
-    public static Vector<PcdId> getAllPcdCodedForFind() {\r
-        Vector<PcdId> pcd = new Vector<PcdId>();\r
-        PcdCodedVector pv = Find.getAllPcdCodedVector();\r
+/**\r
+\r
+ @return\r
+\r
+**/\r
+/**\r
+\r
+ @return\r
+\r
+**/\r
+/**\r
+\r
+ @return\r
+\r
+**/\r
+public static Vector<PcdFindResultId> getAllPcdCodedForFind(PcdCodedVector pv) {\r
+        Vector<PcdFindResultId> pcd = new Vector<PcdFindResultId>();\r
         boolean isAdded = false;\r
         boolean isProduced = false;\r
 \r
@@ -683,24 +704,19 @@ public class Find {
                 isProduced = false;\r
             }\r
 \r
-            //\r
-            // Get the sting "PackageName.ModuleName" \r
-            //\r
-            String tmp = pvId.getBelongModule().getPackageId().getName() + SEPERATOR + pvId.getBelongModule().getName();\r
-\r
             //\r
             // Check if the item has been added in\r
             // If added, append package name and new module name\r
             // If not added, add a new one first\r
             //\r
             for (int indexOfGuid = 0; indexOfGuid < pcd.size(); indexOfGuid++) {\r
-                PcdId pcdId = pcd.get(indexOfGuid);\r
+                PcdFindResultId pcdId = pcd.get(indexOfGuid);\r
 \r
                 if (pvId.getName().equals(pcdId.getName())) {\r
                     if (isProduced) {\r
-                        pcd.get(indexOfGuid).setProducedModules(pcdId.getProducedModules() + "<br>" + tmp);\r
+                        pcd.get(indexOfGuid).addProducedModules(pvId.getBelongModule());\r
                     } else if (!isProduced) {\r
-                        pcd.get(indexOfGuid).setConsumedModules(pcdId.getConsumedModules() + "<br>" + tmp);\r
+                        pcd.get(indexOfGuid).addConsumedModules(pvId.getBelongModule());\r
                     }\r
                     isAdded = true;\r
                     continue;\r
@@ -711,19 +727,20 @@ public class Find {
             // Add a new one\r
             //\r
             if (!isAdded) {\r
-                if (isProduced) {\r
-                    pcd\r
-                       .addElement(new PcdId(pvId.getName(), pvId.getType(), tmp, null, pvId.getDeclaredBy().getName()));\r
-                } else if (!isProduced) {\r
-                    pcd\r
-                       .addElement(new PcdId(pvId.getName(), pvId.getType(), null, tmp, pvId.getDeclaredBy().getName()));\r
-                }\r
+                PcdFindResultId pcdId = new PcdFindResultId(pvId.getName(), "PCD", pvId.getSupArchList(),\r
+                                                            pvId.getHelp(), null, pvId.getDeclaredBy());\r
+                pcdId.setTokenSpaceGuidCName(pvId.getTokenSpaceGuidCName());\r
+                pcdId.setToken(pvId.getToken());\r
+                pcdId.setDatumType(pvId.getDatumType());\r
+                pcdId.setValue(pvId.getValue());\r
+                pcdId.setUsage(pvId.getUsage());\r
+                \r
+                pcd.addElement(pcdId);\r
             }\r
         }\r
 \r
         return pcd;\r
     }\r
-\r
     /**\r
      Get all library class entries from workspace\r
      \r
@@ -782,7 +799,8 @@ public class Find {
                                                                                                .getLibraryClassDeclarations()\r
                                                                                                .getLibraryClassList()\r
                                                                                                .size(); indexOfLibraryClass++) {\r
-                                        LibraryClass lc = spd.getLibraryClassDeclarations().getLibraryClassList().get(indexOfLibraryClass);\r
+                                        LibraryClass lc = spd.getLibraryClassDeclarations().getLibraryClassList()\r
+                                                             .get(indexOfLibraryClass);\r
                                         if (lc.getName().equals(name)) {\r
                                             lcid.setSupArchList(Tools.convertListToVector(lc.getSupArchList()));\r
                                             lcid.setSupModuleList(Tools.convertListToVector(lc.getSupModuleList()));\r
@@ -813,70 +831,6 @@ public class Find {
      @return\r
      \r
      **/\r
-    //    public static Vector<LibraryClassId> getAllLibraryClassForFind(LibraryClassVector lcv) {\r
-    //        Vector<LibraryClassId> libraryClass = new Vector<LibraryClassId>();\r
-    //        boolean isAdded = false;\r
-    //        boolean isProduced = false;\r
-    //\r
-    //        //\r
-    //        // Go through pv to add item as new format to ppi one by one\r
-    //        //\r
-    //        for (int indexOfLcv = 0; indexOfLcv < lcv.size(); indexOfLcv++) {\r
-    //            isAdded = false;\r
-    //            LibraryClassIdentification lcvId = lcv.getLibraryClass(indexOfLcv);\r
-    //\r
-    //            //\r
-    //            // First check if produced or not\r
-    //            //\r
-    //            if (lcvId.getUsage().equals(DataType.USAGE_TYPE_ALWAYS_PRODUCED)\r
-    //                || lcvId.getUsage().equals(DataType.USAGE_TYPE_SOMETIMES_PRODUCED)) {\r
-    //                isProduced = true;\r
-    //            } else if (lcvId.getUsage().equals(DataType.USAGE_TYPE_ALWAYS_CONSUMED)\r
-    //                       || lcvId.getUsage().equals(DataType.USAGE_TYPE_SOMETIMES_CONSUMED)) {\r
-    //                isProduced = false;\r
-    //            }\r
-    //\r
-    //            //\r
-    //            // Get the string "PackageName.ModuleName" \r
-    //            //\r
-    //            String tmp = lcvId.getBelongModule().getPackageId().getName() + SEPERATOR\r
-    //                         + lcvId.getBelongModule().getName();\r
-    //\r
-    //            //\r
-    //            // Check if the item has been added in\r
-    //            // If added, append package name and new module name\r
-    //            // If not added, add a new one first\r
-    //            //\r
-    //            for (int indexOfGuid = 0; indexOfGuid < libraryClass.size(); indexOfGuid++) {\r
-    //                LibraryClassId lcId = libraryClass.get(indexOfGuid);\r
-    //\r
-    //                if (lcvId.getLibraryClassName().equals(lcId.getName())) {\r
-    //                    if (isProduced) {\r
-    //                        libraryClass.get(indexOfGuid).setProducedModules(lcId.getProducedModules() + "<br>" + tmp);\r
-    //                    } else if (!isProduced) {\r
-    //                        libraryClass.get(indexOfGuid).setConsumedModules(lcId.getConsumedModules() + "<br>" + tmp);\r
-    //                    }\r
-    //                    isAdded = true;\r
-    //                    continue;\r
-    //                }\r
-    //            }\r
-    //\r
-    //            //\r
-    //            // Add a new one\r
-    //            //\r
-    //            if (!isAdded) {\r
-    //                if (isProduced) {\r
-    //                    libraryClass.addElement(new LibraryClassId(lcvId.getLibraryClassName(), "Library Class", tmp, null,\r
-    //                                                               lcvId.getDeclaredBy().getName()));\r
-    //                } else if (!isProduced) {\r
-    //                    libraryClass.addElement(new LibraryClassId(lcvId.getLibraryClassName(), "Library Class", null, tmp,\r
-    //                                                               lcvId.getDeclaredBy().getName()));\r
-    //                }\r
-    //            }\r
-    //        }\r
-    //\r
-    //        return libraryClass;\r
-    //    }\r
     public static Vector<FindResultId> getAllLibraryClassForFind(LibraryClassVector lcv) {\r
         Vector<FindResultId> libraryClass = new Vector<FindResultId>();\r
         boolean isAdded = false;\r
index da9a7de546cd105b3427d97d0c1e189b285d42da..c0991025aca904b4a823deaf33a9a58a5a92b422 100644 (file)
@@ -42,6 +42,7 @@ import org.tianocore.frameworkwizard.common.Tools;
 import org.tianocore.frameworkwizard.common.ui.IFrame;\r
 import org.tianocore.frameworkwizard.module.Identifications.ModuleIdentification;\r
 import org.tianocore.frameworkwizard.module.Identifications.LibraryClass.LibraryClassVector;\r
+import org.tianocore.frameworkwizard.module.Identifications.PcdCoded.PcdCodedVector;\r
 \r
 public class FindResult extends IFrame implements TableModelListener, ListSelectionListener, MouseListener {\r
 \r
@@ -86,6 +87,10 @@ public class FindResult extends IFrame implements TableModelListener, ListSelect
 \r
     private Vector<FindResultId> vLibraryClassFindResult = null;\r
 \r
+    private PcdCodedVector pv = null;\r
+\r
+    private Vector<PcdFindResultId> vPcdFindResult = null;\r
+\r
     /**\r
      * This is the default constructor\r
      */\r
@@ -377,29 +382,52 @@ public class FindResult extends IFrame implements TableModelListener, ListSelect
         }\r
 \r
         if (this.method.equals("PCD")) {\r
-            Vector<PcdId> vPcd = Find.getAllPcdCodedForFind();\r
+            pv = Find.getAllPcdCodedVector();\r
+            vPcdFindResult = Find.getAllPcdCodedForFind(pv);\r
 \r
-            if (vPcd.size() > 0) {\r
+            if (vPcdFindResult.size() > 0) {\r
 \r
-                for (int index = 0; index < vPcd.size(); index++) {\r
+                for (int index = 0; index < vPcdFindResult.size(); index++) {\r
                     Vector<String> v = new Vector<String>();\r
-                    v.addElement(vPcd.elementAt(index).getName());\r
-                    v.addElement(vPcd.elementAt(index).getType());\r
-                    String strProducedModules = vPcd.elementAt(index).getProducedModules();\r
+                    v.addElement(vPcdFindResult.elementAt(index).getName());\r
+                    v.addElement(vPcdFindResult.elementAt(index).getType());\r
+\r
+                    //\r
+                    // Generate Produced Modules List\r
+                    //\r
+                    String strProducedModules = "";\r
+                    Vector<ModuleIdentification> vModule = vPcdFindResult.elementAt(index).getProducedModules();\r
+                    for (int indexOfPM = 0; indexOfPM < vModule.size(); indexOfPM++) {\r
+                        strProducedModules = strProducedModules + "<br>"\r
+                                             + vModule.get(indexOfPM).getPackageId().getName() + "."\r
+                                             + vModule.get(indexOfPM).getName();\r
+                    }\r
                     if (strProducedModules.indexOf("<br>") == 0) {\r
                         strProducedModules = strProducedModules.substring("<br>".length());\r
                     }\r
                     int line1 = Tools.getSpecificStringCount(strProducedModules, "<br>");\r
                     v.addElement("<html>" + strProducedModules + "</html>");\r
 \r
-                    String strConsumedModules = vPcd.elementAt(index).getConsumedModules();\r
+                    //\r
+                    // Generate Consumed Modules List\r
+                    //\r
+                    String strConsumedModules = "";\r
+                    vModule = vPcdFindResult.elementAt(index).getConsumedModules();\r
+                    for (int indexOfCM = 0; indexOfCM < vModule.size(); indexOfCM++) {\r
+                        strConsumedModules = strConsumedModules + "<br>"\r
+                                             + vModule.get(indexOfCM).getPackageId().getName() + "."\r
+                                             + vModule.get(indexOfCM).getName();\r
+                    }\r
                     if (strConsumedModules.indexOf("<br>") == 0) {\r
                         strConsumedModules = strConsumedModules.substring("<br>".length());\r
                     }\r
                     int line2 = Tools.getSpecificStringCount(strConsumedModules, "<br>");\r
                     v.addElement("<html>" + strConsumedModules + "</html>");\r
 \r
-                    v.addElement(vPcd.elementAt(index).getDeclaredBy());\r
+                    //\r
+                    // Add declare package name\r
+                    //\r
+                    v.addElement(vPcdFindResult.elementAt(index).getDeclaredBy().getName());\r
 \r
                     model.addRow(v);\r
                     jTable.setRowHeight(index, (Math.max(line1, line2) > 1 ? Math.max(line1, line2) : 1) * 18);\r
@@ -528,6 +556,10 @@ public class FindResult extends IFrame implements TableModelListener, ListSelect
                     FindResultDetailInfo frdi = new FindResultDetailInfo(vLibraryClassFindResult.elementAt(selectedRow));\r
                     frdi.setVisible(true);\r
                 }\r
+                if (this.method.equals("PCD")) {\r
+                    FindResultDetailInfo frdi = new FindResultDetailInfo(vPcdFindResult.elementAt(selectedRow));\r
+                    frdi.setVisible(true);\r
+                }\r
             }\r
         }\r
     }\r
index 0788d6703e2131caf39e92656dbecc588c182619..472555b43955dbf9502c647ba2b7e403dde10e51 100644 (file)
@@ -25,6 +25,9 @@ import javax.swing.JPanel;
 import javax.swing.JScrollPane;\r
 import javax.swing.JTextArea;\r
 \r
+import org.tianocore.DynamicPcdBuildDefinitionsDocument.DynamicPcdBuildDefinitions;\r
+import org.tianocore.DynamicPcdBuildDefinitionsDocument.DynamicPcdBuildDefinitions.PcdBuildData.SkuInfo;\r
+import org.tianocore.DynamicPcdBuildDefinitionsDocument.DynamicPcdBuildDefinitions.PcdBuildData;\r
 import org.tianocore.FrameworkModulesDocument.FrameworkModules;\r
 import org.tianocore.LibrariesDocument.Libraries;\r
 import org.tianocore.LibrariesDocument.Libraries.Instance;\r
@@ -32,6 +35,9 @@ import org.tianocore.LibraryClassDocument.LibraryClass;
 import org.tianocore.ModuleSADocument.ModuleSA;\r
 import org.tianocore.ModuleSurfaceAreaDocument.ModuleSurfaceArea;\r
 import org.tianocore.PackageSurfaceAreaDocument.PackageSurfaceArea;\r
+import org.tianocore.PcdBuildDefinitionDocument.PcdBuildDefinition;\r
+import org.tianocore.PcdBuildDefinitionDocument.PcdBuildDefinition.PcdData;\r
+import org.tianocore.PcdCodedDocument.PcdCoded;\r
 import org.tianocore.PlatformSurfaceAreaDocument.PlatformSurfaceArea;\r
 import org.tianocore.frameworkwizard.common.DataType;\r
 import org.tianocore.frameworkwizard.common.GlobalData;\r
@@ -124,6 +130,251 @@ public class FindResultDetailInfo extends IFrame {
         this.jTextArea.setSelectionEnd(0);\r
     }\r
 \r
+    /**\r
+     \r
+     @param lci\r
+     \r
+     **/\r
+    public FindResultDetailInfo(PcdFindResultId frid) {\r
+        super();\r
+        init();\r
+        this.setTitle(frid.getName());\r
+        this.jTextArea.setText(createReport(frid));\r
+        this.jTextArea.setSelectionStart(0);\r
+        this.jTextArea.setSelectionEnd(0);\r
+    }\r
+\r
+    /**\r
+     Create detailed information report for pcd\r
+     \r
+     @param frid\r
+     @return\r
+     \r
+     **/\r
+    private String createReport(PcdFindResultId frid) {\r
+        String name = frid.getName();\r
+\r
+        //\r
+        // Write Pcd Name\r
+        //\r
+        writeReportLn("PCD C Name: " + name);\r
+\r
+        //\r
+        // Wrtie Declared package\r
+        //\r
+        writeReportLn("Declared in Package: " + frid.getDeclaredBy().getName() + " ("\r
+                      + Tools.getRelativePath(frid.getDeclaredBy().getPath(), Workspace.getCurrentWorkspace()) + ")");\r
+\r
+        //\r
+        // Write Token Space\r
+        //\r
+        writeReportLn("Token Space: " + frid.getTokenSpaceGuidCName());\r
+\r
+        //\r
+        // Write Token\r
+        //\r
+        writeReportLn("Token: " + frid.getToken());\r
+\r
+        //\r
+        // Write Datum Type\r
+        //\r
+        writeReportLn("Datum Type: " + frid.getDatumType());\r
+\r
+        //\r
+        // Write Default Value\r
+        //\r
+        writeReportLn("Default Value: " + frid.getValue());\r
+\r
+        //\r
+        // Write Usages\r
+        //\r
+        writeReportLn("Valid Usages: " + frid.getUsage());\r
+\r
+        //\r
+        // Write Help Text\r
+        //\r
+        writeReportLn("Help Text: ");\r
+        writeReportLn(TAB + frid.getHelp());\r
+\r
+        //\r
+        // Write an Empty Line\r
+        //\r
+        writeReportLn("");\r
+\r
+        //\r
+        // Wriet all modules which use this PCD:\r
+        //\r
+        writeReportLn("Modules Coded to Use This PCD: ");\r
+\r
+        Vector<ModuleIdentification> vModules = frid.getConsumedModules();\r
+        if (vModules != null) {\r
+            for (int index = 0; index < vModules.size(); index++) {\r
+                //\r
+                // Write Module Name and Path\r
+                //\r
+                writeReportLn(TAB + vModules.get(index).getName() + " ("\r
+                              + Tools.getRelativePath(vModules.get(index).getPath(), Workspace.getCurrentWorkspace())\r
+                              + ")");\r
+\r
+                //\r
+                // Write Module Pcd Info\r
+                //\r
+                ModuleSurfaceArea msa = GlobalData.openingModuleList.getModuleSurfaceAreaFromId(vModules.get(index));\r
+                if (msa != null) {\r
+                    PcdCoded pcdCoded = msa.getPcdCoded();\r
+                    if (pcdCoded != null) {\r
+                        for (int indexOfPcd = 0; indexOfPcd < pcdCoded.getPcdEntryList().size(); indexOfPcd++) {\r
+                            if (pcdCoded.getPcdEntryList().get(indexOfPcd).getCName().equals(name)) {\r
+                                //\r
+                                // Write Pcd Item Type\r
+                                //\r
+                                writeReportLn(TAB + TAB + "PcdItemType: "\r
+                                              + pcdCoded.getPcdEntryList().get(indexOfPcd).getPcdItemType().toString());\r
+\r
+                                //\r
+                                // Write Help Text\r
+                                //\r
+                                writeReportLn(TAB + TAB + "Help Text: ");\r
+                                writeReportLn(TAB + TAB + TAB\r
+                                              + pcdCoded.getPcdEntryList().get(indexOfPcd).getHelpText());\r
+                            }\r
+                        }\r
+                    }\r
+                }\r
+\r
+                //\r
+                // Write an Empty Line\r
+                //\r
+                writeReportLn("");\r
+            }\r
+        }\r
+\r
+        //\r
+        // Write an Empty Line\r
+        //\r
+        writeReportLn("");\r
+\r
+        //\r
+        // Write All Platforms Specifing this PCD\r
+        //\r
+        writeReportLn("Platforms Specifing this PCD: ");\r
+\r
+        for (int index = 0; index < GlobalData.openingPlatformList.size(); index++) {\r
+            PlatformSurfaceArea fpd = GlobalData.openingPlatformList.getOpeningPlatformByIndex(index).getXmlFpd();\r
+            PlatformIdentification pid = GlobalData.openingPlatformList.getOpeningPlatformByIndex(index).getId();\r
+\r
+            String tmp = "";\r
+            //\r
+            // Get Non-Dynamic Pcd\r
+            //\r
+            FrameworkModules fm = fpd.getFrameworkModules();\r
+            if (fm != null) {\r
+                for (int indexOfModuleSa = 0; indexOfModuleSa < fm.getModuleSAList().size(); indexOfModuleSa++) {\r
+                    ModuleSA msa = fm.getModuleSAList().get(indexOfModuleSa);\r
+                    if (msa != null) {\r
+                        PcdBuildDefinition p = msa.getPcdBuildDefinition();\r
+                        if (p != null) {\r
+                            if (p.getPcdDataList() != null) {\r
+\r
+                                for (int indexOfPcd = 0; indexOfPcd < p.getPcdDataList().size(); indexOfPcd++) {\r
+                                    PcdData pd = p.getPcdDataList().get(indexOfPcd);\r
+                                    //\r
+                                    // Find this PCD\r
+                                    //\r
+                                    if (pd.getCName().equals(name)) {\r
+                                        //\r
+                                        // Write Module Sa Info\r
+                                        //\r
+                                        ModuleIdentification moduleSaId = GlobalData\r
+                                                                                    .findIdByGuidVersion(\r
+                                                                                                         msa\r
+                                                                                                            .getModuleGuid(),\r
+                                                                                                         msa\r
+                                                                                                            .getModuleVersion(),\r
+                                                                                                         msa\r
+                                                                                                            .getPackageGuid(),\r
+                                                                                                         msa\r
+                                                                                                            .getPackageVersion());\r
+                                        tmp = tmp\r
+                                              + TAB\r
+                                              + TAB\r
+                                              + "Module: "\r
+                                              + moduleSaId.getName()\r
+                                              + " ("\r
+                                              + Tools.getRelativePath(moduleSaId.getPath(),\r
+                                                                      Workspace.getCurrentWorkspace()) + ")"\r
+                                              + DataType.UNIX_LINE_SEPARATOR;\r
+                                        tmp = tmp + TAB + TAB + TAB + "Implementation: " + pd.getItemType().toString()\r
+                                              + DataType.UNIX_LINE_SEPARATOR;\r
+                                        tmp = tmp + TAB + TAB + TAB + "Specified / Implementation Value: "\r
+                                              + pd.getValue() + DataType.UNIX_LINE_SEPARATOR;\r
+                                        tmp = tmp + DataType.UNIX_LINE_SEPARATOR;\r
+                                    }\r
+                                }\r
+                            }\r
+                        }\r
+                    }\r
+                }\r
+            }\r
+\r
+            //\r
+            // Get Dynamic Pcd\r
+            //\r
+            DynamicPcdBuildDefinitions dpbd = fpd.getDynamicPcdBuildDefinitions();\r
+            if (dpbd != null) {\r
+                for (int indexOfDpbd = 0; indexOfDpbd < dpbd.getPcdBuildDataList().size(); indexOfDpbd++) {\r
+                    PcdBuildData pbd = dpbd.getPcdBuildDataList().get(indexOfDpbd);\r
+                    if (pbd != null) {\r
+                        if (pbd.getCName().equals(name)) {\r
+                            //\r
+                            // Write Dynamic Pcd Build Definition\r
+                            //\r
+                            tmp = tmp + TAB + TAB + "Dynamic Pcd Build Definition: " + DataType.UNIX_LINE_SEPARATOR;\r
+                            if (pbd.getSkuInfoList() != null) {\r
+                                for (int indexOfPcd = 0; indexOfPcd < pbd.getSkuInfoList().size(); indexOfPcd++) {\r
+                                    SkuInfo si = pbd.getSkuInfoList().get(indexOfPcd);\r
+                                    if (si != null) {\r
+                                        tmp = tmp + TAB + TAB + TAB + "Sku Id: " + si.getSkuId().toString()\r
+                                              + DataType.UNIX_LINE_SEPARATOR;\r
+                                        tmp = tmp + TAB + TAB + TAB + "Variable Name: " + si.getVariableName()\r
+                                              + DataType.UNIX_LINE_SEPARATOR;\r
+                                        tmp = tmp + TAB + TAB + TAB + "Variable GUID: " + si.getVariableGuid()\r
+                                              + DataType.UNIX_LINE_SEPARATOR;\r
+                                        tmp = tmp + TAB + TAB + TAB + "Variable Offset: " + si.getVariableOffset()\r
+                                              + DataType.UNIX_LINE_SEPARATOR;\r
+                                        tmp = tmp + TAB + TAB + TAB + "Hii Default Value: " + si.getHiiDefaultValue()\r
+                                              + DataType.UNIX_LINE_SEPARATOR;\r
+                                    }\r
+                                }\r
+                            }\r
+                        }\r
+                    }\r
+                }\r
+            }\r
+\r
+            //\r
+            // If not empty, write this platform info\r
+            //\r
+            if (!Tools.isEmpty(tmp)) {\r
+                tmp = TAB + "Platform: " + pid.getName() + " ("\r
+                      + Tools.getRelativePath(pid.getPath(), Workspace.getCurrentWorkspace()) + ")"\r
+                      + DataType.UNIX_LINE_SEPARATOR + tmp;\r
+                this.writeReportLn(tmp);\r
+            }\r
+        }\r
+\r
+        return reportContent;\r
+    }\r
+\r
+    //\r
+    // Create detailed information report for library\r
+    // \r
+    /**\r
+     \r
+     @param frid\r
+     @return\r
+     \r
+     **/\r
     private String createReport(FindResultId frid) {\r
         String tmp = "";\r
         String name = frid.getName();\r
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/find/PcdFindResultId.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/find/PcdFindResultId.java
new file mode 100644 (file)
index 0000000..88e46c4
--- /dev/null
@@ -0,0 +1,76 @@
+/** @file\r
+\r
+ The file is used to define Pcd Identification used by find function\r
+\r
+ Copyright (c) 2006, Intel Corporation\r
+ All rights reserved. This program and the accompanying materials\r
+ are licensed and made available under the terms and conditions of the BSD License\r
+ which accompanies this distribution.  The full text of the license may be found at\r
+ http://opensource.org/licenses/bsd-license.php\r
+\r
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+ **/\r
+package org.tianocore.frameworkwizard.common.find;\r
+\r
+import java.util.Vector;\r
+\r
+import org.tianocore.frameworkwizard.packaging.PackageIdentification;\r
+\r
+public class PcdFindResultId extends FindResultId {\r
+\r
+    private String tokenSpaceGuidCName = null;\r
+    \r
+    private String token = null;\r
+    \r
+    private String datumType = null;\r
+    \r
+    private String value = null;\r
+    \r
+    private String usage = null;\r
+    \r
+    public PcdFindResultId(String strName, String strType, Vector<String> vArch, String strHelp, Vector<String> vModuleType, PackageIdentification pDeclaredBy) {\r
+        super(strName, strType, vArch, strHelp, vModuleType, pDeclaredBy);\r
+    }\r
+\r
+    public String getDatumType() {\r
+        return datumType;\r
+    }\r
+\r
+    public void setDatumType(String datumType) {\r
+        this.datumType = datumType;\r
+    }\r
+\r
+    public String getToken() {\r
+        return token;\r
+    }\r
+\r
+    public void setToken(String token) {\r
+        this.token = token;\r
+    }\r
+\r
+    public String getTokenSpaceGuidCName() {\r
+        return tokenSpaceGuidCName;\r
+    }\r
+\r
+    public void setTokenSpaceGuidCName(String tokenSpaceGuidCName) {\r
+        this.tokenSpaceGuidCName = tokenSpaceGuidCName;\r
+    }\r
+\r
+    public String getUsage() {\r
+        return usage;\r
+    }\r
+\r
+    public void setUsage(String usage) {\r
+        this.usage = usage;\r
+    }\r
+\r
+    public String getValue() {\r
+        return value;\r
+    }\r
+\r
+    public void setValue(String value) {\r
+        this.value = value;\r
+    }\r
+}\r
index cf4b5bb16fd9e1ebd65c191827b8a9519e8a7de9..13ed398fa341749e2a765f10bf9fea70188560c2 100644 (file)
@@ -41,6 +41,12 @@ public class PcdCodedIdentification {
     \r
     private String usage = null;\r
     \r
+    private String tokenSpaceGuidCName = null;\r
+    \r
+    private String token = null;\r
+    \r
+    private String datumType = null;\r
+    \r
     private ModuleIdentification belongModule = null;\r
     \r
     private PackageIdentification declaredBy = null;\r
@@ -142,4 +148,28 @@ public class PcdCodedIdentification {
     public void setDeclaredBy(PackageIdentification declaredBy) {\r
         this.declaredBy = declaredBy;\r
     }\r
+\r
+    public String getToken() {\r
+        return token;\r
+    }\r
+\r
+    public void setToken(String token) {\r
+        this.token = token;\r
+    }\r
+\r
+    public String getTokenSpaceGuidCName() {\r
+        return tokenSpaceGuidCName;\r
+    }\r
+\r
+    public void setTokenSpaceGuidCName(String tokenSpaceGuidCName) {\r
+        this.tokenSpaceGuidCName = tokenSpaceGuidCName;\r
+    }\r
+\r
+    public String getDatumType() {\r
+        return datumType;\r
+    }\r
+\r
+    public void setDatumType(String datumType) {\r
+        this.datumType = datumType;\r
+    }\r
 }\r