aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/component/ws/ComponentAppAction.java3
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/platform/ServerComponents.java4
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/startup/GwtPublisher.java135
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/ui/JRubyFacade.java4
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/ui/JRubyI18n.java9
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/ui/ViewProxy.java5
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/component/ws/ComponentAppActionTest.java17
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/startup/GwtPublisherTest.java118
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/ui/JRubyI18nTest.java12
-rw-r--r--server/sonar-server/src/test/resources/org.sonar.server.startup.GwtPublisherTest.module1/one.js0
-rw-r--r--server/sonar-server/src/test/resources/org.sonar.server.startup.GwtPublisherTest.module1/two.css0
-rw-r--r--server/sonar-server/src/test/resources/org.sonar.server.startup.GwtPublisherTest.module2/file.js0
-rw-r--r--server/sonar-web/src/main/less/style.less225
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/controllers/plugins/configuration_controller.rb7
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/controllers/plugins/home_controller.rb7
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/helpers/application_helper.rb24
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/configuration/index.rhtml3
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/drilldown/_header.html.erb12
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/gwt/_base.html.erb32
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/gwt/_resource_viewers.html.erb9
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/gwt/page.html.erb7
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_head.html.erb1
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/resource/_view.html.erb8
-rw-r--r--sonar-core/src/main/java/org/sonar/core/i18n/GwtI18n.java85
-rw-r--r--sonar-core/src/main/resources/org/sonar/l10n/core.properties4
-rw-r--r--sonar-core/src/main/resources/org/sonar/l10n/gwt.properties19
-rw-r--r--sonar-core/src/test/java/org/sonar/core/i18n/GwtI18nTest.java63
-rw-r--r--sonar-core/src/test/java/org/sonar/core/i18n/I18nClassloaderTest.java1
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/i18n/GwtI18nTest/gwt.properties2
-rw-r--r--sonar-deprecated/src/main/java/org/sonar/api/web/GwtExtension.java31
-rw-r--r--sonar-deprecated/src/main/java/org/sonar/api/web/GwtPage.java33
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/web/Footer.java2
-rw-r--r--sonar-plugin-api/src/main/resources/org/sonar/api/web/gwt/Sonar.gwt.xml9
34 files changed, 12 insertions, 880 deletions
diff --git a/.gitignore b/.gitignore
index e84f2450ff3..cd0a13b3150 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,5 @@
# The following should be moved in related sub-directories
server/sonar-web/src/main/webapp/stylesheets/sonar-colorizer.css
-server/sonar-web/src/main/webapp/deploy/gwt
server/sonar-web/src/main/webapp/deploy/plugins
server/sonar-web/src/main/webapp/deploy/bootstrap
server/sonar-web/src/main/webapp/deploy/maven/org
diff --git a/server/sonar-server/src/main/java/org/sonar/server/component/ws/ComponentAppAction.java b/server/sonar-server/src/main/java/org/sonar/server/component/ws/ComponentAppAction.java
index 951f9431ad6..90f075d0546 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/component/ws/ComponentAppAction.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/component/ws/ComponentAppAction.java
@@ -311,8 +311,7 @@ public class ComponentAppAction implements RequestHandler {
Map<String, String> result = newHashMap();
List<String> providedExtensions = newArrayList("tests_viewer", "coverage", "duplications", "issues", "source");
for (ViewProxy<Page> page : extensions) {
- // Gwt components viewer tab can not be displayed
- if (!providedExtensions.contains(page.getId()) && !page.isGwt()) {
+ if (!providedExtensions.contains(page.getId())) {
addExtension(page, result, component, userSession);
}
}
diff --git a/server/sonar-server/src/main/java/org/sonar/server/platform/ServerComponents.java b/server/sonar-server/src/main/java/org/sonar/server/platform/ServerComponents.java
index 2fc25c2f8eb..8192bf32e6b 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/platform/ServerComponents.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/platform/ServerComponents.java
@@ -40,7 +40,6 @@ import org.sonar.core.component.SnapshotPerspectives;
import org.sonar.core.config.CorePropertyDefinitions;
import org.sonar.core.config.Logback;
import org.sonar.core.i18n.DefaultI18n;
-import org.sonar.core.i18n.GwtI18n;
import org.sonar.core.i18n.RuleI18nManager;
import org.sonar.core.issue.IssueFilterSerializer;
import org.sonar.core.issue.IssueNotifications;
@@ -265,7 +264,6 @@ import org.sonar.server.source.ws.SourcesWs;
import org.sonar.server.startup.CleanPreviewAnalysisCache;
import org.sonar.server.startup.CopyRequirementsFromCharacteristicsToRules;
import org.sonar.server.startup.GeneratePluginIndex;
-import org.sonar.server.startup.GwtPublisher;
import org.sonar.server.startup.JdbcDriverDeployer;
import org.sonar.server.startup.LogServerId;
import org.sonar.server.startup.RegisterDashboards;
@@ -427,7 +425,6 @@ class ServerComponents {
JRubyI18n.class,
DefaultI18n.class,
RuleI18nManager.class,
- GwtI18n.class,
Durations.class,
// ws
@@ -751,7 +748,6 @@ class ServerComponents {
/** Index startup Synchronization */
startupContainer.addSingleton(IndexSynchronizer.class);
- startupContainer.addSingleton(GwtPublisher.class);
startupContainer.addSingleton(RegisterMetrics.class);
startupContainer.addSingleton(RegisterQualityGates.class);
startupContainer.addSingleton(RegisterRules.class);
diff --git a/server/sonar-server/src/main/java/org/sonar/server/startup/GwtPublisher.java b/server/sonar-server/src/main/java/org/sonar/server/startup/GwtPublisher.java
deleted file mode 100644
index a69b50a758c..00000000000
--- a/server/sonar-server/src/main/java/org/sonar/server/startup/GwtPublisher.java
+++ /dev/null
@@ -1,135 +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.
- */
-package org.sonar.server.startup;
-
-import com.google.common.annotations.VisibleForTesting;
-import org.apache.commons.io.FileUtils;
-import org.apache.commons.lang.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.sonar.api.config.Settings;
-import org.sonar.api.platform.Server;
-import org.sonar.api.utils.Logs;
-import org.sonar.api.utils.SonarException;
-import org.sonar.api.utils.TimeProfiler;
-import org.sonar.api.utils.ZipUtils;
-import org.sonar.api.web.GwtExtension;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.util.zip.ZipEntry;
-
-public class GwtPublisher {
- private static final Logger LOG = LoggerFactory.getLogger(GwtPublisher.class);
-
- private Server server;
- private GwtExtension[] extensions = null;
- private File outputDir = null;
-
- public GwtPublisher(GwtExtension[] extensions, Settings settings, Server server) {
- this.extensions = extensions;
- this.server = server;
- }
-
- /**
- * Used when no plugin is defining some GwtExtension
- */
- public GwtPublisher(Settings settings, Server server) {
- this(new GwtExtension[]{}, settings, server);
- }
-
- @VisibleForTesting
- GwtPublisher(GwtExtension[] extensions, File outputDir) {
- this.extensions = extensions;
- this.outputDir = outputDir;
- }
-
- GwtPublisher() {
- }
-
- public void start() {
- TimeProfiler profiler = new TimeProfiler().start("Deploy GWT plugins");
- try {
- cleanDirectory();
- this.outputDir = new File(server.getDeployDir(), "gwt");
- LoggerFactory.getLogger(GwtPublisher.class).debug("Deploy {} GWT extensions to {}", extensions.length, outputDir);
- publish();
-
- } catch (Exception e) {
- throw new IllegalStateException("Fail to deploy GWT extensions", e);
- }
- profiler.stop();
- }
-
- protected void cleanDirectory() {
- try {
- if (outputDir != null && outputDir.exists()) {
- File[] files = outputDir.listFiles();
- if (files != null) {
- for (File file : files) {
- // avoid issues with SCM hidden dirs
- if (!file.isHidden()) {
- if (file.isDirectory()) {
- FileUtils.deleteDirectory(file);
- FileUtils.deleteDirectory(file);
- } else {
- file.delete();
- }
- }
- }
- }
- }
-
- } catch (IOException e) {
- LOG.warn("can not clean the directory " + outputDir, e);
- }
- }
-
- protected void publish() throws IOException, URISyntaxException {
- for (final GwtExtension module : extensions) {
- URL sourceDir = module.getClass().getResource("/" + module.getGwtId() + "/");
- if (sourceDir == null) {
- throw new SonarException("Can not find the directory " + module.getGwtId() + " defined by the GWT module " + module.getClass().getName());
- }
- Logs.INFO.info("Deploy {} to {}", module.getGwtId(), outputDir);
- if (sourceDir.toString().startsWith("jar:file")) {
- // unzip the JAR
- String path = StringUtils.substringBetween(sourceDir.toString(), "jar:file:", "!");
- File gwtJar = new File(getCleanPath(path));
- ZipUtils.unzip(gwtJar, outputDir, new ZipUtils.ZipEntryFilter() {
- public boolean accept(ZipEntry entry) {
- return entry.getName().startsWith(module.getGwtId());
- }
- });
- } else {
- // just copy the files
- File source = new File(sourceDir.toURI());
- FileUtils.copyDirectory(source, new File(outputDir, module.getGwtId()));
- }
- }
- }
-
- protected String getCleanPath(String path) throws URISyntaxException {
- return new URI(path).getPath();
- }
-}
diff --git a/server/sonar-server/src/main/java/org/sonar/server/ui/JRubyFacade.java b/server/sonar-server/src/main/java/org/sonar/server/ui/JRubyFacade.java
index 300589c85f4..277d7a13070 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/ui/JRubyFacade.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/ui/JRubyFacade.java
@@ -318,10 +318,6 @@ public final class JRubyFacade {
return getJRubyI18n().message(rubyLocale, key, defaultValue, parameters);
}
- public String getJsL10nDictionnary(String rubyLocale) {
- return getJRubyI18n().getJsDictionnary(rubyLocale);
- }
-
public void indexProjects() {
get(ResourceIndexerDao.class).indexProjects();
}
diff --git a/server/sonar-server/src/main/java/org/sonar/server/ui/JRubyI18n.java b/server/sonar-server/src/main/java/org/sonar/server/ui/JRubyI18n.java
index 65935833d6a..8354c31b419 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/ui/JRubyI18n.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/ui/JRubyI18n.java
@@ -25,7 +25,6 @@ import org.sonar.api.ServerComponent;
import org.sonar.api.i18n.I18n;
import org.sonar.api.utils.Duration;
import org.sonar.api.utils.Durations;
-import org.sonar.core.i18n.GwtI18n;
import org.sonar.server.user.UserSession;
import javax.annotation.Nullable;
@@ -44,12 +43,10 @@ public class JRubyI18n implements ServerComponent {
private I18n i18n;
private Durations durations;
private Map<String, Locale> localesByRubyKey = Maps.newHashMap();
- private GwtI18n gwtI18n;
- public JRubyI18n(I18n i18n, Durations durations, GwtI18n gwtI18n) {
+ public JRubyI18n(I18n i18n, Durations durations) {
this.i18n = i18n;
this.durations = durations;
- this.gwtI18n = gwtI18n;
}
Locale getLocale(String rubyKey) {
@@ -84,10 +81,6 @@ public class JRubyI18n implements ServerComponent {
return StringUtils.defaultString(i18n.message(getLocale(rubyLocale), key, defaultValue, parameters), key);
}
- public String getJsDictionnary(String rubyLocale) {
- return gwtI18n.getJsDictionnary(toLocale(rubyLocale));
- }
-
public String ageFromNow(Date date) {
return i18n.ageFromNow(UserSession.get().locale(), date);
}
diff --git a/server/sonar-server/src/main/java/org/sonar/server/ui/ViewProxy.java b/server/sonar-server/src/main/java/org/sonar/server/ui/ViewProxy.java
index 05decee0963..07e5d9eed7c 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/ui/ViewProxy.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/ui/ViewProxy.java
@@ -29,7 +29,6 @@ import org.apache.commons.lang.builder.ToStringBuilder;
import org.sonar.api.utils.AnnotationUtils;
import org.sonar.api.web.DefaultTab;
import org.sonar.api.web.Description;
-import org.sonar.api.web.GwtPage;
import org.sonar.api.web.NavigationSection;
import org.sonar.api.web.RequiredMeasures;
import org.sonar.api.web.ResourceLanguage;
@@ -281,10 +280,6 @@ public class ViewProxy<V extends View> implements Comparable<ViewProxy> {
return isGlobal;
}
- public boolean isGwt() {
- return view instanceof GwtPage;
- }
-
public WidgetLayoutType getWidgetLayout() {
return widgetLayout;
}
diff --git a/server/sonar-server/src/test/java/org/sonar/server/component/ws/ComponentAppActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/component/ws/ComponentAppActionTest.java
index fd84c991a5a..99b4dcc1012 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/component/ws/ComponentAppActionTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/component/ws/ComponentAppActionTest.java
@@ -36,7 +36,6 @@ import org.sonar.api.rule.RuleKey;
import org.sonar.api.utils.DateUtils;
import org.sonar.api.utils.Duration;
import org.sonar.api.utils.Durations;
-import org.sonar.api.web.GwtPage;
import org.sonar.api.web.NavigationSection;
import org.sonar.api.web.Page;
import org.sonar.api.web.UserRole;
@@ -440,8 +439,8 @@ public class ComponentAppActionTest {
addComponent();
when(views.getPages(anyString(), anyString(), anyString(), anyString(), any(String[].class))).thenReturn(
- // Issues extension and MyGwtExtension will be ignore
- newArrayList(new ViewProxy<Page>(new MyExtension()), new ViewProxy<Page>(new MyGwtExtension()), new ViewProxy<Page>(new IssuesExtension())));
+ // Issues extension will be ignore
+ newArrayList(new ViewProxy<Page>(new MyExtension()), new ViewProxy<Page>(new MyExtension()), new ViewProxy<Page>(new IssuesExtension())));
WsTester.TestRequest request = tester.newGetRequest("api/components", "app").setParam("key", COMPONENT_KEY);
request.execute().assertJson(getClass(), "app_with_extension.json");
@@ -540,18 +539,6 @@ public class ComponentAppActionTest {
}
@NavigationSection(NavigationSection.RESOURCE_TAB)
- private static class MyGwtExtension extends GwtPage {
- public String getTitle() {
- return "My GWT extension";
- }
-
- @Override
- public String getGwtId() {
- return "my-gwt-extension";
- }
- }
-
- @NavigationSection(NavigationSection.RESOURCE_TAB)
private static class IssuesExtension implements Page {
public String getId() {
return "issues";
diff --git a/server/sonar-server/src/test/java/org/sonar/server/startup/GwtPublisherTest.java b/server/sonar-server/src/test/java/org/sonar/server/startup/GwtPublisherTest.java
deleted file mode 100644
index 8e900809fc4..00000000000
--- a/server/sonar-server/src/test/java/org/sonar/server/startup/GwtPublisherTest.java
+++ /dev/null
@@ -1,118 +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.
- */
-package org.sonar.server.startup;
-
-import org.apache.commons.io.FileUtils;
-import org.junit.Before;
-import org.junit.Test;
-import org.sonar.api.utils.SonarException;
-import org.sonar.api.web.GwtExtension;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import java.net.URL;
-
-import static org.hamcrest.Matchers.containsString;
-import static org.hamcrest.core.Is.is;
-import static org.hamcrest.core.IsNot.not;
-import static org.junit.Assert.assertThat;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
-
-public class GwtPublisherTest {
- private File outputDir;
-
- @Before
- public void cleanOutput() throws IOException {
- outputDir = new File("./target/test-tmp/org/sonar/server/startup/GwtPublisherTest/output");
- if (outputDir.exists()) {
- FileUtils.forceDelete(outputDir);
- }
- }
-
- @Test
- public void shouldCopyAllFilesToOutputDir() throws IOException, URISyntaxException {
- GwtExtension module1 = mock(GwtExtension.class);
- when(module1.getGwtId()).thenReturn("org.sonar.server.startup.GwtPublisherTest.module1");
-
- GwtExtension module2 = mock(GwtExtension.class);
- when(module2.getGwtId()).thenReturn("org.sonar.server.startup.GwtPublisherTest.module2");
-
- GwtPublisher publisher = new GwtPublisher(new GwtExtension[]{module1, module2}, outputDir);
- publisher.publish();
-
- assertThat(new File("./target/test-tmp/org/sonar/server/startup/GwtPublisherTest/output/org.sonar.server.startup.GwtPublisherTest.module1/one.js").exists(), is(true));
- assertThat(new File("./target/test-tmp/org/sonar/server/startup/GwtPublisherTest/output/org.sonar.server.startup.GwtPublisherTest.module1/two.css").exists(), is(true));
- assertThat(new File("./target/test-tmp/org/sonar/server/startup/GwtPublisherTest/output/org.sonar.server.startup.GwtPublisherTest.module2/file.js").exists(), is(true));
- }
-
- @Test(expected = SonarException.class)
- public void shouldFailIfGwtSourcesNotFound() throws IOException, URISyntaxException {
- GwtExtension component = mock(GwtExtension.class);
- when(component.getGwtId()).thenReturn("org.sonar.server.startup.GwtPublisherTest.unknownmodule");
-
- GwtPublisher publisher = new GwtPublisher(new GwtExtension[]{component}, outputDir);
- publisher.publish();
- }
-
- @Test
- public void shouldCleanTheOutputDirOnStop() throws IOException {
- File dir = new File("./target/test-tmp/org/sonar/server/startup/GwtPublisherTest/shouldCleanTheOutputDirOnStop");
- if (!dir.exists()) {
- FileUtils.forceMkdir(dir);
- }
- File file = new File(dir, "test.txt");
- FileUtils.writeStringToFile(file, "test");
- File testDir = new File(dir, "testDir");
- testDir.mkdir();
- File testDirFile = new File(testDir, "test.txt");
- FileUtils.writeStringToFile(testDirFile, "test");
-
- File scm = new File(dir, ".svn");
- scm.mkdir();
-
- assertThat(file.exists(), is(true));
- assertThat(testDir.exists(), is(true));
- assertThat(testDirFile.exists(), is(true));
- assertThat(scm.exists(), is(true));
-
- GwtPublisher publisher = new GwtPublisher(null, dir);
- publisher.cleanDirectory();
- assertThat(dir.exists(), is(true));
- assertThat(FileUtils.listFiles(dir, null, true).size(), is(0));
- scm = new File(dir, ".svn");
- // won't be hidden under windows and test will fail, no hidden setter on file unfortunatly
- if (scm.isHidden()) {
- assertThat(scm.exists(), is(true));
- }
- }
-
- @Test
- public void shouldGetPathWithValidCharacterEvenIfSpaceInPath() throws Exception {
- GwtPublisher publisher = new GwtPublisher();
- String path = "/org/sonar/server/startup/GwtPublisherTest/path with space/archive.jar";
- URL sourceDir = getClass().getResource(path);
-
- String result = publisher.getCleanPath(sourceDir.toString());
- assertThat(result, not(containsString("%20")));
- assertThat(result, containsString(" "));
- }
-}
diff --git a/server/sonar-server/src/test/java/org/sonar/server/ui/JRubyI18nTest.java b/server/sonar-server/src/test/java/org/sonar/server/ui/JRubyI18nTest.java
index f2e56ccbe12..f2b5921159e 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/ui/JRubyI18nTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/ui/JRubyI18nTest.java
@@ -27,7 +27,6 @@ import org.mockito.runners.MockitoJUnitRunner;
import org.sonar.api.i18n.I18n;
import org.sonar.api.utils.Duration;
import org.sonar.api.utils.Durations;
-import org.sonar.core.i18n.GwtI18n;
import java.util.Date;
import java.util.Locale;
@@ -44,9 +43,6 @@ public class JRubyI18nTest {
I18n i18n;
@Mock
- GwtI18n gwtI18n;
-
- @Mock
Durations durations;
JRubyI18n jRubyI18n;
@@ -54,7 +50,7 @@ public class JRubyI18nTest {
@Before
public void setUp() throws Exception {
- jRubyI18n = new JRubyI18n(i18n, durations, gwtI18n);
+ jRubyI18n = new JRubyI18n(i18n, durations);
}
@Test
@@ -85,12 +81,6 @@ public class JRubyI18nTest {
}
@Test
- public void get_js_dictionnary() throws Exception {
- jRubyI18n.getJsDictionnary("en");
- verify(gwtI18n).getJsDictionnary(any(Locale.class));
- }
-
- @Test
public void age_from_now() throws Exception {
Date date = new Date();
jRubyI18n.ageFromNow(new Date());
diff --git a/server/sonar-server/src/test/resources/org.sonar.server.startup.GwtPublisherTest.module1/one.js b/server/sonar-server/src/test/resources/org.sonar.server.startup.GwtPublisherTest.module1/one.js
deleted file mode 100644
index e69de29bb2d..00000000000
--- a/server/sonar-server/src/test/resources/org.sonar.server.startup.GwtPublisherTest.module1/one.js
+++ /dev/null
diff --git a/server/sonar-server/src/test/resources/org.sonar.server.startup.GwtPublisherTest.module1/two.css b/server/sonar-server/src/test/resources/org.sonar.server.startup.GwtPublisherTest.module1/two.css
deleted file mode 100644
index e69de29bb2d..00000000000
--- a/server/sonar-server/src/test/resources/org.sonar.server.startup.GwtPublisherTest.module1/two.css
+++ /dev/null
diff --git a/server/sonar-server/src/test/resources/org.sonar.server.startup.GwtPublisherTest.module2/file.js b/server/sonar-server/src/test/resources/org.sonar.server.startup.GwtPublisherTest.module2/file.js
deleted file mode 100644
index e69de29bb2d..00000000000
--- a/server/sonar-server/src/test/resources/org.sonar.server.startup.GwtPublisherTest.module2/file.js
+++ /dev/null
diff --git a/server/sonar-web/src/main/less/style.less b/server/sonar-web/src/main/less/style.less
index a3d782891e2..994b25358dd 100644
--- a/server/sonar-web/src/main/less/style.less
+++ b/server/sonar-web/src/main/less/style.less
@@ -1287,177 +1287,6 @@ div.autocompleteNote {
padding: 1px 10px;
}
-#gwtpage {
- width: 100%;
-}
-
-.gwt-SourcePanel {
- font-size: 12px;
- background-color: #fff;
- border-top: 1px solid silver;
- border-bottom: 1px solid silver;
- width: 100%;
-}
-
-.gwt-SourcePanel .ln {
- background-color: #EFEFEF;
- white-space: nowrap;
- text-align: right;
- font-size: 85%;
- color: #AAAAAA;
- border-right: 1px solid #DDD;
- padding: 0 3px;
- height: 14px;
-}
-
-.gwt-SourcePanel .src {
- padding: 0 5px;
- height: 14px;
-}
-
-.gwt-SourcePanel .val {
- background-color: #EFEFEF;
- border-right: 1px solid #DDD;
- text-align: right;
- color: #777;
- padding: 0 3px;
- height: 14px;
- white-space: nowrap;
-}
-
-.gwt-SourcePanel .red {
- background-color: #F0C8C8;
-}
-
-.gwt-SourcePanel .orange {
- background-color: #FFF6BF;
- color: #514721;
-}
-
-.gwt-SourcePanel .green {
- background-color: #ACE97C;
-}
-
-.gwt-SourcePanel .msg {
- font-family: sans-serif;
- vertical-align: top;
- padding: 3px 0;
- height: 1.3em;
- background-position: 5px 1px;
- background-repeat: no-repeat;
-}
-
-.gwt-SourcePanel .bigln {
- font-family: sans-serif;
- vertical-align: top;
- padding: 3px 0;
- height: 1.6em;
- background-position: 5px 1px;
- background-repeat: no-repeat;
- background-color: #EFEFEF;
-}
-
-.gwt-SourcePanel .warn {
- font-family: sans-serif;
- vertical-align: top;
- background-color: #FFFFC9;
- border: 1px solid #DCDCDC;
- border-top: none;
- color: black;
- line-height: 1.6em;
- margin: 0;
- padding: 0 0 2px 5px;
-}
-
-.gwt-SourcePanel .msg.error {
- background-image: url("../images/exclamation.png");
-}
-
-.gwt-SourcePanel .msg.warning {
- background-image: url("../images/warning.png");
-}
-
-.gwt-SourcePanel .msg.BLOCKER {
- padding: 1px 5px 1px 25px;
- background-image: url("../images/priority/BLOCKER.gif");
- background-color: #FF5252;
- color: #eee;
- border: 1px solid red;
- margin: 1px 0 1px 5px;
- height: 100%;
-}
-
-.gwt-SourcePanel .msg.CRITICAL {
- padding: 1px 5px 1px 25px;
- background-image: url("../images/priority/CRITICAL.gif");
- background-color: #FF5252;
- color: #eee;
- border: 1px solid red;
- margin: 1px 0 1px 5px;
- height: 100%;
-}
-
-.gwt-SourcePanel .msg.MAJOR {
- padding: 1px 5px 1px 25px;
- background-image: url("../images/priority/MAJOR.gif");
- background-color: #FF5252;
- color: #eee;
- border: 1px solid red;
- margin: 1px 0 1px 5px;
- height: 100%;
-}
-
-.gwt-SourcePanel .msg.MINOR {
- padding: 1px 5px 1px 25px;
- background-image: url("../images/priority/MINOR.gif");
- background-color: #FFF6BF;
- border: 1px solid #FFD324;
- margin: 1px 0 1px 5px;
- height: 100%;
-}
-
-.gwt-SourcePanel .msg.INFO {
- padding: 1px 5px 1px 25px;
- background-image: url("../images/priority/INFO.gif");
- background-color: #FFF6BF;
- border: 1px solid #FFD324;
- margin: 1px 0 1px 5px;
- height: 100%;
-}
-
-.gwt-ViewerHeader {
- background-color: #EFEFEF;
- border: 1px solid #DDD;
- border-top: none;
- margin-bottom: 8px;
- color: #333;
- vertical-align: bottom;
-}
-
-.gwt-ViewerHeader .metric {
- padding: 8px 2px 5px 10px;
- font-size: 93%;
- text-align: right;
- font-weight: bold;
-}
-
-.gwt-ViewerHeader .value {
- padding: 8px 15px 5px 2px;
- font-size: 93%;
- text-align: left;
- font-weight: normal;
-}
-
-.gwt-ViewerHeader .cell {
- padding: 3px 10px;
-}
-
-.gwt-ViewerHeader .big {
- padding: 4px 10px 2px 10px;
- font-size: 152%;
- font-weight: bold;
-}
-
/* ------------------- DASHBOARD ------------------- */
.page_title {
margin: 0 0 7px 0;
@@ -1888,52 +1717,6 @@ ul.bullet li {
font-weight: bold;
}
-.gwt-TabBar {
- font-size: 93%;
- width: 100%;
- border-bottom: 1px solid #cdcdcd;
-}
-
-.gwt-TabBarFirst {
- width: 0;
-}
-
-.gwt-TabBar .gwt-TabBarItem {
- cursor: pointer;
- font-weight: normal;
- text-decoration: underline;
- color: #555;
- background-color: #EFEFEF;
- vertical-align: middle;
- white-space: nowrap;
- padding: 0.3em 0.6em;
- border: 1px solid #cdcdcd;
- border-bottom: none;
- border-radius: 4px 4px 0 0;
- -moz-border-radius: 4px 4px 0 0;
- -webkit-border-radius: 4px 4px 0 0;
-}
-
-.gwt-TabBar .gwt-TabBarItem-wrapper {
- padding: 0 0 0 1px;
-}
-
-.gwt-TabBar .gwt-TabBarItem-selected {
- cursor: default;
- font-weight: bold;
- text-decoration: underline;
- color: #efefef;
- background-color: #4B9FD5;
- border-bottom: none;
- vertical-align: middle;
- white-space: nowrap;
- padding: 0.3em 0.6em;
-}
-
-.gwt-TabPanelBottom {
- width: 100%;
-}
-
.markdown-tips {
font-size: @smallFontSize;
color: @secondFontColor;
@@ -2089,7 +1872,7 @@ a.nolink {
.link-no-underline;
}
-h1 strong, .dashbox .title, .gwt-SourcePanel .sources .msg li strong {
+h1 strong, .dashbox .title {
font-weight: bold;
}
@@ -2105,7 +1888,7 @@ h4 a, h4 a:visited, .gray {
border-bottom: 1px solid #ddd;
}
-table.data, table.spaced, .gwt-SourcePanel .sources {
+table.data, table.spaced {
width: 100%;
}
@@ -2121,10 +1904,6 @@ table.without-header {
color: #fff;
}
-.gwt-SourcePanel .sources td {
- vertical-align: top;
-}
-
/* GENERIC STYLES */
.line-block {
display: block;
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/plugins/configuration_controller.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/plugins/configuration_controller.rb
index caa8c4a6063..6aac815459b 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/plugins/configuration_controller.rb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/plugins/configuration_controller.rb
@@ -37,12 +37,7 @@ class Plugins::ConfigurationController < ApplicationController
if authorized
@page=@page_proxy.getTarget()
- if @page_proxy.isGwt()
- @gwt_id = @page.getGwtId()
- render :template => 'gwt/page'
- else
- render :template => 'plugins/rails_page'
- end
+ render :template => 'plugins/rails_page'
else
access_denied
end
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/plugins/home_controller.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/plugins/home_controller.rb
index 2284a7e2b72..7e843227a91 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/plugins/home_controller.rb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/plugins/home_controller.rb
@@ -37,12 +37,7 @@ class Plugins::HomeController < ApplicationController
if authorized
@page=@page_proxy.getTarget()
- if @page_proxy.isGwt()
- @gwt_id = @page.getGwtId()
- render :template => 'gwt/page'
- else
- render :template => 'plugins/rails_page'
- end
+ render :template => 'plugins/rails_page'
else
access_denied
end
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 5624de3a9ce..d3989111e74 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
@@ -168,30 +168,6 @@ module ApplicationHelper
end
end
- def url_for_gwt(page)
- "#{ApplicationController.root_context}/plugins/home/#{page}"
- end
-
- # URL to GWT page for a given resource.
- #
- # === Optional parameters
- #
- # * <tt>:resource</tt> - id or key of the selected resource. Default value is the current resource.
- #
- # === Examples
- #
- # url_for_resource_gwt('org.sonar.tests:reference/org.sonar.plugins.core.hotspots.GwtHotspots')
- # url_for_resource_gwt('org.sonar.tests:reference/org.sonar.plugins.core.hotspots.GwtHotspots', :resource => 'org.apache.struts:struts-parent')
- def url_for_resource_gwt(page, options={})
- if options[:resource]
- "#{ApplicationController.root_context}/plugins/resource/#{options[:resource]}?page=#{page}"
- elsif @resource
- "#{ApplicationController.root_context}/plugins/resource/#{@resource.id}?page=#{page}"
- else
- ''
- end
- end
-
# URL to measures drilldown page for a given metric.
#
# === Optional parameters
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/configuration/index.rhtml b/server/sonar-web/src/main/webapp/WEB-INF/app/views/configuration/index.rhtml
index 025793bcac9..53999f10bd6 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/configuration/index.rhtml
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/configuration/index.rhtml
@@ -1,5 +1,4 @@
<div id='loading'><%= image_tag 'loading.gif' %> loading</div>
<div id="error" class="hidden">error</div>
<div id="main"></div>
-<%= javascript_include_tag "gwt/#{@view}/#{@view}.nocache.js?#{sonar_version}" %>
-<div id="sonarUrl" class="hidden"><%= url_for(:controller => '/', :action => '', :only_path => false, :trailing_slash => false)[0...-2] -%></div> \ No newline at end of file
+<div id="sonarUrl" class="hidden"><%= url_for(:controller => '/', :action => '', :only_path => false, :trailing_slash => false)[0...-2] -%></div>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/drilldown/_header.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/drilldown/_header.html.erb
index 7049f5f5469..b55315f8778 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/drilldown/_header.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/drilldown/_header.html.erb
@@ -1,6 +1,3 @@
-<%= render :partial => 'gwt/base', :locals => {:resource => nil, :popup => false, :metric => (@metric ? @metric.key : nil)} -%>
-<%= render :partial => 'gwt/resource_viewers' -%>
-
<script type="text/javascript">
/* display resource */
function d(resourceId, is_file) {
@@ -20,13 +17,4 @@
window.location.reload();
}
}
-
- function loadGWT(gwtId, resourceId, resourceKey, resourceName, resourceScope, resourceQualifier, resourceLanguage) {
- config["resource"] = [
- {"id":resourceId, "key":resourceKey, "name":resourceName, "scope":resourceScope, "qualifier":resourceQualifier,
- "lang":resourceLanguage}
- ];
- config["resource_key"] = resourceId;
- modules[gwtId]();
- }
</script>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/gwt/_base.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/gwt/_base.html.erb
deleted file mode 100644
index 14b862a081c..00000000000
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/gwt/_base.html.erb
+++ /dev/null
@@ -1,32 +0,0 @@
-<script type="text/javascript">
- var config = {
- "sonar_url":baseUrl,
- "version":"<%= sonar_version -%>",
- "popup":"<%= popup -%>"
- <% if metric %>, "metric":"<%= metric -%>"
- <% end %>
-
- <%
- if resource
- %>, "resource_key":"<%= resource.id -%>",
- "resource":[
- {"id": <%= resource.id -%>, "key":"<%= resource.key -%>", "scope":"<%= resource.scope -%>", "qualifier":"<%= resource.qualifier -%>", "name":"<%= resource.name -%>", "lang":"<%= resource.language -%>"}
- ]
- <% end %>
- };
-
- var rp = {
- <%
- index=0
- params.each do |key,value|
- %>
- <%= ',' if index>0 -%>"<%= h(key) -%>":"<%= h(value) -%>"
- <%
- index+=1
- end
- %>
- };
-
- var modules = new Object();
- <%= Java::OrgSonarServerUi::JRubyFacade.getInstance().getJsL10nDictionnary(I18n.locale) -%>
-</script> \ No newline at end of file
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/gwt/_resource_viewers.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/gwt/_resource_viewers.html.erb
deleted file mode 100644
index f382653f6b3..00000000000
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/gwt/_resource_viewers.html.erb
+++ /dev/null
@@ -1,9 +0,0 @@
-<%
- controller.java_facade.getResourceTabs().each do |tab|
- if tab.isGwt()
-%>
- <script src="<%= ApplicationController.root_context -%>/deploy/gwt/<%= tab.getId() -%>/<%= tab.getId() -%>.nocache.js"></script>
- <%
- end
- end
- %>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/gwt/page.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/gwt/page.html.erb
deleted file mode 100644
index f1cf389a57c..00000000000
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/gwt/page.html.erb
+++ /dev/null
@@ -1,7 +0,0 @@
-<%= render :partial => 'gwt/base', :locals => {:resource => @project, :popup => false, :metric => nil} %>
-<div id="gwtpage"> </div>
-
-<!-- for SmartGWT -->
-<script> var isomorphicDir = "<%= "#{ApplicationController.root_context}/deploy/gwt/#{@gwt_id}" -%>/sc/";</script>
-
-<script type="text/javascript" src="<%= "#{ApplicationController.root_context}/deploy/gwt/#{@gwt_id}/#{@gwt_id}.nocache.js?#{sonar_version}" -%>"></script> \ No newline at end of file
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_head.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_head.html.erb
index d32c00b4ef8..65212efea1c 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_head.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_head.html.erb
@@ -4,7 +4,6 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="gwt:property" content="locale=<%= I18n.locale.to_s.gsub(/-/, '_') -%>">
<link rel="shortcut icon" type="image/x-icon" href="<%= image_path('favicon.ico') -%>">
<%
if @page_title
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/resource/_view.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/resource/_view.html.erb
index 1e6e4762245..33f134f19a2 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/resource/_view.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/resource/_view.html.erb
@@ -3,13 +3,7 @@
<%= render :partial => 'tabs' -%>
</div>
<div class="accordion-item-body">
- <% if @extension.isGwt() %>
- <div id="gwtpage"> </div>
- <script>
- loadGWT('<%= @extension.getId() -%>', <%= @resource.id -%>,'<%= escape_javascript(@resource.key) -%>', '<%= escape_javascript(@resource.name) -%>',
- '<%= @resource.scope -%>', '<%= @resource.qualifier -%>', '<%= escape_javascript(@resource.language) -%>');
- </script>
- <% elsif @extension.getTarget() # ruby on rails page %>
+ <% if @extension.getTarget() # ruby on rails page %>
<%= render :inline => @extension.getTarget().getTemplate() -%>
<% end %>
</div>
diff --git a/sonar-core/src/main/java/org/sonar/core/i18n/GwtI18n.java b/sonar-core/src/main/java/org/sonar/core/i18n/GwtI18n.java
deleted file mode 100644
index d5cf7fd9635..00000000000
--- a/sonar-core/src/main/java/org/sonar/core/i18n/GwtI18n.java
+++ /dev/null
@@ -1,85 +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.
- */
-package org.sonar.core.i18n;
-
-import com.google.common.collect.Lists;
-import org.apache.commons.lang.StringEscapeUtils;
-import org.sonar.api.ServerComponent;
-
-import java.util.*;
-
-public class GwtI18n implements ServerComponent {
- public static final String GWT_BUNDLE = DefaultI18n.BUNDLE_PACKAGE + "gwt";
-
- private DefaultI18n manager;
- private String[] propertyKeys;
-
- public GwtI18n(DefaultI18n manager) {
- this.manager = manager;
- }
-
- public void start() {
- doStart(getBundle(Locale.ENGLISH));
- }
-
- void doStart(ResourceBundle englishBundle) {
- List<String> keys = Lists.newArrayList();
- Enumeration<String> enumeration = englishBundle.getKeys();
- while (enumeration.hasMoreElements()) {
- String propertyKey = enumeration.nextElement();
- keys.add(propertyKey);
- }
- propertyKeys = keys.toArray(new String[keys.size()]);
- }
-
- String[] getPropertyKeys() {
- return propertyKeys;
- }
-
- /**
- * Used by the JRuby on Rails application
- */
- public String getJsDictionnary(Locale locale) {
- ResourceBundle bundle = getBundle(locale);
- return getJsDictionnary(bundle);
- }
-
- String getJsDictionnary(ResourceBundle bundle) {
- StringBuilder js = new StringBuilder("var l10n = {");
- for (int index = 0; index < propertyKeys.length; index++) {
- String key = propertyKeys[index];
- String value = StringEscapeUtils.escapeJavaScript(bundle.getString(key));
- if (index > 0) {
- js.append(",");
- }
- js.append("\"").append(key).append("\": \"").append(value).append("\"");
- }
- js.append("};");
- return js.toString();
- }
-
- ResourceBundle getBundle(Locale locale) {
- try {
- return ResourceBundle.getBundle(GWT_BUNDLE, locale, manager.getBundleClassLoader());
- } catch (MissingResourceException e) {
- throw new IllegalStateException("The English bundle for GWT extensions is not deployed", e);
- }
- }
-}
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 bc649128268..b0477cfdc24 100644
--- a/sonar-core/src/main/resources/org/sonar/l10n/core.properties
+++ b/sonar-core/src/main/resources/org/sonar/l10n/core.properties
@@ -521,10 +521,6 @@ comparison.page=Compare
design.page=Design
libraries.page=Libraries
-# GWT pages
-org.sonar.plugins.design.ui.page.DesignPage.page=Design
-org.sonar.plugins.design.ui.libraries.LibrariesPage.page=Libraries
-
#------------------------------------------------------------------------------
#
diff --git a/sonar-core/src/main/resources/org/sonar/l10n/gwt.properties b/sonar-core/src/main/resources/org/sonar/l10n/gwt.properties
deleted file mode 100644
index aaa12a5fa72..00000000000
--- a/sonar-core/src/main/resources/org/sonar/l10n/gwt.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-noData=No data
-newWindow=New window
-
-# Design page (DSM)
-design.help=Help
-design.legend.dependencies=Dependency
-design.legend.cycles=Suspect dependency (cycle)
-design.legend.uses=- uses >
-design.cellTooltip=Click to highlight, double-click to display more details
-design.rowTooltip=Click to highlight, double-click to zoom
-
-
-# Libraries page
-libs.filter=Filter:
-libs.displayTests=Display test libraries
-libs.expand=Expand all
-libs.collapse=Collapse all
-libs.noLibraries=No libraries
-libs.usageLink=Usages
diff --git a/sonar-core/src/test/java/org/sonar/core/i18n/GwtI18nTest.java b/sonar-core/src/test/java/org/sonar/core/i18n/GwtI18nTest.java
deleted file mode 100644
index 954e9f8c95c..00000000000
--- a/sonar-core/src/test/java/org/sonar/core/i18n/GwtI18nTest.java
+++ /dev/null
@@ -1,63 +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.
- */
-package org.sonar.core.i18n;
-
-import com.google.common.collect.Lists;
-import org.hamcrest.core.Is;
-import org.junit.Before;
-import org.junit.Test;
-
-import java.util.Locale;
-import java.util.ResourceBundle;
-
-import static org.hamcrest.Matchers.not;
-import static org.hamcrest.Matchers.containsString;
-import static org.junit.Assert.assertThat;
-import static org.junit.matchers.JUnitMatchers.hasItems;
-import static org.mockito.Mockito.mock;
-
-public class GwtI18nTest {
-
- private GwtI18n i18n;
- private ResourceBundle bundle;
-
- @Before
- public void init() {
- bundle = ResourceBundle.getBundle("org.sonar.core.i18n.GwtI18nTest.gwt", Locale.ENGLISH);
- i18n = new GwtI18n(mock(DefaultI18n.class));
- i18n.doStart(bundle);
- }
-
- @Test
- public void list_all_property_keys_at_startup() {
- assertThat(i18n.getPropertyKeys().length, Is.is(2));
- assertThat(Lists.newArrayList(i18n.getPropertyKeys()), hasItems("one", "two"));
- }
-
- @Test
- public void encode_javascript_values() {
- String js = i18n.getJsDictionnary(bundle);
- assertThat(js, containsString("var l10n = {"));
- assertThat(js, containsString("one\": \"One"));
- assertThat(js, containsString("two\": \"Two"));
- assertThat(js, containsString("};"));
- assertThat(js, not(containsString(",};"))); // IE does not support empty key-values
- }
-}
diff --git a/sonar-core/src/test/java/org/sonar/core/i18n/I18nClassloaderTest.java b/sonar-core/src/test/java/org/sonar/core/i18n/I18nClassloaderTest.java
index 00a6b3e0372..b7ffe6eb2cc 100644
--- a/sonar-core/src/test/java/org/sonar/core/i18n/I18nClassloaderTest.java
+++ b/sonar-core/src/test/java/org/sonar/core/i18n/I18nClassloaderTest.java
@@ -55,7 +55,6 @@ public class I18nClassloaderTest {
@Test
public void contain_its_own_classloader() {
assertThat(i18nClassloader.getResource("org/sonar/l10n/core.properties")).isNotNull();
- assertThat(i18nClassloader.getResource("org/sonar/l10n/gwt.properties")).isNotNull();
}
@Test
diff --git a/sonar-core/src/test/resources/org/sonar/core/i18n/GwtI18nTest/gwt.properties b/sonar-core/src/test/resources/org/sonar/core/i18n/GwtI18nTest/gwt.properties
deleted file mode 100644
index da5fa91137a..00000000000
--- a/sonar-core/src/test/resources/org/sonar/core/i18n/GwtI18nTest/gwt.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-one=One
-two=Two \ No newline at end of file
diff --git a/sonar-deprecated/src/main/java/org/sonar/api/web/GwtExtension.java b/sonar-deprecated/src/main/java/org/sonar/api/web/GwtExtension.java
deleted file mode 100644
index 1d50831f4fc..00000000000
--- a/sonar-deprecated/src/main/java/org/sonar/api/web/GwtExtension.java
+++ /dev/null
@@ -1,31 +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.
- */
-package org.sonar.api.web;
-
-import org.sonar.api.ServerExtension;
-
-/**
- * @since 1.10
- * @deprecated in 3.7. Replaced by Ruby on Rails extensions
- */
-@Deprecated
-public interface GwtExtension extends ServerExtension {
- String getGwtId();
-}
diff --git a/sonar-deprecated/src/main/java/org/sonar/api/web/GwtPage.java b/sonar-deprecated/src/main/java/org/sonar/api/web/GwtPage.java
deleted file mode 100644
index e3f69cb41ee..00000000000
--- a/sonar-deprecated/src/main/java/org/sonar/api/web/GwtPage.java
+++ /dev/null
@@ -1,33 +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.
- */
-package org.sonar.api.web;
-
-/**
- * @since 1.11
- * @deprecated in 3.7. Replaced by Ruby on Rails pages.
- */
-@Deprecated
-public abstract class GwtPage implements Page, GwtExtension {
-
- public final String getId() {
- return getGwtId();
- }
-
-}
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/Footer.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/Footer.java
index 167e217f3b7..4dbbdade375 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/web/Footer.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/Footer.java
@@ -27,7 +27,7 @@ import org.sonar.api.ServerExtension;
public interface Footer extends ServerExtension {
/**
- * Static HTML (no Ruby on Rails nor GWT)
+ * Static HTML (no Ruby on Rails)
*/
String getHtml();
}
diff --git a/sonar-plugin-api/src/main/resources/org/sonar/api/web/gwt/Sonar.gwt.xml b/sonar-plugin-api/src/main/resources/org/sonar/api/web/gwt/Sonar.gwt.xml
deleted file mode 100644
index 8353b9407ac..00000000000
--- a/sonar-plugin-api/src/main/resources/org/sonar/api/web/gwt/Sonar.gwt.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<module>
-
- <inherits name='com.google.gwt.user.User'/>
- <inherits name="com.google.gwt.json.JSON"/>
- <inherits name="com.google.gwt.http.HTTP"/>
- <inherits name="com.google.gwt.i18n.I18N"/>
- <inherits name='com.google.gwt.gen2.table.Table'/>
-
-</module>