]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModulePCDs.java
Fixed grammar in messages.
[mirror_edk2.git] / Tools / Source / FrameworkWizard / src / org / tianocore / frameworkwizard / module / ui / ModulePCDs.java
index 8d72515e84359a042c4d88254053f4b2f0bae21c..3531399a42902aa1a78ba3f975b1e2b1ca82f144 100644 (file)
@@ -29,6 +29,7 @@ import javax.swing.event.ListSelectionEvent;
 \r
 import org.tianocore.PcdCodedDocument;\r
 import org.tianocore.PcdItemTypes;\r
+import org.tianocore.PcdUsage;\r
 import org.tianocore.ModuleSurfaceAreaDocument.ModuleSurfaceArea;\r
 import org.tianocore.PcdCodedDocument.PcdCoded;\r
 import org.tianocore.PcdCodedDocument.PcdCoded.PcdEntry;\r
@@ -185,6 +186,7 @@ public class ModulePCDs extends IInternalFrame {
             model.addColumn("Name");\r
             model.addColumn("Type");\r
             model.addColumn("Value");\r
+            model.addColumn("Usage");\r
 \r
             jTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\r
             jTable.getSelectionModel().addListSelectionListener(this);\r
@@ -234,8 +236,11 @@ public class ModulePCDs extends IInternalFrame {
                     if (pcds.getPcdEntryList().get(index).getPcdItemType() != null) {\r
                         arg6 = pcds.getPcdEntryList().get(index).getPcdItemType().toString();\r
                     }\r
-\r
-                    id = new PcdCodedIdentification(arg0, arg1, arg2, arg3, arg4, arg5, arg6);\r
+                    String arg7 = null;\r
+                    if (pcds.getPcdEntryList().get(index).getUsage() != null) {\r
+                        arg7 = pcds.getPcdEntryList().get(index).getUsage().toString();\r
+                    }\r
+                    id = new PcdCodedIdentification(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7);\r
                     vid.addPcdCoded(id);\r
                 }\r
             }\r
@@ -400,6 +405,9 @@ public class ModulePCDs extends IInternalFrame {
                     if (!isEmpty(vid.getPcdCoded(index).getType())) {\r
                         p.setPcdItemType(PcdItemTypes.Enum.forString(vid.getPcdCoded(index).getType()));\r
                     }\r
+                    if (!isEmpty(vid.getPcdCoded(index).getUsage())) {\r
+                        p.setUsage(PcdUsage.Enum.forString(vid.getPcdCoded(index).getUsage()));\r
+                    }\r
                     this.pcds.addNewPcdEntry();\r
                     this.pcds.setPcdEntryArray(pcds.getPcdEntryList().size() - 1, p);\r
                 }\r
@@ -454,12 +462,16 @@ public class ModulePCDs extends IInternalFrame {
         int intPreferredWidth = this.getJContentPane().getPreferredSize().width;\r
         int intPreferredHeight = this.getJContentPane().getPreferredSize().height;\r
 \r
-        resizeComponent(this.jScrollPaneTable, intCurrentWidth, intCurrentHeight, intPreferredWidth, intPreferredHeight);\r
-        relocateComponent(this.jButtonAdd, intCurrentWidth, intCurrentHeight, intPreferredWidth, intPreferredHeight,\r
-                          DataType.SPACE_TO_RIGHT_FOR_ADD_BUTTON, DataType.SPACE_TO_BOTTOM_FOR_ADD_BUTTON);\r
-        relocateComponent(this.jButtonRemove, intCurrentWidth, intCurrentHeight, intPreferredWidth, intPreferredHeight,\r
-                          DataType.SPACE_TO_RIGHT_FOR_REMOVE_BUTTON, DataType.SPACE_TO_BOTTOM_FOR_REMOVE_BUTTON);\r
-        relocateComponent(this.jButtonUpdate, intCurrentWidth, intCurrentHeight, intPreferredWidth, intPreferredHeight,\r
-                          DataType.SPACE_TO_RIGHT_FOR_UPDATE_BUTTON, DataType.SPACE_TO_BOTTOM_FOR_UPDATE_BUTTON);\r
+        Tools.resizeComponent(this.jScrollPaneTable, intCurrentWidth, intCurrentHeight, intPreferredWidth,\r
+                              intPreferredHeight);\r
+        Tools.relocateComponent(this.jButtonAdd, intCurrentWidth, intCurrentHeight, intPreferredWidth,\r
+                                intPreferredHeight, DataType.SPACE_TO_RIGHT_FOR_ADD_BUTTON,\r
+                                DataType.SPACE_TO_BOTTOM_FOR_ADD_BUTTON);\r
+        Tools.relocateComponent(this.jButtonRemove, intCurrentWidth, intCurrentHeight, intPreferredWidth,\r
+                                intPreferredHeight, DataType.SPACE_TO_RIGHT_FOR_REMOVE_BUTTON,\r
+                                DataType.SPACE_TO_BOTTOM_FOR_REMOVE_BUTTON);\r
+        Tools.relocateComponent(this.jButtonUpdate, intCurrentWidth, intCurrentHeight, intPreferredWidth,\r
+                                intPreferredHeight, DataType.SPACE_TO_RIGHT_FOR_UPDATE_BUTTON,\r
+                                DataType.SPACE_TO_BOTTOM_FOR_UPDATE_BUTTON);\r
     }\r
 }\r