]> Dogcows Code - chaz/vimcoder/commitdiff
Merge pull request #12 from svn-kmf/master
authorCharles McGarvey <chazmcgarvey@brokenzipper.com>
Wed, 30 Nov 2016 03:58:26 +0000 (20:58 -0700)
committerGitHub <noreply@github.com>
Wed, 30 Nov 2016 03:58:26 +0000 (20:58 -0700)
Makefile
src/com/dogcows/Editor.java
src/com/dogcows/VimCoder.java
src/com/dogcows/resources/C++Template
src/com/dogcows/resources/JavaTemplate

index 602b108a838562a402eb7647053a2f31b82b3a23..9ac51831fc3dd862637b903856f4214232b2b340 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,7 @@
 # Supported targets: all clean distclean dist fetch jar
 
 project                = VimCoder
-version                = 0.3.5
+version                = 0.3.6
 
 sources                = $(wildcard src/com/dogcows/*.java)
 classes                = $(sources:src/%.java=%.class)
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);
        }
 
 
index 5841a42e7772fe6847d02793dded2e2a06b86831..b77b38bf40b4c1e2d2f7f8708c1315b712bf4408 100644 (file)
@@ -27,12 +27,7 @@ public class VimCoder
        /**
         * The name and version of this plugin.
         */
-       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";
+       public final static String version = "VimCoder 0.3.6";
 
 
        /**
@@ -248,7 +243,7 @@ public class VimCoder
                }
                catch (Exception exception)
                {
-                       logError("An error occured while loading the problem: " +
+                       logError("An error occurred while loading the problem: " +
                                 exception.getLocalizedMessage());
                }
        }
index 1bf6810653ac832434654918a8347148fc1a553e..6f225cd57fb8dec6577f4b11d75de6d2f7558448 100644 (file)
@@ -1,5 +1,5 @@
 
-// {{{ Boilerplate Code <--------------------------------------------------
+// {{{ $VIMCODER$ <-----------------------------------------------------
 // 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.*;
This page took 0.027961 seconds and 4 git commands to generate.