MeasureFilterListWidget.class,
MeasureFilterTreemapWidget.class,
WelcomeWidget.class,
+ DocumentationCommentsWidget.class,
// dashboards
ProjectDefaultDashboard.class,
--- /dev/null
+/*
+ * SonarQube, open source software quality management tool.
+ * Copyright (C) 2008-2013 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * SonarQube is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * SonarQube is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+package org.sonar.plugins.core.widgets;
+
+
+public class DocumentationCommentsWidget extends CoreWidget {
+
+ public DocumentationCommentsWidget() {
+ super("documentation_comments", "Documentation Metrics", "/org/sonar/plugins/core/widgets/documentation_comments_widget.html.erb");
+ }
+
+}
widget.comments_duplications.blocks.suffix=\ blocks
widget.comments_duplications.files.suffix=\ files
+widget.documentation_comments.name=Documentation & Comments
+widget.documentation_comments.description=Reports on comments and documentation
+widget.documentation_comments.comments=Comments
+widget.documentation_comments.documentation=Documentation
+widget.documentation_comments.lines.suffix=\ lines
+widget.documentation_comments.docu_api.suffix=\ docu. API
+widget.documentation_comments.undocu_api.suffix=\ undocu. API
+widget.documentation_comments.public_api.suffix=\ Public API
+
widget.complexity.name=Complexity
widget.complexity.description=Reports on complexity, average complexity and complexity distribution.
widget.complexity.per_method.suffix=\ /method
--- /dev/null
+<%
+ comments=measure('comment_lines_density')
+ if comments
+%>
+<table width="100%">
+ <tbody>
+ <tr>
+ <td valign="top" width="50%">
+ <div class="dashbox">
+ <p class="title"><%= message('widget.documentation_comments.documentation') -%></p>
+ <p>
+ <span class="big">
+ <%= format_measure(measure('public_documented_api_density'),:url => url_for_drilldown('public_documented_api_density'), :suffix => ' ' + message('widget.documentation_comments.docu_api.suffix'))%>
+ </span>
+ <%= dashboard_configuration.selected_period? ? format_variation('public_documented_api_density') : trend_icon('public_documented_api_density') -%>
+ </p>
+ <p>
+ <%= format_measure(measure('public_api'),:url => url_for_drilldown('public_api'), :suffix => ' ' + message('widget.documentation_comments.public_api.suffix'))%>
+ <%= dashboard_configuration.selected_period? ? format_variation('public_api') : trend_icon('public_api') -%>
+ </p>
+ <p>
+ <%= format_measure(measure('public_undocumented_api'),:url => url_for_drilldown('public_undocumented_api'), :suffix => ' ' + message('widget.documentation_comments.undocu_api.suffix'))%>
+ <%= dashboard_configuration.selected_period? ? format_variation('public_undocumented_api') : trend_icon('public_undocumented_api') -%>
+ </p>
+ </div>
+ </td>
+ <td valign="top" width="50%">
+ <div class="dashbox">
+ <p class="title"><%= message('widget.documentation_comments.comments') -%></p>
+ <p>
+ <span class="big">
+ <%= format_measure('comment_lines_density',:url => url_for_drilldown('comment_lines_density'))%>
+ </span>
+ <%= dashboard_configuration.selected_period? ? format_variation('comment_lines_density') : trend_icon('comment_lines_density') -%>
+ </p>
+ <p>
+ <%= format_measure(measure('comment_lines'),:url => url_for_drilldown('comment_lines'), :suffix => ' ' + message('widget.documentation_comments.lines.suffix'))%>
+ <%= dashboard_configuration.selected_period? ? format_variation('comment_lines') : trend_icon('comment_lines') -%>
+ </p>
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+<%
+ end
+%>