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

Unified Diff: pkg/analysis_server/tool/spec/html_tools.dart

Issue 473733003: Output javadoc for enumerated values; suppress empty javadoc. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 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/analysis_server/tool/spec/codegen_tools.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/tool/spec/html_tools.dart
diff --git a/pkg/analysis_server/tool/spec/html_tools.dart b/pkg/analysis_server/tool/spec/html_tools.dart
index 1dc83de15b308c62e636cc06a8b17e98efc4b117..7ec6ffbe7b07e48fbafd496120158be95e1bdb65 100644
--- a/pkg/analysis_server/tool/spec/html_tools.dart
+++ b/pkg/analysis_server/tool/spec/html_tools.dart
@@ -47,6 +47,32 @@ String innerText(dom.Element parent) {
}
/**
+ * Return true if the given node is a text node containing only whitespace, or
+ * a comment.
+ */
+bool isWhitespaceNode(dom.Node node) {
+ if (node is dom.Element) {
+ return false;
+ } else if (node is dom.Text) {
+ return node.text.trim().isEmpty;
+ }
+ // Treat all other types of nodes (e.g. comments) as whitespace.
+ return true;
+}
+
+/**
+ * Return true if the given iterable contains only whitespace text nodes.
+ */
+bool containsOnlyWhitespace(Iterable<dom.Node> nodes) {
+ for (dom.Node node in nodes) {
+ if (!isWhitespaceNode(node)) {
+ return false;
+ }
+ }
+ return true;
+}
+
+/**
* Mixin class for generating HTML.
*/
class HtmlGenerator {
« no previous file with comments | « pkg/analysis_server/tool/spec/codegen_tools.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698