aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/false_positive_issues.html.erb3
-rw-r--r--plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/size.html.erb4
-rw-r--r--plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/charts/AbstractChartTest.java (renamed from sonar-plugin-api/src/test/java/org/sonar/api/charts/AbstractChartTest.java)2
-rw-r--r--plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/charts/DistributionAreaChartTest.java1
-rw-r--r--plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/charts/DistributionBarChartTest.java1
-rw-r--r--plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/charts/XradarChartTest.java1
-rw-r--r--plugins/sonar-xoo-plugin/pom.xml5
-rw-r--r--server/sonar-web/src/main/coffee/coding-rules/app.coffee2
-rw-r--r--server/sonar-web/src/main/hbs/coding-rules/coding-rules-quality-profile-activation.hbs2
-rw-r--r--server/sonar-web/src/main/js/issues/extra.js6
-rw-r--r--server/sonar-web/src/main/js/tests/e2e/tests/coding-rules-spec.js9
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/helpers/application_helper.rb3
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_layout.html.erb3
-rw-r--r--sonar-core/src/main/resources/org/sonar/l10n/core.properties2
-rw-r--r--sonar-deprecated/pom.xml5
-rw-r--r--sonar-deprecated/src/main/java/org/sonar/api/charts/AbstractChart.java (renamed from sonar-plugin-api/src/main/java/org/sonar/api/charts/AbstractChart.java)4
-rw-r--r--sonar-deprecated/src/main/java/org/sonar/api/charts/Chart.java (renamed from sonar-plugin-api/src/main/java/org/sonar/api/charts/Chart.java)4
-rw-r--r--sonar-deprecated/src/main/java/org/sonar/api/charts/ChartParameters.java (renamed from sonar-plugin-api/src/main/java/org/sonar/api/charts/ChartParameters.java)2
-rw-r--r--sonar-deprecated/src/main/java/org/sonar/api/charts/package-info.java (renamed from sonar-plugin-api/src/main/java/org/sonar/api/charts/package-info.java)3
-rw-r--r--sonar-deprecated/src/main/java/org/sonar/api/checks/NoSonarFilter.java (renamed from sonar-plugin-api/src/main/java/org/sonar/api/checks/NoSonarFilter.java)0
-rw-r--r--sonar-deprecated/src/test/java/org/sonar/api/charts/ChartParametersTest.java (renamed from sonar-plugin-api/src/test/java/org/sonar/api/charts/ChartParametersTest.java)3
-rw-r--r--sonar-deprecated/src/test/java/org/sonar/api/checks/NoSonarFilterTest.java (renamed from sonar-plugin-api/src/test/java/org/sonar/api/checks/NoSonarFilterTest.java)0
-rw-r--r--sonar-plugin-api/pom.xml4
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/BatchComponent.java16
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/BatchExtension.java3
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/CoreProperties.java3
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/Extension.java2
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/Plugin.java5
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/Properties.java5
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/Property.java11
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/ServerComponent.java3
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/SonarPlugin.java5
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/config/Category.java (renamed from sonar-plugin-api/src/main/java/org/sonar/api/config/internal/Category.java)14
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/config/PropertyDefinitions.java2
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/config/Settings.java5
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/config/SubCategory.java (renamed from sonar-plugin-api/src/main/java/org/sonar/api/config/internal/SubCategory.java)9
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/config/internal/package-info.java23
-rw-r--r--sonar-plugin-api/src/test/java/org/sonar/api/config/AesCipherTest.java1
-rw-r--r--sonar-plugin-api/src/test/java/org/sonar/api/config/CategoryTest.java (renamed from sonar-plugin-api/src/test/java/org/sonar/api/config/internal/CategoryTest.java)2
-rw-r--r--sonar-plugin-api/src/test/java/org/sonar/api/config/PropertyDefinitionsTest.java2
40 files changed, 97 insertions, 83 deletions
diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/false_positive_issues.html.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/false_positive_issues.html.erb
index f5f6a80b018..cf6c4661fcc 100644
--- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/false_positive_issues.html.erb
+++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/false_positive_issues.html.erb
@@ -3,13 +3,12 @@
search_options = {}
search_options['componentRoots'] = @project.key
- search_options['resolved'] = 'true'
search_options['resolutions'] = 'FALSE-POSITIVE'
title = message('widget.false_positive_reviews.name')
%>
<%= render :partial => 'project/widgets/issues/issues_list_widget',
- :locals => {:search_options => search_options, :title => title,
+ :locals => {:search_options => search_options, :title => title,
:widget_id => widget.id.to_s, :widget_properties => widget_properties} %>
<% end %>
diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/size.html.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/size.html.erb
index e68012f744b..cda33b0714f 100644
--- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/size.html.erb
+++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/size.html.erb
@@ -110,7 +110,7 @@
<%= format_measure(generated_ncloc, :url => url_for_drilldown(generated_ncloc)) -%>
<span class="nowrap">
<%= dashboard_configuration.selected_period? ? format_variation(generated_ncloc) : trend_icon(generated_ncloc) %>
- <span class="widget-label"><%= message('metric.generated.name.suffix') -%></span>
+ <span class="widget-label"><%= message('metric.generated_ncloc.name.suffix') -%></span>
</span>
</p>
<% end %>
@@ -124,7 +124,7 @@
</p>
<% if generated_lines && generated_lines.value>0 %>
- <p>incl. <%= format_measure(generated_lines, :suffix => message('metric.generated.name.suffix'), :url => url_for_drilldown(generated_lines)) -%> <%= dashboard_configuration.selected_period? ? format_variation(generated_lines) : trend_icon(generated_lines) -%></p>
+ <p>incl. <%= format_measure(generated_lines, :suffix => ' ' + message('metric.generated_lines.name.suffix'), :url => url_for_drilldown(generated_lines)) -%> <%= dashboard_configuration.selected_period? ? format_variation(generated_lines) : trend_icon(generated_lines) -%></p>
<% end %>
<% if projects %>
diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/charts/AbstractChartTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/charts/AbstractChartTest.java
index eba63156d5f..31223db492f 100644
--- a/sonar-plugin-api/src/test/java/org/sonar/api/charts/AbstractChartTest.java
+++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/charts/AbstractChartTest.java
@@ -17,7 +17,7 @@
* 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.api.charts;
+package org.sonar.plugins.core.charts;
import org.apache.commons.io.FileUtils;
import org.jfree.chart.ChartUtilities;
diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/charts/DistributionAreaChartTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/charts/DistributionAreaChartTest.java
index 6ae7fed839a..6a535abad16 100644
--- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/charts/DistributionAreaChartTest.java
+++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/charts/DistributionAreaChartTest.java
@@ -20,7 +20,6 @@
package org.sonar.plugins.core.charts;
import org.junit.Test;
-import org.sonar.api.charts.AbstractChartTest;
import org.sonar.api.charts.ChartParameters;
import java.awt.image.BufferedImage;
diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/charts/DistributionBarChartTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/charts/DistributionBarChartTest.java
index 4cf1e46dece..a0937082942 100644
--- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/charts/DistributionBarChartTest.java
+++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/charts/DistributionBarChartTest.java
@@ -20,7 +20,6 @@
package org.sonar.plugins.core.charts;
import org.junit.Test;
-import org.sonar.api.charts.AbstractChartTest;
import org.sonar.api.charts.ChartParameters;
import java.awt.image.BufferedImage;
diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/charts/XradarChartTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/charts/XradarChartTest.java
index 39a304c2e67..d48d049c440 100644
--- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/charts/XradarChartTest.java
+++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/charts/XradarChartTest.java
@@ -20,7 +20,6 @@
package org.sonar.plugins.core.charts;
import org.junit.Test;
-import org.sonar.api.charts.AbstractChartTest;
import org.sonar.api.charts.ChartParameters;
import java.awt.image.BufferedImage;
diff --git a/plugins/sonar-xoo-plugin/pom.xml b/plugins/sonar-xoo-plugin/pom.xml
index 10f52cda77b..4d45692ef42 100644
--- a/plugins/sonar-xoo-plugin/pom.xml
+++ b/plugins/sonar-xoo-plugin/pom.xml
@@ -29,6 +29,11 @@
<artifactId>commons-io</artifactId>
<scope>provided</scope>
</dependency>
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ <scope>provided</scope>
+ </dependency>
<!-- unit testing -->
<dependency>
diff --git a/server/sonar-web/src/main/coffee/coding-rules/app.coffee b/server/sonar-web/src/main/coffee/coding-rules/app.coffee
index aab13d216d4..14ab0d938c5 100644
--- a/server/sonar-web/src/main/coffee/coding-rules/app.coffee
+++ b/server/sonar-web/src/main/coffee/coding-rules/app.coffee
@@ -509,7 +509,7 @@ requirejs [
repo = _.findWhere(App.repositories, key: value)
other_repo_with_same_name = _.find(App.repositories, (repos) -> repos.name == repo.name && repos.key != repo.key)
if other_repo_with_same_name
- repo.name + ' - ' + App.languages[repo.language]
+ App.languages[repo.language] + ' ' + repo.name
else
repo.name
diff --git a/server/sonar-web/src/main/hbs/coding-rules/coding-rules-quality-profile-activation.hbs b/server/sonar-web/src/main/hbs/coding-rules/coding-rules-quality-profile-activation.hbs
index 560972b992b..9e48279434d 100644
--- a/server/sonar-web/src/main/hbs/coding-rules/coding-rules-quality-profile-activation.hbs
+++ b/server/sonar-web/src/main/hbs/coding-rules/coding-rules-quality-profile-activation.hbs
@@ -45,7 +45,7 @@
{{else}}
{{#eq type 'BOOLEAN'}}
<select name="{{key}}" value="{{value}}">
- <option value="{{defaultValue}}">{{t 'default'}}</option>
+ <option value="{{defaultValue}}">{{t 'default'}} ({{t defaultValue}})</option>
<option value="true"{{#eq value 'true'}} selected="selected"{{/eq}}>{{t 'true'}}</option>
<option value="false"{{#eq value 'false'}} selected="selected"{{/eq}}>{{t 'false'}}</option>
</select>
diff --git a/server/sonar-web/src/main/js/issues/extra.js b/server/sonar-web/src/main/js/issues/extra.js
index 6f7700c336b..7edfb0ece40 100644
--- a/server/sonar-web/src/main/js/issues/extra.js
+++ b/server/sonar-web/src/main/js/issues/extra.js
@@ -621,12 +621,14 @@ define(
var idObj = _.findWhere(params, { key: 'id' });
if (idObj) {
var that = this,
- f = this.app.favoriteFilter;
+ f = this.app.favoriteFilter;
this.app.canSave = false;
f.set('id', idObj.value);
f.fetch({
success: function () {
- params = _.extend({}, that.parseQuery(f.get('query')), params);
+ var parsedFilter = that.parseQuery(f.get('query'));
+ params = _.extend({}, params);
+ params = _.extent(params, parsedFilter);
that.loadResults(params);
}
});
diff --git a/server/sonar-web/src/main/js/tests/e2e/tests/coding-rules-spec.js b/server/sonar-web/src/main/js/tests/e2e/tests/coding-rules-spec.js
index 4b4349c7a23..b6cabf1d88a 100644
--- a/server/sonar-web/src/main/js/tests/e2e/tests/coding-rules-spec.js
+++ b/server/sonar-web/src/main/js/tests/e2e/tests/coding-rules-spec.js
@@ -60,6 +60,15 @@ casper.test.begin(testName('Readonly Tests'), function suite(test) {
});
+ casper.waitForSelector('div.navigator-facets-list-item:nth-child(2)', function checkFacets() {
+ test.assertSelectorHasText('div.navigator-facets-list-item:nth-child(2) a:nth-child(1)', 'Java SonarQube');
+ test.assertSelectorHasText('div.navigator-facets-list-item:nth-child(2) a:nth-child(2)', 'Java Common SonarQube');
+ test.assertSelectorHasText('div.navigator-facets-list-item:nth-child(2) a:nth-child(3)', 'CoffeeScript SonarQube');
+ test.assertSelectorHasText('div.navigator-facets-list-item:nth-child(2) a:nth-child(4)', 'CoffeeScript Common SonarQube');
+ test.assertSelectorHasText('div.navigator-facets-list-item:nth-child(2) a:nth-child(5)', 'Xoo SonarQube');
+ });
+
+
casper.waitForSelector('li.active', function checkResultsList() {
test.assertElementCount('ol.navigator-results-list li', 10);
test.assertElementCount('li.active', 1);
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/helpers/application_helper.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/helpers/application_helper.rb
index d3989111e74..be210cffe4e 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/helpers/application_helper.rb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/helpers/application_helper.rb
@@ -992,6 +992,9 @@ module ApplicationHelper
def url_for_issues(params)
url = ApplicationController.root_context + '/issues/search#'
params.each do |key, value|
+ if key == 'filter'
+ key = 'id'
+ end
url += key.to_s + '=' + value.to_s + '|'
end
url
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_layout.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_layout.html.erb
index d9c1cad458a..1b6e846b19c 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_layout.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_layout.html.erb
@@ -204,11 +204,12 @@
<%= render 'branding/footer' -%>
<div>
Version <%= sonar_version -%> -
+ <a href="http://www.gnu.org/licenses/lgpl-3.0.txt" target="lgpl_v3">LGPL v3</a> -
<a href="http://www.sonarqube.org" target="sonar">Community</a> -
<a href="http://www.sonarqube.org/documentation" target="sonar_doc">Documentation</a> -
<a href="http://www.sonarqube.org/support" target="support">Get Support</a> -
<a href="http://sonar-plugins.codehaus.org" target="plugins">Plugins</a> -
- <a href="<%= ApplicationController.root_context -%>/api_documentation">API</a>
+ <a href="<%= ApplicationController.root_context -%>/api_documentation">Web Service API</a>
<% unless DatabaseVersion.production? %>
<br><br><span class="error big" id="evaluation_warning">Embedded database should be used for evaluation purpose only</span>
<br><br><span class="error">The embedded database will not scale, it will not support upgrading to newer versions of SonarQube, and there is no support for migrating your data out of it into a different database engine.</span>
diff --git a/sonar-core/src/main/resources/org/sonar/l10n/core.properties b/sonar-core/src/main/resources/org/sonar/l10n/core.properties
index a269b014eab..00a38e8fb16 100644
--- a/sonar-core/src/main/resources/org/sonar/l10n/core.properties
+++ b/sonar-core/src/main/resources/org/sonar/l10n/core.properties
@@ -2059,10 +2059,12 @@ metric.functions.name=Functions
metric.functions.description=Functions
metric.generated_lines.name=Generated Lines
+metric.generated_lines.name.suffix=generated lines
metric.generated_lines.description=Number of generated lines
metric.generated_lines.abbreviation=Gen. Lines
metric.generated_ncloc.name=Generated lines of code
+metric.generated_ncloc.name.suffix=generated lines of code
metric.generated_ncloc.description=Generated non Commenting Lines of Code
metric.generated_ncloc.abbreviation=Gen. LOC
diff --git a/sonar-deprecated/pom.xml b/sonar-deprecated/pom.xml
index a394e6983c3..9a80e797996 100644
--- a/sonar-deprecated/pom.xml
+++ b/sonar-deprecated/pom.xml
@@ -15,6 +15,10 @@
<artifactId>sonar-plugin-api</artifactId>
</dependency>
<dependency>
+ <groupId>jfree</groupId>
+ <artifactId>jfreechart</artifactId>
+ </dependency>
+ <dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-project</artifactId>
</dependency>
@@ -24,6 +28,7 @@
<scope>provided</scope>
</dependency>
+
<!-- unit test -->
<dependency>
<groupId>junit</groupId>
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/charts/AbstractChart.java b/sonar-deprecated/src/main/java/org/sonar/api/charts/AbstractChart.java
index b7e5006ad9d..016ab133322 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/charts/AbstractChart.java
+++ b/sonar-deprecated/src/main/java/org/sonar/api/charts/AbstractChart.java
@@ -30,10 +30,12 @@ import java.awt.Color;
import java.awt.image.BufferedImage;
/**
- * An extension point to generate JFreeChart charts
+ * Base implementation to generate charts with JFreechart
*
* @since 1.10
+ * @deprecated in 4.5.1, replaced by Javascript charts
*/
+@Deprecated
public abstract class AbstractChart implements Chart {
public static final int FONT_SIZE = 13;
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/charts/Chart.java b/sonar-deprecated/src/main/java/org/sonar/api/charts/Chart.java
index ac3080bfe8e..f9404bd835d 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/charts/Chart.java
+++ b/sonar-deprecated/src/main/java/org/sonar/api/charts/Chart.java
@@ -24,10 +24,12 @@ import org.sonar.api.ServerExtension;
import java.awt.image.BufferedImage;
/**
- * An Extension to create charts
+ * Extension point to generate charts
*
* @since 1.10
+ * @deprecated in 4.5.1, replaced by Javascript charts
*/
+@Deprecated
public interface Chart extends ServerExtension {
String getKey();
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/charts/ChartParameters.java b/sonar-deprecated/src/main/java/org/sonar/api/charts/ChartParameters.java
index 1f821aead01..dbd6cc9addc 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/charts/ChartParameters.java
+++ b/sonar-deprecated/src/main/java/org/sonar/api/charts/ChartParameters.java
@@ -33,7 +33,9 @@ import java.util.Map;
/**
* The class to hold parameters to configure a chart
* @since 1.10
+ * @deprecated in 4.5.1, replaced by Javascript charts
*/
+@Deprecated
public class ChartParameters {
private static final String[] EMPTY = new String[0];
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/charts/package-info.java b/sonar-deprecated/src/main/java/org/sonar/api/charts/package-info.java
index 358d4bbef40..e5922bf75f0 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/charts/package-info.java
+++ b/sonar-deprecated/src/main/java/org/sonar/api/charts/package-info.java
@@ -17,6 +17,9 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+/**
+ * Deprecated in 4.5.1. JFreechart charts are replaced by Javascript charts.
+ */
@ParametersAreNonnullByDefault
package org.sonar.api.charts;
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/checks/NoSonarFilter.java b/sonar-deprecated/src/main/java/org/sonar/api/checks/NoSonarFilter.java
index 05c4bd9bfaf..05c4bd9bfaf 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/checks/NoSonarFilter.java
+++ b/sonar-deprecated/src/main/java/org/sonar/api/checks/NoSonarFilter.java
diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/charts/ChartParametersTest.java b/sonar-deprecated/src/test/java/org/sonar/api/charts/ChartParametersTest.java
index 40fbe94c3b5..7ef39e3b730 100644
--- a/sonar-plugin-api/src/test/java/org/sonar/api/charts/ChartParametersTest.java
+++ b/sonar-deprecated/src/test/java/org/sonar/api/charts/ChartParametersTest.java
@@ -19,11 +19,12 @@
*/
package org.sonar.api.charts;
-import static org.junit.Assert.*;
import org.junit.Test;
import java.util.Locale;
+import static org.junit.Assert.*;
+
public class ChartParametersTest {
@Test
public void shouldForbidHighSizeForSecurityReasons() {
diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/checks/NoSonarFilterTest.java b/sonar-deprecated/src/test/java/org/sonar/api/checks/NoSonarFilterTest.java
index 7f4793b77cd..7f4793b77cd 100644
--- a/sonar-plugin-api/src/test/java/org/sonar/api/checks/NoSonarFilterTest.java
+++ b/sonar-deprecated/src/test/java/org/sonar/api/checks/NoSonarFilterTest.java
diff --git a/sonar-plugin-api/pom.xml b/sonar-plugin-api/pom.xml
index 06f98e88d24..9195d9193bf 100644
--- a/sonar-plugin-api/pom.xml
+++ b/sonar-plugin-api/pom.xml
@@ -89,10 +89,6 @@
<artifactId>commons-collections</artifactId>
</dependency>
<dependency>
- <groupId>jfree</groupId>
- <artifactId>jfreechart</artifactId>
- </dependency>
- <dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/BatchComponent.java b/sonar-plugin-api/src/main/java/org/sonar/api/BatchComponent.java
index 4ae6a337048..21c785caa1e 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/BatchComponent.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/BatchComponent.java
@@ -20,8 +20,20 @@
package org.sonar.api;
/**
- * Dependency Injection : all the classes implementing this interface are available in the batch IoC container.
- * Just add a parameter to the constructor of your component.
+ * Marker interface for all the components available in container of batch (code analyzer). Note that
+ * injection of dependencies by constructor is used :
+ * <pre>
+ * public class Foo implements BatchComponent {
+ *
+ * }
+ * public class Bar implements BatchComponent {
+ * private final Foo foo;
+ * public Bar(Foo f) {
+ * this.foo = f;
+ * }
+ * }
+ *
+ * </pre>
*
* @since 2.2
*/
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/BatchExtension.java b/sonar-plugin-api/src/main/java/org/sonar/api/BatchExtension.java
index 6867cdd88b5..95cc1c0f8f7 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/BatchExtension.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/BatchExtension.java
@@ -20,7 +20,8 @@
package org.sonar.api;
/**
- * Batch extension point.
+ * Marker interface for all the batch extension points, which are aimed to be implemented
+ * by plugins.
*
* @since 1.10
*/
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/CoreProperties.java b/sonar-plugin-api/src/main/java/org/sonar/api/CoreProperties.java
index e13f6c3581d..079d77ad2e8 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/CoreProperties.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/CoreProperties.java
@@ -20,8 +20,7 @@
package org.sonar.api;
/**
- * CoreProperties is used to group various properties of Sonar as well
- * as default values of configuration in a single place
+ * Non-exhaustive list of constants of core properties.
*
* @since 1.11
*/
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/Extension.java b/sonar-plugin-api/src/main/java/org/sonar/api/Extension.java
index a0ccc09fddc..1c5c8a52c07 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/Extension.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/Extension.java
@@ -20,7 +20,7 @@
package org.sonar.api;
/**
- * Extension point.
+ * Plugin extension point
*
* @since 1.10
*/
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/Plugin.java b/sonar-plugin-api/src/main/java/org/sonar/api/Plugin.java
index c0c1340b387..ea7bbc755e9 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/Plugin.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/Plugin.java
@@ -22,10 +22,11 @@ package org.sonar.api;
import java.util.List;
/**
- * A plugin is a group of extensions. See <code>org.sonar.api.Extension</code> interface to get all extension points.
+ * A plugin is a group of extensions. See <code>org.sonar.api.Extension</code> interface to browse
+ * available extension points.
* <p/>
* <p>The manifest property <code>Plugin-Class</code> must declare the name of the implementation class.
- * See META-INF/MANIFEST.MF.</p>
+ * It is automatically set by sonar-packaging-maven-plugin when building plugins.</p>
*
* @see org.sonar.api.Extension
* @since 1.10
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/Properties.java b/sonar-plugin-api/src/main/java/org/sonar/api/Properties.java
index 8191edf3319..c41c9f30958 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/Properties.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/Properties.java
@@ -24,6 +24,11 @@ import java.lang.annotation.RetentionPolicy;
/**
* Plugin properties. This annotation is only used on classes implementing org.sonar.api.Plugin.
+ * <p/>
+ * Note that {@link org.sonar.api.config.PropertyDefinition} is an alternative, programmatic and recommended approach
+ * to declare properties.
+ * <p/>
+ * Effective property values are accessible at runtime through the component {@link org.sonar.api.config.Settings}
*
* @since 1.10
*/
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/Property.java b/sonar-plugin-api/src/main/java/org/sonar/api/Property.java
index e9a6fdc50c5..5b0b10964d9 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/Property.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/Property.java
@@ -28,18 +28,11 @@ import java.lang.annotation.Target;
* Property value can be set in different ways :
* <ul>
* <li>System property</li>
- * <li>Maven command-line (-Dfoo=bar)</li>
+ * <li>Batch command-line (-Dfoo=bar in Maven or sonar-runner)</li>
* <li>Maven pom.xml (element <properties>)</li>
* <li>Maven settings.xml</li>
- * <li>Sonar web interface</li>
+ * <li>SonarQube web administration console</li>
* </ul>
- * <p/>
- * Value is accessible in batch extensions via the Configuration object of class <code>org.sonar.api.resources.Project</code>
- * (see method <code>getConfiguration()</code>).
- * <p/>
- * <p><strong>Must be used in <code>org.sonar.api.Plugin</code> classes only.</strong></p>
- * <p></p>
- * It's recommended to use the class {@link org.sonar.api.config.PropertyDefinition} since v3.6.
*
* @since 1.10
*/
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/ServerComponent.java b/sonar-plugin-api/src/main/java/org/sonar/api/ServerComponent.java
index e2f30ed3460..281c3058a7a 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/ServerComponent.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/ServerComponent.java
@@ -20,8 +20,7 @@
package org.sonar.api;
/**
- * Dependency Injection : all the classes implementing this interface are available in the server IoC container.
- * Just add a parameter to the constructor of your component.
+ * Same than {@link org.sonar.api.BatchComponent} but for server-side components.
*
* @since 2.2
*/
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/SonarPlugin.java b/sonar-plugin-api/src/main/java/org/sonar/api/SonarPlugin.java
index 6e029ebcf96..c66422b6467 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/SonarPlugin.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/SonarPlugin.java
@@ -20,7 +20,10 @@
package org.sonar.api;
/**
- * A plugin is a group of extensions. See {@link Extension} interface to get all extension points.
+ * Plugin entry-point used to declare its extensions (see {@link org.sonar.api.Extension}.
+ * <p/>
+ * <p>The JAR manifest must declare the name of the implementation class in the property <code>Plugin-Class</code>.
+ * This property is automatically set by sonar-packaging-maven-plugin when building plugin.</p>
*
* @since 2.8
*/
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/config/internal/Category.java b/sonar-plugin-api/src/main/java/org/sonar/api/config/Category.java
index c8990213204..e4008f2ecea 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/config/internal/Category.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/config/Category.java
@@ -17,7 +17,7 @@
* 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.api.config.internal;
+package org.sonar.api.config;
import org.apache.commons.lang.StringUtils;
@@ -26,29 +26,29 @@ import java.util.Locale;
/**
* @since 3.7
*/
-public class Category {
+class Category {
private final String originalKey;
private final boolean special;
- public Category(String originalKey) {
+ Category(String originalKey) {
this(originalKey, false);
}
- public Category(String originalKey, boolean special) {
+ Category(String originalKey, boolean special) {
this.originalKey = originalKey;
this.special = special;
}
- public String originalKey() {
+ String originalKey() {
return originalKey;
}
- public String key() {
+ String key() {
return StringUtils.lowerCase(originalKey, Locale.ENGLISH);
}
- public boolean isSpecial() {
+ boolean isSpecial() {
return special;
}
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/config/PropertyDefinitions.java b/sonar-plugin-api/src/main/java/org/sonar/api/config/PropertyDefinitions.java
index 00b4af26138..5c20f786866 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/config/PropertyDefinitions.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/config/PropertyDefinitions.java
@@ -24,8 +24,6 @@ import com.google.common.collect.Maps;
import org.apache.commons.lang.StringUtils;
import org.sonar.api.*;
import org.sonar.api.Properties;
-import org.sonar.api.config.internal.Category;
-import org.sonar.api.config.internal.SubCategory;
import org.sonar.api.utils.AnnotationUtils;
import javax.annotation.Nullable;
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/config/Settings.java b/sonar-plugin-api/src/main/java/org/sonar/api/config/Settings.java
index f1832884616..cea246e73a8 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/config/Settings.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/config/Settings.java
@@ -39,8 +39,9 @@ import java.util.Map;
import java.util.Properties;
/**
- * Project Settings on batch side, Global Settings on server side.
- * This component does not access to database, so property changed via setter methods are not persisted.
+ * Project settings on batch side, or global settings on server side. This component does not access to database, so
+ * property changed via setter methods are not persisted.
+ * <p/>
* <p>
* For testing, you can create a new empty {@link Settings} component using {@link #Settings()} and then
* populate it using all variant of {@code setProperty}. <br/>
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/config/internal/SubCategory.java b/sonar-plugin-api/src/main/java/org/sonar/api/config/SubCategory.java
index 8dfbcc16d10..05c96078eca 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/config/internal/SubCategory.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/config/SubCategory.java
@@ -17,19 +17,18 @@
* 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.api.config.internal;
-
+package org.sonar.api.config;
/**
* @since 3.7
*/
-public class SubCategory extends Category {
+class SubCategory extends Category {
- public SubCategory(String originalKey) {
+ SubCategory(String originalKey) {
super(originalKey);
}
- public SubCategory(String originalKey, boolean special) {
+ SubCategory(String originalKey, boolean special) {
super(originalKey, special);
}
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/config/internal/package-info.java b/sonar-plugin-api/src/main/java/org/sonar/api/config/internal/package-info.java
deleted file mode 100644
index 25458dc6179..00000000000
--- a/sonar-plugin-api/src/main/java/org/sonar/api/config/internal/package-info.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * SonarQube, open source software quality management tool.
- * Copyright (C) 2008-2014 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.
- */
-@ParametersAreNonnullByDefault
-package org.sonar.api.config.internal;
-
-import javax.annotation.ParametersAreNonnullByDefault;
diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/config/AesCipherTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/config/AesCipherTest.java
index 7631b6b9b85..b2dccf589b3 100644
--- a/sonar-plugin-api/src/test/java/org/sonar/api/config/AesCipherTest.java
+++ b/sonar-plugin-api/src/test/java/org/sonar/api/config/AesCipherTest.java
@@ -36,7 +36,6 @@ import java.security.Key;
import static org.hamcrest.Matchers.greaterThan;
import static org.hamcrest.Matchers.instanceOf;
import static org.hamcrest.core.Is.is;
-import static org.hamcrest.core.Is.isA;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.fail;
diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/config/internal/CategoryTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/config/CategoryTest.java
index 1c325e5eceb..c6d9f3a733b 100644
--- a/sonar-plugin-api/src/test/java/org/sonar/api/config/internal/CategoryTest.java
+++ b/sonar-plugin-api/src/test/java/org/sonar/api/config/CategoryTest.java
@@ -17,7 +17,7 @@
* 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.api.config.internal;
+package org.sonar.api.config;
import org.junit.Test;
diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/config/PropertyDefinitionsTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/config/PropertyDefinitionsTest.java
index 4a43b55d1a2..333b8e15c3e 100644
--- a/sonar-plugin-api/src/test/java/org/sonar/api/config/PropertyDefinitionsTest.java
+++ b/sonar-plugin-api/src/test/java/org/sonar/api/config/PropertyDefinitionsTest.java
@@ -22,8 +22,6 @@ package org.sonar.api.config;
import org.junit.Test;
import org.sonar.api.Properties;
import org.sonar.api.Property;
-import org.sonar.api.config.internal.Category;
-import org.sonar.api.config.internal.SubCategory;
import org.sonar.api.resources.Qualifiers;
import java.util.Arrays;