diff options
author | Jean-Baptiste Vilain <jean-baptiste.vilain@sonarsource.com> | 2013-04-11 18:26:42 +0200 |
---|---|---|
committer | Jean-Baptiste Vilain <jean-baptiste.vilain@sonarsource.com> | 2013-04-11 18:26:42 +0200 |
commit | 779eb8f0c2ea746d1310e7c8ae4b9db66ff6ac07 (patch) | |
tree | 56b2d43e1d9f395e119eaed9430e822fc8ce63db /sonar-ws-client/src | |
parent | 86033bd3c9ba856afdd42aaf06948169205a4522 (diff) | |
download | sonarqube-779eb8f0c2ea746d1310e7c8ae4b9db66ff6ac07.tar.gz sonarqube-779eb8f0c2ea746d1310e7c8ae4b9db66ff6ac07.zip |
SONAR-4255 Dropped syntax highlighting support in source viewer WS
Diffstat (limited to 'sonar-ws-client/src')
-rw-r--r-- | sonar-ws-client/src/main/java/org/sonar/wsclient/services/SourceQuery.java | 17 | ||||
-rw-r--r-- | sonar-ws-client/src/test/java/org/sonar/wsclient/services/SourceQueryTest.java | 11 |
2 files changed, 2 insertions, 26 deletions
diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/SourceQuery.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/SourceQuery.java index eac8e842bcc..a7db8f4876d 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/SourceQuery.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/SourceQuery.java @@ -25,7 +25,6 @@ public class SourceQuery extends Query<Source> { private String resourceKeyOrId; private int from = 0; private int to = 0; - private boolean highlightedSyntax = false; public SourceQuery(String resourceKeyOrId) { this.resourceKeyOrId = resourceKeyOrId; @@ -66,15 +65,6 @@ public class SourceQuery extends Query<Source> { return to; } - public boolean isHighlightedSyntax() { - return highlightedSyntax; - } - - public SourceQuery setHighlightedSyntax(boolean b) { - this.highlightedSyntax = b; - return this; - } - @Override public String getUrl() { StringBuilder url = new StringBuilder(BASE_URL); @@ -83,9 +73,6 @@ public class SourceQuery extends Query<Source> { if (from > 0 && to > 0) { url.append("from=").append(from).append("&to=").append(to).append("&"); } - if (highlightedSyntax) { - url.append("color=true&"); - } return url.toString(); } @@ -97,8 +84,4 @@ public class SourceQuery extends Query<Source> { public static SourceQuery create(String resourceKeyOrId) { return new SourceQuery(resourceKeyOrId); } - - public static SourceQuery createWithHighlightedSyntax(String resourceKeyOrId) { - return new SourceQuery(resourceKeyOrId).setHighlightedSyntax(true); - } } diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/SourceQueryTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/SourceQueryTest.java index 3ad9dd84130..35385de5ba1 100644 --- a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/SourceQueryTest.java +++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/SourceQueryTest.java @@ -19,11 +19,11 @@ */ package org.sonar.wsclient.services; +import org.junit.Test; + import static org.hamcrest.core.Is.is; import static org.junit.Assert.assertThat; -import org.junit.Test; - public class SourceQueryTest extends QueryTestCase { @Test @@ -33,13 +33,6 @@ public class SourceQueryTest extends QueryTestCase { } @Test - public void createWithHighlightedSyntax() { - assertThat(SourceQuery.createWithHighlightedSyntax("myproject:org.foo.Bar").getUrl(), - is("/api/sources?resource=myproject%3Aorg.foo.Bar&color=true&")); - assertThat(SourceQuery.createWithHighlightedSyntax("myproject:org.foo.Bar").getModelClass().getName(), is(Source.class.getName())); - } - - @Test public void getOnlyAFewLines() { assertThat(SourceQuery.create("myproject:org.foo.Bar").setFromLineToLine(10, 30).getUrl(), is("/api/sources?resource=myproject%3Aorg.foo.Bar&from=10&to=30&")); |