1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 22:52:11 +02:00
This commit is contained in:
Ken Ryall 2009-08-07 15:40:51 +00:00
parent daff450887
commit b1ce1b2244

View file

@ -88,14 +88,18 @@ public class AbsolutePathSourceContainer extends AbstractSourceContainer {
* @return IProject or null * @return IProject or null
*/ */
private IProject getProject() { private IProject getProject() {
ILaunchConfiguration config = getDirector().getLaunchConfiguration(); ISourceLookupDirector director = getDirector();
if (config != null) { if (director != null)
try { {
String name = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME, ""); ILaunchConfiguration config = director.getLaunchConfiguration();
if (name.length() > 0) if (config != null) {
return ResourcesPlugin.getWorkspace().getRoot().getProject(name); try {
} catch (CoreException e) { String name = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME, ""); //$NON-NLS-1$
// Don't care carry on search using other heuristics if (name.length() > 0)
return ResourcesPlugin.getWorkspace().getRoot().getProject(name);
} catch (CoreException e) {
// Don't care carry on search using other heuristics
}
} }
} }
return null; return null;