Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 170213
Collapse All | Expand All

(-)src/org/eclipse/pde/internal/ui/launcher/LaunchConfigurationHelper.java (-1 / +4 lines)
Lines 66-72 Link Here
66
	}
66
	}
67
	
67
	
68
	public static File getConfigurationLocation(ILaunchConfiguration config) {
68
	public static File getConfigurationLocation(ILaunchConfiguration config) {
69
		File dir = new File(PDECore.getDefault().getStateLocation().toOSString(), config.getName());
69
		//bug 170213 change config location if config name contains #
70
		String configName = config.getName();
71
		configName = configName.replace('#', 'h');
72
		File dir = new File(PDECore.getDefault().getStateLocation().toOSString(), configName);
70
		try {
73
		try {
71
			if (!config.getAttribute(IPDELauncherConstants.CONFIG_USE_DEFAULT_AREA, true)) {
74
			if (!config.getAttribute(IPDELauncherConstants.CONFIG_USE_DEFAULT_AREA, true)) {
72
				String userPath = config.getAttribute(IPDELauncherConstants.CONFIG_LOCATION, (String)null);
75
				String userPath = config.getAttribute(IPDELauncherConstants.CONFIG_LOCATION, (String)null);
(-)src/org/eclipse/pde/internal/ui/launcher/LaunchConfigurationListener.java (-4 / +2 lines)
Lines 15-21 Link Here
15
import org.eclipse.debug.core.DebugPlugin;
15
import org.eclipse.debug.core.DebugPlugin;
16
import org.eclipse.debug.core.ILaunchConfiguration;
16
import org.eclipse.debug.core.ILaunchConfiguration;
17
import org.eclipse.debug.core.ILaunchConfigurationListener;
17
import org.eclipse.debug.core.ILaunchConfigurationListener;
18
import org.eclipse.pde.internal.core.PDECore;
19
import org.eclipse.pde.internal.core.util.CoreUtility;
18
import org.eclipse.pde.internal.core.util.CoreUtility;
20
19
21
20
Lines 37-50 Link Here
37
	 * @see org.eclipse.debug.core.ILaunchConfigurationListener#launchConfigurationRemoved(org.eclipse.debug.core.ILaunchConfiguration)
36
	 * @see org.eclipse.debug.core.ILaunchConfigurationListener#launchConfigurationRemoved(org.eclipse.debug.core.ILaunchConfiguration)
38
	 */
37
	 */
39
	public void launchConfigurationRemoved(ILaunchConfiguration configuration) {
38
	public void launchConfigurationRemoved(ILaunchConfiguration configuration) {
40
		File metadataLocation = new File(PDECore.getDefault().getStateLocation().toOSString());
39
		File configDir = LaunchConfigurationHelper.getConfigurationLocation(configuration);
41
		File configDir = new File(metadataLocation, configuration.getName());
42
		if (configDir.exists()) {
40
		if (configDir.exists()) {
43
			// rename the config area if it was auto-set by PDE when the launch configuration is renamed
41
			// rename the config area if it was auto-set by PDE when the launch configuration is renamed
44
			ILaunchConfiguration destination = DebugPlugin.getDefault().getLaunchManager().getMovedTo(configuration);
42
			ILaunchConfiguration destination = DebugPlugin.getDefault().getLaunchManager().getMovedTo(configuration);
45
			boolean delete = true;
43
			boolean delete = true;
46
			if (destination != null) {
44
			if (destination != null) {
47
				delete = !configDir.renameTo(new File(metadataLocation, destination.getName()));
45
				delete = !configDir.renameTo(LaunchConfigurationHelper.getConfigurationLocation(destination));
48
			}
46
			}
49
			if (delete)
47
			if (delete)
50
				CoreUtility.deleteContent(configDir);
48
				CoreUtility.deleteContent(configDir);

Return to bug 170213