diff options
author | Mike Rennie | 2013-04-02 17:33:10 +0000 |
---|---|---|
committer | Mike Rennie | 2013-04-02 17:33:10 +0000 |
commit | ea106a0637026d8f1ea946efe04f3687fb96109e (patch) | |
tree | 9b010bd121ab01c030bafbff1702acce8ba291f7 /org.eclipse.debug.core | |
parent | 6ccab5a548647c64ae02fa6140841177c473fef9 (diff) | |
download | eclipse.platform.debug-ea106a0637026d8f1ea946efe04f3687fb96109e.tar.gz eclipse.platform.debug-ea106a0637026d8f1ea946efe04f3687fb96109e.tar.xz eclipse.platform.debug-ea106a0637026d8f1ea946efe04f3687fb96109e.zip |
Bug 395441 - An IAE exception from WorkspaceRoot breaks launch history
toolbar menu
Diffstat (limited to 'org.eclipse.debug.core')
-rw-r--r-- | org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfiguration.java | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfiguration.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfiguration.java index 7970718ab..9b6f73d1a 100644 --- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfiguration.java +++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfiguration.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2011 IBM Corporation and others. + * Copyright (c) 2000, 2013 IBM Corporation 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 @@ -526,20 +526,22 @@ public class LaunchConfiguration extends PlatformObject implements ILaunchConfig IPath path = Path.fromPortableString(pathStr); IResource res = null; switch (type) { - case IResource.FILE: - res = root.getFile(path); - break; - case IResource.PROJECT: - res = root.getProject(pathStr); - break; - case IResource.FOLDER: - res = root.getFolder(path); - break; - case IResource.ROOT: - res = root; - break; - default: - throw new CoreException(newStatus(DebugCoreMessages.LaunchConfiguration_0, DebugPlugin.ERROR, null)); + case IResource.FILE: + res = root.getFile(path); + break; + case IResource.PROJECT: + if(Path.ROOT.isValidSegment(pathStr)) { + res = root.getProject(pathStr); + } + break; + case IResource.FOLDER: + res = root.getFolder(path); + break; + case IResource.ROOT: + res = root; + break; + default: + throw new CoreException(newStatus(DebugCoreMessages.LaunchConfiguration_0, DebugPlugin.ERROR, null)); } if(res != null) { list.add(res); |