Module Order in FV editor enhanced.
authorjlin16 <jlin16@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 21 Sep 2006 16:08:07 +0000 (16:08 +0000)
committerjlin16 <jlin16@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 21 Sep 2006 16:08:07 +0000 (16:08 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1590 6f19259b-4bc3-4df7-8a09-765794883524

Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFileContents.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFlash.java

index d9c2e69..840f3e7 100644 (file)
@@ -190,7 +190,7 @@ public class FpdFileContents {
         return fpdFrameworkModules;\r
     }\r
     \r
-    public void getFrameworkModuleGuid (String fvName, Vector<String> vGuid) {\r
+    public void getFrameworkModuleSAByFvBinding (String fvName, Vector<String[]> vGuid) {\r
         if (getFrameworkModulesCount() == 0){\r
             return;\r
         }\r
@@ -208,8 +208,15 @@ public class FpdFileContents {
             \r
             String[] fvNames = fvBinding.split(" ");\r
             for (int i = 0; i < fvNames.length; ++i) {\r
+                //\r
+                // BugBug : underscore "_" should not be replaced!!! \r
+                // But Fv name FVMAIN from fdf file not consist with FV_MAIN in fpd file.\r
+                //\r
                 if (fvNames[i].equals(fvName) || fvNames[i].replaceAll("_", "").equals(fvName)) {\r
-                    vGuid.add(moduleSa.getModuleGuid());\r
+                    String[] sa = new String[] {moduleSa.getModuleGuid(), moduleSa.getModuleVersion(),\r
+                                                moduleSa.getPackageGuid(), moduleSa.getPackageVersion(), \r
+                                                listToString(moduleSa.getSupArchList())};\r
+                    vGuid.add(sa);\r
                     break;\r
                 }\r
             }\r
@@ -964,14 +971,9 @@ public class FpdFileContents {
         setFvBinding (moduleSa, newFvNameList.trim());\r
     }\r
     \r
-    public void updateFvBindingInModuleSA (ModuleIdentification mi, String fvName) {\r
-        Vector<Object> vSupArchs = new Vector<Object>();\r
-        getPlatformDefsSupportedArchs(vSupArchs);\r
-        String moduleInfo = mi.getGuid() + " " + mi.getVersion() + " " + mi.getPackageId().getGuid() + " " + mi.getPackageId().getVersion();\r
-        for (int i = 0; i < vSupArchs.size(); ++i) {\r
-            String moduleKey = moduleInfo + " " + vSupArchs.get(i);\r
-            appendFvBinding (moduleKey, fvName);\r
-        }\r
+    public void updateFvBindingInModuleSA (String moduleKey, String fvName) {\r
+       \r
+        appendFvBinding (moduleKey, fvName);\r
     }\r
     \r
     public String getFfsFileNameGuid(String moduleKey){\r
@@ -1759,7 +1761,10 @@ public class FpdFileContents {
         for (int i = 0; i < includeModules.size(); ++i) {\r
             cursor.beginElement(elementModule);\r
             cursor.insertAttributeWithValue("ModuleGuid", includeModules.get(i)[0]);\r
-            cursor.insertAttributeWithValue("BaseName", includeModules.get(i)[1]);\r
+            cursor.insertAttributeWithValue("ModuleVersion", includeModules.get(i)[1]);\r
+            cursor.insertAttributeWithValue("PackageGuid", includeModules.get(i)[2]);\r
+            cursor.insertAttributeWithValue("PackageVersion", includeModules.get(i)[3]);\r
+            cursor.insertAttributeWithValue("Arch", includeModules.get(i)[4]);\r
             cursor.toEndToken();\r
             cursor.toNextToken();\r
         }\r
@@ -1807,7 +1812,10 @@ public class FpdFileContents {
         QName elementFvName = new QName (xmlNs, "FvName");\r
         QName elementIncludeModules = new QName(xmlNs, "IncludeModules");\r
         QName attribModuleGuid = new QName("ModuleGuid");\r
-        QName attribBaseName = new QName("BaseName");\r
+        QName attribModuleVersion = new QName("ModuleVersion");\r
+        QName attribPackageGuid = new QName("PackageGuid");\r
+        QName attribPackageVersion = new QName("PackageVersion");\r
+        QName attribArch = new QName("Arch");\r
         \r
         if (cursor.toChild(elementUserExts)) {\r
             do {\r
@@ -1821,7 +1829,10 @@ public class FpdFileContents {
                             int i = 0;\r
                             do {\r
                                 saa[i][0] = cursor.getAttributeText(attribModuleGuid);\r
-                                saa[i][1] = cursor.getAttributeText(attribBaseName);\r
+                                saa[i][1] = cursor.getAttributeText(attribModuleVersion);\r
+                                saa[i][2] = cursor.getAttributeText(attribPackageGuid);\r
+                                saa[i][3] = cursor.getAttributeText(attribPackageVersion);\r
+                                saa[i][4] = cursor.getAttributeText(attribArch);\r
                                 ++i;\r
                             }while (cursor.toNextSibling());\r
                         }\r
index 5a365bb..482188d 100644 (file)
@@ -25,7 +25,6 @@ import javax.swing.ListSelectionModel;
 \r
 import org.tianocore.PlatformSurfaceAreaDocument;\r
 import org.tianocore.frameworkwizard.common.DataValidation;\r
-import org.tianocore.frameworkwizard.common.GlobalData;\r
 import org.tianocore.frameworkwizard.common.IDefaultTableModel;\r
 import org.tianocore.frameworkwizard.common.Identifications.OpeningPlatformType;\r
 import org.tianocore.frameworkwizard.common.ui.IInternalFrame;\r
@@ -39,10 +38,11 @@ import java.awt.event.ComponentAdapter;
 import java.awt.event.ComponentEvent;\r
 import java.awt.event.ItemEvent;\r
 import java.awt.event.ItemListener;\r
+import java.awt.event.MouseAdapter;\r
+import java.awt.event.MouseEvent;\r
 import java.io.BufferedReader;\r
 import java.io.File;\r
 import java.io.FileReader;\r
-import java.util.ArrayList;\r
 import java.util.HashMap;\r
 import java.util.Iterator;\r
 import java.util.LinkedHashMap;\r
@@ -2305,7 +2305,108 @@ public class FpdFlash extends IInternalFrame {
         }\r
 \r
     }\r
-        \r
+    \r
+//    class ModuleSAInfo {\r
+//        private int rowNumber = -1;\r
+//        private String moduleGuid = null;\r
+//        private String moduleVersion = null;\r
+//        private String packageGuid = null;\r
+//        private String packageVersion = null;\r
+//        private String arch = null;\r
+//        \r
+//        public ModuleSAInfo (String mg, String mv, String pg, String pv, String a) {\r
+//            moduleGuid = mg;\r
+//            moduleVersion = mv;\r
+//            packageGuid = pg;\r
+//            packageVersion = pv;\r
+//            arch = a;\r
+//        }\r
+//\r
+//        /**\r
+//         * @return Returns the arch.\r
+//         */\r
+//        public String getArch() {\r
+//            return arch;\r
+//        }\r
+//\r
+//        /**\r
+//         * @param arch The arch to set.\r
+//         */\r
+//        public void setArch(String arch) {\r
+//            this.arch = arch;\r
+//        }\r
+//\r
+//        /**\r
+//         * @return Returns the moduleGuid.\r
+//         */\r
+//        public String getModuleGuid() {\r
+//            return moduleGuid;\r
+//        }\r
+//\r
+//        /**\r
+//         * @param moduleGuid The moduleGuid to set.\r
+//         */\r
+//        public void setModuleGuid(String moduleGuid) {\r
+//            this.moduleGuid = moduleGuid;\r
+//        }\r
+//\r
+//        /**\r
+//         * @return Returns the moduleVersion.\r
+//         */\r
+//        public String getModuleVersion() {\r
+//            return moduleVersion;\r
+//        }\r
+//\r
+//        /**\r
+//         * @param moduleVersion The moduleVersion to set.\r
+//         */\r
+//        public void setModuleVersion(String moduleVersion) {\r
+//            this.moduleVersion = moduleVersion;\r
+//        }\r
+//\r
+//        /**\r
+//         * @return Returns the packageGuid.\r
+//         */\r
+//        public String getPackageGuid() {\r
+//            return packageGuid;\r
+//        }\r
+//\r
+//        /**\r
+//         * @param packageGuid The packageGuid to set.\r
+//         */\r
+//        public void setPackageGuid(String packageGuid) {\r
+//            this.packageGuid = packageGuid;\r
+//        }\r
+//\r
+//        /**\r
+//         * @return Returns the packageVersion.\r
+//         */\r
+//        public String getPackageVersion() {\r
+//            return packageVersion;\r
+//        }\r
+//\r
+//        /**\r
+//         * @param packageVersion The packageVersion to set.\r
+//         */\r
+//        public void setPackageVersion(String packageVersion) {\r
+//            this.packageVersion = packageVersion;\r
+//        }\r
+//\r
+//        /**\r
+//         * @return Returns the rowNumber.\r
+//         */\r
+//        public int getRowNumber() {\r
+//            return rowNumber;\r
+//        }\r
+//\r
+//        /**\r
+//         * @param rowNumber The rowNumber to set.\r
+//         */\r
+//        public void setRowNumber(int rowNumber) {\r
+//            this.rowNumber = rowNumber;\r
+//        }\r
+//    }\r
+    \r
     private class ModuleOrderPane extends JPanel {\r
 \r
         /**\r
@@ -2328,8 +2429,8 @@ public class FpdFlash extends IInternalFrame {
         private JButton jButtonCancel = null;\r
         private IDefaultTableModel modInFvTableModel = null;\r
         private IDefaultTableModel fpdModTableModel = null;\r
-        private HashMap<String, ModuleIdentification> mGuidToModuleId = null;\r
-        private ArrayList<String> listModGuidInFv = null;\r
+//        private ArrayList<ModuleSAInfo> listTableModInFvModuleSAInfo = null;\r
+//        private ArrayList<ModuleSAInfo> listTableFpdModulesModuleSAInfo = null;\r
         private String title = null;\r
         private String outputFileName = null;\r
         \r
@@ -2337,8 +2438,8 @@ public class FpdFlash extends IInternalFrame {
             super(new BorderLayout());\r
             title = tabTitle;\r
             outputFileName = file;\r
-            mGuidToModuleId = new HashMap<String, ModuleIdentification>();\r
-            listModGuidInFv = new ArrayList<String>();\r
+//            listTableModInFvModuleSAInfo = new ArrayList<ModuleSAInfo>();\r
+//            listTableFpdModulesModuleSAInfo = new ArrayList<ModuleSAInfo>();\r
             add(getJPanelModOrderN(), java.awt.BorderLayout.NORTH);\r
             add(getJPanelModOrderS(), java.awt.BorderLayout.SOUTH);\r
             add(getJPanelModOrderC(), java.awt.BorderLayout.CENTER);\r
@@ -2350,34 +2451,40 @@ public class FpdFlash extends IInternalFrame {
             int size = ffc.getUserExtsIncModCount(fvName);\r
             \r
             if (size != -1) {\r
-                String[][] saa = new String[size][2];\r
+                String[][] saa = new String[size][5];\r
                 ffc.getUserExtsIncMods(fvName, saa);\r
 \r
                 for (int i = 0; i < size; ++i) {\r
-                    listModGuidInFv.add(saa[i][0].toLowerCase());\r
-                    String name = getModuleName(saa[i][0]);\r
-                    String[] row = { name };\r
+                    String moduleKey = saa[i][0] + " " + saa[i][1] + " " + saa[i][2] + " " + saa[i][3];\r
+                    ModuleIdentification mi = WorkspaceProfile.getModuleId(moduleKey);\r
+                    String name = "N/A";\r
+                    if (mi != null) {\r
+                        name = mi.getName();\r
+                    }\r
+                    String[] row = { name, saa[i][0] , saa[i][1], saa[i][2] , saa[i][3], saa[i][4] };\r
                     modInFvTableModel.addRow(row);\r
                 }\r
             }\r
             //\r
             // From ModuleSAs, get module guids with FvBinding = fvName.\r
             //\r
-            Vector<String> vGuid = new Vector<String>();\r
-            ffc.getFrameworkModuleGuid(fvName, vGuid);\r
+            Vector<String[]> vModuleSA = new Vector<String[]>();\r
+            ffc.getFrameworkModuleSAByFvBinding(fvName, vModuleSA);\r
             //\r
             // If BuildOptions->UserExtensions already contain these module info,\r
             // no need to add them into table again.\r
             //\r
-            Iterator<String> iter = vGuid.iterator();\r
+            Iterator<String[]> iter = vModuleSA.iterator();\r
             while (iter.hasNext()){\r
-                String guid = iter.next();\r
-//                String moduleName = getModuleName(guid);\r
-//                if (existedInTable(moduleName, modInFvTableModel)) {\r
-//                    vGuid.remove(guid);\r
-//                }\r
-                if (!listModGuidInFv.contains(guid.toLowerCase())) {\r
-                    String[] row = {getModuleName(guid)};\r
+                String[] sa = iter.next();\r
+                if (!moduleInfoInTable (sa, modInFvTableModel)) {\r
+                    String moduleKey = sa[0] + " " + sa[1] + " " + sa[2] + " " + sa[3];\r
+                    ModuleIdentification mi = WorkspaceProfile.getModuleId(moduleKey);\r
+                    String name = "N/A";\r
+                    if (mi != null) {\r
+                        name = mi.getName();\r
+                    }\r
+                    String[] row = { name, sa[0] , sa[1], sa[2] , sa[3], sa[4] };\r
                     modInFvTableModel.addRow(row);\r
                 }\r
             }\r
@@ -2390,11 +2497,16 @@ public class FpdFlash extends IInternalFrame {
             ffc.getFrameworkModulesInfo(saa);\r
             \r
             for (int i = 0; i < size; ++i) {\r
-                String name = getModuleName(saa[i][0]);\r
-                if (existedInTable(name, modInFvTableModel) || existedInTable(name, fpdModTableModel)) {\r
+                if (moduleInfoInTable(saa[i], modInFvTableModel) || moduleInfoInTable(saa[i], fpdModTableModel)) {\r
                     continue;\r
                 }\r
-                String[] row = {name};\r
+                String moduleKey = saa[i][0] + " " + saa[i][1] + " " + saa[i][2] + " " + saa[i][3];\r
+                ModuleIdentification mi = WorkspaceProfile.getModuleId(moduleKey);\r
+                String name = "N/A";\r
+                if (mi != null) {\r
+                    name = mi.getName();\r
+                }\r
+                String[] row = { name, saa[i][0] , saa[i][1], saa[i][2] , saa[i][3], saa[i][4] };\r
                 fpdModTableModel.addRow(row);\r
             }\r
             \r
@@ -2402,29 +2514,35 @@ public class FpdFlash extends IInternalFrame {
             sorter.setSortState(0, TableSorter.ASCENDING);\r
         }\r
         \r
-        private String getModuleName (String guid) {\r
-            \r
-            for (int i = 0; i < GlobalData.vModuleList.size(); ++i) {\r
-                ModuleIdentification mi = GlobalData.vModuleList.get(i);\r
-                String mg = mi.getGuid();\r
-                if (mg == null) {\r
-                    continue;\r
-                }\r
-                if (mg.equalsIgnoreCase(guid)) {\r
-                    mGuidToModuleId.put(guid.toLowerCase(), mi);\r
-                    return mi.getName();\r
-                }\r
-            }\r
-            \r
-            return "";\r
-        }\r
         \r
-        private boolean existedInTable (String name, DefaultTableModel model) {\r
+        private boolean moduleInfoInTable (String[] moduleInfo, DefaultTableModel model) {\r
+            boolean matched = false;\r
             int size = model.getDataVector().size();\r
             for (int i = 0; i < size; ++i) {\r
-                if (((Vector)model.getDataVector().elementAt(i)).contains(name)) {\r
+                Vector rowData = (Vector)model.getDataVector().elementAt(i);\r
+                for (int j = 1; j < rowData.size(); ++j) {\r
+                    if (rowData.elementAt(j) == null && moduleInfo[j-1] == null) {\r
+                        matched = true;\r
+                    }\r
+                    else if (rowData.elementAt(j).equals("null") && moduleInfo[j-1] == null) {\r
+                        matched = true;\r
+                    }\r
+                    else if (rowData.elementAt(j) == null && moduleInfo[j-1].equals("null")) {\r
+                        matched = true;\r
+                    }\r
+                    else if (rowData.elementAt(j) != null && rowData.elementAt(j).toString().equalsIgnoreCase(moduleInfo[j-1])) {\r
+                        matched = true;\r
+                    }\r
+                    else {\r
+                        matched = false;\r
+                        break;\r
+                    }\r
+                }\r
+                \r
+                if (matched) {\r
                     return true;\r
                 }\r
+                \r
             }\r
             return false;\r
         }\r
@@ -2497,11 +2615,77 @@ public class FpdFlash extends IInternalFrame {
         private JTable getJTableModInFv() {\r
             if (jTableModInFv == null) {\r
                 modInFvTableModel = new IDefaultTableModel();\r
+                \r
+                jTableModInFv = new JTable(modInFvTableModel){\r
+                    /**\r
+                     * \r
+                     */\r
+                    private static final long serialVersionUID = 4903583933542581721L;\r
+\r
+                    public String getToolTipText(MouseEvent e) {\r
+                        String tip = null;\r
+                        java.awt.Point p = e.getPoint();\r
+                        int rowIndex = rowAtPoint(p);\r
+//                        int colIndex = columnAtPoint(p);\r
+//                        int realColumnIndex = convertColumnIndexToModel(colIndex);\r
+\r
+                        TableModel model = getModel();\r
+                        String mg = (String) model.getValueAt(rowIndex, 1);\r
+                        String mv = (String) model.getValueAt(rowIndex, 2);\r
+                        String pg = (String) model.getValueAt(rowIndex, 3);\r
+                        String pv = (String) model.getValueAt(rowIndex, 4);\r
+                        String arch = (String) model.getValueAt(rowIndex, 5);\r
+                        ModuleIdentification mi = WorkspaceProfile.getModuleId(mg + " " + mv + " " + pg + " " + pv);\r
+                        if (mi != null) {\r
+                            tip = "Path: " + mi.getPath() + "; Arch: " + arch + ";";\r
+                        }\r
+                        else {\r
+                            tip = "No Module Path Information."; \r
+                        }\r
+                             \r
+                        return tip;\r
+                    }\r
+\r
+                };\r
                 modInFvTableModel.addColumn("Module Orders in FV");\r
-                jTableModInFv = new JTable(modInFvTableModel);\r
+                modInFvTableModel.addColumn("mg");\r
+                modInFvTableModel.addColumn("mv");\r
+                modInFvTableModel.addColumn("pg");\r
+                modInFvTableModel.addColumn("pv");\r
+                modInFvTableModel.addColumn("arch");\r
+                \r
+                for (int i = 1; i < 6; ++i) {\r
+                    jTableModInFv.removeColumn(jTableModInFv.getColumnModel().getColumn(jTableModInFv.getColumnCount()-1));\r
+                }\r
+                \r
                 jTableModInFv.setRowHeight(20);\r
                 jTableModInFv.setShowGrid(false);\r
-                \r
+//                jTableModInFv.setAutoCreateColumnsFromModel(false);\r
+                jTableModInFv.addMouseListener(new MouseAdapter() {\r
+\r
+                    /* (non-Javadoc)\r
+                     * @see java.awt.event.MouseAdapter#mouseClicked(java.awt.event.MouseEvent)\r
+                     */\r
+                    @Override\r
+                    public void mouseClicked(MouseEvent arg0) {\r
+                        if (arg0.getButton() == MouseEvent.BUTTON3) {\r
+                            java.awt.Point p = arg0.getPoint();\r
+                            int rowIndex = jTableModInFv.rowAtPoint(p);\r
+                            TableModel model = jTableModInFv.getModel();\r
+                            String mg = (String) model.getValueAt(rowIndex, 1);\r
+                            String mv = (String) model.getValueAt(rowIndex, 2);\r
+                            String pg = (String) model.getValueAt(rowIndex, 3);\r
+                            String pv = (String) model.getValueAt(rowIndex, 4);\r
+                            ModuleIdentification mi = WorkspaceProfile.getModuleId(mg + " " + mv + " " + pg + " " + pv);\r
+                            String details = "PackageGuid: " + pg + "; ModuleVer:" + mv + "; PkgVer:" + pv;\r
+                            if (mi != null) {\r
+                                details = "In Package " + mi.getPackageId().getName() + "; ModuleVer:" + mv + "; PkgVer:" + pv;\r
+                            }\r
+                            JOptionPane.showMessageDialog(frame, details);\r
+                        }\r
+                    }\r
+                    \r
+                });\r
             }\r
             return jTableModInFv;\r
         }\r
@@ -2550,10 +2734,76 @@ public class FpdFlash extends IInternalFrame {
             if (jTableFpdModules == null) {\r
                 fpdModTableModel = new IDefaultTableModel();\r
                 TableSorter sorter = new TableSorter(fpdModTableModel);\r
-                jTableFpdModules = new JTable(sorter);\r
+                jTableFpdModules = new JTable(sorter){\r
+                    /**\r
+                     * \r
+                     */\r
+                    private static final long serialVersionUID = -4666296888377637808L;\r
+\r
+                    public String getToolTipText(MouseEvent e) {\r
+                        String tip = null;\r
+                        java.awt.Point p = e.getPoint();\r
+                        int rowIndex = rowAtPoint(p);\r
+//                        int colIndex = columnAtPoint(p);\r
+//                        int realColumnIndex = convertColumnIndexToModel(colIndex);\r
+\r
+                        TableModel model = getModel();\r
+                        String mg = (String) model.getValueAt(rowIndex, 1);\r
+                        String mv = (String) model.getValueAt(rowIndex, 2);\r
+                        String pg = (String) model.getValueAt(rowIndex, 3);\r
+                        String pv = (String) model.getValueAt(rowIndex, 4);\r
+                        String arch = (String) model.getValueAt(rowIndex, 5);\r
+                        ModuleIdentification mi = WorkspaceProfile.getModuleId(mg + " " + mv + " " + pg + " " + pv);\r
+                        if (mi != null) {\r
+                            tip = "Path: " + mi.getPath() + "; Arch: " + arch + ";";\r
+                        }\r
+                        else {\r
+                            tip = "No Module Path Information."; \r
+                        }\r
+                             \r
+                        return tip;\r
+                    }\r
+\r
+                };\r
+                \r
+                fpdModTableModel.addColumn("Modules in Platform");\r
+                fpdModTableModel.addColumn("mg");\r
+                fpdModTableModel.addColumn("mv");\r
+                fpdModTableModel.addColumn("pg");\r
+                fpdModTableModel.addColumn("pv");\r
+                fpdModTableModel.addColumn("arch");\r
+                \r
+                for (int i = 1; i < 6; ++i) {\r
+                    jTableFpdModules.removeColumn(jTableFpdModules.getColumnModel().getColumn(jTableFpdModules.getColumnCount()-1));\r
+                }\r
                 jTableFpdModules.setRowHeight(20);\r
                 jTableFpdModules.setShowGrid(false);\r
-                fpdModTableModel.addColumn("Modules in Platform");\r
+//                jTableFpdModules.setAutoCreateColumnsFromModel(false);\r
+                jTableFpdModules.addMouseListener(new MouseAdapter() {\r
+\r
+                    /* (non-Javadoc)\r
+                     * @see java.awt.event.MouseAdapter#mouseClicked(java.awt.event.MouseEvent)\r
+                     */\r
+                    @Override\r
+                    public void mouseClicked(MouseEvent arg0) {\r
+                        if (arg0.getButton() == MouseEvent.BUTTON3) {\r
+                            java.awt.Point p = arg0.getPoint();\r
+                            int rowIndex = jTableFpdModules.rowAtPoint(p);\r
+                            TableModel model = jTableFpdModules.getModel();\r
+                            String mg = (String) model.getValueAt(rowIndex, 1);\r
+                            String mv = (String) model.getValueAt(rowIndex, 2);\r
+                            String pg = (String) model.getValueAt(rowIndex, 3);\r
+                            String pv = (String) model.getValueAt(rowIndex, 4);\r
+                            ModuleIdentification mi = WorkspaceProfile.getModuleId(mg + " " + mv + " " + pg + " " + pv);\r
+                            String details = "PackageGuid: " + pg + "; ModuleVer:" + mv + "; PkgVer:" + pv;\r
+                            if (mi != null) {\r
+                                details = "In Package " + mi.getPackageId().getName() + "; ModuleVer:" + mv + "; PkgVer:" + pv;\r
+                            }\r
+                            JOptionPane.showMessageDialog(frame, details);\r
+                        }\r
+                    }\r
+                    \r
+                });\r
 \r
             }\r
             return jTableFpdModules;\r
@@ -2602,8 +2852,17 @@ public class FpdFlash extends IInternalFrame {
                         }\r
                         \r
                         int rowInModel = ((TableSorter)jTableFpdModules.getModel()).getModelRowIndex(selectedRowRight);\r
+                        String name = fpdModTableModel.getValueAt(selectedRowRight, 0)+"";\r
+                        String mg = fpdModTableModel.getValueAt(selectedRowRight, 1)+"";\r
+                        String mv = fpdModTableModel.getValueAt(selectedRowRight, 2)+"";\r
+                        String pg = fpdModTableModel.getValueAt(selectedRowRight, 3)+"";\r
+                        String pv = fpdModTableModel.getValueAt(selectedRowRight, 4)+"";\r
+                        String arch = fpdModTableModel.getValueAt(selectedRowRight, 5)+"";\r
+                        String[] row = {name, mg, mv, pg, pv, arch};\r
+                        if (name.length() == 0 || name.equals("N/A")) {\r
+                            return;\r
+                        }\r
                         \r
-                        String[] row = {jTableFpdModules.getValueAt(selectedRowRight, 0)+""};\r
                         int selectedRowLeft = jTableModInFv.getSelectedRow();\r
                         if (selectedRowLeft < 0) {\r
                             modInFvTableModel.addRow(row);\r
@@ -2637,7 +2896,17 @@ public class FpdFlash extends IInternalFrame {
                             return;\r
                         }\r
                         \r
-                        String[] row = {jTableModInFv.getValueAt(selectedRowLeft, 0)+""};\r
+                        String name = modInFvTableModel.getValueAt(selectedRowLeft, 0)+"";\r
+                        String mg = modInFvTableModel.getValueAt(selectedRowLeft, 1)+"";\r
+                        String mv = modInFvTableModel.getValueAt(selectedRowLeft, 2)+"";\r
+                        String pg = modInFvTableModel.getValueAt(selectedRowLeft, 3)+"";\r
+                        String pv = modInFvTableModel.getValueAt(selectedRowLeft, 4)+"";\r
+                        String arch = modInFvTableModel.getValueAt(selectedRowLeft, 5)+"";\r
+                        String[] row = {name, mg, mv, pg, pv, arch};\r
+                        if (name.length() == 0 || name.equals("N/A")) {\r
+                            return;\r
+                        }\r
+                        \r
                         fpdModTableModel.addRow(row);\r
                         int viewIndex = ((TableSorter) jTableFpdModules.getModel()).getViewIndexArray()[jTableFpdModules\r
                                                                                                                         .getRowCount() - 1];\r
@@ -2694,23 +2963,22 @@ public class FpdFlash extends IInternalFrame {
                         //\r
                         Vector<String[]> vModInFv = new Vector<String[]>();\r
                         for (int i = 0; i < jTableModInFv.getRowCount(); ++i) {\r
-                            String moduleName = jTableModInFv.getValueAt(i, 0)+"";\r
-                            if (moduleName.length() == 0) {\r
+                            String moduleName = modInFvTableModel.getValueAt(i, 0)+"";\r
+                            if (moduleName.length() == 0 || moduleName.equals("N/A")) {\r
                                 continue;\r
                             }\r
-                            ModuleIdentification mi = null;\r
-                            Set<String> key = mGuidToModuleId.keySet();\r
-                            Iterator<String> iter = key.iterator();\r
-                            while (iter.hasNext()) {\r
-                                String guid = iter.next();\r
-                                mi = mGuidToModuleId.get(guid);\r
-                                if (mi.getName().equals(moduleName)) {\r
-                                    String[] sa = {guid, WorkspaceProfile.getModuleBaseName(mi)};\r
-                                    vModInFv.add(sa);\r
-                                    ffc.updateFvBindingInModuleSA (mi, title);\r
-                                    break;\r
-                                }\r
-                            }\r
+                            \r
+                            String mg = modInFvTableModel.getValueAt(i, 1)+"";\r
+                            String mv = modInFvTableModel.getValueAt(i, 2)+"";\r
+                            String pg = modInFvTableModel.getValueAt(i, 3)+"";\r
+                            String pv = modInFvTableModel.getValueAt(i, 4)+"";\r
+                            String arch = modInFvTableModel.getValueAt(i, 5)+"";\r
+                           \r
+                            String moduleInfo = mg + " " + mv + " " + pg + " " + pv + " " + arch;\r
+                                \r
+                            String[] sa = { mg, mv, pg, pv, arch};\r
+                            vModInFv.add(sa);\r
+                            ffc.updateFvBindingInModuleSA(moduleInfo, title);\r
                             \r
                         }\r
                         ffc.removeBuildOptionsUserExtensions(title);\r