]> Dogcows Code - chaz/vimcoder/blobdiff - src/com/dogcows/Editor.java
do not add editor name to the end of a submission
[chaz/vimcoder] / src / com / dogcows / Editor.java
index ea4744240fed71e050bf725ca33e11dd0f2b0e2a..87403240fa43c7de09fcd36b3035729dabadb312 100644 (file)
@@ -58,10 +58,10 @@ public class Editor
        private static final Map<String,String> languageExtension = new HashMap<String,String>();
        static
        {
-               languageExtension.put("Java", "java");
-               languageExtension.put("C++", "cc");
-               languageExtension.put("C#", "cs");
-               languageExtension.put("VB", "vb");
+               languageExtension.put("Java",   "java");
+               languageExtension.put("C++",    "cc");
+               languageExtension.put("C#",     "cs");
+               languageExtension.put("VB",     "vb");
                languageExtension.put("Python", "py");
        }
 
@@ -115,16 +115,17 @@ public class Editor
 
                // Set up the terms used for the template expansion.
                HashMap<String,String> terms = new HashMap<String,String>();
-               terms.put("RETURNTYPE", component.getReturnType().getDescriptor(language));
-               terms.put("CLASSNAME", name);
-               terms.put("METHODNAME", component.getMethodName());
-               terms.put("METHODPARAMS", getMethodParams(component.getParamTypes(),
+               terms.put("RETURNTYPE",           component.getReturnType().getDescriptor(language));
+               terms.put("CLASSNAME",            name);
+               terms.put("METHODNAME",           component.getMethodName());
+               terms.put("METHODPARAMS",         getMethodParams(component.getParamTypes(),
                                                          component.getParamNames(), language));
-               terms.put("METHODPARAMNAMES", Util.join(component.getParamNames(), ", "));
-               terms.put("METHODPARAMSTREAMIN", Util.join(component.getParamNames(), " >> "));
+               terms.put("METHODPARAMNAMES",     Util.join(component.getParamNames(), ", "));
+               terms.put("METHODPARAMSTREAMIN",  Util.join(component.getParamNames(), " >> "));
                terms.put("METHODPARAMSTREAMOUT", Util.join(component.getParamNames(), " << \", \" << "));
-               terms.put("METHODPARAMDECLARES", getMethodParamDeclarations(component.getParamTypes(),
-                                                                           component.getParamNames(), language));
+               terms.put("METHODPARAMDECLARES",  getMethodParamDeclarations(component.getParamTypes(),
+                                                                            component.getParamNames(), language));
+               terms.put("VIMCODER",             VimCoder.version);
 
                // Write the problem statement as an HTML file in the problem directory.
                File problemFile = new File(directory, "Problem.html");
@@ -217,8 +218,7 @@ public class Editor
         */
        public String getSource() throws IOException
        {
-               return Util.readFile(sourceFile) + "\n// Edited by " +
-               VimCoder.version + "\n// " + VimCoder.website + "\n\n";
+               return Util.readFile(sourceFile);
        }
 
 
This page took 0.021404 seconds and 4 git commands to generate.