Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Furnadjiev2017-04-10 11:23:52 +0000
committerIvan Furnadjiev2017-04-10 11:23:52 +0000
commitbcc7fb4e6aff077e308e27c1f138349760e06a79 (patch)
treeb3a6b5e391edab62ab3589f493e7ca1af2faeb61
parent7291e3e363abfca494e264682ae056de95fc723f (diff)
downloadorg.eclipse.rap-bcc7fb4e6aff077e308e27c1f138349760e06a79.tar.gz
org.eclipse.rap-bcc7fb4e6aff077e308e27c1f138349760e06a79.tar.xz
org.eclipse.rap-bcc7fb4e6aff077e308e27c1f138349760e06a79.zip
Add SWT version to resources.js path
Now the workbench JS resource file is registered at: "rwt-resources/<swt version>/resources.js" similar to "rap-client.js". The SWT version is obtained by SWT.getVersion(). 503150: Version resource.js file to prevent caching issues https://bugs.eclipse.org/bugs/show_bug.cgi?id=503150 Change-Id: I17c728ad72980ad8b6658fb1eee2e8170d82136a
-rw-r--r--bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/rap/ui/internal/servlet/ResourceRegisterer.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/rap/ui/internal/servlet/ResourceRegisterer.java b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/rap/ui/internal/servlet/ResourceRegisterer.java
index 92bbab5d5d..c88483b3a1 100644
--- a/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/rap/ui/internal/servlet/ResourceRegisterer.java
+++ b/bundles/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/rap/ui/internal/servlet/ResourceRegisterer.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2012 EclipseSource and others.
+ * Copyright (c) 2012, 2017 EclipseSource and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -19,6 +19,7 @@ import org.eclipse.rap.rwt.internal.application.ApplicationImpl;
import org.eclipse.rap.rwt.internal.resources.ContentBuffer;
import org.eclipse.rap.rwt.service.ResourceLoader;
import org.eclipse.rap.ui.resources.IResource;
+import org.eclipse.swt.SWT;
class ResourceRegisterer {
@@ -65,12 +66,13 @@ class ResourceRegisterer {
}
private void registerConcatenatedScript() {
- application.addResource( "resources.js", new ResourceLoader() {
+ application.addResource( SWT.getVersion() + "/resources.js", new ResourceLoader() {
+ @Override
public InputStream getResourceAsStream( String resourceName ) {
return concatenatedScript.getContentAsStream();
}
} );
- applicationContext.getStartupPage().addJsLibrary( "rwt-resources/resources.js" );
+ applicationContext.getStartupPage().addJsLibrary( "rwt-resources/" + SWT.getVersion() + "/resources.js" );
}
private static class WorkbenchResourceLoader implements ResourceLoader {
@@ -81,6 +83,7 @@ class ResourceRegisterer {
this.resource = resource;
}
+ @Override
public InputStream getResourceAsStream( String resourceName ) {
return resource.getLoader().getResourceAsStream( resource.getLocation() );
}

Back to the top