]> Dogcows Code - chaz/vimcoder/blobdiff - src/com/dogcows/Editor.java
do not overwrite makefiles while opening a problem
[chaz/vimcoder] / src / com / dogcows / Editor.java
index 40ccc829e8306613ae8afc9a036109f1890c498e..eca84208ad675a66706995396744d2d821845537 100644 (file)
@@ -89,7 +89,7 @@ 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).replaceAll("\\s+", ""));
+               terms.put("RETURNTYPE",   component.getReturnType().getDescriptor(language));
                terms.put("CLASSNAME",    name);
                terms.put("METHODNAME",   component.getMethodName());
                terms.put("METHODPARAMS", getMethodParams(component.getParamTypes(),
@@ -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);
@@ -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;
        }
This page took 0.020987 seconds and 4 git commands to generate.