summaryrefslogtreecommitdiff
path: root/Tools/Source/MigrationTools
diff options
context:
space:
mode:
authoralfred <alfred@6f19259b-4bc3-4df7-8a09-765794883524>2006-08-30 08:36:25 +0000
committeralfred <alfred@6f19259b-4bc3-4df7-8a09-765794883524>2006-08-30 08:36:25 +0000
commite3e8956d1353d4623d5997cd7122fbbb2a817875 (patch)
tree10e567131fbb667bec46d873cb3bbfd28b1734ab /Tools/Source/MigrationTools
parent6ae1510e527a79a6958f0ada17c9ef6a4dfba5af (diff)
downloadedk2-e3e8956d1353d4623d5997cd7122fbbb2a817875.zip
edk2-e3e8956d1353d4623d5997cd7122fbbb2a817875.tar.gz
edk2-e3e8956d1353d4623d5997cd7122fbbb2a817875.tar.bz2
editable comment style
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1407 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Tools/Source/MigrationTools')
-rw-r--r--Tools/Source/MigrationTools/org/tianocore/migration/FirstPanel.java16
-rw-r--r--Tools/Source/MigrationTools/org/tianocore/migration/MigrationTool.java2
-rw-r--r--Tools/Source/MigrationTools/org/tianocore/migration/ModuleReader.java11
3 files changed, 26 insertions, 3 deletions
diff --git a/Tools/Source/MigrationTools/org/tianocore/migration/FirstPanel.java b/Tools/Source/MigrationTools/org/tianocore/migration/FirstPanel.java
index c78ad97..fac874e 100644
--- a/Tools/Source/MigrationTools/org/tianocore/migration/FirstPanel.java
+++ b/Tools/Source/MigrationTools/org/tianocore/migration/FirstPanel.java
@@ -29,7 +29,7 @@ public final class FirstPanel extends JPanel implements ActionListener, ItemList
private String startpath;
private ModuleInfo mi;
- private JButton moduleButton, goButton, msaEditorButton, criticButton;
+ private JButton moduleButton, goButton, msaEditorButton, criticButton, specifyCommentButton;
private JTextField moduletext;
private JTextArea log;
private JFileChooser fc;
@@ -57,6 +57,9 @@ public final class FirstPanel extends JPanel implements ActionListener, ItemList
criticButton = new JButton("Critic");
criticButton.addActionListener(this);
+ specifyCommentButton = new JButton("Comment Style");
+ specifyCommentButton.addActionListener(this);
+
moduletext = new JTextField(30);
filebox = new JCheckBox("Output to logfile", true);
@@ -90,7 +93,9 @@ public final class FirstPanel extends JPanel implements ActionListener, ItemList
cst.gridx = 1;
cst.gridy = 0;
- gridbag.setConstraints(criticButton, cst);
+ gridbag.setConstraints(specifyCommentButton, cst);
+ add(specifyCommentButton);
+ //gridbag.setConstraints(criticButton, cst);
//add(criticButton);
JPanel checkboxPanel = new JPanel();
@@ -199,6 +204,13 @@ public final class FirstPanel extends JPanel implements ActionListener, ItemList
println(en.getMessage());
}
}
+ if ( e.getSource() == specifyCommentButton) {
+ try { // input examine is not imposed but should be added
+ 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");
+ } catch (Exception en) {
+ println(en.getMessage());
+ }
+ }
}
public void itemStateChanged(ItemEvent e) {
diff --git a/Tools/Source/MigrationTools/org/tianocore/migration/MigrationTool.java b/Tools/Source/MigrationTools/org/tianocore/migration/MigrationTool.java
index e1e769f..04ab022 100644
--- a/Tools/Source/MigrationTools/org/tianocore/migration/MigrationTool.java
+++ b/Tools/Source/MigrationTools/org/tianocore/migration/MigrationTool.java
@@ -7,7 +7,7 @@ public class MigrationTool {
public static UI ui = null;
public static Database db = null;
- public static final String MIGRATIONCOMMENT = "//%$//";
+ public static String MIGRATIONCOMMENT = "//%$//";
public static boolean printModuleInfo = false;
public static boolean doCritic = false;
diff --git a/Tools/Source/MigrationTools/org/tianocore/migration/ModuleReader.java b/Tools/Source/MigrationTools/org/tianocore/migration/ModuleReader.java
index e7b62f0..bc3fd75 100644
--- a/Tools/Source/MigrationTools/org/tianocore/migration/ModuleReader.java
+++ b/Tools/Source/MigrationTools/org/tianocore/migration/ModuleReader.java
@@ -136,6 +136,16 @@ public final class ModuleReader {
rd = new BufferedReader(new FileReader(mi.modulepath + File.separator + curFile));
Common.ensureDir(mi.modulepath + File.separator + "temp" + File.separator + curFile);
outfile = new PrintWriter(new BufferedWriter(new FileWriter(mi.modulepath + File.separator + "temp" + File.separator + curFile)));
+
+ /*
+ if (curFile.contains(".dxs")) {
+ if (mi.moduletype.contains("PEI")) {
+
+ } else {
+
+ }
+ }
+ */
while ((line = rd.readLine()) != null) {
if (line.contains("#include")) {
mtrinclude = ptninclude.matcher(line);
@@ -148,6 +158,7 @@ public final class ModuleReader {
}
outfile.flush();
outfile.close();
+
}
}