mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Avoid logging of 'Resource xxx does not exist'
This commit is contained in:
parent
19007dbf93
commit
866014dbc8
1 changed files with 8 additions and 6 deletions
|
@ -144,8 +144,8 @@ public class TodoTaskUpdater implements ITodoTaskUpdater {
|
||||||
|
|
||||||
for (Iterator it = pathToTaskList.values().iterator(); it.hasNext();) {
|
for (Iterator it = pathToTaskList.values().iterator(); it.hasNext();) {
|
||||||
final TaskList tasklist = (TaskList) it.next();
|
final TaskList tasklist = (TaskList) it.next();
|
||||||
try {
|
|
||||||
final IFile file= tasklist.fFile;
|
final IFile file= tasklist.fFile;
|
||||||
|
try {
|
||||||
if (file.exists()) {
|
if (file.exists()) {
|
||||||
file.deleteMarkers(ICModelMarker.TASK_MARKER, false, IResource.DEPTH_INFINITE);
|
file.deleteMarkers(ICModelMarker.TASK_MARKER, false, IResource.DEPTH_INFINITE);
|
||||||
final List tasks= tasklist.fTasks;
|
final List tasks= tasklist.fTasks;
|
||||||
|
@ -157,9 +157,11 @@ public class TodoTaskUpdater implements ITodoTaskUpdater {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (CoreException e) {
|
} catch (CoreException e) {
|
||||||
|
if (file.exists()) {
|
||||||
status.add(e.getStatus());
|
status.add(e.getStatus());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -204,12 +206,12 @@ public class TodoTaskUpdater implements ITodoTaskUpdater {
|
||||||
Job job= new Job(Messages.TodoTaskUpdater_DeleteJob) {
|
Job job= new Job(Messages.TodoTaskUpdater_DeleteJob) {
|
||||||
protected IStatus run(IProgressMonitor monitor) {
|
protected IStatus run(IProgressMonitor monitor) {
|
||||||
try {
|
try {
|
||||||
if (resource.exists()) {
|
|
||||||
resource.deleteMarkers(ICModelMarker.TASK_MARKER, false, IResource.DEPTH_INFINITE);
|
resource.deleteMarkers(ICModelMarker.TASK_MARKER, false, IResource.DEPTH_INFINITE);
|
||||||
}
|
|
||||||
} catch (CoreException e) {
|
} catch (CoreException e) {
|
||||||
|
if (resource.exists()) {
|
||||||
return e.getStatus();
|
return e.getStatus();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return Status.OK_STATUS;
|
return Status.OK_STATUS;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue