Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspingel2009-06-01 06:08:23 -0400
committerspingel2009-06-01 06:08:23 -0400
commitd7e3ecfeae77bb4ca7d5a21b6fb4d4d1f38e0d97 (patch)
tree200f6a687e4718b84c73d57e4441491b98a1190a /org.eclipse.mylyn.tasks.core
parent8c8aae9f25bcce20941d80d88d0ea6ed0dbb1ff5 (diff)
downloadorg.eclipse.mylyn.tasks-d7e3ecfeae77bb4ca7d5a21b6fb4d4d1f38e0d97.tar.gz
org.eclipse.mylyn.tasks-d7e3ecfeae77bb4ca7d5a21b6fb4d4d1f38e0d97.tar.xz
org.eclipse.mylyn.tasks-d7e3ecfeae77bb4ca7d5a21b6fb4d4d1f38e0d97.zip
NEW - bug 278499: editor stuck in busy state when password prompt is canceled
https://bugs.eclipse.org/bugs/show_bug.cgi?id=278499
Diffstat (limited to 'org.eclipse.mylyn.tasks.core')
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SubmitTaskAttachmentJob.java12
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SubmitTaskJob.java4
2 files changed, 8 insertions, 8 deletions
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SubmitTaskAttachmentJob.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SubmitTaskAttachmentJob.java
index f9f08a021..1248fbef0 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SubmitTaskAttachmentJob.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SubmitTaskAttachmentJob.java
@@ -41,7 +41,7 @@ public class SubmitTaskAttachmentJob extends SubmitJob {
private final AbstractRepositoryConnector connector;
- private IStatus error;
+ private IStatus errorStatus;
private final AbstractTaskAttachmentSource source;
@@ -72,7 +72,7 @@ public class SubmitTaskAttachmentJob extends SubmitJob {
@Override
public IStatus getStatus() {
- return error;
+ return errorStatus;
}
@Override
@@ -84,7 +84,7 @@ public class SubmitTaskAttachmentJob extends SubmitJob {
public IStatus run(IProgressMonitor monitor) {
final AbstractTaskAttachmentHandler attachmentHandler = connector.getTaskAttachmentHandler();
if (attachmentHandler == null) {
- error = new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN,
+ errorStatus = new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN,
"The task repository does not support attachments."); //$NON-NLS-1$
return Status.OK_STATUS;
}
@@ -101,14 +101,14 @@ public class SubmitTaskAttachmentJob extends SubmitJob {
taskDataManager.putUpdatedTaskData(task, taskData, true);
fireTaskSynchronized(monitor);
} catch (CoreException e) {
- error = e.getStatus();
+ errorStatus = e.getStatus();
} catch (OperationCanceledException e) {
- return Status.CANCEL_STATUS;
+ errorStatus = Status.CANCEL_STATUS;
} finally {
monitor.done();
}
fireDone();
- return Status.OK_STATUS;
+ return (errorStatus == Status.CANCEL_STATUS) ? Status.CANCEL_STATUS : Status.OK_STATUS;
}
}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SubmitTaskJob.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SubmitTaskJob.java
index d41887104..1ae57cd61 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SubmitTaskJob.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SubmitTaskJob.java
@@ -95,7 +95,7 @@ public class SubmitTaskJob extends SubmitJob {
} catch (CoreException e) {
errorStatus = e.getStatus();
} catch (OperationCanceledException e) {
- return Status.CANCEL_STATUS;
+ errorStatus = Status.CANCEL_STATUS;
} catch (Exception e) {
StatusHandler.log(new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN,
"Unexpected error during task submission", e)); //$NON-NLS-1$
@@ -105,7 +105,7 @@ public class SubmitTaskJob extends SubmitJob {
monitor.done();
}
fireDone();
- return Status.OK_STATUS;
+ return (errorStatus == Status.CANCEL_STATUS) ? Status.CANCEL_STATUS : Status.OK_STATUS;
}
private ITask createTask(IProgressMonitor monitor, TaskData updatedTaskData) throws CoreException {

Back to the top