Bug 128158 ResourceException is thrown out when launching Java Debugger
steps to reproduce: - launch Java Debugger - select Available Project, i.e. Java project and Report project - click on Debug expected behavior: - an runtime workbench is started actual behavior: - it only worked for the 1st time, for the 2nd time onwards, the following exceptions were thrown out, org.eclipse.core.internal.resources.ResourceException: Resource /accptest already exists. at org.eclipse.core.internal.resources.Resource.checkDoesNotExist(Resource.java:299) at org.eclipse.core.internal.resources.Resource.checkDoesNotExist(Resource.java:272) at org.eclipse.core.internal.resources.Project.create(Project.java:252) at org.eclipse.birt.report.debug.internal.ui.launcher.util.DebugUtil.importProject(DebugUtil.java:57) at org.eclipse.birt.report.debug.internal.ui.launcher.DebugStartupClass.earlyStartup(DebugStartupClass.java:63) at org.eclipse.ui.internal.EarlyStartupRunnable.runEarlyStartup(EarlyStartupRunnable.java:86) at org.eclipse.ui.internal.EarlyStartupRunnable.run(EarlyStartupRunnable.java:66) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at org.eclipse.core.runtime.Platform.run(Platform.java:785) at org.eclipse.ui.internal.Workbench$18.run(Workbench.java:1614) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58) org.eclipse.core.internal.resources.ResourceException: Resource /javascripting already exists. at org.eclipse.core.internal.resources.Resource.checkDoesNotExist(Resource.java:299) at org.eclipse.core.internal.resources.Resource.checkDoesNotExist(Resource.java:272) at org.eclipse.core.internal.resources.Project.create(Project.java:252) at org.eclipse.birt.report.debug.internal.ui.launcher.util.DebugUtil.importProject(DebugUtil.java:57) at org.eclipse.birt.report.debug.internal.ui.launcher.DebugStartupClass.earlyStartup(DebugStartupClass.java:63) at org.eclipse.ui.internal.EarlyStartupRunnable.runEarlyStartup(EarlyStartupRunnable.java:86) at org.eclipse.ui.internal.EarlyStartupRunnable.run(EarlyStartupRunnable.java:66) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at org.eclipse.core.runtime.Platform.run(Platform.java:785) at org.eclipse.ui.internal.Workbench$18.run(Workbench.java:1614) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)
UI/org.eclipse.birt.report.debug.ui/src/org/eclipse/birt/report/debug/internal/ui/launcher/DebugStartupClass.java
WorkspaceClassPathFinder finder = new WorkspaceClassPathFinder( );
		
		WorkspaceClasspathManager.registerClassPathFinder( finder );
		
		String projectClassPaths = finder.getClassPath( );
		
		if ( projectClassPaths == null )
		{
			projectClassPaths = ""; 
		}
		System.setProperty( WORKSPACE_CLASSPATH_KEY, projectClassPaths );
		String value = System.getProperty( "user.projectname" ); 
		if ( value == null || value.length( ) == 0 )
		{
			return;
		}
		StringTokenizer token = new StringTokenizer( value, ";" ); 
		while ( token.hasMoreTokens( ) )
		{
			String str = token.nextToken( );
			try
			{
				DebugUtil.importProject( str );
			} catch ( Exception e1 )
			{
				e1.printStackTrace( );
			}
		}
	}
}