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

Unified Diff: pkg/dartdoc/lib/src/client/search.dart

Issue 11039018: Show noargs methods as () instead of (...) in find-as-you-type. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments Created 8 years, 2 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 | « pkg/dartdoc/lib/src/client/dropdown.dart ('k') | pkg/dartdoc/lib/src/dartdoc/nav.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/dartdoc/lib/src/client/search.dart
diff --git a/pkg/dartdoc/lib/src/client/search.dart b/pkg/dartdoc/lib/src/client/search.dart
index 4061590ec588b97f476c7fdadc8144b9f0cb5500..fce6d2d5c688055c1d484fa12d4ebf29b4f5b6d5 100644
--- a/pkg/dartdoc/lib/src/client/search.dart
+++ b/pkg/dartdoc/lib/src/client/search.dart
@@ -81,11 +81,13 @@ class Result {
final String args;
final String kind;
final String url;
+ final bool noargs;
TableRowElement row;
Result(this.match, this.kind, this.url,
- [this.library, this.type, String args, this.prefix])
+ {this.library: null, this.type: null, String args: null,
+ this.prefix: null, this.noargs: false})
: this.args = args != null ? '<$args>' : '';
bool get isTopLevel => prefix == null && type == null;
@@ -115,7 +117,11 @@ class Result {
if (kind == CLASS || kind == INTERFACE || kind == TYPEDEF) {
sb.add(args);
} else if (kind == CONSTRUCTOR || kind == METHOD) {
- sb.add('(...)');
+ if (noargs) {
+ sb.add("()");
+ } else {
+ sb.add('(...)');
+ }
}
sb.add('</td></tr><tr><td class="drop-down-link-kind">');
sb.add(kindToString(kind));
« no previous file with comments | « pkg/dartdoc/lib/src/client/dropdown.dart ('k') | pkg/dartdoc/lib/src/dartdoc/nav.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698