1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-08 18:26:01 +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 * @return IProject or null
*/ */
private IProject getProject() { private IProject getProject() {
ILaunchConfiguration config = getDirector().getLaunchConfiguration(); ISourceLookupDirector director = getDirector();
if (director != null)
{
ILaunchConfiguration config = director.getLaunchConfiguration();
if (config != null) { if (config != null) {
try { try {
String name = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME, ""); String name = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME, ""); //$NON-NLS-1$
if (name.length() > 0) if (name.length() > 0)
return ResourcesPlugin.getWorkspace().getRoot().getProject(name); return ResourcesPlugin.getWorkspace().getRoot().getProject(name);
} catch (CoreException e) { } catch (CoreException e) {
// Don't care carry on search using other heuristics // Don't care carry on search using other heuristics
} }
} }
}
return null; return null;
} }