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