mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Bug 329858: fixing exception with header files outside of workspace
This commit is contained in:
parent
24f662d5ba
commit
bbbe3dceac
1 changed files with 12 additions and 3 deletions
|
@ -132,9 +132,18 @@ public class CodanMarkerProblemReporter extends AbstractProblemReporter
|
|||
protected Collection<IMarker> findResourceMarkers(IResource resource,
|
||||
IChecker checker) throws CoreException {
|
||||
Collection<IMarker> res = new ArrayList<IMarker>();
|
||||
IMarker[] markers = resource.findMarkers(
|
||||
GENERIC_CODE_ANALYSIS_MARKER_TYPE, true,
|
||||
IResource.DEPTH_INFINITE);
|
||||
IMarker[] markers;
|
||||
if (resource.exists()) {
|
||||
markers = resource.findMarkers(GENERIC_CODE_ANALYSIS_MARKER_TYPE,
|
||||
true, IResource.DEPTH_INFINITE);
|
||||
} else {
|
||||
if (resource.getProject() == null)
|
||||
return res;
|
||||
// non resource markers attached to a project itself
|
||||
markers = resource.getProject().findMarkers(
|
||||
GENERIC_CODE_ANALYSIS_MARKER_TYPE, true,
|
||||
IResource.DEPTH_ZERO);
|
||||
}
|
||||
ICheckersRegistry reg = CodanRuntime.getInstance()
|
||||
.getCheckersRegistry();
|
||||
Collection<IProblem> problems = reg.getRefProblems(checker);
|
||||
|
|
Loading…
Add table
Reference in a new issue