Chromium Code Reviews| Index: editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/utilities/dartdoc/DartDocUtilities.java |
| =================================================================== |
| --- editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/utilities/dartdoc/DartDocUtilities.java (revision 8707) |
| +++ editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/utilities/dartdoc/DartDocUtilities.java (working copy) |
| @@ -201,7 +201,6 @@ |
| if (documentable instanceof Field) { |
| Field field = (Field) documentable; |
| - // TODO(devoncarew): why/when is this null? |
| if (field.getTypeName() != null) { |
| return field.getTypeName() + " " + field.getElementName(); |
| } else { |
| @@ -229,7 +228,19 @@ |
| buf.append(", "); |
| } |
| - buf.append(method.getParameterTypeNames()[i] + " " + method.getParameterNames()[i]); |
| + String typeName = method.getParameterTypeNames()[i]; |
|
Brian Wilkerson
2012/06/15 17:53:19
nit: We should get the parameter type names and pa
devoncarew
2012/06/15 18:01:04
Done.
|
| + String paramName = method.getParameterNames()[i]; |
| + |
| + if (typeName.indexOf('(') != -1) { |
| + // Instead of returning "void(var) callback", return "void callback(var)". |
| + int index = typeName.indexOf('('); |
| + |
| + buf.append(typeName.substring(0, index)); |
| + buf.append(" " + paramName); |
|
Brian Wilkerson
2012/06/15 17:53:19
nit: we're already using append to concatenate so
devoncarew
2012/06/15 18:01:04
Done.
|
| + buf.append(typeName.substring(index)); |
| + } else { |
| + buf.append(typeName + " " + paramName); |
| + } |
| } |
| if (method.getReturnTypeName() != null) { |