Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1141)

Unified Diff: editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/utilities/dartdoc/DartDocUtilities.java

Issue 10542177: Fix for http://code.google.com/p/dart/issues/detail?id=3616 - missing dartdoc tooltips for getters … (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « compiler/java/com/google/dart/compiler/parser/CommentPreservingParser.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « compiler/java/com/google/dart/compiler/parser/CommentPreservingParser.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698