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

Unified Diff: pkg/dartdoc/lib/dartdoc.dart

Issue 10981058: dartdoc supports isAbstract on methods (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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 | « no previous file | pkg/dartdoc/lib/mirrors.dart » ('j') | pkg/dartdoc/lib/mirrors.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/dartdoc/lib/dartdoc.dart
diff --git a/pkg/dartdoc/lib/dartdoc.dart b/pkg/dartdoc/lib/dartdoc.dart
index 910ca9e3158535c7eece4f9ba8165f7b7be1845c..2eff4bebb5ff43ff7baed52570a6b3bacbc1ed3d 100644
--- a/pkg/dartdoc/lib/dartdoc.dart
+++ b/pkg/dartdoc/lib/dartdoc.dart
@@ -801,11 +801,15 @@ class Dartdoc {
startFile(typeUrl(type));
- var kind = 'Interface';
+ var kind = 'interface';
if (type.isTypedef) {
- kind = 'Typedef';
+ kind = 'typedef';
} else if (type.isClass) {
- kind = 'Class';
+ if (type.isAbstract) {
+ kind = 'abstract class';
+ } else {
+ kind = 'class';
+ }
}
final typeTitle =
@@ -1048,9 +1052,11 @@ class Dartdoc {
_totalMembers++;
_currentMember = method;
+ bool showCode = includeSource && !method.isAbstract;
+
writeln('<div class="method"><h4 id="${memberAnchor(method)}">');
- if (includeSource) {
+ if (showCode) {
writeln('<span class="show-code">Code</span>');
}
@@ -1060,6 +1066,8 @@ class Dartdoc {
} else {
write(method.isConst ? 'const ' : 'new ');
}
+ } else if (method.isAbstract) {
+ write('abstract ');
}
if (method.constructorName == null) {
@@ -1093,7 +1101,7 @@ class Dartdoc {
title="Permalink to $prefix$name">#</a>''');
writeln('</h4>');
- docCode(method.location, getMethodComment(method), showCode: true);
+ docCode(method.location, getMethodComment(method), showCode: showCode);
writeln('</div>');
}
« no previous file with comments | « no previous file | pkg/dartdoc/lib/mirrors.dart » ('j') | pkg/dartdoc/lib/mirrors.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698