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
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
\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
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
rd = new BufferedReader(new FileReader(mi.modulepath + File.separator + curFile));\r
Common.ensureDir(mi.modulepath + File.separator + "temp" + File.separator + curFile);\r
outfile = new PrintWriter(new BufferedWriter(new FileWriter(mi.modulepath + File.separator + "temp" + File.separator + curFile)));\r
+ \r
+ /*\r
+ if (curFile.contains(".dxs")) {\r
+ if (mi.moduletype.contains("PEI")) {\r
+ \r
+ } else {\r
+ \r
+ }\r
+ }\r
+ */\r
while ((line = rd.readLine()) != null) {\r
if (line.contains("#include")) {\r
mtrinclude = ptninclude.matcher(line);\r
}\r
outfile.flush();\r
outfile.close();\r
+ \r
}\r
}\r
\r