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 212782 Details for
Bug 371722
[Tooling] RWT Launcher does not work anymore
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 patch
launch.rwt.patch (text/plain), 25.60 KB, created by
Ivan Furnadjiev
on 2012-03-16 08:30:43 EDT
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Ivan Furnadjiev
Created:
2012-03-16 08:30:43 EDT
Size:
25.60 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.rap.ui.launch.rwt >Index: .settings/org.eclipse.jdt.ui.prefs >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/tooling/org.eclipse.rap.ui.launch.rwt/.settings/org.eclipse.jdt.ui.prefs,v >retrieving revision 1.1 >diff -u -r1.1 org.eclipse.jdt.ui.prefs >--- .settings/org.eclipse.jdt.ui.prefs 6 Apr 2011 13:57:11 -0000 1.1 >+++ .settings/org.eclipse.jdt.ui.prefs 16 Mar 2012 11:09:27 -0000 >@@ -1,4 +1,3 @@ >-#Tue Feb 01 17:40:25 CET 2011 > cleanup.add_default_serial_version_id=true > cleanup.add_generated_serial_version_id=false > cleanup.add_missing_annotations=false >@@ -55,4 +54,4 @@ > org.eclipse.jdt.ui.javadoc=false > org.eclipse.jdt.ui.ondemandthreshold=3 > org.eclipse.jdt.ui.staticondemandthreshold=99 >-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment"/><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment"/><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment"/><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\r\n * \r\n */</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n * @author ${user} */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment"/><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment"/><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment"/><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\r\n * ${tags}\r\n * ${see_to_target}\r\n */</template><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">/*******************************************************************************\r\n * Copyright (c) ${year} R\u00FCdiger Herrmann and others. All rights reserved.\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http\://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors\:\r\n * R\u00FCdiger Herrmann - initial API and implementation\r\n ******************************************************************************/\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\r\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\r\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\r\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\r\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates> >+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment"/><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment"/><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment"/><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\r\n * \r\n */</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n * @author ${user} */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment"/><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment"/><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment"/><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\r\n * ${tags}\r\n * ${see_to_target}\r\n */</template><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">/*******************************************************************************\r\n * Copyright (c) ${year} EclipseSource and others.\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http\://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors\:\r\n * EclipseSource - initial API and implementation\r\n ******************************************************************************/\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\r\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\r\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\r\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\r\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates> >Index: META-INF/MANIFEST.MF >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/tooling/org.eclipse.rap.ui.launch.rwt/META-INF/MANIFEST.MF,v >retrieving revision 1.3 >diff -u -r1.3 MANIFEST.MF >--- META-INF/MANIFEST.MF 12 Dec 2011 13:26:00 -0000 1.3 >+++ META-INF/MANIFEST.MF 16 Mar 2012 11:09:27 -0000 >@@ -21,7 +21,9 @@ > org.eclipse.jetty.security;bundle-version="[8.1.0,9.0.0)", > org.eclipse.jetty.server;bundle-version="[8.1.0,9.0.0)", > org.eclipse.jetty.servlet;bundle-version="[8.1.0,9.0.0)", >- org.eclipse.jetty.util;bundle-version="[8.1.0,9.0.0)" >+ org.eclipse.jetty.util;bundle-version="[8.1.0,9.0.0)", >+ org.eclipse.jetty.webapp;bundle-version="[8.1.0,9.0.0)", >+ org.eclipse.jetty.xml;bundle-version="[8.1.0,9.0.0)" > Bundle-ActivationPolicy: lazy > Bundle-RequiredExecutionEnvironment: J2SE-1.5 > Bundle-Localization: OSGI-INF/l10n/bundle >Index: src/org/eclipse/rap/ui/internal/launch/rwt/delegate/RWTLaunchDelegate.java >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/tooling/org.eclipse.rap.ui.launch.rwt/src/org/eclipse/rap/ui/internal/launch/rwt/delegate/RWTLaunchDelegate.java,v >retrieving revision 1.2 >diff -u -r1.2 RWTLaunchDelegate.java >--- src/org/eclipse/rap/ui/internal/launch/rwt/delegate/RWTLaunchDelegate.java 24 Oct 2011 13:46:35 -0000 1.2 >+++ src/org/eclipse/rap/ui/internal/launch/rwt/delegate/RWTLaunchDelegate.java 16 Mar 2012 11:09:27 -0000 >@@ -1,12 +1,13 @@ > /******************************************************************************* >- * Copyright (c) 2011 Rüdiger Herrmann and others. All rights reserved. >+ * Copyright (c) 2011, 2012 Rüdiger Herrmann 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 > * http://www.eclipse.org/legal/epl-v10.html > * > * Contributors: >- * Rüdiger Herrmann - initial API and implementation >+ * Rüdiger Herrmann - initial API and implementation >+ * EclipseSource - ongoing development > ******************************************************************************/ > package org.eclipse.rap.ui.internal.launch.rwt.delegate; > >@@ -23,7 +24,7 @@ > > > public class RWTLaunchDelegate extends JavaLaunchDelegate { >- >+ > private RWTLaunch launch; > > public void launch( ILaunchConfiguration configuration, >@@ -54,24 +55,32 @@ > } > > public String getMainTypeName( ILaunchConfiguration configuration ) { >- return "org.mortbay.jetty.Main"; //$NON-NLS-1$ >+ return "org.eclipse.rap.ui.internal.launch.rwt.jetty.JettyLauncher"; //$NON-NLS-1$ > } >- >+ > public String[] getClasspath( ILaunchConfiguration configuration ) throws CoreException { > String[] result = super.getClasspath( configuration ); >- result = StringArrays.append( result, BundleFileLocator.locate( "org.mortbay.jetty.server" ) ); //$NON-NLS-1$ >- result = StringArrays.append( result, BundleFileLocator.locate( "org.mortbay.jetty.util" ) ); //$NON-NLS-1$ >+ result = StringArrays.append( result, BundleFileLocator.locate( "org.eclipse.rap.ui.launch.rwt" ) ); //$NON-NLS-1$ >+ result = StringArrays.append( result, BundleFileLocator.locate( "org.eclipse.jetty.continuation" ) ); //$NON-NLS-1$ >+ result = StringArrays.append( result, BundleFileLocator.locate( "org.eclipse.jetty.http" ) ); //$NON-NLS-1$ >+ result = StringArrays.append( result, BundleFileLocator.locate( "org.eclipse.jetty.io" ) ); //$NON-NLS-1$ >+ result = StringArrays.append( result, BundleFileLocator.locate( "org.eclipse.jetty.security" ) ); //$NON-NLS-1$ >+ result = StringArrays.append( result, BundleFileLocator.locate( "org.eclipse.jetty.server" ) ); //$NON-NLS-1$ >+ result = StringArrays.append( result, BundleFileLocator.locate( "org.eclipse.jetty.servlet" ) ); //$NON-NLS-1$ >+ result = StringArrays.append( result, BundleFileLocator.locate( "org.eclipse.jetty.util" ) ); //$NON-NLS-1$ >+ result = StringArrays.append( result, BundleFileLocator.locate( "org.eclipse.jetty.webapp" ) ); //$NON-NLS-1$ >+ result = StringArrays.append( result, BundleFileLocator.locate( "org.eclipse.jetty.xml" ) ); //$NON-NLS-1$ > result = StringArrays.append( result, BundleFileLocator.locate( "javax.servlet" ) ); //$NON-NLS-1$ > return result; > } >- >+ > public String getProgramArguments( ILaunchConfiguration configuration ) { > // don't call super, program arguments are not configurable via the UI > String port = String.valueOf( launch.getPort() ); > String webAppDirectory = launch.getWebAppPath().getAbsolutePath(); >- return MessageFormat.format( "{0} -webapp \"{1}\"", new Object[] { port, webAppDirectory } ); //$NON-NLS-1$ >+ return MessageFormat.format( "{0} \"{1}\"", new Object[] { port, webAppDirectory } ); //$NON-NLS-1$ > } >- >+ > public String getVMArguments( ILaunchConfiguration configuration ) throws CoreException { > String result = super.getVMArguments( configuration ); > result += " -Djetty.home="; //$NON-NLS-1$ >@@ -80,7 +89,7 @@ > result += "\""; //$NON-NLS-1$ > return result; > } >- >+ > void initializeLaunch( ILaunch genericLaunch ) { > launch = new RWTLaunch( genericLaunch ); > launch.setPort( determinePort() ); >Index: src/org/eclipse/rap/ui/internal/launch/rwt/jetty/JettyLauncher.java >=================================================================== >RCS file: src/org/eclipse/rap/ui/internal/launch/rwt/jetty/JettyLauncher.java >diff -N src/org/eclipse/rap/ui/internal/launch/rwt/jetty/JettyLauncher.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/rap/ui/internal/launch/rwt/jetty/JettyLauncher.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,44 @@ >+/******************************************************************************* >+ * Copyright (c) 2012 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 >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * EclipseSource - initial API and implementation >+ ******************************************************************************/ >+package org.eclipse.rap.ui.internal.launch.rwt.jetty; >+ >+import org.eclipse.jetty.server.Connector; >+import org.eclipse.jetty.server.Server; >+import org.eclipse.jetty.server.bio.SocketConnector; >+import org.eclipse.jetty.server.handler.ContextHandlerCollection; >+import org.eclipse.jetty.util.URIUtil; >+import org.eclipse.jetty.util.log.Log; >+import org.eclipse.jetty.webapp.WebAppContext; >+ >+ >+public class JettyLauncher { >+ >+ public static void main( String[] args ) { >+ try { >+ Server server = new Server(); >+ ContextHandlerCollection contexts = new ContextHandlerCollection(); >+ server.setHandler( contexts ); >+ SocketConnector connector = new SocketConnector(); >+ connector.setPort( Integer.parseInt( args[ 0 ] ) ); >+ server.setConnectors( new Connector[]{ connector } ); >+ >+ WebAppContext webapp = new WebAppContext(); >+ webapp.setWar( args[ 1 ] ); >+ webapp.setContextPath( URIUtil.SLASH ); >+ contexts.addHandler(webapp); >+ >+ server.start(); >+ server.join(); >+ } catch( Exception exception ) { >+ Log.getLogger( JettyLauncher.class.getName() ).warn( Log.EXCEPTION, exception ); >+ } >+ } >+} >#P org.eclipse.rap.ui.launch.rwt.test >Index: src/org/eclipse/rap/ui/internal/launch/rwt/delegate/RWTLaunchDelegate_Test.java >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/tooling/org.eclipse.rap.ui.launch.rwt.test/src/org/eclipse/rap/ui/internal/launch/rwt/delegate/RWTLaunchDelegate_Test.java,v >retrieving revision 1.2 >diff -u -r1.2 RWTLaunchDelegate_Test.java >--- src/org/eclipse/rap/ui/internal/launch/rwt/delegate/RWTLaunchDelegate_Test.java 1 Jun 2011 11:22:19 -0000 1.2 >+++ src/org/eclipse/rap/ui/internal/launch/rwt/delegate/RWTLaunchDelegate_Test.java 16 Mar 2012 11:09:29 -0000 >@@ -1,12 +1,13 @@ > /******************************************************************************* >- * Copyright (c) 2011 Rüdiger Herrmann and others. All rights reserved. >+ * Copyright (c) 2011, 2012 Rüdiger Herrmann 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 > * http://www.eclipse.org/legal/epl-v10.html > * > * Contributors: >- * Rüdiger Herrmann - initial API and implementation >+ * Rüdiger Herrmann - initial API and implementation >+ * EclipseSource - ongoing development > ******************************************************************************/ > package org.eclipse.rap.ui.internal.launch.rwt.delegate; > >@@ -27,7 +28,7 @@ > > > public class RWTLaunchDelegate_Test extends TestCase { >- >+ > private ILaunchConfigurationWorkingCopy launchConfig; > private RWTLaunchConfig rwtLaunchConfig; > private RWTLaunchDelegate launchDelegate; >@@ -35,17 +36,27 @@ > public void testGetProgramArguments() { > String programArgs = "programArgument"; > setProgramArguments( programArgs ); >- >+ > String returnedProgramArgs = launchDelegate.getProgramArguments( launchConfig ); >- >+ > assertTrue( returnedProgramArgs.indexOf( "programArgument" ) == -1 ); > } >- >+ >+ @SuppressWarnings("unchecked") > public void testGetMainTypeName() { > String mainTypeName = launchDelegate.getMainTypeName( launchConfig ); >- assertEquals( "org.mortbay.jetty.Main", mainTypeName ); >+ ClassLoader loader = RWTLaunchDelegate.class.getClassLoader(); >+ try { >+ Class jettyLauncher = loader.loadClass( mainTypeName ); >+ jettyLauncher.getDeclaredMethod( "main", String[].class ); >+ } catch( ClassNotFoundException exception ) { >+ fail( "Unable to load Jetty launcher class: " + mainTypeName ); >+ } catch( NoSuchMethodException exception ) { >+ fail( "Unable to find main method in Jetty launcher class: " + mainTypeName ); >+ } catch( SecurityException shouldNotHappen ) { >+ } > } >- >+ > public void testGetVMArguments() throws CoreException { > String vmArguments = launchDelegate.getVMArguments( launchConfig ); > assertTrue( vmArguments.indexOf( "-Djetty.home=" ) >= 0 ); >@@ -54,45 +65,45 @@ > public void testGetVMArgumentsWithUserDefinedArgument() throws CoreException { > String vmArgument = "-Dfoo=bar"; > setVMArgument( vmArgument ); >- >+ > String vmArguments = launchDelegate.getVMArguments( launchConfig ); >- >+ > assertTrue( vmArguments.indexOf( vmArgument ) >= 0 ); > } >- >+ > public void testGetJavaProject() throws CoreException { > TestProject testProject = new TestProject(); > IJavaProject javaProject = testProject.getJavaProject(); > rwtLaunchConfig.setProjectName( javaProject.getElementName() ); >- >+ > IJavaProject returnedJavaProject = launchDelegate.getJavaProject( launchConfig ); >- >+ > assertEquals( javaProject, returnedJavaProject ); > } >- >+ > public void testGetClasspath() throws CoreException { > String[] classpath = launchDelegate.getClasspath( launchConfig ); >- assertEquals( 3, classpath.length ); >+ assertEquals( 11, classpath.length ); > } >- >+ > public void testDeterminePortWhenManualPortConfigured() { > int configuredPort = 1234; > rwtLaunchConfig.setUseManualPort( true ); > rwtLaunchConfig.setPort( configuredPort ); >- >+ > int port = launchDelegate.determinePort(); >- >- assertEquals( configuredPort, port ); >+ >+ assertEquals( configuredPort, port ); > } > > public void testDeterminePortWhenAutomaticPortConfigured() throws IOException { > rwtLaunchConfig.setUseManualPort( false ); >- >+ > int port = launchDelegate.determinePort(); >- >+ > assertTrue( isPortFree( port ) ); > } >- >+ > protected void setUp() throws Exception { > launchConfig = Fixture.createRWTLaunchConfig(); > rwtLaunchConfig = new RWTLaunchConfig( launchConfig ); >@@ -109,7 +120,7 @@ > String attrVmArgs = IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS; > launchConfig.setAttribute( attrVmArgs, vmArgument ); > } >- >+ > private void setProgramArguments( String value ) { > String attrProgramArgs = IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS; > launchConfig.setAttribute( attrProgramArgs, value ); >Index: src/org/eclipse/rap/ui/internal/launch/rwt/util/BundleFileLocator_Test.java >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/tooling/org.eclipse.rap.ui.launch.rwt.test/src/org/eclipse/rap/ui/internal/launch/rwt/util/BundleFileLocator_Test.java,v >retrieving revision 1.1 >diff -u -r1.1 BundleFileLocator_Test.java >--- src/org/eclipse/rap/ui/internal/launch/rwt/util/BundleFileLocator_Test.java 6 Apr 2011 13:57:05 -0000 1.1 >+++ src/org/eclipse/rap/ui/internal/launch/rwt/util/BundleFileLocator_Test.java 16 Mar 2012 11:09:29 -0000 >@@ -1,12 +1,13 @@ > /******************************************************************************* >- * Copyright (c) 2011 Rüdiger Herrmann and others. All rights reserved. >+ * Copyright (c) 2011, 2012 Rüdiger Herrmann 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 > * http://www.eclipse.org/legal/epl-v10.html > * > * Contributors: >- * Rüdiger Herrmann - initial API and implementation >+ * Rüdiger Herrmann - initial API and implementation >+ * EclipseSource - ongoing development > ******************************************************************************/ > package org.eclipse.rap.ui.internal.launch.rwt.util; > >@@ -18,11 +19,11 @@ > > > public class BundleFileLocator_Test extends TestCase { >- >+ > public void testLocateWithExistingBundle() { >- String bundleName = "org.mortbay.jetty.server"; >+ String bundleName = "org.eclipse.jetty.server"; > String location = BundleFileLocator.locate( bundleName ); >- >+ > assertNotNull( location ); > File file = new File( location ); > assertTrue( file.exists() ); >@@ -31,7 +32,7 @@ > > public void testLocateWithNonExistingBundle() { > String location = BundleFileLocator.locate( "does.not.exist" ); >- >+ > assertNull( location ); > } > }
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 371722
:
212716
| 212782