mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 22:52:11 +02:00
Added a missing condition.
This commit is contained in:
parent
f8cb160e20
commit
850511bfd3
2 changed files with 10 additions and 10 deletions
|
@ -89,16 +89,16 @@ public class CProjectSourceContainer extends CompositeSourceContainer {
|
|||
super.init(director);
|
||||
if (fProject == null && director != null) {
|
||||
fProject = SourceUtils.getLaunchConfigurationProject(director);
|
||||
if (fProject != null) {
|
||||
fRootURI = fProject.getLocationURI();
|
||||
if (fRootURI == null)
|
||||
return;
|
||||
try {
|
||||
fRootFile = EFS.getStore(fRootURI);
|
||||
} catch (CoreException e) {
|
||||
}
|
||||
fRoot = ResourcesPlugin.getWorkspace().getRoot();
|
||||
}
|
||||
if (fProject != null) {
|
||||
fRootURI = fProject.getLocationURI();
|
||||
if (fRootURI == null)
|
||||
return;
|
||||
try {
|
||||
fRootFile = EFS.getStore(fRootURI);
|
||||
} catch (CoreException e) {
|
||||
}
|
||||
fRoot = ResourcesPlugin.getWorkspace().getRoot();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ public class SourceFoldersRelativePathSourceContainer extends CompositeSourceCon
|
|||
@Override
|
||||
public void init(ISourceLookupDirector director) {
|
||||
super.init(director);
|
||||
if (director != null) {
|
||||
if (fProject == null && director != null) {
|
||||
fProject = SourceUtils.getLaunchConfigurationProject(director);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue