]> Dogcows Code - chaz/vimcoder/commitdiff
do not add editor name to the end of a submission
authorCharles McGarvey <chazmcgarvey@brokenzipper.com>
Wed, 5 Mar 2014 02:03:06 +0000 (19:03 -0700)
committerCharles McGarvey <chazmcgarvey@brokenzipper.com>
Wed, 5 Mar 2014 02:03:06 +0000 (19:03 -0700)
src/com/dogcows/Editor.java
src/com/dogcows/VimCoder.java
src/com/dogcows/resources/C++Template
src/com/dogcows/resources/JavaTemplate

index ea4744240fed71e050bf725ca33e11dd0f2b0e2a..87403240fa43c7de09fcd36b3035729dabadb312 100644 (file)
@@ -58,10 +58,10 @@ public class Editor
        private static final Map<String,String> languageExtension = new HashMap<String,String>();
        static
        {
        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");
        }
 
                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>();
 
                // 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));
                                                          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("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");
 
                // 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
        {
         */
        public String getSource() throws IOException
        {
-               return Util.readFile(sourceFile) + "\n// Edited by " +
-               VimCoder.version + "\n// " + VimCoder.website + "\n\n";
+               return Util.readFile(sourceFile);
        }
 
 
        }
 
 
index 5841a42e7772fe6847d02793dded2e2a06b86831..d094394f2a0dbe41cdb9bc3f220319df38397de8 100644 (file)
@@ -29,11 +29,6 @@ public class VimCoder
         */
        public final static String version = "VimCoder 0.3.5";
 
         */
        public final static String version = "VimCoder 0.3.5";
 
-       /**
-        * The website of the plugin project.
-        */
-       public final static String website = "http://github.com/chazmcgarvey/vimcoder";
-
 
        /**
         * The first part of the command used to invoke the Vim server.
 
        /**
         * The first part of the command used to invoke the Vim server.
index 1bf6810653ac832434654918a8347148fc1a553e..6f225cd57fb8dec6577f4b11d75de6d2f7558448 100644 (file)
@@ -1,5 +1,5 @@
 
 
-// {{{ Boilerplate Code <--------------------------------------------------
+// {{{ $VIMCODER$ <-----------------------------------------------------
 // vim:filetype=cpp:foldmethod=marker:foldmarker={{{,}}}
 
 #include <algorithm>
 // vim:filetype=cpp:foldmethod=marker:foldmarker={{{,}}}
 
 #include <algorithm>
index 47ab5dbad709457e07a318f3893192e32da92038..68c790b44730c44724e3be3375b36590a583b53d 100644 (file)
@@ -1,5 +1,5 @@
 
 
-// {{{ Boilerplate Code <--------------------------------------------------
+// {{{ $VIMCODER$ <-----------------------------------------------------
 // vim:filetype=java:foldmethod=marker:foldmarker={{{,}}}
 
 import static java.lang.Math.*;
 // vim:filetype=java:foldmethod=marker:foldmarker={{{,}}}
 
 import static java.lang.Math.*;
This page took 0.023498 seconds and 4 git commands to generate.