Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Schorn2008-04-03 17:50:08 +0000
committerMarkus Schorn2008-04-03 17:50:08 +0000
commit433aa00c3478839d7fa4ca0f2b2bf049a1c9c0b2 (patch)
tree1688219976ae00619057a622ab195ceba597bd4f /core/org.eclipse.cdt.core
parent24213569982835981f227a128669bc7589b68125 (diff)
downloadorg.eclipse.cdt-433aa00c3478839d7fa4ca0f2b2bf049a1c9c0b2.tar.gz
org.eclipse.cdt-433aa00c3478839d7fa4ca0f2b2bf049a1c9c0b2.tar.xz
org.eclipse.cdt-433aa00c3478839d7fa4ca0f2b2bf049a1c9c0b2.zip
Check existence of resource before deleting markers.
Diffstat (limited to 'core/org.eclipse.cdt.core')
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/TodoTaskUpdater.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/TodoTaskUpdater.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/TodoTaskUpdater.java
index 0a903eff858..b29ed00ad51 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/TodoTaskUpdater.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/TodoTaskUpdater.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007 Google, Inc and others.
+ * Copyright (c) 2007, 2008 Google, Inc and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -141,6 +141,7 @@ public class TodoTaskUpdater implements ITodoTaskUpdater {
// run this in a job in order not to block the indexer (bug 210730).
if (!pathToTaskList.isEmpty()) {
Job job= new Job(Messages.TodoTaskUpdater_UpdateJob) {
+ @Override
protected IStatus run(IProgressMonitor monitor) {
MultiStatus status= new MultiStatus(CCorePlugin.PLUGIN_ID, 0,
Messages.TodoTaskUpdater_UpdateJob, null);
@@ -205,8 +206,12 @@ public class TodoTaskUpdater implements ITodoTaskUpdater {
// run this in a job in order not to block the indexer (bug 210730).
Job job= new Job(Messages.TodoTaskUpdater_DeleteJob) {
+ @Override
protected IStatus run(IProgressMonitor monitor) {
try {
+ if (resource == null || !resource.exists()) {
+ return Status.CANCEL_STATUS;
+ }
resource.deleteMarkers(ICModelMarker.TASK_MARKER, false, IResource.DEPTH_INFINITE);
} catch (CoreException e) {
if (resource.exists()) {

Back to the top