]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Tools/Source/MigrationTools/org/tianocore/migration/FirstPanel.java
editable comment style
[mirror_edk2.git] / Tools / Source / MigrationTools / org / tianocore / migration / FirstPanel.java
index c78ad97bb3063604bd7554a02f42fea43f1a8b8c..fac874e381fd9a95c0895b1a585b111299c37556 100644 (file)
@@ -29,7 +29,7 @@ public final class FirstPanel extends JPanel implements ActionListener, ItemList
        private String startpath;\r
        private ModuleInfo mi;\r
        \r
-       private JButton moduleButton, goButton, msaEditorButton, criticButton;\r
+       private JButton moduleButton, goButton, msaEditorButton, criticButton, specifyCommentButton;\r
        private JTextField moduletext;\r
        private JTextArea log;\r
        private JFileChooser fc;\r
@@ -57,6 +57,9 @@ public final class FirstPanel extends JPanel implements ActionListener, ItemList
                criticButton = new JButton("Critic");\r
                criticButton.addActionListener(this);\r
                \r
+               specifyCommentButton = new JButton("Comment Style");\r
+               specifyCommentButton.addActionListener(this);\r
+               \r
                moduletext = new JTextField(30);\r
                \r
                filebox = new JCheckBox("Output to logfile", true);\r
@@ -90,7 +93,9 @@ public final class FirstPanel extends JPanel implements ActionListener, ItemList
 \r
         cst.gridx = 1;\r
         cst.gridy = 0;\r
-        gridbag.setConstraints(criticButton, cst);\r
+        gridbag.setConstraints(specifyCommentButton, cst);\r
+        add(specifyCommentButton);\r
+        //gridbag.setConstraints(criticButton, cst);\r
         //add(criticButton);\r
         \r
         JPanel checkboxPanel = new JPanel();\r
@@ -199,6 +204,13 @@ public final class FirstPanel extends JPanel implements ActionListener, ItemList
                        println(en.getMessage());\r
                }\r
         }\r
+        if ( e.getSource() == specifyCommentButton) {\r
+               try {                                                                                   // input examine is not imposed but should be added\r
+                       MigrationTool.MIGRATIONCOMMENT = getInput("Please type in wanted comment style used by the tool\nbe sure to start with '//', or you won't enjoy the result");\r
+               } catch (Exception en) {\r
+                       println(en.getMessage());\r
+               }\r
+        }\r
     }\r
     \r
     public void itemStateChanged(ItemEvent e) {\r