Fixed grammar and column widths (set min, preferred and max widths for version and...
[mirror_edk2.git] / Tools / Source / FrameworkWizard / src / org / tianocore / frameworkwizard / platform / ui / FpdFrameworkModules.java
index 56375e1..e6a372a 100644 (file)
@@ -35,32 +35,91 @@ public class FpdFrameworkModules extends IInternalFrame {
      * \r
      */\r
     private static final long serialVersionUID = 1L;\r
+\r
     static JFrame frame;\r
+\r
     private JSplitPane jSplitPane = null;\r
+\r
     private JPanel jPanelTop = null;\r
+\r
     private JPanel jPanelBottom = null;\r
+\r
     private JLabel jLabel = null;\r
+\r
     private JScrollPane jScrollPaneAllModules = null;\r
+\r
     private JTable jTableAllModules = null;\r
+\r
     private JPanel jPanelTopSouth = null;\r
+\r
     private JButton jButtonAddModule = null;\r
+\r
     private JLabel jLabelModulesAdded = null;\r
+\r
     private JPanel jPanelBottomSouth = null;\r
+\r
     private JScrollPane jScrollPaneFpdModules = null;\r
+\r
     private JTable jTableFpdModules = null;\r
+\r
     private JButton jButtonSettings = null;\r
+\r
     private JButton jButtonRemoveModule = null;\r
+\r
     private NonEditableTableModel modelAllModules = null;\r
+\r
     private NonEditableTableModel modelFpdModules = null;\r
-    \r
+\r
     private FpdModuleSA settingDlg = null;\r
-    \r
+\r
     private FpdFileContents ffc = null;\r
+\r
     private OpeningPlatformType docConsole = null;\r
+\r
     private Map<String, ArrayList<String>> fpdMsa = null;\r
-    \r
+\r
     private ArrayList<ModuleIdentification> miList = null;\r
 \r
+    private final int ModNameCol = 0;\r
+\r
+    private final int ModVerCol = 1;\r
+\r
+    private final int PkgNameCol = 2;\r
+\r
+    private final int PkgVerCol = 3;\r
+\r
+    private final int ArchCol = 4;\r
+\r
+    private final int Path4Col = 4;\r
+\r
+    private final int Path5Col = 5;\r
+    \r
+    private final int ModNameMinWidth = 168;\r
+    \r
+    private final int ModNamePrefWidth = 200;\r
+\r
+    private final int PkgNameMinWidth = 100;\r
+    \r
+    private final int PkgNamePrefWidth = 110;\r
+    \r
+    private final int PkgNameMaxWidth = 150;\r
+    \r
+    private final int VerMinWidth = 50;\r
+    \r
+    private final int VerMaxWidth = 80;\r
+    \r
+    private final int VerPrefWidth = 60;\r
+    \r
+    private final int PathPrefWidth = 320;\r
+    \r
+    private final int PathMinWidth = 280;\r
+    \r
+    private final int ArchPrefWidth = 80;\r
+    \r
+    private final int ArchMinWidth = 60;\r
+    \r
+    private final int ArchMaxWidth = 100;\r
+    \r
     /**\r
      * This method initializes jSplitPane      \r
      *         \r
@@ -121,7 +180,7 @@ public class FpdFrameworkModules extends IInternalFrame {
     private JScrollPane getJScrollPaneAllModules() {\r
         if (jScrollPaneAllModules == null) {\r
             jScrollPaneAllModules = new JScrollPane();\r
-            jScrollPaneAllModules.setPreferredSize(new java.awt.Dimension(600,200));\r
+            jScrollPaneAllModules.setPreferredSize(new java.awt.Dimension(600, 200));\r
             jScrollPaneAllModules.setViewportView(getJTableAllModules());\r
         }\r
         return jScrollPaneAllModules;\r
@@ -139,12 +198,31 @@ public class FpdFrameworkModules extends IInternalFrame {
             jTableAllModules = new JTable(sorter);\r
             sorter.setTableHeader(jTableAllModules.getTableHeader());\r
             jTableAllModules.setRowHeight(20);\r
-            modelAllModules.addColumn("ModuleName");\r
-            modelAllModules.addColumn("ModuleVersion");\r
-            modelAllModules.addColumn("PackageName");\r
-            modelAllModules.addColumn("PackageVersion");\r
+            modelAllModules.addColumn("<html>Module<br>Name</html>");\r
+            modelAllModules.addColumn("<html>Module<br>Version</html>");\r
+            modelAllModules.addColumn("<html>Package<br>Name</html>");\r
+            modelAllModules.addColumn("<html>Package<br>Version</html>");\r
             modelAllModules.addColumn("Path");\r
-            \r
+            javax.swing.table.TableColumn column = null;\r
+            column = jTableAllModules.getColumnModel().getColumn(ModNameCol);\r
+            column.setPreferredWidth(ModNamePrefWidth);\r
+            column.setMinWidth(ModNameMinWidth);\r
+            column = jTableAllModules.getColumnModel().getColumn(ModVerCol);\r
+            column.setPreferredWidth(VerPrefWidth);\r
+            column.setMaxWidth(VerMaxWidth);\r
+            column.setMinWidth(VerMinWidth);\r
+            column = jTableAllModules.getColumnModel().getColumn(PkgNameCol);\r
+            column.setPreferredWidth(PkgNamePrefWidth);\r
+            column.setMinWidth(PkgNameMinWidth);\r
+            column.setMaxWidth(PkgNameMaxWidth);\r
+            column = jTableAllModules.getColumnModel().getColumn(PkgVerCol);\r
+            column.setPreferredWidth(VerPrefWidth);\r
+            column.setMaxWidth(VerMaxWidth);\r
+            column.setMinWidth(VerMinWidth);\r
+            column = jTableAllModules.getColumnModel().getColumn(Path4Col);\r
+            column.setPreferredWidth(PathPrefWidth);\r
+            column.setMinWidth(PathMinWidth);\r
+\r
             jTableAllModules.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\r
         }\r
         return jTableAllModules;\r
@@ -174,18 +252,18 @@ public class FpdFrameworkModules extends IInternalFrame {
     private JButton getJButtonAddModule() {\r
         if (jButtonAddModule == null) {\r
             jButtonAddModule = new JButton();\r
-            jButtonAddModule.setPreferredSize(new java.awt.Dimension(130,20));\r
+            jButtonAddModule.setPreferredSize(new java.awt.Dimension(130, 20));\r
             jButtonAddModule.setText("Add a Module");\r
             jButtonAddModule.addActionListener(new java.awt.event.ActionListener() {\r
                 public void actionPerformed(java.awt.event.ActionEvent e) {\r
                     int selectedRow = jTableAllModules.getSelectedRow();\r
-                    if (selectedRow < 0){\r
+                    if (selectedRow < 0) {\r
                         return;\r
                     }\r
-                    \r
-                    TableSorter sorter = (TableSorter)jTableAllModules.getModel();\r
+\r
+                    TableSorter sorter = (TableSorter) jTableAllModules.getModel();\r
                     selectedRow = sorter.modelIndex(selectedRow);\r
-                    String path = modelAllModules.getValueAt(selectedRow, 4)+"";\r
+                    String path = modelAllModules.getValueAt(selectedRow, Path4Col) + "";\r
                     ModuleIdentification mi = miList.get(selectedRow);\r
                     Vector<String> vArchs = null;\r
                     try {\r
@@ -194,18 +272,18 @@ public class FpdFrameworkModules extends IInternalFrame {
                     catch (Exception exp) {\r
                         JOptionPane.showMessageDialog(frame, exp.getMessage());\r
                     }\r
-                    \r
+\r
                     if (vArchs == null) {\r
-                        JOptionPane.showMessageDialog(frame, "No supported Archs specified in MSA file.");\r
+                        JOptionPane.showMessageDialog(frame, "No Supported Architectures specified in MSA file.");\r
                         return;\r
                     }\r
-                    \r
+\r
                     String archsAdded = "";\r
                     String mg = mi.getGuid();\r
                     String mv = mi.getVersion();\r
                     String pg = mi.getPackage().getGuid();\r
                     String pv = mi.getPackage().getVersion();\r
-                    \r
+\r
                     ArrayList<String> al = fpdMsa.get(mg + mv + pg + pv);\r
                     if (al == null) {\r
                         al = new ArrayList<String>();\r
@@ -218,7 +296,7 @@ public class FpdFrameworkModules extends IInternalFrame {
                     // Archs this Module supported have already been added.\r
                     //\r
                     if (vArchs.size() == 0) {\r
-                        JOptionPane.showMessageDialog(frame, "This Module Already Added.");\r
+                        JOptionPane.showMessageDialog(frame, "This Module has already been added.");\r
                         return;\r
                     }\r
                     //ToDo put Arch instead of null\r
@@ -227,35 +305,34 @@ public class FpdFrameworkModules extends IInternalFrame {
                         String arch = vArchs.get(i);\r
                         al.add(arch);\r
                         archsAdded += arch + " ";\r
-                        String[] row = {"", mv, "", pv, arch, path};\r
-                        \r
-                       if (mi != null) {\r
-                           row[0] = mi.getName();\r
-                           row[2] = mi.getPackage().getName();\r
-                           \r
-                       }\r
-                       modelFpdModules.addRow(row);\r
-                       \r
-                       docConsole.setSaved(false);\r
-                       try{\r
-                           //ToDo : specify archs need to add.\r
-                           ffc.addFrameworkModulesPcdBuildDefs(mi, arch, null);\r
-                       }\r
-                       catch (Exception exception) {\r
-                           JOptionPane.showMessageDialog(frame, "Adding " + row[0] + " with SupArch " + arch + ": "+ exception.getMessage());\r
-                           errorOccurred = true;\r
-                       }\r
+                        String[] row = { "", mv, "", pv, arch, path };\r
+\r
+                        if (mi != null) {\r
+                            row[ModNameCol] = mi.getName();\r
+                            row[PkgNameCol] = mi.getPackage().getName();\r
+\r
+                        }\r
+                        modelFpdModules.addRow(row);\r
+\r
+                        docConsole.setSaved(false);\r
+                        try {\r
+                            //ToDo : specify archs need to add.\r
+                            ffc.addFrameworkModulesPcdBuildDefs(mi, arch, null);\r
+                        } catch (Exception exception) {\r
+                            JOptionPane.showMessageDialog(frame, "Adding " + row[ModNameCol] + " with SupArch " + arch\r
+                                                                 + ": " + exception.getMessage());\r
+                            errorOccurred = true;\r
+                        }\r
                     }\r
-                    \r
-                    String s = "This Module with Arch "+ archsAdded;\r
+\r
+                    String s = "This Module with Architecture " + archsAdded;\r
                     if (errorOccurred) {\r
-                        s += " Added with Error. Platform may NOT Be Built."; \r
-                    }\r
-                    else {\r
-                        s += " Added Successfully.";\r
+                        s += " was added with Error. Platform may NOT Build.";\r
+                    } else {\r
+                        s += " was added Successfully.";\r
                     }\r
-                    JOptionPane.showMessageDialog(frame,  s);\r
-                    jTableFpdModules.changeSelection(modelFpdModules.getRowCount()-1, 0, false, false);\r
+                    JOptionPane.showMessageDialog(frame, s);\r
+                    jTableFpdModules.changeSelection(modelFpdModules.getRowCount() - 1, 0, false, false);\r
                 }\r
             });\r
         }\r
@@ -287,7 +364,7 @@ public class FpdFrameworkModules extends IInternalFrame {
     private JScrollPane getJScrollPaneFpdModules() {\r
         if (jScrollPaneFpdModules == null) {\r
             jScrollPaneFpdModules = new JScrollPane();\r
-            jScrollPaneFpdModules.setPreferredSize(new java.awt.Dimension(453,200));\r
+            jScrollPaneFpdModules.setPreferredSize(new java.awt.Dimension(453, 200));\r
             jScrollPaneFpdModules.setViewportView(getJTableFpdModules());\r
         }\r
         return jScrollPaneFpdModules;\r
@@ -305,13 +382,36 @@ public class FpdFrameworkModules extends IInternalFrame {
             jTableFpdModules = new JTable(sorter);\r
             sorter.setTableHeader(jTableFpdModules.getTableHeader());\r
             jTableFpdModules.setRowHeight(20);\r
-            modelFpdModules.addColumn("ModuleName");\r
-            modelFpdModules.addColumn("ModuleVersion");            \r
-            modelFpdModules.addColumn("PackageName");\r
-            modelFpdModules.addColumn("PackageVersion");\r
-            modelFpdModules.addColumn("SupportedArch");\r
+            modelFpdModules.addColumn("<html>Module<br>Name</html>");\r
+            modelFpdModules.addColumn("<html>Module<br>Version</html>");\r
+            modelFpdModules.addColumn("<html>Package<br>Name</html>");\r
+            modelFpdModules.addColumn("<html>Package<br>Version</html>");\r
+            modelFpdModules.addColumn("<html>Supported<br>Architectures</html>");\r
             modelFpdModules.addColumn("Path");\r
-            \r
+            javax.swing.table.TableColumn column = null;\r
+            column = jTableFpdModules.getColumnModel().getColumn(ModNameCol);\r
+            column.setPreferredWidth(ModNamePrefWidth);\r
+            column.setMinWidth(ModNameMinWidth);\r
+            column = jTableFpdModules.getColumnModel().getColumn(ModVerCol);\r
+            column.setPreferredWidth(VerPrefWidth);\r
+            column.setMaxWidth(VerMaxWidth);\r
+            column.setMinWidth(VerMinWidth);\r
+            column = jTableFpdModules.getColumnModel().getColumn(PkgNameCol);\r
+            column.setPreferredWidth(PkgNamePrefWidth);\r
+            column.setMinWidth(PkgNameMinWidth);\r
+            column.setMaxWidth(PkgNameMaxWidth);\r
+            column = jTableFpdModules.getColumnModel().getColumn(PkgVerCol);\r
+            column.setPreferredWidth(VerPrefWidth);\r
+            column.setMaxWidth(VerMaxWidth);\r
+            column.setMinWidth(VerMinWidth);\r
+            column = jTableFpdModules.getColumnModel().getColumn(ArchCol);\r
+            column.setPreferredWidth(ArchPrefWidth);\r
+            column.setMaxWidth(ArchMaxWidth);\r
+            column.setMinWidth(ArchMinWidth);\r
+            column = jTableFpdModules.getColumnModel().getColumn(Path5Col);\r
+            column.setPreferredWidth(PathPrefWidth);\r
+            column.setMinWidth(PathMinWidth);\r
+\r
             jTableFpdModules.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\r
         }\r
         return jTableFpdModules;\r
@@ -330,11 +430,11 @@ public class FpdFrameworkModules extends IInternalFrame {
             jButtonSettings.addActionListener(new java.awt.event.ActionListener() {\r
                 public void actionPerformed(java.awt.event.ActionEvent e) {\r
                     int selectedRow = jTableFpdModules.getSelectedRow();\r
-                    if (selectedRow < 0){\r
+                    if (selectedRow < 0) {\r
                         return;\r
                     }\r
-                    \r
-                    TableSorter sorter = (TableSorter)jTableFpdModules.getModel();\r
+\r
+                    TableSorter sorter = (TableSorter) jTableFpdModules.getModel();\r
                     selectedRow = sorter.modelIndex(selectedRow);\r
                     try {\r
                         if (ffc.adjustPcd(selectedRow)) {\r
@@ -349,14 +449,14 @@ public class FpdFrameworkModules extends IInternalFrame {
                     if (settingDlg == null) {\r
                         settingDlg = new FpdModuleSA(ffc);\r
                     }\r
-                    \r
+\r
                     String[] sa = new String[5];\r
                     ffc.getFrameworkModuleInfo(selectedRow, sa);\r
-                    String mg = sa[0];\r
-                    String mv = sa[1];\r
-                    String pg = sa[2];\r
-                    String pv = sa[3];\r
-                    String arch = sa[4];\r
+                    String mg = sa[ModNameCol];\r
+                    String mv = sa[ModVerCol];\r
+                    String pg = sa[PkgNameCol];\r
+                    String pv = sa[PkgVerCol];\r
+                    String arch = sa[ArchCol];\r
                     settingDlg.setKey(mg + " " + mv + " " + pg + " " + pv + " " + arch, selectedRow, docConsole);\r
                     settingDlg.setVisible(true);\r
                 }\r
@@ -364,7 +464,6 @@ public class FpdFrameworkModules extends IInternalFrame {
         }\r
         return jButtonSettings;\r
     }\r
\r
 \r
     /**\r
      * This method initializes jButton2        \r
@@ -374,42 +473,42 @@ public class FpdFrameworkModules extends IInternalFrame {
     private JButton getJButtonRemoveModule() {\r
         if (jButtonRemoveModule == null) {\r
             jButtonRemoveModule = new JButton();\r
-            jButtonRemoveModule.setPreferredSize(new java.awt.Dimension(130,20));\r
+            jButtonRemoveModule.setPreferredSize(new java.awt.Dimension(130, 20));\r
             jButtonRemoveModule.setText("Remove Module");\r
             jButtonRemoveModule.addActionListener(new java.awt.event.ActionListener() {\r
                 public void actionPerformed(java.awt.event.ActionEvent e) {\r
                     int selectedRow = jTableFpdModules.getSelectedRow();\r
-                    if (selectedRow < 0){\r
+                    if (selectedRow < 0) {\r
                         return;\r
                     }\r
-                    \r
-                    TableSorter sorter = (TableSorter)jTableFpdModules.getModel();\r
+\r
+                    TableSorter sorter = (TableSorter) jTableFpdModules.getModel();\r
                     selectedRow = sorter.modelIndex(selectedRow);\r
-                    \r
+\r
                     String[] sa = new String[5];\r
                     ffc.getFrameworkModuleInfo(selectedRow, sa);\r
-                    String mg = sa[0];\r
-                    String mv = sa[1];\r
-                    String pg = sa[2];\r
-                    String pv = sa[3];\r
-                    String arch = sa[4];\r
-                    ModuleIdentification mi = GlobalData.getModuleId(sa[0] + " " + sa[1] + " " + sa[2] + " " + sa[3] + " " + sa[4]);\r
+                    String mg = sa[ModNameCol];\r
+                    String mv = sa[ModVerCol];\r
+                    String pg = sa[PkgNameCol];\r
+                    String pv = sa[PkgVerCol];\r
+                    String arch = sa[ArchCol];\r
+                    ModuleIdentification mi = GlobalData.getModuleId(sa[ModNameCol] + " " + sa[ModVerCol] + " "\r
+                                                                     + sa[PkgNameCol] + " " + sa[PkgVerCol] + " "\r
+                                                                     + sa[ArchCol]);\r
                     mv = mi.getVersion();\r
                     pv = mi.getPackage().getVersion();\r
                     modelFpdModules.removeRow(selectedRow);\r
                     if (arch == null) {\r
                         // if no arch specified in ModuleSA\r
-                        fpdMsa.remove(mg+mv+pg+pv);\r
-                    }\r
-                    else {\r
-                        ArrayList<String> al = fpdMsa.get(mg+mv+pg+pv);\r
+                        fpdMsa.remove(mg + mv + pg + pv);\r
+                    } else {\r
+                        ArrayList<String> al = fpdMsa.get(mg + mv + pg + pv);\r
                         al.remove(arch);\r
                         if (al.size() == 0) {\r
-                            fpdMsa.remove(mg+mv+pg+pv);\r
+                            fpdMsa.remove(mg + mv + pg + pv);\r
                         }\r
                     }\r
-                    \r
-                    \r
+\r
                     docConsole.setSaved(false);\r
                     ffc.removeModuleSA(selectedRow);\r
                 }\r
@@ -434,17 +533,17 @@ public class FpdFrameworkModules extends IInternalFrame {
         initialize();\r
     }\r
 \r
-    public FpdFrameworkModules(PlatformSurfaceAreaDocument.PlatformSurfaceArea fpd){\r
+    public FpdFrameworkModules(PlatformSurfaceAreaDocument.PlatformSurfaceArea fpd) {\r
         this();\r
         init(fpd);\r
-        \r
+\r
     }\r
-    \r
+\r
     public FpdFrameworkModules(OpeningPlatformType opt) {\r
         this(opt.getXmlFpd());\r
         docConsole = opt;\r
     }\r
-    \r
+\r
     private void init(PlatformSurfaceAreaDocument.PlatformSurfaceArea fpd) {\r
         try {\r
             GlobalData.initInfo("Tools" + File.separator + "Conf" + File.separator + "FrameworkDatabase.db", System.getenv("WORKSPACE"));\r
@@ -452,81 +551,85 @@ public class FpdFrameworkModules extends IInternalFrame {
         catch(Exception e){\r
             JOptionPane.showMessageDialog(frame, "Error occurred when getting module data.");\r
         }\r
-        \r
-        if (ffc == null){\r
+\r
+        if (ffc == null) {\r
             ffc = new FpdFileContents(fpd);\r
             ffc.initDynPcdMap();\r
         }\r
-        \r
+\r
         if (fpdMsa == null) {\r
             fpdMsa = new HashMap<String, ArrayList<String>>();\r
         }\r
-        \r
+\r
         if (ffc.getFrameworkModulesCount() > 0) {\r
             String[][] saa = new String[ffc.getFrameworkModulesCount()][5];\r
             ffc.getFrameworkModulesInfo(saa);\r
             for (int i = 0; i < saa.length; ++i) {\r
-                ModuleIdentification mi = GlobalData.getModuleId(saa[i][0]+ " "+saa[i][1]+" "+saa[i][2]+" "+saa[i][3]);\r
-                String[] row = {"", "", "", "", "", ""};\r
+                ModuleIdentification mi = GlobalData.getModuleId(saa[i][ModNameCol] + " " + saa[i][ModVerCol] + " "\r
+                                                                 + saa[i][PkgNameCol] + " " + saa[i][PkgVerCol]);\r
+                String[] row = { "", "", "", "", "", "" };\r
                 if (mi != null) {\r
-                    row[0] = mi.getName();\r
-                    row[1] = mi.getVersion();\r
-                    row[2] = mi.getPackage().getName();\r
-                    row[3] = mi.getPackage().getVersion();\r
-                    row[4] = saa[i][4];\r
-                    try{\r
-                        row[5] = GlobalData.getMsaFile(mi).getPath().substring(System.getenv("WORKSPACE").length() + 1);\r
-                    }\r
-                    catch (Exception e) {\r
-                        JOptionPane.showMessageDialog(frame, "ShowFPDModules:" + e.getMessage());\r
+                    row[ModNameCol] = mi.getName();\r
+                    row[ModVerCol] = mi.getVersion();\r
+                    row[PkgNameCol] = mi.getPackage().getName();\r
+                    row[PkgVerCol] = mi.getPackage().getVersion();\r
+                    row[ArchCol] = saa[i][ArchCol];\r
+                    try {\r
+                        row[Path5Col] = GlobalData.getMsaFile(mi).getPath().substring(\r
+                                                                                      System.getenv("WORKSPACE")\r
+                                                                                            .length() + 1);\r
+                    } catch (Exception e) {\r
+                        JOptionPane.showMessageDialog(frame, "Show FPD Modules:" + e.getMessage());\r
                     }\r
                 }\r
                 modelFpdModules.addRow(row);\r
-                ArrayList<String> al = fpdMsa.get(saa[i][0]+row[1]+saa[i][2]+row[3]);\r
+                ArrayList<String> al = fpdMsa.get(saa[i][ModNameCol] + row[ModVerCol] + saa[i][PkgNameCol]\r
+                                                  + row[PkgVerCol]);\r
                 if (al == null) {\r
                     al = new ArrayList<String>();\r
-                    fpdMsa.put(saa[i][0]+row[1]+saa[i][2]+row[3], al);\r
+                    fpdMsa.put(saa[i][ModNameCol] + row[ModVerCol] + saa[i][PkgNameCol] + row[PkgVerCol], al);\r
                 }\r
-                al.add(saa[i][4]);\r
-                \r
+                al.add(saa[i][Path4Col]);\r
+\r
             }\r
         }\r
-        \r
+\r
         showAllModules();\r
-        \r
+\r
     }\r
-    \r
+\r
     private void showAllModules() {\r
-        \r
+\r
         if (miList == null) {\r
             miList = new ArrayList<ModuleIdentification>();\r
         }\r
         Set<PackageIdentification> spi = GlobalData.getPackageList();\r
         Iterator ispi = spi.iterator();\r
-        \r
-        while(ispi.hasNext()) {\r
-            PackageIdentification pi = (PackageIdentification)ispi.next();\r
-            String[] s = {"", "", "", "", ""};\r
-            \r
+\r
+        while (ispi.hasNext()) {\r
+            PackageIdentification pi = (PackageIdentification) ispi.next();\r
+            String[] s = { "", "", "", "", "" };\r
+\r
             Set<ModuleIdentification> smi = GlobalData.getModules(pi);\r
             Iterator ismi = smi.iterator();\r
-            while(ismi.hasNext()) {\r
-                ModuleIdentification mi = (ModuleIdentification)ismi.next();\r
-                s[0] = mi.getName();\r
-                s[1] = mi.getVersion();\r
-                s[2] = pi.getName();\r
-                s[3] = pi.getVersion();\r
+            while (ismi.hasNext()) {\r
+                ModuleIdentification mi = (ModuleIdentification) ismi.next();\r
+                s[ModNameCol] = mi.getName();\r
+                s[ModVerCol] = mi.getVersion();\r
+                s[PkgNameCol] = pi.getName();\r
+                s[PkgVerCol] = pi.getVersion();\r
                 try {\r
-                    s[4] = GlobalData.getMsaFile(mi).getPath().substring(System.getenv("WORKSPACE").length() + 1);\r
-                }\r
-                catch (Exception e) {\r
-                    JOptionPane.showMessageDialog(frame, "ShowAllModules:" + e.getMessage());\r
+                    s[Path4Col] = GlobalData.getMsaFile(mi).getPath()\r
+                                            .substring(System.getenv("WORKSPACE").length() + 1);\r
+                catch (Exception e) {\r
+                    JOptionPane.showMessageDialog(frame, "Show All Modules:" + e.getMessage());\r
                 }\r
                 modelAllModules.addRow(s);\r
                 miList.add(mi);\r
             }\r
         }\r
     }\r
+\r
     /**\r
      * This method initializes this\r
      * \r
@@ -537,10 +640,10 @@ public class FpdFrameworkModules extends IInternalFrame {
         this.setTitle("Framework Modules");\r
         this.setContentPane(getJSplitPane());\r
         this.setVisible(true);\r
-        \r
+\r
     }\r
 \r
-}  //  @jve:decl-index=0:visual-constraint="10,10"\r
+} //  @jve:decl-index=0:visual-constraint="10,10"\r
 \r
 class NonEditableTableModel extends DefaultTableModel {\r
     /**\r