From: Charles McGarvey Date: Thu, 23 Jun 2011 19:04:44 +0000 (-0600) Subject: compressing types with multiple identifiers is bad for C++ X-Git-Tag: v0.3.2~8 X-Git-Url: https://git.dogcows.com/gitweb?a=commitdiff_plain;h=21cddeda44bd48862361da3c925fbff09f756313;p=chaz%2Fvimcoder compressing types with multiple identifiers is bad for C++ Sadly, it doesn't look like constructor syntax can be used for multi-word types in C++, so "return long long();" from the template won't compile, but oh well. The return statement is meant to be replaced anyway. see #32 --- diff --git a/src/com/dogcows/Editor.java b/src/com/dogcows/Editor.java index 40ccc82..ff38a0f 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(), @@ -295,7 +295,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; }