X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fcom%2Fdogcows%2FEditor.java;h=eca84208ad675a66706995396744d2d821845537;hb=2950052d2276e7ec64aad1ec678e32622e3a38c5;hp=57e1b779a2a74aedb9f71aa5b1ac26e60d3c1e16;hpb=13cdace1459b932489b8b43885504d701643f1bd;p=chaz%2Fvimcoder diff --git a/src/com/dogcows/Editor.java b/src/com/dogcows/Editor.java index 57e1b77..eca8420 100644 --- a/src/com/dogcows/Editor.java +++ b/src/com/dogcows/Editor.java @@ -89,7 +89,7 @@ public class Editor // Set up the terms used for the template expansion. HashMap terms = new HashMap(); - terms.put("RETURNTYPE", component.getReturnType().getDescriptor(language).replaceAll("\\s+", "")); + terms.put("RETURNTYPE", component.getReturnType().getDescriptor(language)); terms.put("CLASSNAME", name); terms.put("METHODNAME", component.getMethodName()); terms.put("METHODPARAMS", getMethodParams(component.getParamTypes(), @@ -97,7 +97,7 @@ public class Editor language)); 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)); @@ -164,6 +164,7 @@ public class Editor // Finally, expand the Makefile template and write it. File makeFile = new File(directory, "Makefile"); + if (!makeFile.canRead()) { String text = Util.expandTemplate(readTemplate(lang + "Makefile"), terms); @@ -243,7 +244,7 @@ public class Editor * before the timeout, we will assume it is not backgrounding and * that everything worked. This works as long as the Vim server is * able to start within the stall period. */ - long expire = System.currentTimeMillis() + 250; + long expire = System.currentTimeMillis() + 1000; while (System.currentTimeMillis() < expire) { Thread.yield(); @@ -295,7 +296,7 @@ public class Editor String[] strings = new String[types.length]; for (int i = 0; i < types.length; ++i) { - strings[i] = types[i].getDescriptor(language).replaceAll("\\s+", ""); + strings[i] = types[i].getDescriptor(language); } return strings; }