Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 144956 Details for
Bug 281787
Bundle image resources exposed under changing context
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Proposed fix
clipboard.txt (text/plain), 11.80 KB, created by
RĂ¼diger Herrmann
on 2009-08-19 09:41:38 EDT
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
RĂ¼diger Herrmann
Created:
2009-08-19 09:41:38 EDT
Size:
11.80 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.rap.rwt.test >Index: src/org/eclipse/rwt/internal/resources/ResourceManagerImpl_Test.java >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/runtime.rwt.test/org.eclipse.rap.rwt.test/src/org/eclipse/rwt/internal/resources/ResourceManagerImpl_Test.java,v >retrieving revision 1.5 >diff -u -r1.5 ResourceManagerImpl_Test.java >--- src/org/eclipse/rwt/internal/resources/ResourceManagerImpl_Test.java 15 Jul 2009 08:45:12 -0000 1.5 >+++ src/org/eclipse/rwt/internal/resources/ResourceManagerImpl_Test.java 19 Aug 2009 13:41:18 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2002, 2008 Innoopract Informationssysteme GmbH. >+ * Copyright (c) 2002, 2009 Innoopract Informationssysteme GmbH. > * 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 >@@ -7,8 +7,8 @@ > * > * Contributors: > * Innoopract Informationssysteme GmbH - initial API and implementation >+ * EclipseSource - ongoing development > ******************************************************************************/ >- > package org.eclipse.rwt.internal.resources; > > import java.io.*; >@@ -50,7 +50,7 @@ > private static final int TEST_PORT = 4711; > private static final String TEST_SERVER = "TestCase"; > private static final String TEST_SERVLET_PATH = "/W4TDelegate"; >- private static final String TEST_REQUEST_URI >+ private static final String TEST_REQUEST_URI > = TEST_CONTEXT + "/W4TDelegate?anyParam=true"; > private static final String TEST_CONTEXT_URL > = "http://" >@@ -84,7 +84,7 @@ > + RequestParams.RESOURCE_VERSION > + "=" > + "1895582734"; >- >+ > ///////// > // fields > private String webAppRoot; >@@ -181,7 +181,7 @@ > } > > public void testRegistrationServletTempDir() throws Exception { >- IResourceManager manager >+ IResourceManager manager > = getManager( ResourceBase.DELIVER_BY_SERVLET_AND_TEMP_DIR ); > clearTempFile(); > // register only existing resources >@@ -451,7 +451,7 @@ > // expected > } > } >- >+ > public void testGetRegisteredContent() throws Exception { > IResourceManager manager = getManager( ResourceBase.DELIVER_FROM_DISK ); > InputStream is = openStream( TEST_RESOURCE_2 ); >@@ -462,7 +462,7 @@ > content.close(); > assertNull( manager.getRegisteredContent( "not-there" ) ); > } >- >+ > /* > * 280582: resource registration fails when using ImageDescriptor.createFromURL > * https://bugs.eclipse.org/bugs/show_bug.cgi?id=280582 >@@ -477,13 +477,13 @@ > manager.register( name, inputStream ); > inputStream.close(); > String location = manager.getLocation( name ); >- assertEquals( "http://TestCase:4711/test/http$1//host$1port/path$$1", >+ assertEquals( "http://TestCase:4711/test/http$1//host$1port/path$$1", > location ); > } > > /////////////////// > // helping methods >- >+ > private static int[] read( final InputStream input ) throws IOException { > int[] result = null; > try { >@@ -518,7 +518,11 @@ > } > > private String getResourceCopyFile( final String resourceName ) { >- return webAppRoot + File.separator + resourceName; >+ return webAppRoot >+ + File.separator >+ + "resources" >+ + File.separator >+ + resourceName; > } > > private String getResourceCopyInTempFile( final String resourceName ) { >@@ -573,15 +577,15 @@ > return null; > } > >- public long getDateHeader( String arg0 ) { >+ public long getDateHeader( final String arg0 ) { > return 0; > } > >- public String getHeader( String arg0 ) { >+ public String getHeader( final String arg0 ) { > return null; > } > >- public Enumeration getHeaders( String arg0 ) { >+ public Enumeration getHeaders( final String arg0 ) { > return null; > } > >@@ -589,7 +593,7 @@ > return null; > } > >- public int getIntHeader( String arg0 ) { >+ public int getIntHeader( final String arg0 ) { > return 0; > } > >@@ -617,7 +621,7 @@ > return null; > } > >- public boolean isUserInRole( String arg0 ) { >+ public boolean isUserInRole( final String arg0 ) { > return false; > } > >@@ -641,7 +645,7 @@ > return TEST_SERVLET_PATH; > } > >- public HttpSession getSession( boolean arg0 ) { >+ public HttpSession getSession( final boolean arg0 ) { > return null; > } > >@@ -665,7 +669,7 @@ > return false; > } > >- public Object getAttribute( String arg0 ) { >+ public Object getAttribute( final String arg0 ) { > return null; > } > >@@ -677,7 +681,7 @@ > return null; > } > >- public void setCharacterEncoding( String arg0 ) >+ public void setCharacterEncoding( final String arg0 ) > throws UnsupportedEncodingException > { > } >@@ -694,7 +698,7 @@ > return null; > } > >- public String getParameter( String arg0 ) { >+ public String getParameter( final String arg0 ) { > return null; > } > >@@ -702,7 +706,7 @@ > return null; > } > >- public String[] getParameterValues( String arg0 ) { >+ public String[] getParameterValues( final String arg0 ) { > return null; > } > >@@ -738,10 +742,10 @@ > return null; > } > >- public void setAttribute( String arg0, Object arg1 ) { >+ public void setAttribute( final String arg0, final Object arg1 ) { > } > >- public void removeAttribute( String arg0 ) { >+ public void removeAttribute( final String arg0 ) { > } > > public Locale getLocale() { >@@ -756,11 +760,11 @@ > return false; > } > >- public RequestDispatcher getRequestDispatcher( String arg0 ) { >+ public RequestDispatcher getRequestDispatcher( final String arg0 ) { > return null; > } > >- public String getRealPath( String arg0 ) { >+ public String getRealPath( final String arg0 ) { > return null; > } > >@@ -782,60 +786,60 @@ > } > private class TestResponse implements HttpServletResponse { > >- public void addCookie( Cookie arg0 ) { >+ public void addCookie( final Cookie arg0 ) { > } > >- public boolean containsHeader( String arg0 ) { >+ public boolean containsHeader( final String arg0 ) { > return false; > } > >- public String encodeURL( String arg0 ) { >+ public String encodeURL( final String arg0 ) { > return arg0; > } > >- public String encodeRedirectURL( String arg0 ) { >+ public String encodeRedirectURL( final String arg0 ) { > return null; > } > >- public String encodeUrl( String arg0 ) { >+ public String encodeUrl( final String arg0 ) { > return arg0; > } > >- public String encodeRedirectUrl( String arg0 ) { >+ public String encodeRedirectUrl( final String arg0 ) { > return null; > } > >- public void sendError( int arg0, String arg1 ) throws IOException { >+ public void sendError( final int arg0, final String arg1 ) throws IOException { > } > >- public void sendError( int arg0 ) throws IOException { >+ public void sendError( final int arg0 ) throws IOException { > } > >- public void sendRedirect( String arg0 ) throws IOException { >+ public void sendRedirect( final String arg0 ) throws IOException { > } > >- public void setDateHeader( String arg0, long arg1 ) { >+ public void setDateHeader( final String arg0, final long arg1 ) { > } > >- public void addDateHeader( String arg0, long arg1 ) { >+ public void addDateHeader( final String arg0, final long arg1 ) { > } > >- public void setHeader( String arg0, String arg1 ) { >+ public void setHeader( final String arg0, final String arg1 ) { > } > >- public void addHeader( String arg0, String arg1 ) { >+ public void addHeader( final String arg0, final String arg1 ) { > } > >- public void setIntHeader( String arg0, int arg1 ) { >+ public void setIntHeader( final String arg0, final int arg1 ) { > } > >- public void addIntHeader( String arg0, int arg1 ) { >+ public void addIntHeader( final String arg0, final int arg1 ) { > } > >- public void setStatus( int arg0 ) { >+ public void setStatus( final int arg0 ) { > } > >- public void setStatus( int arg0, String arg1 ) { >+ public void setStatus( final int arg0, final String arg1 ) { > } > > public String getCharacterEncoding() { >@@ -850,13 +854,13 @@ > return null; > } > >- public void setContentLength( int arg0 ) { >+ public void setContentLength( final int arg0 ) { > } > >- public void setContentType( String arg0 ) { >+ public void setContentType( final String arg0 ) { > } > >- public void setBufferSize( int arg0 ) { >+ public void setBufferSize( final int arg0 ) { > } > > public int getBufferSize() { >@@ -876,7 +880,7 @@ > public void reset() { > } > >- public void setLocale( Locale arg0 ) { >+ public void setLocale( final Locale arg0 ) { > } > > public Locale getLocale() { >@@ -887,7 +891,7 @@ > throw new UnsupportedOperationException(); > } > >- public void setCharacterEncoding( String charset ) { >+ public void setCharacterEncoding( final String charset ) { > throw new UnsupportedOperationException(); > } > } >Index: src/org/eclipse/swt/graphics/Image_Test.java >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/runtime.rwt.test/org.eclipse.rap.rwt.test/src/org/eclipse/swt/graphics/Image_Test.java,v >retrieving revision 1.6 >diff -u -r1.6 Image_Test.java >--- src/org/eclipse/swt/graphics/Image_Test.java 12 Jun 2008 13:23:15 -0000 1.6 >+++ src/org/eclipse/swt/graphics/Image_Test.java 19 Aug 2009 13:41:18 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2002, 2007 Innoopract Informationssysteme GmbH. >+ * Copyright (c) 2002, 2009 Innoopract Informationssysteme GmbH. > * 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 >@@ -7,8 +7,8 @@ > * > * Contributors: > * Innoopract Informationssysteme GmbH - initial API and implementation >+ * EclipseSource - ongoing development > ******************************************************************************/ >- > package org.eclipse.swt.graphics; > > import java.io.*; >@@ -37,8 +37,8 @@ > // assertEquals( 0, Image.size() ); > Image image1 = Graphics.getImage( RWTFixture.IMAGE1 ); > assertTrue( manager.isRegistered( RWTFixture.IMAGE1 ) ); >- String contextPath = Fixture.CONTEXT_DIR.getPath(); >- assertTrue( new File( contextPath + "/" + RWTFixture.IMAGE1 ).exists() ); >+ String contextPath = Fixture.CONTEXT_DIR.getPath() + "/resources/"; >+ assertTrue( new File( contextPath + RWTFixture.IMAGE1 ).exists() ); > // assertEquals( 1, Image.size() ); > Image image2 = Graphics.getImage( RWTFixture.IMAGE1 ); > assertTrue( manager.isRegistered( RWTFixture.IMAGE1 ) ); >#P org.eclipse.rap.rwt >Index: src/org/eclipse/rwt/internal/resources/ResourceManagerImpl.java >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/runtime.rwt/org.eclipse.rap.rwt/src/org/eclipse/rwt/internal/resources/ResourceManagerImpl.java,v >retrieving revision 1.5 >diff -u -r1.5 ResourceManagerImpl.java >--- src/org/eclipse/rwt/internal/resources/ResourceManagerImpl.java 15 Jul 2009 08:45:11 -0000 1.5 >+++ src/org/eclipse/rwt/internal/resources/ResourceManagerImpl.java 19 Aug 2009 13:41:19 -0000 >@@ -504,6 +504,8 @@ > StringBuffer filename = new StringBuffer(); > filename.append( webAppRoot ); > filename.append( File.separator ); >+ filename.append( "resources" ); >+ filename.append( File.separator ); > filename.append( versionedResourceName( escapeFilename( name ), version ) ); > return new File( filename.toString() ); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 281787
:
140325
|
144956
|
145933
|
145938