Conflicts: plugins/sonar-xoo-plugin/pom.xml sonar-plugin-api/pom.xml sonar-plugin-api/src/main/java/org/sonar/api/config/Settings.javatags/5.0-RC1
@@ -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 %> |
@@ -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 %> |
@@ -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; |
@@ -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; |
@@ -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; |
@@ -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; |
@@ -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> |
@@ -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 | |||
@@ -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> |
@@ -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); | |||
} | |||
}); |
@@ -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); |
@@ -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 |
@@ -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> |
@@ -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 | |||
@@ -14,6 +14,10 @@ | |||
<groupId>${project.groupId}</groupId> | |||
<artifactId>sonar-plugin-api</artifactId> | |||
</dependency> | |||
<dependency> | |||
<groupId>jfree</groupId> | |||
<artifactId>jfreechart</artifactId> | |||
</dependency> | |||
<dependency> | |||
<groupId>org.apache.maven</groupId> | |||
<artifactId>maven-project</artifactId> | |||
@@ -24,6 +28,7 @@ | |||
<scope>provided</scope> | |||
</dependency> | |||
<!-- unit test --> | |||
<dependency> | |||
<groupId>junit</groupId> |
@@ -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; |
@@ -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(); | |||
@@ -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]; | |||
@@ -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; | |||
@@ -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() { |
@@ -88,10 +88,6 @@ | |||
<groupId>commons-collections</groupId> | |||
<artifactId>commons-collections</artifactId> | |||
</dependency> | |||
<dependency> | |||
<groupId>jfree</groupId> | |||
<artifactId>jfreechart</artifactId> | |||
</dependency> | |||
<dependency> | |||
<groupId>org.slf4j</groupId> | |||
<artifactId>slf4j-api</artifactId> |
@@ -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 | |||
*/ |
@@ -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 | |||
*/ |
@@ -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 | |||
*/ |
@@ -20,7 +20,7 @@ | |||
package org.sonar.api; | |||
/** | |||
* Extension point. | |||
* Plugin extension point | |||
* | |||
* @since 1.10 | |||
*/ |
@@ -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 |
@@ -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 | |||
*/ |
@@ -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 | |||
*/ |
@@ -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 | |||
*/ |
@@ -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 | |||
*/ |
@@ -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; | |||
} | |||
@@ -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; |
@@ -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/> |
@@ -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); | |||
} | |||
@@ -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; |
@@ -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; | |||
@@ -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; | |||
@@ -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; |