1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-07 17:56:01 +02:00

Applied patch to fix 197634.

This commit is contained in:
Ken Ryall 2007-08-03 04:14:33 +00:00
parent 27bfb855d6
commit e39c9dace5

View file

@ -49,6 +49,7 @@ public class AbsolutePathSourceContainer extends AbstractSourceContainer {
// The file is not already in the workspace so try to create an external translation unit for it. // The file is not already in the workspace so try to create an external translation unit for it.
String projectName = getDirector().getLaunchConfiguration().getAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME, ""); //$NON-NLS-1$ String projectName = getDirector().getLaunchConfiguration().getAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME, ""); //$NON-NLS-1$
if (projectName != "") {
ICProject project = CoreModel.getDefault().getCModel().getCProject(projectName); ICProject project = CoreModel.getDefault().getCModel().getCProject(projectName);
if (project != null) if (project != null)
{ {
@ -56,6 +57,7 @@ public class AbsolutePathSourceContainer extends AbstractSourceContainer {
String id = CoreModel.getRegistedContentTypeId(project.getProject(), path.lastSegment()); String id = CoreModel.getRegistedContentTypeId(project.getProject(), path.lastSegment());
return new ExternalTranslationUnit[] { new ExternalTranslationUnit(project, new Path(file.getCanonicalPath()), id) }; return new ExternalTranslationUnit[] { new ExternalTranslationUnit(project, new Path(file.getCanonicalPath()), id) };
} }
}
} catch (IOException e) { // ignore if getCanonicalPath throws } catch (IOException e) { // ignore if getCanonicalPath throws
} catch (CoreException e) { } catch (CoreException e) {
} }